-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-collectionsArea: `std::collections`Area: `std::collections`C-feature-acceptedCategory: A feature request that has been accepted pending implementation.Category: A feature request that has been accepted pending implementation.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
In Python I've often found the set.pop()
method useful which would remove and return a single arbitrary element of the set (or raise if empty). In Rust this should return an Option<T>
, of course.
I haven't found such a method on HashSet
, have I just not looked hard enough?
ethanpailes, MatthieuBizien, DavidBSounthiraraj, jonhoo, knappador and 29 more
Metadata
Metadata
Assignees
Labels
A-collectionsArea: `std::collections`Area: `std::collections`C-feature-acceptedCategory: A feature request that has been accepted pending implementation.Category: A feature request that has been accepted pending implementation.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.