Fix small issues from latest clippy version

This commit is contained in:
Gwilym Kuiper 2022-09-15 21:04:10 +01:00
parent ed218102ab
commit 45e9c860df
2 changed files with 3 additions and 3 deletions

View file

@ -36,7 +36,7 @@ fn main() {
.arg("-mthumb-interwork")
.arg("-mcpu=arm7tdmi")
.arg("-g")
.args(&["-o", out_file_path.as_str()])
.args(["-o", out_file_path.as_str()])
.arg(a)
.output()
.unwrap_or_else(|_| panic!("failed to compile {}", a));

View file

@ -79,13 +79,13 @@ impl Timer {
}
pub fn set_enabled(&mut self, enabled: bool) -> &mut Self {
let bit = if enabled { 1 } else { 0 };
let bit = u16::from(enabled);
self.control_register().set_bits(bit, 1, 7);
self
}
pub fn set_cascade(&mut self, cascade: bool) -> &mut Self {
let bit = if cascade { 1 } else { 0 };
let bit = u16::from(cascade);
self.control_register().set_bits(bit, 1, 2);
self
}