Skip to content

FAQ for borrow check error with find/insert into containers #6806

Closed
@pcwalton

Description

@pcwalton

There's a common borrow check error that results from trying to insert into a container (usually a hash map) in the None branch after a find call. We should document the solution to this—namely, find_or_insert and friends.

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions