Skip to content

Signature of OccupiedEntry::insert #68

Closed
@dtolnay

Description

@dtolnay

The first three all take &mut self while indexmap takes self by value. Is this intentional? I found this makes it complicated for a library to multiplex across different choices of underlying map type: serde-rs/json#418.

My workaround is:

mem::replace(occupied_entry.get_mut(), value)

Metadata

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