-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove dead code: Hash128
#8203
Conversation
Web viewer built successfully. If applicable, you should also test it:
Note: This comment is updated whenever you push a commit. |
@@ -91,7 +86,7 @@ impl Hash128 { | |||
impl std::hash::Hash for Hash128 { | |||
#[inline] | |||
fn hash<H: std::hash::Hasher>(&self, state: &mut H) { | |||
state.write_u64(self.0[0]); | |||
state.write_u128((self.first64() as u128) << 64 | self.second64() as u128); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, you're only allowed to use write_u64
with nohash_hasher
, anything else will result in a runtime error in debug builds.
If the hash128 is good, than any 64 bits of it should also be a good hash
If |
Let's remove it then. |
Hash128
isn't actually used anywhere, I just randomly stumbled upon it while refactoring some hashing related stuff.Still a good idea to fix it (or remove it entirely?) before someone's get bitten.