From 961d432f72ea2cfc488b80ab343ed70515c2a34d Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Fri, 21 Mar 2025 19:44:41 +0100 Subject: [PATCH] Replace `each_ref_ext` with `each_ref` --- crates/fj-core/src/operations/build/face.rs | 3 +-- crates/fj-core/src/operations/split/face.rs | 3 +-- crates/fj-interop/src/ext.rs | 20 -------------------- 3 files changed, 2 insertions(+), 24 deletions(-) diff --git a/crates/fj-core/src/operations/build/face.rs b/crates/fj-core/src/operations/build/face.rs index 0440bc5fd..102b4da9b 100644 --- a/crates/fj-core/src/operations/build/face.rs +++ b/crates/fj-core/src/operations/build/face.rs @@ -1,6 +1,5 @@ use std::{array, borrow::Borrow}; -use fj_interop::ext::ArrayExt; use fj_math::{Point, Scalar}; use crate::{ @@ -61,7 +60,7 @@ pub trait BuildFace { array }; let vertices = half_edges - .each_ref_ext() + .each_ref() .map(|edge: &Handle| edge.start_vertex().clone()); Polygon { diff --git a/crates/fj-core/src/operations/split/face.rs b/crates/fj-core/src/operations/split/face.rs index 0cbc38fec..ea7725435 100644 --- a/crates/fj-core/src/operations/split/face.rs +++ b/crates/fj-core/src/operations/split/face.rs @@ -1,4 +1,3 @@ -use fj_interop::ext::ArrayExt; use fj_math::Point; use itertools::Itertools; @@ -63,7 +62,7 @@ impl SplitFace for Shell { // // Something to think about though! { - let [(a, _), (b, _)] = line.each_ref_ext(); + let [(a, _), (b, _)] = line.each_ref(); let exterior = face.region().exterior(); diff --git a/crates/fj-interop/src/ext.rs b/crates/fj-interop/src/ext.rs index fc4a747d1..3dd7e9f89 100644 --- a/crates/fj-interop/src/ext.rs +++ b/crates/fj-interop/src/ext.rs @@ -2,11 +2,6 @@ /// Extension trait for arrays pub trait ArrayExt { - /// Stable replacement for `each_ref` - /// - /// - fn each_ref_ext(&self) -> [&T; N]; - /// Stable replacement for `each_mut` /// /// @@ -26,11 +21,6 @@ pub trait ArrayExt { } impl ArrayExt for [T; 2] { - fn each_ref_ext(&self) -> [&T; 2] { - let [a, b] = self; - [a, b] - } - fn each_mut_ext(&mut self) -> [&mut T; 2] { let [a, b] = self; [a, b] @@ -52,11 +42,6 @@ impl ArrayExt for [T; 2] { } impl ArrayExt for [T; 3] { - fn each_ref_ext(&self) -> [&T; 3] { - let [a, b, c] = self; - [a, b, c] - } - fn each_mut_ext(&mut self) -> [&mut T; 3] { let [a, b, c] = self; [a, b, c] @@ -78,11 +63,6 @@ impl ArrayExt for [T; 3] { } impl ArrayExt for [T; 4] { - fn each_ref_ext(&self) -> [&T; 4] { - let [a, b, c, d] = self; - [a, b, c, d] - } - fn each_mut_ext(&mut self) -> [&mut T; 4] { let [a, b, c, d] = self; [a, b, c, d]