Skip to content

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

Closed
@jbreitbart

Description

@jbreitbart

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?

Activity

LunaBorowska

LunaBorowska commented on Jan 30, 2021

@LunaBorowska
Contributor

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.

added a commit that references this issue on Jan 30, 2021
56c2736
added a commit that references this issue on Jan 30, 2021

Rollup merge of rust-lang#81550 - xfix:replace-mention-of-predecessor…

0330456
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @jbreitbart@LunaBorowska

      Issue actions

        std::collections provides a complexity for BTreeMap::predecessor but the function is not available · Issue #81548 · rust-lang/rust