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

insert_overwrite should return results from cut #51

Closed
stefnotch opened this issue Dec 26, 2023 · 1 comment
Closed

insert_overwrite should return results from cut #51

stefnotch opened this issue Dec 26, 2023 · 1 comment

Comments

@stefnotch
Copy link

I would have expected insert_overwrite to return an iterator over the old items, since most other insert methods return the old values or something.

Judging from the source code, it'd be a quick tweak.
https://docs.rs/discrete_range_map/latest/src/discrete_range_map/discrete_range_map.rs.html#1232-1240

@ripytide
Copy link
Owner

Good point, I didn't need this in my use-case, but that would match up with the BTreeMap's insert. The other insert_* methods are are bit trickier in this regard so might require a bit more work.

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

No branches or pull requests

2 participants