Remove redundant block

This commit is contained in:
Hanno Braun 2022-03-08 17:15:08 +01:00
parent a0d6814ef8
commit 386c10524c

View File

@ -48,10 +48,9 @@ impl ToShape for fj::Difference2d {
});
}
{
// Can't panic, as we just verified that both shapes have one face.
let [face_a, face_b] = [&mut a, &mut b]
.map(|shape| shape.faces().all().next().unwrap());
let [face_a, face_b] =
[&mut a, &mut b].map(|shape| shape.faces().all().next().unwrap());
let (cycles_a, cycles_b, surface_a, surface_b) =
match ((*face_a).clone(), (*face_b).clone()) {
@ -66,8 +65,7 @@ impl ToShape for fj::Difference2d {
},
) => (a, b, surface_a, surface_b),
_ => {
// None of the 2D types still use triangle
// representation.
// None of the 2D types still use triangle representation.
unreachable!()
}
};
@ -82,7 +80,6 @@ impl ToShape for fj::Difference2d {
cycles.extend(cycles_b);
shape.faces().add(Face::Face { cycles, surface });
};
shape
}