<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/libstd/collections/hash/mod.rs, branch 1.34.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.34.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.34.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2018-12-26T04:08:33+00:00</updated>
<entry>
<title>Remove licenses</title>
<updated>2018-12-26T04:08:33+00:00</updated>
<author>
<name>Mark Rousskov</name>
<email>mark.simulacrum@gmail.com</email>
</author>
<published>2018-12-25T15:56:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2a663555ddf36f6b041445894a8c175cd1bc718c'/>
<id>urn:sha1:2a663555ddf36f6b041445894a8c175cd1bc718c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>std: Clean out deprecated APIs</title>
<updated>2016-03-12T20:31:13+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2016-03-07T23:42:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b53764c73bd722ea22142bace6249d5950066253'/>
<id>urn:sha1:b53764c73bd722ea22142bace6249d5950066253</id>
<content type='text'>
Removes all unstable and deprecated APIs prior to the 1.8 release. All APIs that
are deprecated in the 1.8 release are sticking around for the rest of this
cycle.

Some notable changes are:

* The `dynamic_lib` module was moved into `rustc_back` as the compiler still
  relies on a few bits and pieces.
* The `DebugTuple` formatter now special-cases an empty struct name with only
  one field to append a trailing comma.
</content>
</entry>
<entry>
<title>implement RFC 1194</title>
<updated>2015-08-28T16:41:54+00:00</updated>
<author>
<name>Andrew Paseltiner</name>
<email>apaseltiner@gmail.com</email>
</author>
<published>2015-08-27T15:10:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f9b63d39730740e002cc31a38a7a8a3a18d3f46d'/>
<id>urn:sha1:f9b63d39730740e002cc31a38a7a8a3a18d3f46d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Register new snapshots</title>
<updated>2015-02-21T06:17:17+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2015-02-20T02:35:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6686f7aa471f162697d08a78ad4d04d3c0e9612c'/>
<id>urn:sha1:6686f7aa471f162697d08a78ad4d04d3c0e9612c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>std: Stabilize the `hash` module</title>
<updated>2015-02-18T16:26:20+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2015-02-18T04:48:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f83e23ad7c464c242c2d7ace7212d323980b2bca'/>
<id>urn:sha1:f83e23ad7c464c242c2d7ace7212d323980b2bca</id>
<content type='text'>
This commit is an implementation of [RFC 823][rfc] which is another pass over
the `std::hash` module for stabilization. The contents of the module were not
entirely marked stable, but some portions which remained quite similar to the
previous incarnation are now marked `#[stable]`. Specifically:

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0823-hash-simplification.md

* `std::hash` is now stable (the name)
* `Hash` is now stable
* `Hash::hash` is now stable
* `Hasher` is now stable
* `SipHasher` is now stable
* `SipHasher::new` and `new_with_keys` are now stable
* `Hasher for SipHasher` is now stable
* Many `Hash` implementations are now stable

All other portions of the `hash` module remain `#[unstable]` as they are less
commonly used and were recently redesigned.

This commit is a breaking change due to the modifications to the `std::hash` API
and more details can be found on the [RFC][rfc].

Closes #22467
[breaking-change]
</content>
</entry>
<entry>
<title>std: Stabilize the std::hash module</title>
<updated>2015-01-07T20:18:08+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2014-12-09T20:37:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=511f0b8a3de5a166fc96aba5170782c9abf92101'/>
<id>urn:sha1:511f0b8a3de5a166fc96aba5170782c9abf92101</id>
<content type='text'>
This commit aims to prepare the `std::hash` module for alpha by formalizing its
current interface whileholding off on adding `#[stable]` to the new APIs.  The
current usage with the `HashMap` and `HashSet` types is also reconciled by
separating out composable parts of the design. The primary goal of this slight
redesign is to separate the concepts of a hasher's state from a hashing
algorithm itself.

The primary change of this commit is to separate the `Hasher` trait into a
`Hasher` and a `HashState` trait. Conceptually the old `Hasher` trait was
actually just a factory for various states, but hashing had very little control
over how these states were used. Additionally the old `Hasher` trait was
actually fairly unrelated to hashing.

This commit redesigns the existing `Hasher` trait to match what the notion of a
`Hasher` normally implies with the following definition:

    trait Hasher {
        type Output;
        fn reset(&amp;mut self);
        fn finish(&amp;self) -&gt; Output;
    }

This `Hasher` trait emphasizes that hashing algorithms may produce outputs other
than a `u64`, so the output type is made generic. Other than that, however, very
little is assumed about a particular hasher. It is left up to implementors to
provide specific methods or trait implementations to feed data into a hasher.

The corresponding `Hash` trait becomes:

    trait Hash&lt;H: Hasher&gt; {
        fn hash(&amp;self, &amp;mut H);
    }

The old default of `SipState` was removed from this trait as it's not something
that we're willing to stabilize until the end of time, but the type parameter is
always required to implement `Hasher`. Note that the type parameter `H` remains
on the trait to enable multidispatch for specialization of hashing for
particular hashers.

Note that `Writer` is not mentioned in either of `Hash` or `Hasher`, it is
simply used as part `derive` and the implementations for all primitive types.

With these definitions, the old `Hasher` trait is realized as a new `HashState`
trait in the `collections::hash_state` module as an unstable addition for
now. The current definition looks like:

    trait HashState {
        type Hasher: Hasher;
        fn hasher(&amp;self) -&gt; Hasher;
    }

The purpose of this trait is to emphasize that the one piece of functionality
for implementors is that new instances of `Hasher` can be created.  This
conceptually represents the two keys from which more instances of a
`SipHasher` can be created, and a `HashState` is what's stored in a
`HashMap`, not a `Hasher`.

Implementors of custom hash algorithms should implement the `Hasher` trait, and
only hash algorithms intended for use in hash maps need to implement or worry
about the `HashState` trait.

The entire module and `HashState` infrastructure remains `#[unstable]` due to it
being recently redesigned, but some other stability decision made for the
`std::hash` module are:

* The `Writer` trait remains `#[experimental]` as it's intended to be replaced
  with an `io::Writer` (more details soon).
* The top-level `hash` function is `#[unstable]` as it is intended to be generic
  over the hashing algorithm instead of hardwired to `SipHasher`
* The inner `sip` module is now private as its one export, `SipHasher` is
  reexported in the `hash` module.

And finally, a few changes were made to the default parameters on `HashMap`.

* The `RandomSipHasher` default type parameter was renamed to `RandomState`.
  This renaming emphasizes that it is not a hasher, but rather just state to
  generate hashers. It also moves away from the name "sip" as it may not always
  be implemented as `SipHasher`. This type lives in the
  `std::collections::hash_map` module as `#[unstable]`

* The associated `Hasher` type of `RandomState` is creatively called...
  `Hasher`! This concrete structure lives next to `RandomState` as an
  implemenation of the "default hashing algorithm" used for a `HashMap`. Under
  the hood this is currently implemented as `SipHasher`, but it draws an
  explicit interface for now and allows us to modify the implementation over
  time if necessary.

There are many breaking changes outlined above, and as a result this commit is
a:

[breaking-change]
</content>
</entry>
<entry>
<title>refactor libcollections as part of collection reform</title>
<updated>2014-11-02T23:58:11+00:00</updated>
<author>
<name>Alexis Beingessner</name>
<email>a.beingessner@gmail.com</email>
</author>
<published>2014-10-31T01:25:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=112c8a966fbdb52ff2a535dc8e6df3a8b3cb8fb2'/>
<id>urn:sha1:112c8a966fbdb52ff2a535dc8e6df3a8b3cb8fb2</id>
<content type='text'>
* Moves multi-collection files into their own directory, and splits them into seperate files
* Changes exports so that each collection has its own module
* Adds underscores to public modules and filenames to match standard naming conventions

(that is, treemap::{TreeMap, TreeSet} =&gt; tree_map::TreeMap, tree_set::TreeSet)

* Renames PriorityQueue to BinaryHeap
* Renames SmallIntMap to VecMap
* Miscellanious fallout fixes

[breaking-change]
</content>
</entry>
</feed>
