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 PatriciaTree::iter_prefix_mut() bug #44

Merged
merged 1 commit into from
Jan 13, 2025
Merged

Fix PatriciaTree::iter_prefix_mut() bug #44

merged 1 commit into from
Jan 13, 2025

Conversation

sile
Copy link
Owner

@sile sile commented Jan 13, 2025

This PR fixes the bug mentioned in #43 (comment).

Copilot Summary

This pull request includes changes to the src/map.rs file, focusing on adding a new field to the IterMut struct and modifying the Iterator implementation for IterMut. Additionally, a previously ignored test has been re-enabled.

Enhancements to IterMut struct and iterator implementation:

  • src/map.rs: Added a new field key_offset to the IterMut struct to store the length of the key and initialized it in the new method.
  • src/map.rs: Updated the next method in the Iterator implementation for IterMut to use key_offset when truncating key_bytes.

Testing improvements:

  • src/map.rs: Re-enabled the issue42_iter_prefix_mut test by removing the #[ignore] attribute.

@sile sile merged commit 3aa63db into master Jan 13, 2025
9 checks passed
@sile sile deleted the fix-iter-mut-bug branch January 13, 2025 11:37
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.

1 participant