cleaned up some mut

This commit is contained in:
2024-08-24 11:49:37 -04:00
parent 5772ae2ed6
commit c184c31620
3 changed files with 4 additions and 4 deletions

View File

@ -43,14 +43,14 @@ impl BleServer {
}
}
pub async fn run(&mut self) -> Result<()> {
pub async fn run(&self) -> Result<()> {
match self.do_run().await {
Ok(_) => {error!("Exited bluetooth server wait loop with no error.");panic!();}
Err(e) => {error!("Bluetooth task encountered error {}", e);panic!();}
}
}
pub async fn do_run(&mut self) -> Result<()> {
pub async fn do_run(&self) -> Result<()> {
trace!("Entering BLE Run");
let ble_device = BLEDevice::take();
set_device_security(ble_device);

View File

@ -49,7 +49,7 @@ impl Dispatch {
}
/// Get a channel sender that will send commands to this dispatcher
pub fn get_cmd_channel(&mut self) -> SendQ {
pub fn get_cmd_channel(&self) -> SendQ {
self.endpoint.clone()
}

View File

@ -84,7 +84,7 @@ async fn main_loop() -> Result<()> {
Commands::StopTimerExpired,
STOP_SAFETY_TIME_MS,
&mut dp);
let mut ble_server = ble_server::BleServer::new(&mut dp);
let ble_server = ble_server::BleServer::new(&mut dp);
let executor = Executor::new();
let mut tasks:Vec<_> = Vec::new();