Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move counters inside condenser. #1548

Merged
merged 4 commits into from
Jul 10, 2024
Merged

Move counters inside condenser. #1548

merged 4 commits into from
Jul 10, 2024

Conversation

chriseth
Copy link
Member

@chriseth chriseth commented Jul 8, 2024

No description provided.

}
for (kind, id) in symbols {
let counter = counters.symbol_counters.get_mut(&kind).unwrap();
*counter = std::cmp::max(*counter, id + 1);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry, this is actually wrong. Will fix.

})
.max()
.unwrap_or_default();
let counters = Counters::with_existing(symbols.values().map(|(sym, _)| sym), None, None);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use .keys() instead of .values().map(|(sym, _)| sym)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, not. The values are pairs. It would have worked to replace items().map(..., but not values().map(...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sorry. I may be still sleepy.

@lvella lvella added this pull request to the merge queue Jul 10, 2024
Merged via the queue into main with commit 9767688 Jul 10, 2024
6 checks passed
@lvella lvella deleted the move_conter_into_condenser branch July 10, 2024 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants