From bb4f43fe1c7410425b4e61833d61143bfa80518a Mon Sep 17 00:00:00 2001 From: atse Date: Tue, 22 Aug 2023 17:01:00 +0800 Subject: [PATCH] Remove stale reference to channel_state vref --- src/channels.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/channels.rs b/src/channels.rs index fffbae8..a90d886 100644 --- a/src/channels.rs +++ b/src/channels.rs @@ -97,11 +97,8 @@ impl Channels { /// calculate the TEC i_set centerpoint pub fn get_center(&mut self, channel: usize) -> ElectricPotential { match self.channel_state(channel).center { - CenterPoint::Vref => { - let vref = self.read_vref(channel); - self.channel_state(channel).vref = vref; - vref - }, + CenterPoint::Vref => + self.read_vref(channel), CenterPoint::Override(center_point) => ElectricPotential::new::(center_point.into()), }