<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/libstd/collections/hash, branch 1.24.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.24.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.24.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2017-12-13T13:53:39+00:00</updated>
<entry>
<title>Remove Sync and Send implementation for RawTable</title>
<updated>2017-12-13T13:53:39+00:00</updated>
<author>
<name>Konrad Borowski</name>
<email>konrad@borowski.pw</email>
</author>
<published>2017-12-13T13:53:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=524c3ff472a54a42c75257b803abc9dc34c7302c'/>
<id>urn:sha1:524c3ff472a54a42c75257b803abc9dc34c7302c</id>
<content type='text'>
The implementation was introduced when changing hash storage from
Unique to *mut, but it was changed back to Unique.</content>
</entry>
<entry>
<title>Use Try syntax for Option in place of macros or match</title>
<updated>2017-12-09T22:18:33+00:00</updated>
<author>
<name>Matt Brubeck</name>
<email>mbrubeck@limpet.net</email>
</author>
<published>2017-12-09T01:32:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3024c1434a667425d30e4b0785857381323712aa'/>
<id>urn:sha1:3024c1434a667425d30e4b0785857381323712aa</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Improvided map_entry_replace examples</title>
<updated>2017-11-11T18:45:32+00:00</updated>
<author>
<name>Jeroen Bollen</name>
<email>contact@jeroenbollen.eu</email>
</author>
<published>2017-11-11T15:21:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0fb37fc67d0d0278022f355bed2aac0c2b772835'/>
<id>urn:sha1:0fb37fc67d0d0278022f355bed2aac0c2b772835</id>
<content type='text'>
The current examples should be more realistic.
</content>
</entry>
<entry>
<title>Changed tabs back into spaces to fix formatting.</title>
<updated>2017-11-11T15:23:16+00:00</updated>
<author>
<name>Jeroen Bollen</name>
<email>contact@jeroenbollen.eu</email>
</author>
<published>2017-10-12T09:18:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0f8ee171b2d78acaee2fb3c7774af531510d945b'/>
<id>urn:sha1:0f8ee171b2d78acaee2fb3c7774af531510d945b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Addressed issues raised in #44286.</title>
<updated>2017-11-11T15:23:16+00:00</updated>
<author>
<name>Jeroen Bollen</name>
<email>contact@jeroenbollen.eu</email>
</author>
<published>2017-10-09T19:06:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0df7f00a0430df0d9c14e4c51919062f44aadaad'/>
<id>urn:sha1:0df7f00a0430df0d9c14e4c51919062f44aadaad</id>
<content type='text'>
This commit renames the `replace` function to `replace_entry`, and
creates a seperate `replace_key` function for `OccupiedEntry`. The
original `replace` function did not solve the use-case where the
key needed to be replaced, but not the value. Documentation and
naming has also been updated to better reflect what the original
replace function does.
</content>
</entry>
<entry>
<title>std: Remove `rand` crate and module</title>
<updated>2017-11-09T04:41:17+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2017-11-01T19:32:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6bc8f164b09b9994e6a2d4c4ca60d7d36c09d3fe'/>
<id>urn:sha1:6bc8f164b09b9994e6a2d4c4ca60d7d36c09d3fe</id>
<content type='text'>
This commit removes the `rand` crate from the standard library facade as
well as the `__rand` module in the standard library. Neither of these
were used in any meaningful way in the standard library itself. The only
need for randomness in libstd is to initialize the thread-local keys of
a `HashMap`, and that unconditionally used `OsRng` defined in the
standard library anyway.

The cruft of the `rand` crate and the extra `rand` support in the
standard library makes libstd slightly more difficult to port to new
platforms, namely WebAssembly which doesn't have any randomness at all
(without interfacing with JS). The purpose of this commit is to clarify
and streamline randomness in libstd, focusing on how it's only required
in one location, hashmap seeds.

Note that the `rand` crate out of tree has almost always been a drop-in
replacement for the `rand` crate in-tree, so any usage (accidental or
purposeful) of the crate in-tree should switch to the `rand` crate on
crates.io. This then also has the further benefit of avoiding
duplication (mostly) between the two crates!
</content>
</entry>
<entry>
<title>[test] Add some `#[inline]` to `HashMap`</title>
<updated>2017-10-20T18:49:36+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2017-10-20T18:40:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d01427f53e81a24e1c49d1672f37d4809c04a004'/>
<id>urn:sha1:d01427f53e81a24e1c49d1672f37d4809c04a004</id>
<content type='text'>
</content>
</entry>
<entry>
<title>std: Set probe length tag on cloned hashmaps</title>
<updated>2017-10-14T14:21:52+00:00</updated>
<author>
<name>Manish Goregaokar</name>
<email>manishsmail@gmail.com</email>
</author>
<published>2017-10-13T17:19:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e8e7715bebdd401ebacfabb66928d0f7e4733120'/>
<id>urn:sha1:e8e7715bebdd401ebacfabb66928d0f7e4733120</id>
<content type='text'>
This isn't strictly necessary for hashmap cloning to work. The tag is
used to hint for an upcoming resize, so it's good to copy this
information over.

(We can do cleverer things like actually resizing the hashmap when we
see the tag, or even cleaning up the entry order, but this requires
more thought and might not be worth it)
</content>
</entry>
<entry>
<title>std: Get rid of hash_offet in RawTable</title>
<updated>2017-10-14T14:21:50+00:00</updated>
<author>
<name>Manish Goregaokar</name>
<email>manishsmail@gmail.com</email>
</author>
<published>2017-10-13T17:09:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=bb9e850246092d3931080ddbac551a0857b28364'/>
<id>urn:sha1:bb9e850246092d3931080ddbac551a0857b28364</id>
<content type='text'>
This offset is always zero, and we don't consistently take it into
account. This is okay, because it's zero, but if it ever changes we're
going to have bugs (e.g. in the `dealloc` call, where we don't take it
into account).

It's better to remove this for now; if we ever have a need for a
nonzero offset we can add it back, and handle it properly when we do so.
</content>
</entry>
<entry>
<title>Auto merge of #44734 - mchlrhw:wip/hashmap-entry-and-then, r=BurntSushi</title>
<updated>2017-10-06T12:51:11+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2017-10-06T12:51:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a8feaee5b6b54c03f49481fe04a9ad9e8f659f7c'/>
<id>urn:sha1:a8feaee5b6b54c03f49481fe04a9ad9e8f659f7c</id>
<content type='text'>
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.
</content>
</entry>
</feed>
