From 1f604eb29ad551bf0229688ee844ae028dd525cc Mon Sep 17 00:00:00 2001 From: Aaron Fenyes Date: Thu, 9 Oct 2025 22:36:37 -0700 Subject: [PATCH] Revert "Spruce up formatting and error messages" This reverts commit adc60ac5c160ceee11ee205352a1665b29fc6e94. We decided that it would be better for me to request formatting changes one by one. --- app-proto/src/assembly.rs | 42 +++++++++++++-------------------------- 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/app-proto/src/assembly.rs b/app-proto/src/assembly.rs index 5ba75ff..d571d0e 100644 --- a/app-proto/src/assembly.rs +++ b/app-proto/src/assembly.rs @@ -312,14 +312,13 @@ impl Element for Point { point(0.0, 0.0, 0.0), ) } - + fn default_regulators(self: Rc) -> Vec> { all::() - .map( - |axis| Rc::new( - PointCoordinateRegulator::new(self.clone(), axis) - ) as Rc:: - ) + .map(|axis| { + Rc::new(PointCoordinateRegulator::new(self.clone(), axis)) + as Rc:: + }) .collect() } @@ -544,32 +543,19 @@ impl PointCoordinateRegulator { let measurement = subject.representation().map( move |rep| rep[axis as usize] ); - let set_point = create_signal(SpecifiedValue::from_empty_spec()); - let serial = Self::next_serial(); - - Self { subject, axis, measurement, set_point, serial } + Self { subject, axis, measurement, set_point, serial: Self::next_serial() } } } impl Serial for PointCoordinateRegulator { - fn serial(&self) -> u64 { - self.serial - } + fn serial(&self) -> u64 { self.serial } } impl Regulator for PointCoordinateRegulator { - fn subjects(&self) -> Vec> { - vec![self.subject.clone()] - } - - fn measurement(&self) -> ReadSignal { - self.measurement - } - - fn set_point(&self) -> Signal { - self.set_point - } + fn subjects(&self) -> Vec> { vec![self.subject.clone()] } + fn measurement(&self) -> ReadSignal { self.measurement } + fn set_point(&self) -> Signal { self.set_point } } impl ProblemPoser for PointCoordinateRegulator { @@ -590,10 +576,10 @@ impl ProblemPoser for PointCoordinateRegulator { coords[index.0] = value } } - if n_set == Axis::CARDINALITY { - let [x, y, z] = coords_frozen; - let norm = point(x, y, z)[Point::NORM_COMPONENT]; - problem.frozen.push(Point::NORM_COMPONENT, col, norm); + if nset == Axis::CARDINALITY { + let [x, y, z] = coords; + problem.frozen.push( + Point::NORM_COMPONENT, col, point(x,y,z)[Point::NORM_COMPONENT]); } } });