diff --git a/src/ascii.rs b/src/ascii.rs index 8940733..b5e9e44 100644 --- a/src/ascii.rs +++ b/src/ascii.rs @@ -127,6 +127,7 @@ impl> Hash for Ascii { for byte in self.as_ref().bytes().map(|b| b.to_ascii_lowercase()) { hasher.write_u8(byte); } + hasher.write_u8(0xff); } } diff --git a/src/unicode/mod.rs b/src/unicode/mod.rs index 8b88733..3a03503 100644 --- a/src/unicode/mod.rs +++ b/src/unicode/mod.rs @@ -59,8 +59,9 @@ impl> Hash for Unicode { let mut buf = [0; 4]; for c in self.0.as_ref().chars().flat_map(|c| lookup(c)) { let len = char_to_utf8(c, &mut buf); - hasher.write(&buf[..len]) + hasher.write(&buf[..len]); } + hasher.write_u8(0xff); } }