Skip to content

fix CI warnings #177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- `invalid_reference_casting` Compilation error in spi.rs for Rust version 1.73+ (
See [PR#112431](https://github.com/rust-lang/rust/pull/112431) for more info)
- `unused_doc_comments` Warning in rcc.rs
- Fixed some warnings #177

## [v0.18.0] - 2021-11-14

Expand Down
1 change: 0 additions & 1 deletion examples/dac.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#![no_main]
#![no_std]

use cortex_m;
use cortex_m_rt as rt;
use panic_halt as _;

Expand Down
1 change: 0 additions & 1 deletion examples/pwm_complementary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// Halt on panic
use panic_halt as _;

use cortex_m;
use cortex_m_rt::entry;

use stm32f0xx_hal as hal;
Expand Down
6 changes: 3 additions & 3 deletions examples/usb_serial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fn main() -> ! {
// Configure the on-board LED (LD3, green)
let gpiob = dp.GPIOB.split(&mut rcc);
let mut led = cortex_m::interrupt::free(|cs| gpiob.pb3.into_push_pull_output(cs));
led.set_low(); // Turn off
led.set_low().ok(); // Turn off

let gpioa = dp.GPIOA.split(&mut rcc);

Expand Down Expand Up @@ -66,7 +66,7 @@ fn main() -> ! {

match serial.read(&mut buf) {
Ok(count) if count > 0 => {
led.set_high(); // Turn on
led.set_high().ok(); // Turn on

// Echo back in upper case
for c in buf[0..count].iter_mut() {
Expand All @@ -88,6 +88,6 @@ fn main() -> ! {
_ => {}
}

led.set_low(); // Turn off
led.set_low().ok(); // Turn off
}
}
2 changes: 1 addition & 1 deletion src/gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -758,4 +758,4 @@ gpio!([
PF9: (pf9, 9, Input<Floating>),
PF10: (pf10, 10, Input<Floating>),
]
]);
]);
4 changes: 1 addition & 3 deletions src/signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
//!
//! (stored in flash memory)

use core::str::from_utf8_unchecked;

/// This is the test voltage in millivolts of the calibration done at the factory
pub const VDDA_CALIB: u32 = 3300;

Expand Down Expand Up @@ -54,7 +52,7 @@ impl Uid {

/// Lot number
pub fn lot_num(&self) -> &str {
unsafe { from_utf8_unchecked(&self.waf_lot[1..]) }
unsafe { core::str::from_utf8_unchecked(&self.waf_lot[1..]) }
}
}

Expand Down