mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-11 17:41:33 +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
|
@ -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));
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue