X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=library%2Falloc%2Fsrc%2Fcollections%2Flinked_list.rs;h=67dc4f30f3179c9d6681f900443cf224f2ac8f5a;hb=87fd70c107b23fe08336a12a20a0f5e85561d499;hp=736b38370ab87929a5b9b60efec2bf5cd2de4142;hpb=bb6265a73912db95a71b024820ddb93e34382115;p=rust.git diff --git a/library/alloc/src/collections/linked_list.rs b/library/alloc/src/collections/linked_list.rs index 736b38370ab..67dc4f30f31 100644 --- a/library/alloc/src/collections/linked_list.rs +++ b/library/alloc/src/collections/linked_list.rs @@ -1944,7 +1944,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { #[stable(feature = "rust1", since = "1.0.0")] impl Hash for LinkedList { fn hash(&self, state: &mut H) { - self.len().hash(state); + state.write_length_prefix(self.len()); for elt in self { elt.hash(state); }