Skip to content

Commit d1ad94f

Browse files
authored
Merge pull request #47 from stm32-rs/clippy
Add clippy exeptions to examples
2 parents f8a0934 + 2c4757b commit d1ad94f

File tree

8 files changed

+8
-0
lines changed

8 files changed

+8
-0
lines changed

examples/blinky_random.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ fn main() -> ! {
4444
}
4545
}
4646

47+
#[allow(clippy::empty_loop)]
4748
#[exception]
4849
fn HardFault(ef: &ExceptionFrame) -> ! {
4950
hprintln!("Hard fault {:#?}", ef).unwrap();

examples/clockout.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use hal::rcc::{Config, LSCOSrc, MCOSrc, Prescaler};
1313
use hal::stm32;
1414
use rt::entry;
1515

16+
#[allow(clippy::empty_loop)]
1617
#[entry]
1718
fn main() -> ! {
1819
let dp = stm32::Peripherals::take().expect("cannot take peripherals");

examples/flash.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ use hal::flash::*;
1414
use hal::stm32;
1515
use rt::entry;
1616

17+
#[allow(clippy::empty_loop)]
1718
#[entry]
1819
fn main() -> ! {
1920
let dp = stm32::Peripherals::take().expect("cannot take peripherals");

examples/hello.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ extern crate stm32g0xx_hal as hal;
1111
use cortex_m_semihosting::hprintln;
1212
use rt::entry;
1313

14+
#[allow(clippy::empty_loop)]
1415
#[entry]
1516
fn main() -> ! {
1617
hprintln!("Hello, STM32G0!").unwrap();

examples/pwm.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use hal::prelude::*;
1313
use hal::stm32;
1414
use rt::{entry, exception, ExceptionFrame};
1515

16+
#[allow(clippy::empty_loop)]
1617
#[entry]
1718
fn main() -> ! {
1819
let dp = stm32::Peripherals::take().expect("cannot take peripherals");

examples/sdcard.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ use hal::spi;
2121
use hal::stm32;
2222
use rt::entry;
2323

24+
#[allow(clippy::empty_loop)]
2425
#[entry]
2526
fn main() -> ! {
2627
let dp = stm32::Peripherals::take().expect("cannot take peripherals");

examples/stopwatch.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ use hal::rcc::{Config, SysClockSrc};
1616
use hal::stm32;
1717
use rt::entry;
1818

19+
#[allow(clippy::empty_loop)]
1920
#[entry]
2021
fn main() -> ! {
2122
let cp = cortex_m::Peripherals::take().expect("cannot take core peripherals");

examples/watchdog.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ use hal::prelude::*;
1414
use hal::stm32;
1515
use rt::{entry, exception, ExceptionFrame};
1616

17+
#[allow(clippy::empty_loop)]
1718
#[entry]
1819
fn main() -> ! {
1920
let dp = stm32::Peripherals::take().expect("cannot take peripherals");

0 commit comments

Comments
 (0)