Remove unused code

This commit is contained in:
Hanno Braun 2025-02-18 20:44:29 +01:00
parent e103fe7555
commit 639996caf1
6 changed files with 5 additions and 37 deletions

View File

@ -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};

View File

@ -17,11 +17,6 @@ pub trait Operation {
}
}
pub trait OperationOutput<Output = Self>: Operation {
#[allow(unused)] // ongoing cleanup
fn output(&self) -> &Output;
}
pub struct OperationDisplay<'r> {
pub op: &'r dyn Operation,
}

View File

@ -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>,

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}