Skip to content

Commit 6327eea

Browse files
ndmitchellfacebook-github-bot
authored andcommitted
Remove AsMut on Hashed
Summary: This breaks the invariants, allowing someone to mutate the inside and thus break the hash. Reviewed By: JakobDegen Differential Revision: D59722733 fbshipit-source-id: 065e5251bc0a0345ee6029206bf2784ffdb563ef
1 parent 1509fe5 commit 6327eea

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

gazebo/src/hash.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,6 @@ impl<T> AsRef<T> for Hashed<T> {
5656
}
5757
}
5858

59-
impl<T> AsMut<T> for Hashed<T> {
60-
fn as_mut(&mut self) -> &mut T {
61-
&mut self.value
62-
}
63-
}
64-
6559
impl<T: Hash> From<T> for Hashed<T> {
6660
fn from(value: T) -> Self {
6761
Self::new(value)

0 commit comments

Comments
 (0)