diff --git a/src/main.rs b/src/main.rs index 0dd37c8..ddf3328 100644 --- a/src/main.rs +++ b/src/main.rs @@ -31,7 +31,7 @@ pub fn main() -> Result<(), Box> { Ok(rs) => rs, Err(err) => { println!("Unable to connect to redis: {:?}", err); - return Err(err) + return Ok(()) } }; @@ -39,7 +39,11 @@ pub fn main() -> Result<(), Box> { let controller = NativeHeliosDacController::new()?; let devices = controller.list_devices()?; - let device = devices.into_iter().next().unwrap(); + let Some(device) = devices.into_iter().next() else { + println!("Unable to find an helios device"); + return Ok(()); + }; + let mut device = device.open()?; while running.load(Ordering::SeqCst) {