Skip to content

BTreeMap documentation improvement #39661

Closed
@Henning-K

Description

@Henning-K

On the page https://doc.rust-lang.org/std/collections/index.html there is a comparison of the collection types in the standard library and it says under "Use a BTreeMap when:" "You want a sorted map.".

It was not immediately clear to me that the map's Key/Value pairs are in fact sorted by its keys. This was only fully clarified by asking the helpful folks over on IRC.

Steve Klabnik then encouraged me to open an issue here asking for a change in the docs clarifying the point made above.

This point in the list/comparison should probably say something more like
"You want a map sorted by its keys."
to avoid any unnecessary ambiguity.

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions