From b364b315236714907a7e4f9506f27fc371f87833 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 21 Nov 2026 21:53:47 -0800 Subject: [PATCH] 3D: curved_band takes its two rings as one argument curved_band took eight arguments once it gained the mesh's band data, and an allow attribute silenced clippy's too_many_arguments lint. It now takes the partner rings as one [a, b] array, and the allow attribute has been removed. --- crates/three-d/src/solid/build.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/crates/three-d/src/solid/build.rs b/crates/three-d/src/solid/build.rs index 2ed69488a7..894e07da9c 100644 --- a/crates/three-d/src/solid/build.rs +++ b/crates/three-d/src/solid/build.rs @@ -398,18 +398,16 @@ impl<'a> Builder<'a> { /// direction (before rotation) the band faces away from the solid, for orienting normals. For a /// mesh the quads take their part, texture coordinates and corner normals from `mesh`. pub(super) fn band(&mut self, a: &[V3], b: &[V3], cuts: &[usize], outward: impl Fn(usize) -> V3, mesh: &BandMesh) -> Result<(), String> { - self.curved_band(a, b, cuts, outward, None, None, mesh) + self.curved_band([a, b], cuts, outward, None, None, mesh) } - /// [`Builder::band`], with `curves` the pieces of curve the rings' edges follow and the - /// outlines at `a` and `b`: a quad whose edge is not cut keeps its edges along the profile curved. + /// [`Builder::band`] between the partner rings `[a, b]`, with `curves` the pieces of curve the + /// rings' edges follow and the outlines at `a` and `b`: a quad whose edge is not cut keeps its edges along the profile curved. /// With `side`, each quad carries where its corners lie on the side unrolled flat /// ([`Facet::surface`]). - #[allow(clippy::too_many_arguments)] pub(super) fn curved_band( &mut self, - a: &[V3], - b: &[V3], + [a, b]: [&[V3]; 2], cuts: &[usize], outward: impl Fn(usize) -> V3, mut curves: Option, @@ -1008,7 +1006,7 @@ pub(crate) fn extrude_faces(path: &PathData, rule: FillRule, bounds: Rect, optio let normals = rows.get(k).zip(rows.get(k + 1)).map(|(na, nb)| (na.as_slice(), nb.as_slice())); let v = [across.get(k).copied().unwrap_or(0.5), across.get(k + 1).copied().unwrap_or(0.5)]; let mesh = BandMesh { part: part_of(s0, s1), u: &u, v, normals }; - b.curved_band(a, c, pieces, |i| outward(ring, i, face), curves, side, &mesh)?; + b.curved_band([a, c], pieces, |i| outward(ring, i, face), curves, side, &mesh)?; } } b.cells = None;