From 59550978f451b0f5262d2bb38cdf8f8535bce079 Mon Sep 17 00:00:00 2001 From: bunnie Date: Tue, 31 May 2022 14:38:41 +0800 Subject: [PATCH] fix warnings that have cropped up for transition to 2021 edition --- services/modals/src/main.rs | 4 ++-- services/root-keys/src/main.rs | 1 + services/usb-device-xous/src/main.rs | 2 -- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/services/modals/src/main.rs b/services/modals/src/main.rs index 5b75ddccb..6ba7a56d6 100644 --- a/services/modals/src/main.rs +++ b/services/modals/src/main.rs @@ -715,7 +715,7 @@ fn main() -> ! { match list_hash.get(item.as_str()) { Some(index) => { match index { - 0...31 => drop(list_selected.set_bit(*index, true)), + 0..=31 => drop(list_selected.set_bit(*index, true)), _ => log::warn!("invalid bitfield index"), }; } @@ -753,7 +753,7 @@ fn main() -> ! { Some(item) => match list_hash.get(item.as_str()) { Some(index) => { match index { - 0...31 => drop(list_selected.set_bit(*index, true)), + 0..=31 => drop(list_selected.set_bit(*index, true)), _ => log::warn!("invalid bitfield index"), }; } diff --git a/services/root-keys/src/main.rs b/services/root-keys/src/main.rs index 0a22df56f..7154db7d3 100644 --- a/services/root-keys/src/main.rs +++ b/services/root-keys/src/main.rs @@ -298,6 +298,7 @@ mod implementation { fn main() -> ! { + #[cfg(not(any(target_os = "none", target_os = "xous")))] use crate::implementation::RootKeys; log_server::init_wait().unwrap(); diff --git a/services/usb-device-xous/src/main.rs b/services/usb-device-xous/src/main.rs index 3e12493dd..c124b46d0 100644 --- a/services/usb-device-xous/src/main.rs +++ b/services/usb-device-xous/src/main.rs @@ -71,8 +71,6 @@ impl Clock for EmbeddedClock { } fn main() -> ! { - use crate::SpinalUsbDevice; - log_server::init_wait().unwrap(); log::set_max_level(log::LevelFilter::Debug); log::info!("my PID is {}", xous::process::id());