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

std::collections provides a complexity for BTreeMap::predecessor but the function is not available #81548

Closed
jbreitbart opened this issue Jan 30, 2021 · 1 comment · Fixed by #81550
Labels
C-bug Category: This is a bug.

Comments

@jbreitbart
Copy link

I was just through https://doc.rust-lang.org/std/collections/#maps and noticed that it gives a complexity for the predecessor operation for BTreeMap, but that operation seems not to be available. I checked the map itself and its iterator. Is this a documentation bug or am I missing something?

@jbreitbart jbreitbart added the C-bug Category: This is a bug. label Jan 30, 2021
@KamilaBorowska
Copy link
Contributor

KamilaBorowska commented Jan 30, 2021

This looks a lot like a cursor method, but cursor API for BTreeMap is long gone if it even existed at any point. I think we could write range instead of predecessor here.

m-ou-se added a commit to m-ou-se/rust that referenced this issue Jan 30, 2021
…, r=jonas-schievink

Replace predecessor with range in collections documentation

Fixes rust-lang#81548.
@bors bors closed this as completed in 56c2736 Jan 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants