Skip to content

Commit 27e1439

Browse files
bors[bot]sirhcel
andauthored
Merge #343
343: Clean up warning on unused result r=adamgreig a=sirhcel I would prefer the example code not to contain unused results. This cleans up the actually one and only warning on an unused result. ```bash $ cargo build --target thumbv7em-none-eabihf [...] warning: unused `Result` that must be used --> src/16-punch-o-meter/auxiliary/src/lib.rs:38:5 | 38 | nss.set_high(); | ^^^^^^^^^^^^^^^ | = note: `#[warn(unused_must_use)]` on by default = note: this `Result` may be an `Err` variant, which should be handled warning: 1 warning emitted [...] ``` Co-authored-by: Christian Meusel <christian.meusel@posteo.de>
2 parents cc254bb + df0e7e4 commit 27e1439

File tree

1 file changed

+1
-1
lines changed
  • src/16-punch-o-meter/auxiliary/src

1 file changed

+1
-1
lines changed

src/16-punch-o-meter/auxiliary/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub fn init() -> (Lsm303dlhc, Delay, MonoTimer, ITM) {
3535
let mut nss = gpioe
3636
.pe3
3737
.into_push_pull_output(&mut gpioe.moder, &mut gpioe.otyper);
38-
nss.set_high();
38+
nss.set_high().unwrap();
3939

4040
let mut gpiob = dp.GPIOB.split(&mut rcc.ahb);
4141
let scl = gpiob.pb6.into_af4(&mut gpiob.moder, &mut gpiob.afrl);

0 commit comments

Comments
 (0)