mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-27 01:26:36 +11:00
Merge pull request #305 from gwilymk/fixes-for-latest-clippy
Fix small issues from latest clippy version
This commit is contained in:
commit
944c198659
2 changed files with 3 additions and 3 deletions
|
@ -36,7 +36,7 @@ fn main() {
|
||||||
.arg("-mthumb-interwork")
|
.arg("-mthumb-interwork")
|
||||||
.arg("-mcpu=arm7tdmi")
|
.arg("-mcpu=arm7tdmi")
|
||||||
.arg("-g")
|
.arg("-g")
|
||||||
.args(&["-o", out_file_path.as_str()])
|
.args(["-o", out_file_path.as_str()])
|
||||||
.arg(a)
|
.arg(a)
|
||||||
.output()
|
.output()
|
||||||
.unwrap_or_else(|_| panic!("failed to compile {}", a));
|
.unwrap_or_else(|_| panic!("failed to compile {}", a));
|
||||||
|
|
|
@ -79,13 +79,13 @@ impl Timer {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_enabled(&mut self, enabled: bool) -> &mut Self {
|
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.control_register().set_bits(bit, 1, 7);
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_cascade(&mut self, cascade: bool) -> &mut 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.control_register().set_bits(bit, 1, 2);
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue