From a902e2522e9b282bfcf3dc8540ebe0dd4f2b6a8b Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Tue, 8 Nov 2022 12:32:58 +0100 Subject: [PATCH] Refactor --- crates/fj-kernel/src/builder/cycle.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/fj-kernel/src/builder/cycle.rs b/crates/fj-kernel/src/builder/cycle.rs index a2b5ca081..0eff6841c 100644 --- a/crates/fj-kernel/src/builder/cycle.rs +++ b/crates/fj-kernel/src/builder/cycle.rs @@ -55,12 +55,12 @@ impl CycleBuilder for PartialCycle { .surface() .expect("Need surface to extend cycle with poly-chain"); - let position_prev = vertex_prev - .position() - .expect("Need surface position to extend cycle"); - let position_next = vertex_next - .position() - .expect("Need surface position to extend cycle"); + let [position_prev, position_next] = + [&vertex_prev, &vertex_next].map(|vertex| { + vertex + .position() + .expect("Need surface position to extend cycle") + }); let from = vertex_prev; let to = vertex_next;