Skip to content

Commit

Permalink
Remove AsMut on Hashed
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ndmitchell authored and facebook-github-bot committed Jul 13, 2024
1 parent 1509fe5 commit 6327eea
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions gazebo/src/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ impl<T> AsRef<T> for Hashed<T> {
}
}

impl<T> AsMut<T> for Hashed<T> {
fn as_mut(&mut self) -> &mut T {
&mut self.value
}
}

impl<T: Hash> From<T> for Hashed<T> {
fn from(value: T) -> Self {
Self::new(value)
Expand Down

0 comments on commit 6327eea

Please sign in to comment.