Skip to content

Commit

Permalink
Replace uses of iter in fj-operations
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Jan 4, 2023
1 parent 9663bd0 commit bd8f487
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions crates/fj-operations/src/difference_2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use fj_interop::{debug::DebugInfo, ext::ArrayExt, mesh::Color};
use fj_kernel::{
algorithms::reverse::Reverse,
insert::Insert,
iter::ObjectIters,
objects::{Objects, Sketch},
partial::{Partial, PartialFace, PartialObject, PartialSketch},
services::Service,
Expand Down Expand Up @@ -34,12 +33,12 @@ impl Shape for fj::Difference2d {
.each_ref_ext()
.map(|shape| shape.compute_brep(objects, debug_info));

if let Some(face) = a.face_iter().next() {
if let Some(face) = a.faces().into_iter().next() {
// If there's at least one face to subtract from, we can proceed.

let surface = face.surface();

for face in a.face_iter() {
for face in a.faces() {
assert_eq!(
surface,
face.surface(),
Expand All @@ -53,7 +52,7 @@ impl Shape for fj::Difference2d {
}
}

for face in b.face_iter() {
for face in b.faces() {
assert_eq!(
surface,
face.surface(),
Expand Down

0 comments on commit bd8f487

Please sign in to comment.