-
-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1633 from hannobraun/builder
Remove unused builder methods
- Loading branch information
Showing
7 changed files
with
17 additions
and
238 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,9 @@ | ||
use crate::{ | ||
objects::Face, | ||
partial::{Partial, PartialShell}, | ||
}; | ||
use crate::partial::PartialShell; | ||
|
||
/// Builder API for [`PartialShell`] | ||
pub trait ShellBuilder { | ||
/// Add a face to the shell | ||
/// | ||
/// The face will not be connected to any other faces that the shell might | ||
/// already have. | ||
fn add_face(&mut self) -> Partial<Face>; | ||
// No methods are currently defined. This trait serves as a placeholder, to | ||
// make it clear where to add such methods, once necessary. | ||
} | ||
|
||
impl ShellBuilder for PartialShell { | ||
fn add_face(&mut self) -> Partial<Face> { | ||
let face = Partial::default(); | ||
self.faces.push(face.clone()); | ||
face | ||
} | ||
} | ||
impl ShellBuilder for PartialShell {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,9 @@ | ||
use crate::{ | ||
objects::Face, | ||
partial::{Partial, PartialSketch}, | ||
}; | ||
use crate::partial::PartialSketch; | ||
|
||
/// Builder API for [`PartialSketch`] | ||
pub trait SketchBuilder { | ||
/// Add a face to the sketch | ||
fn add_face(&mut self) -> Partial<Face>; | ||
// No methods are currently defined. This trait serves as a placeholder, to | ||
// make it clear where to add such methods, once necessary. | ||
} | ||
|
||
impl SketchBuilder for PartialSketch { | ||
fn add_face(&mut self) -> Partial<Face> { | ||
let face = Partial::default(); | ||
self.faces.extend([face.clone()]); | ||
face | ||
} | ||
} | ||
impl SketchBuilder for PartialSketch {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
use crate::partial::{PartialGlobalVertex, PartialSurfaceVertex}; | ||
|
||
/// Builder API for [`PartialSurfaceVertex`] | ||
pub trait SurfaceVertexBuilder {} | ||
|
||
impl SurfaceVertexBuilder for PartialSurfaceVertex { | ||
pub trait SurfaceVertexBuilder { | ||
// No methods are currently defined. This trait serves as a placeholder, to | ||
// make it clear where to add such methods, once necessary. | ||
} | ||
|
||
/// Builder API for [`PartialGlobalVertex`] | ||
pub trait GlobalVertexBuilder {} | ||
impl SurfaceVertexBuilder for PartialSurfaceVertex {} | ||
|
||
impl GlobalVertexBuilder for PartialGlobalVertex { | ||
/// Builder API for [`PartialGlobalVertex`] | ||
pub trait GlobalVertexBuilder { | ||
// No methods are currently defined. This trait serves as a placeholder, to | ||
// make it clear where to add such methods, once necessary. | ||
} | ||
|
||
impl GlobalVertexBuilder for PartialGlobalVertex {} |