about summary refs log tree commit diff
path: root/src/libstd/hash
AgeCommit message (Collapse)AuthorLines
2014-05-07core: Inherit the result moduleAlex Crichton-1/+12
The unwrap()/unwrap_err() methods are temporarily removed, and will be added back in the next commit.
2014-05-07core: Inherit possible string functionalityAlex Crichton-1/+1
This moves as much allocation as possible from teh std::str module into core::str. This includes essentially all non-allocating functionality, mostly iterators and slicing and such. This primarily splits the Str trait into only having the as_slice() method, adding a new StrAllocating trait to std::str which contains the relevant new allocation methods. This is a breaking change if any of the methods of "trait Str" were overriden. The old functionality can be restored by implementing both the Str and StrAllocating traits. [breaking-change]
2014-05-07core: Inherit the intrinsics moduleAlex Crichton-0/+8
2014-05-06librustc: Remove `~EXPR`, `~TYPE`, and `~PAT` from the language, exceptPatrick Walton-1/+2
for `~str`/`~[]`. Note that `~self` still remains, since I forgot to add support for `Box<self>` before the snapshot. How to update your code: * Instead of `~EXPR`, you should write `box EXPR`. * Instead of `~TYPE`, you should write `Box<Type>`. * Instead of `~PATTERN`, you should write `box PATTERN`. [breaking-change]
2014-05-02Replace most ~exprs with 'box'. #11779Brian Anderson-1/+1
2014-05-01remove leftover obsolete string literalsDaniel Micay-1/+1
2014-04-24Update libuvAlex Crichton-1/+1
This update brings a few months of changes, but primarily a fix for the following situation. When creating a handle to stdin, libuv used to set the stdin handle to nonblocking mode. This would end up affect this stdin handle across all processes that shared it, which mean that stdin become nonblocking for everyone using the same stdin. On linux, this also affected *stdout* because stdin/stdout roughly point at the same thing. This problem became apparent when running the test suite manually on a local computer. The stdtest suite (running with libgreen) would set stdout to nonblocking mode (as described above), and then the next test suite would always fail for a printing failure (because stdout was returning EAGAIN). This has been fixed upstream, joyent/libuv@342e8c, and this update pulls in this fix. This also brings us in line with a recently upstreamed libuv patch. Closes #13336 Closes #13355
2014-04-18Replace all ~"" with "".to_owned()Richo Healey-5/+9
2014-04-18std: Make ~[T] no longer a growable vectorAlex Crichton-8/+3
This removes all resizability support for ~[T] vectors in preparation of DST. The only growable vector remaining is Vec<T>. In summary, the following methods from ~[T] and various functions were removed. Each method/function has an equivalent on the Vec type in std::vec unless otherwise stated. * slice::OwnedCloneableVector * slice::OwnedEqVector * slice::append * slice::append_one * slice::build (no replacement) * slice::bytes::push_bytes * slice::from_elem * slice::from_fn * slice::with_capacity * ~[T].capacity() * ~[T].clear() * ~[T].dedup() * ~[T].extend() * ~[T].grow() * ~[T].grow_fn() * ~[T].grow_set() * ~[T].insert() * ~[T].pop() * ~[T].push() * ~[T].push_all() * ~[T].push_all_move() * ~[T].remove() * ~[T].reserve() * ~[T].reserve_additional() * ~[T].reserve_exect() * ~[T].retain() * ~[T].set_len() * ~[T].shift() * ~[T].shrink_to_fit() * ~[T].swap_remove() * ~[T].truncate() * ~[T].unshift() * ~str.clear() * ~str.set_len() * ~str.truncate() Note that no other API changes were made. Existing apis that took or returned ~[T] continue to do so. [breaking-change]
2014-04-15optimized SipHash implementationSean McArthur-42/+143
work started from @gereeter's PR: https://github.com/mozilla/rust/pull/13114 but adjusted bits
2014-04-11libtest: rename `BenchHarness` to `Bencher`Liigo Zhuang-5/+5
Closes #12640
2014-04-11Fix tests. Add Vec<u8> conversion to StrBuf.Huon Wilson-1/+1
2014-04-10libstd: Implement `StrBuf`, a new string buffer type like `Vec`, andPatrick Walton-4/+5
port all code over to use it.
2014-04-02Fix fallout of requiring uint indicesAlex Crichton-1/+1
2014-03-31std: Switch field privacy as necessaryAlex Crichton-11/+11
2014-03-28Convert most code to new inner attribute syntax.Brian Anderson-1/+1
Closes #2569
2014-03-22rustc: Remove all usage of manual deref()Alex Crichton-2/+1
Favor using '*' instead
2014-03-20rename std::vec_ng -> std::vecDaniel Micay-1/+1
Closes #12771
2014-03-20rename std::vec -> std::sliceDaniel Micay-4/+4
Closes #12702
2014-03-13Remove Rc's borrow method to avoid conflicts with RefCell's borrow in ↵Eduard Burtescu-1/+2
Rc<RefCell<T>>.
2014-03-04Rename all variables that have uppercase characters in their names to use ↵Palmer Cox-1/+1
only lowercase characters
2014-03-01libstd: Add some functionality to `Vec<T>`Patrick Walton-0/+8
2014-02-27std: cut down on the memory usage of `SipHasher`Erick Tryzelaar-6/+6
2014-02-27collections: allow `HashMap` to work with generic hashersErick Tryzelaar-9/+42
2014-02-22std: fix the hash doctestErick Tryzelaar-2/+2
2014-02-21std: rewrite Hash to make it more genericErick Tryzelaar-0/+888
This patch merges IterBytes and Hash traits, which clears up the confusion of using `#[deriving(IterBytes)]` to support hashing. Instead, it now is much easier to use the new `#[deriving(Hash)]` for making a type hashable with a stream hash. Furthermore, it supports custom non-stream-based hashers, such as if a value's hash was cached in a database. This does not yet replace the old IterBytes-hash with this new version.