Merge pull request #305 from gwilymk/fixes-for-latest-clippy

Fix small issues from latest clippy version
This commit is contained in:
Gwilym Kuiper 2022-09-15 21:19:19 +01:00 committed by GitHub
commit 944c198659
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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
}