mirror of https://github.com/hannobraun/Fornjot
Remove redundant code
This commit is contained in:
parent
88bc99e13e
commit
fd1b7deba7
|
@ -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");
|
||||
|
@ -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)
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)?;
|
||||
|
@ -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,
|
||||
|
|
|
@ -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)?;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue