]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #60894 - cuviper:hash_set_entry, r=cramertj,Centril
authorMazdak Farrokhzad <twingoow@gmail.com>
Fri, 17 May 2019 00:54:18 +0000 (02:54 +0200)
committerGitHub <noreply@github.com>
Fri, 17 May 2019 00:54:18 +0000 (02:54 +0200)
commita80a1d0e0d0d9cd47fe6070a7450fa81ccd0856d
tree9e1badb00f6b3b89b907801b66d6343e3ef806eb
parent70b38d13a530a625725aa9a8cb7c959fa52e3747
parent9161a4dbefd613fd86fab4bfea88ad93c55fb4da
Rollup merge of #60894 - cuviper:hash_set_entry, r=cramertj,Centril

Add entry-like methods to HashSet

* `HashSet::get_or_insert`
* `HashSet::get_or_insert_with`

These provide a simplification of the `Entry` API for `HashSet`, with
names chosen to match the similar methods on `Option`.