Skip to content

option: rename unwrap to get or remove get_ref in favour of as_ref().unwrap() #9784

Closed
@thestinger

Description

@thestinger

There are already nearly identical methods named get_ref() and get_mut_ref() and std::hashmap names the equivalent method get. This method doesn't always move, it's just a normal by-value method, so it should follow the same convention as other get-or-fail methods. If it used the shorter naming, replacing get_mut_ref() with as_mut().get() would only add a character.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions