From 9fa4424b71c1e8a0616e82a34f406a109dffe685 Mon Sep 17 00:00:00 2001 From: nham Date: Sun, 27 Jul 2014 12:37:32 -0400 Subject: [PATCH] Hash the length of the RingBuf before hashing elements --- src/libcollections/ringbuf.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcollections/ringbuf.rs b/src/libcollections/ringbuf.rs index 6b1670fbe855e..44b546f665688 100644 --- a/src/libcollections/ringbuf.rs +++ b/src/libcollections/ringbuf.rs @@ -460,6 +460,7 @@ impl PartialOrd for RingBuf { impl> Hash for RingBuf { fn hash(&self, state: &mut S) { + self.len().hash(state); for elt in self.iter() { elt.hash(state); }