From 870a7a37e724e1bd72ae600df143b7e96d156241 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Mon, 16 May 2022 18:29:26 +0200 Subject: [PATCH] Refactor --- crates/fj-kernel/src/topology/cycles.rs | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/crates/fj-kernel/src/topology/cycles.rs b/crates/fj-kernel/src/topology/cycles.rs index 6d6c37443..8f18b9d94 100644 --- a/crates/fj-kernel/src/topology/cycles.rs +++ b/crates/fj-kernel/src/topology/cycles.rs @@ -1,5 +1,3 @@ -use std::hash::{Hash, Hasher}; - use crate::shape::{Handle, LocalForm, Shape}; use super::{CycleBuilder, Edge}; @@ -19,7 +17,7 @@ use super::{CycleBuilder, Edge}; /// /// A cycle that is part of a [`Shape`] must be structurally sound. That means /// the edges it refers to, must be part of the same shape. -#[derive(Clone, Debug, Eq, Ord, PartialOrd)] +#[derive(Clone, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)] pub struct Cycle { /// The edges that make up the cycle pub edges: Vec, Edge<3>>>, @@ -46,17 +44,3 @@ impl Cycle<3> { self.edges.iter().map(|handle| handle.canonical().get()) } } - -impl PartialEq for Cycle { - fn eq(&self, other: &Self) -> bool { - self.edges == other.edges - } -} - -impl Hash for Cycle { - fn hash(&self, state: &mut H) { - for edge in &self.edges { - edge.hash(state); - } - } -}