diff --git a/crates/fj-kernel/src/shape/local.rs b/crates/fj-kernel/src/shape/local.rs index ed13b9a89..e9df83444 100644 --- a/crates/fj-kernel/src/shape/local.rs +++ b/crates/fj-kernel/src/shape/local.rs @@ -1,5 +1,3 @@ -use std::hash::{Hash, Hasher}; - use super::Object; /// A reference to an object, which includes a local form @@ -14,7 +12,7 @@ use super::Object; /// terms that are useful to those objects. Two instances of `LocalForm` are /// equal, if both the local and the canonical forms are equal. The equality of /// the handle that refers to the canonical form is disregarded. -#[derive(Clone, Debug, Eq, Ord, PartialOrd)] +#[derive(Clone, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)] pub struct LocalForm { local: Local, canonical: Canonical, @@ -50,24 +48,3 @@ impl LocalForm { Self::new(canonical.clone(), canonical) } } - -impl PartialEq for LocalForm -where - Local: PartialEq, - Canonical: PartialEq, -{ - fn eq(&self, other: &Self) -> bool { - self.local == other.local && self.canonical == other.canonical - } -} - -impl Hash for LocalForm -where - Local: Hash, - Canonical: Hash, -{ - fn hash(&self, state: &mut H) { - self.local.hash(state); - self.canonical.hash(state); - } -}