From d223dd1e57cc412aa2eff28e6604f86b9f013083 Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Fri, 21 Feb 2014 21:33:23 -0800 Subject: std: rewrite Hash to make it more generic 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. --- src/libextra/stats.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/libextra') diff --git a/src/libextra/stats.rs b/src/libextra/stats.rs index 181ea6766c5..6738275c4c1 100644 --- a/src/libextra/stats.rs +++ b/src/libextra/stats.rs @@ -11,6 +11,7 @@ #[allow(missing_doc)]; use std::cmp; +use std::hash_old::Hash; use std::hashmap; use std::io; use std::mem; -- cgit 1.4.1-3-g733a5