1
Fork 0

Remove some unnecessary hash truncations

This commit is contained in:
Ben Kimock 2023-04-15 13:53:50 -04:00
parent fd57c6b407
commit 84facac97a
4 changed files with 9 additions and 33 deletions

View file

@ -2159,9 +2159,7 @@ where
};
Hash::hash(&TAG_VALID_SPAN, hasher);
// We truncate the stable ID hash and line and column numbers. The chances
// of causing a collision this way should be minimal.
Hash::hash(&(file.name_hash as u64), hasher);
Hash::hash(&file.name_hash, hasher);
// Hash both the length and the end location (line/column) of a span. If we
// hash only the length, for example, then two otherwise equal spans with