cleaned up some mut
This commit is contained in:
@ -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);
|
||||
|
||||
@ -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()
|
||||
}
|
||||
|
||||
|
||||
@ -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();
|
||||
|
||||
Reference in New Issue
Block a user