fix warnings that have cropped up for transition to 2021 edition

This commit is contained in:
bunnie 2022-05-31 14:38:41 +08:00
parent 52207b641c
commit 98289b1405
3 changed files with 3 additions and 4 deletions

View file

@ -660,7 +660,7 @@ fn main() -> ! {
match list_hash.get(item.as_str()) { match list_hash.get(item.as_str()) {
Some(index) => { Some(index) => {
match 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"), _ => log::warn!("invalid bitfield index"),
}; };
} }
@ -698,7 +698,7 @@ fn main() -> ! {
Some(item) => match list_hash.get(item.as_str()) { Some(item) => match list_hash.get(item.as_str()) {
Some(index) => { Some(index) => {
match 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"), _ => log::warn!("invalid bitfield index"),
}; };
} }

View file

@ -298,6 +298,7 @@ mod implementation {
fn main() -> ! { fn main() -> ! {
#[cfg(not(any(target_os = "none", target_os = "xous")))]
use crate::implementation::RootKeys; use crate::implementation::RootKeys;
log_server::init_wait().unwrap(); log_server::init_wait().unwrap();

View file

@ -66,8 +66,6 @@ impl Clock for EmbeddedClock {
} }
fn main() -> ! { fn main() -> ! {
use crate::SpinalUsbDevice;
log_server::init_wait().unwrap(); log_server::init_wait().unwrap();
log::set_max_level(log::LevelFilter::Info); log::set_max_level(log::LevelFilter::Info);
log::info!("my PID is {}", xous::process::id()); log::info!("my PID is {}", xous::process::id());