From 7b94db0194c3e5a3e8b29d6a59bbe12306bdafbb Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Wed, 20 Jul 2022 16:07:54 +0200 Subject: [PATCH] Return reference from `Vertex::global` --- crates/fj-kernel/src/algorithms/sweep.rs | 2 +- crates/fj-kernel/src/objects/edge.rs | 4 ++-- crates/fj-kernel/src/objects/vertex.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/fj-kernel/src/algorithms/sweep.rs b/crates/fj-kernel/src/algorithms/sweep.rs index 2563ef24e..8b35222a0 100644 --- a/crates/fj-kernel/src/algorithms/sweep.rs +++ b/crates/fj-kernel/src/algorithms/sweep.rs @@ -44,7 +44,7 @@ pub fn sweep( create_non_continuous_side_face( path, is_sweep_along_negative_direction, - vertices.map(|vertex| vertex.global()), + vertices.map(|vertex| *vertex.global()), color, &mut target, ); diff --git a/crates/fj-kernel/src/objects/edge.rs b/crates/fj-kernel/src/objects/edge.rs index 1a5d142fd..0e87a7f2a 100644 --- a/crates/fj-kernel/src/objects/edge.rs +++ b/crates/fj-kernel/src/objects/edge.rs @@ -169,8 +169,8 @@ impl VerticesOfEdge { pub fn reverse(self) -> Self { Self(self.0.map(|[a, b]| { [ - Vertex::new(-b.position(), b.global()), - Vertex::new(-a.position(), a.global()), + Vertex::new(-b.position(), *b.global()), + Vertex::new(-a.position(), *a.global()), ] })) } diff --git a/crates/fj-kernel/src/objects/vertex.rs b/crates/fj-kernel/src/objects/vertex.rs index d8ae18b75..0ed4171da 100644 --- a/crates/fj-kernel/src/objects/vertex.rs +++ b/crates/fj-kernel/src/objects/vertex.rs @@ -36,7 +36,7 @@ impl Vertex { } /// The global form of this vertex - pub fn global(&self) -> GlobalVertex { - self.global + pub fn global(&self) -> &GlobalVertex { + &self.global } }