From 10642b18d1108c1aa0cdd29a5549bb3cc4ae838f Mon Sep 17 00:00:00 2001 From: QuantumEntangledAndy Date: Tue, 31 Aug 2021 20:26:59 +0700 Subject: [PATCH] Remove uneeded mutablility in ledstate --- crates/core/src/bc_protocol/ledstate.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/core/src/bc_protocol/ledstate.rs b/crates/core/src/bc_protocol/ledstate.rs index 6be34d8..333e35f 100644 --- a/crates/core/src/bc_protocol/ledstate.rs +++ b/crates/core/src/bc_protocol/ledstate.rs @@ -3,7 +3,7 @@ use crate::bc::{model::*, xml::*}; impl BcCamera { /// Get the [LedState] xml which contains the LED status of the camera - pub fn get_ledstate(&mut self) -> Result { + pub fn get_ledstate(&self) -> Result { let connection = self .connection .as_ref() @@ -49,7 +49,7 @@ impl BcCamera { } /// Set the led lights using the [LedState] xml - pub fn set_ledstate(&mut self, mut led_state: LedState) -> Result<()> { + pub fn set_ledstate(&self, mut led_state: LedState) -> Result<()> { let connection = self .connection .as_ref() @@ -100,7 +100,7 @@ impl BcCamera { /// /// This is for the RED IR lights that can come on automaitcally /// during low light. - pub fn irled_light_set(&mut self, state: LightState) -> Result<()> { + pub fn irled_light_set(&self, state: LightState) -> Result<()> { let mut led_state = self.get_ledstate()?; led_state.state = match state { LightState::On => "open".to_string(), @@ -115,7 +115,7 @@ impl BcCamera { /// True is on and false is off /// /// This is for the little blue on light of some camera - pub fn led_light_set(&mut self, state: bool) -> Result<()> { + pub fn led_light_set(&self, state: bool) -> Result<()> { let mut led_state = self.get_ledstate()?; led_state.light_state = match state { true => "open".to_string(),