Skip to content

Commit

Permalink
Return iterator from Sketch::into_faces
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Jul 27, 2022
1 parent f488cb7 commit 1e38028
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
5 changes: 1 addition & 4 deletions crates/fj-kernel/src/algorithms/transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,7 @@ impl TransformObject for GlobalVertex {

impl TransformObject for Sketch {
fn transform(self, transform: &Transform) -> Self {
let faces = self
.into_faces()
.into_iter()
.map(|face| face.transform(transform));
let faces = self.into_faces().map(|face| face.transform(transform));
Self::new().with_faces(faces)
}
}
Expand Down
4 changes: 2 additions & 2 deletions crates/fj-kernel/src/objects/sketch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ impl Sketch {
}

/// Convert the sketch into a list of faces
pub fn into_faces(self) -> BTreeSet<Face> {
self.faces
pub fn into_faces(self) -> impl Iterator<Item = Face> {
self.faces.into_iter()
}
}

Expand Down
1 change: 0 additions & 1 deletion crates/fj-operations/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ impl Shape for fj::Shape {
.compute_brep(config, tolerance, debug_info)?
.into_inner()
.into_faces()
.into_iter()
.collect(),
config,
),
Expand Down

0 comments on commit 1e38028

Please sign in to comment.