mirror of
https://github.com/hannobraun/Fornjot
synced 2025-02-26 09:05:52 +00:00
Consolidate duplicated code
This commit is contained in:
parent
65cf917fe5
commit
2036ef9040
@ -50,10 +50,8 @@ impl ToShape for fj::Difference2d {
|
||||
|
||||
{
|
||||
// Can't panic, as we just verified that both shapes have one face.
|
||||
let (a, b) = (
|
||||
a.faces().all().next().unwrap(),
|
||||
b.faces().all().next().unwrap(),
|
||||
);
|
||||
let [a, b] = [&mut a, &mut b]
|
||||
.map(|shape| shape.faces().all().next().unwrap());
|
||||
|
||||
let (a, b, surface_a, surface_b) =
|
||||
match ((*a).clone(), (*b).clone()) {
|
||||
|
Loading…
Reference in New Issue
Block a user