Skip to content

Commit

Permalink
Remove redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Nov 11, 2022
1 parent 88bc99e commit fd1b7de
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 52 deletions.
10 changes: 0 additions & 10 deletions crates/fj-kernel/src/partial/objects/curve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ impl PartialCurve {
self
}

/// Merge this partial object with another
pub fn merge_with(self, other: Self) -> Self {
<Self as MergeWith>::merge_with(self, other)
}

/// Build a full [`Curve`] from the partial curve
pub fn build(self, objects: &Objects) -> Result<Curve, ValidationError> {
let path = self.path.expect("Can't build `Curve` without path");
Expand Down Expand Up @@ -116,11 +111,6 @@ impl From<&Curve> for PartialCurve {
pub struct PartialGlobalCurve;

impl PartialGlobalCurve {
/// Merge this partial object with another
pub fn merge_with(self, other: Self) -> Self {
<Self as MergeWith>::merge_with(self, other)
}

/// Build a full [`GlobalCurve`] from the partial global curve
pub fn build(self, _: &Objects) -> Result<GlobalCurve, ValidationError> {
Ok(GlobalCurve)
Expand Down
5 changes: 0 additions & 5 deletions crates/fj-kernel/src/partial/objects/cycle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ impl PartialCycle {
self
}

/// Merge this partial object with another
pub fn merge_with(self, other: Self) -> Self {
<Self as MergeWith>::merge_with(self, other)
}

/// Build a full [`Cycle`] from the partial cycle
pub fn build(
mut self,
Expand Down
10 changes: 0 additions & 10 deletions crates/fj-kernel/src/partial/objects/edge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,6 @@ impl PartialHalfEdge {
self
}

/// Merge this partial object with another
pub fn merge_with(self, other: Self) -> Self {
<Self as MergeWith>::merge_with(self, other)
}

/// Build a full [`HalfEdge`] from the partial half-edge
pub fn build(self, objects: &Objects) -> Result<HalfEdge, ValidationError> {
let curve = self.curve.into_full(objects)?;
Expand Down Expand Up @@ -184,11 +179,6 @@ impl PartialGlobalEdge {
self
}

/// Merge this partial object with another
pub fn merge_with(self, other: Self) -> Self {
<Self as MergeWith>::merge_with(self, other)
}

/// Build a full [`GlobalEdge`] from the partial global edge
pub fn build(
self,
Expand Down
5 changes: 0 additions & 5 deletions crates/fj-kernel/src/partial/objects/face.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ impl PartialFace {
self
}

/// Merge this partial object with another
pub fn merge_with(self, other: Self) -> Self {
<Self as MergeWith>::merge_with(self, other)
}

/// Construct a polygon from a list of points
pub fn build(self, objects: &Objects) -> Result<Face, ValidationError> {
let exterior = self.exterior.into_full(objects)?;
Expand Down
4 changes: 0 additions & 4 deletions crates/fj-kernel/src/partial/objects/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ macro_rules! impl_traits {
impl Partial for $partial {
type Full = $full;

fn merge_with(self, other: Self) -> Self {
self.merge_with(other)
}

fn build(self, objects: &Objects)
-> Result<
Self::Full,
Expand Down
15 changes: 0 additions & 15 deletions crates/fj-kernel/src/partial/objects/vertex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ impl PartialVertex {
self
}

/// Merge this partial object with another
pub fn merge_with(self, other: Self) -> Self {
<Self as MergeWith>::merge_with(self, other)
}

/// Build a full [`Vertex`] from the partial vertex
///
/// # Panics
Expand Down Expand Up @@ -173,11 +168,6 @@ impl PartialSurfaceVertex {
self
}

/// Merge this partial object with another
pub fn merge_with(self, other: Self) -> Self {
<Self as MergeWith>::merge_with(self, other)
}

/// Build a full [`SurfaceVertex`] from the partial surface vertex
pub fn build(
self,
Expand Down Expand Up @@ -248,11 +238,6 @@ impl PartialGlobalVertex {
self
}

/// Merge this partial object with another
pub fn merge_with(self, other: Self) -> Self {
<Self as MergeWith>::merge_with(self, other)
}

/// Build a full [`GlobalVertex`] from the partial global vertex
pub fn build(self, _: &Objects) -> Result<GlobalVertex, ValidationError> {
let position = self
Expand Down
3 changes: 0 additions & 3 deletions crates/fj-kernel/src/partial/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ pub trait Partial: Default + for<'a> From<&'a Self::Full> {
/// The type representing the full variant of this object
type Full;

/// Merge another partial object of the same type into this one
fn merge_with(self, other: Self) -> Self;

/// Build a full object from this partial one
///
/// Implementations of this method will typically try to infer any missing
Expand Down

0 comments on commit fd1b7de

Please sign in to comment.