mirror of
https://github.com/hannobraun/Fornjot
synced 2025-02-26 17:15: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.
|
// Can't panic, as we just verified that both shapes have one face.
|
||||||
let (a, b) = (
|
let [a, b] = [&mut a, &mut b]
|
||||||
a.faces().all().next().unwrap(),
|
.map(|shape| shape.faces().all().next().unwrap());
|
||||||
b.faces().all().next().unwrap(),
|
|
||||||
);
|
|
||||||
|
|
||||||
let (a, b, surface_a, surface_b) =
|
let (a, b, surface_a, surface_b) =
|
||||||
match ((*a).clone(), (*b).clone()) {
|
match ((*a).clone(), (*b).clone()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user