Skip to content

Commit 13519fc

Browse files
authored
Fix clippy warnings (#150)
1 parent fca3989 commit 13519fc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/flash.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pub struct FlashWriter<'a, const SECTOR_SZ_KB: u32> {
5858
flash_sz: FlashSize,
5959
verify: bool,
6060
}
61-
impl<'a, const SECTOR_SZ_KB: u32> FlashWriter<'a, SECTOR_SZ_KB> {
61+
impl<const SECTOR_SZ_KB: u32> FlashWriter<'_, SECTOR_SZ_KB> {
6262
#[allow(unused)]
6363
fn unlock_options(&mut self) -> Result<()> {
6464
// Check if flash is busy

src/rcc/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ impl Rcc {
414414
let us_per_s = 1_000_000;
415415
// Number of cycles @ sys_freq for 1us, rounded up, this will
416416
// likely end up being 2us since the AHB prescaler is changed
417-
let delay_cycles = (sys_freq + us_per_s - 1) / us_per_s;
417+
let delay_cycles = sys_freq.div_ceil(us_per_s);
418418
cortex_m::asm::delay(delay_cycles);
419419

420420
self.rb

0 commit comments

Comments
 (0)