From d9b6ac60dd4369f3f81bcbbc3c12eaa64937cf00 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Mon, 22 May 2023 12:45:37 +0200 Subject: [PATCH] Remove unused methods --- crates/fj-kernel/src/objects/full/face.rs | 11 ----------- crates/fj-kernel/src/objects/full/shell.rs | 5 ----- crates/fj-kernel/src/objects/full/solid.rs | 16 +--------------- 3 files changed, 1 insertion(+), 31 deletions(-) diff --git a/crates/fj-kernel/src/objects/full/face.rs b/crates/fj-kernel/src/objects/full/face.rs index 8a824b02a..5b62e7f19 100644 --- a/crates/fj-kernel/src/objects/full/face.rs +++ b/crates/fj-kernel/src/objects/full/face.rs @@ -109,17 +109,6 @@ impl FaceSet { pub fn new() -> Self { Self::default() } - - /// Find the given face - pub fn find(&self, face: &Handle) -> Option> { - for f in self { - if f == face { - return Some(f.clone()); - } - } - - None - } } impl Extend> for FaceSet { diff --git a/crates/fj-kernel/src/objects/full/shell.rs b/crates/fj-kernel/src/objects/full/shell.rs index 0fe1fb2e4..a5d8c5d65 100644 --- a/crates/fj-kernel/src/objects/full/shell.rs +++ b/crates/fj-kernel/src/objects/full/shell.rs @@ -26,9 +26,4 @@ impl Shell { pub fn faces(&self) -> &FaceSet { &self.faces } - - /// Find the given face in the shell - pub fn find_face(&self, face: &Handle) -> Option> { - self.faces().find(face) - } } diff --git a/crates/fj-kernel/src/objects/full/solid.rs b/crates/fj-kernel/src/objects/full/solid.rs index b630296bf..24aba5cdb 100644 --- a/crates/fj-kernel/src/objects/full/solid.rs +++ b/crates/fj-kernel/src/objects/full/solid.rs @@ -1,9 +1,6 @@ use std::collections::BTreeSet; -use crate::{ - objects::{Face, Shell}, - storage::Handle, -}; +use crate::{objects::Shell, storage::Handle}; /// A 3-dimensional shape, built from [`Shell`]s. Many Solids will contains only /// one shell, but if the Solid contains cavities they will be represented by a @@ -30,15 +27,4 @@ impl Solid { pub fn shells(&self) -> impl Iterator> { self.shells.iter() } - - /// Find the given face in the solid - pub fn find_face(&self, face: &Handle) -> Option> { - for shell in self.shells() { - if let Some(face) = shell.find_face(face) { - return Some(face); - } - } - - None - } }