diff options
| author | bors <bors@rust-lang.org> | 2017-10-06 12:51:11 +0000 | 
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-10-06 12:51:11 +0000 | 
| commit | a8feaee5b6b54c03f49481fe04a9ad9e8f659f7c (patch) | |
| tree | 4918f2dbd5a71e6157e0e50c1fd71278e5161225 /src/test/run-pass/rfc-2005-default-binding-mode/tuple.rs | |
| parent | 3ed8b698421291f5057059da885cd670d76a47e9 (diff) | |
| parent | 9e36111fc60ff448bb8c2977dc51ccf0d3e3a3e9 (diff) | |
| download | rust-a8feaee5b6b54c03f49481fe04a9ad9e8f659f7c.tar.gz rust-a8feaee5b6b54c03f49481fe04a9ad9e8f659f7c.zip | |
Auto merge of #44734 - mchlrhw:wip/hashmap-entry-and-then, r=BurntSushi
Implement `and_modify` on `Entry` ## Motivation `Entry`s are useful for allowing access to existing values in a map while also allowing default values to be inserted for absent keys. The existing API is similar to that of `Option`, where `or` and `or_with` can be used if the option variant is `None`. The `Entry` API is, however, missing an equivalent of `Option`'s `and_then` method. If it were present it would be possible to modify an existing entry before calling `or_insert` without resorting to matching on the entry variant. Tracking issue: https://github.com/rust-lang/rust/issues/44733.
Diffstat (limited to 'src/test/run-pass/rfc-2005-default-binding-mode/tuple.rs')
0 files changed, 0 insertions, 0 deletions
