diff --git a/src/geometry/transform.rs b/src/geometry/transform.rs index 682d2bd6..7ea91cd4 100755 --- a/src/geometry/transform.rs +++ b/src/geometry/transform.rs @@ -1,6 +1,7 @@ use approx::{AbsDiffEq, RelativeEq, UlpsEq}; use std::any::Any; use std::fmt::Debug; +use std::hash; use std::marker::PhantomData; #[cfg(feature = "serde-serialize-no-std")] @@ -166,14 +167,16 @@ where _phantom: PhantomData, } -// TODO -// impl + hash::Hash, C: TCategory> hash::Hash for Transform -// where DefaultAllocator: Allocator, U1>, DimNameSum, U1>>, -// Owned, U1>, DimNameSum, U1>>: hash::Hash { -// fn hash(&self, state: &mut H) { -// self.matrix.hash(state); -// } -// } +impl hash::Hash for Transform +where + Const: DimNameAdd, + DefaultAllocator: Allocator, U1>, DimNameSum, U1>>, + Owned, U1>, DimNameSum, U1>>: hash::Hash, +{ + fn hash(&self, state: &mut H) { + self.matrix.hash(state); + } +} impl Copy for Transform where