diff --git a/library/core/src/hash/mod.rs b/library/core/src/hash/mod.rs index 84bbf985e8be4..35b5eed48524f 100644 --- a/library/core/src/hash/mod.rs +++ b/library/core/src/hash/mod.rs @@ -549,8 +549,8 @@ pub trait Hasher { #[inline] #[unstable(feature = "hasher_prefixfree_extras", issue = "96762")] fn write_str(&mut self, s: &str) { + self.write_length_prefix(s.len()); self.write(s.as_bytes()); - self.write_u8(0xff); } }