From 639996caf19d697d865ef8239abb69094692d25f Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Tue, 18 Feb 2025 20:44:29 +0100 Subject: [PATCH] Remove unused code --- experiments/2024-12-09/src/operation/mod.rs | 6 +----- experiments/2024-12-09/src/operation/traits.rs | 5 ----- experiments/2024-12-09/src/topology/face.rs | 8 +------- experiments/2024-12-09/src/topology/solid.rs | 7 +------ experiments/2024-12-09/src/topology/vertex.rs | 8 +------- experiments/2024-12-09/src/view.rs | 8 +------- 6 files changed, 5 insertions(+), 37 deletions(-) diff --git a/experiments/2024-12-09/src/operation/mod.rs b/experiments/2024-12-09/src/operation/mod.rs index 27c6771da..e33896473 100644 --- a/experiments/2024-12-09/src/operation/mod.rs +++ b/experiments/2024-12-09/src/operation/mod.rs @@ -2,8 +2,4 @@ mod handle; mod handle_any; mod traits; -pub use self::{ - handle::Handle, - handle_any::HandleAny, - traits::{Operation, OperationOutput}, -}; +pub use self::{handle::Handle, handle_any::HandleAny, traits::Operation}; diff --git a/experiments/2024-12-09/src/operation/traits.rs b/experiments/2024-12-09/src/operation/traits.rs index 276ce8993..a91023195 100644 --- a/experiments/2024-12-09/src/operation/traits.rs +++ b/experiments/2024-12-09/src/operation/traits.rs @@ -17,11 +17,6 @@ pub trait Operation { } } -pub trait OperationOutput: Operation { - #[allow(unused)] // ongoing cleanup - fn output(&self) -> &Output; -} - pub struct OperationDisplay<'r> { pub op: &'r dyn Operation, } diff --git a/experiments/2024-12-09/src/topology/face.rs b/experiments/2024-12-09/src/topology/face.rs index 375efd5f7..c732344eb 100644 --- a/experiments/2024-12-09/src/topology/face.rs +++ b/experiments/2024-12-09/src/topology/face.rs @@ -6,7 +6,7 @@ use spade::Triangulation; use crate::{ geometry::{TriMesh, Triangle}, math::{Plane, Point}, - operation::{Handle, HandleAny, Operation, OperationOutput}, + operation::{Handle, HandleAny, Operation}, }; use super::vertex::Vertex; @@ -104,12 +104,6 @@ impl Operation for Face { } } -impl OperationOutput for Face { - fn output(&self) -> &Self { - self - } -} - struct TriangulationPoint { point_surface: Point<2>, point_vertex: Point<3>, diff --git a/experiments/2024-12-09/src/topology/solid.rs b/experiments/2024-12-09/src/topology/solid.rs index 4db76009a..8ca9691ff 100644 --- a/experiments/2024-12-09/src/topology/solid.rs +++ b/experiments/2024-12-09/src/topology/solid.rs @@ -2,7 +2,7 @@ use std::fmt; use crate::{ geometry::TriMesh, - operation::{Handle, HandleAny, Operation, OperationOutput}, + operation::{Handle, HandleAny, Operation}, }; use super::face::Face; @@ -39,8 +39,3 @@ impl Operation for Solid { self.faces.iter().map(|face| face.to_any()).collect() } } -impl OperationOutput for Solid { - fn output(&self) -> &Self { - self - } -} diff --git a/experiments/2024-12-09/src/topology/vertex.rs b/experiments/2024-12-09/src/topology/vertex.rs index 5315ba02d..c6d7fff7d 100644 --- a/experiments/2024-12-09/src/topology/vertex.rs +++ b/experiments/2024-12-09/src/topology/vertex.rs @@ -3,7 +3,7 @@ use std::fmt; use crate::{ geometry::TriMesh, math::{Point, Vector}, - operation::{HandleAny, Operation, OperationOutput}, + operation::{HandleAny, Operation}, }; #[derive(Clone, Copy, Debug, Eq, Ord, PartialEq, PartialOrd)] @@ -43,9 +43,3 @@ impl Operation for Vertex { Vec::new() } } - -impl OperationOutput for Vertex { - fn output(&self) -> &Self { - self - } -} diff --git a/experiments/2024-12-09/src/view.rs b/experiments/2024-12-09/src/view.rs index 4b6bb6ef9..11281a956 100644 --- a/experiments/2024-12-09/src/view.rs +++ b/experiments/2024-12-09/src/view.rs @@ -2,7 +2,7 @@ use std::{fmt, iter}; use crate::{ geometry::TriMesh, - operation::{HandleAny, Operation, OperationOutput}, + operation::{HandleAny, Operation}, }; #[derive(Clone)] @@ -134,9 +134,3 @@ impl Operation for OperationView { self.operation.children() } } - -impl OperationOutput for OperationView { - fn output(&self) -> &Self { - self - } -}