Skip to content

Please add find_equiv to TreeMap #14549

Closed
@SimonSapin

Description

For accessing a key in a JSON object (which is represented in memory as TreeMap<String, Json>), I find myself writing code like map.find(&key.to_string()) that really should be just map.find(key).

HashMap has a find_equiv method to do this. It’d be nice to have it in TreeMap. (Other convenience method may apply to.)

However, you may want to block this on a decision from #12135.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions