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

fix Indexer's iter_mut #38

Merged
merged 1 commit into from
Oct 23, 2023
Merged

fix Indexer's iter_mut #38

merged 1 commit into from
Oct 23, 2023

Conversation

flyq
Copy link
Contributor

@flyq flyq commented Oct 19, 2023

The type Item returned by iter_mut should be (&usize, &mut T) instead of (&mut usize, &mut T), because the elements in Indexer's values need to be sorted according to key, so that binary search is effective when insert_or_update, so we cannot allow the key to be changed.

@huitseeker huitseeker requested a review from porcuquine October 21, 2023 14:24
Copy link
Contributor

@huitseeker huitseeker left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

@huitseeker huitseeker added this pull request to the merge queue Oct 23, 2023
Merged via the queue into lurk-lang:main with commit 542bf03 Oct 23, 2023
4 checks passed
@huitseeker huitseeker mentioned this pull request Oct 26, 2023
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.

3 participants