Skip to content

Commit d89d9e1

Browse files
author
Henrik Snöman
committed
Fixed missed error
1 parent ef46ad5 commit d89d9e1

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020
- stm32h562
2121
- stm32h563
2222
- stm32h573
23+
features:
24+
- rand
2325
env: # Peripheral Feature flags
2426
FLAGS: rt,log
2527

@@ -42,6 +44,6 @@ jobs:
4244
- name: Install thumbv8m rust target
4345
run: rustup target add thumbv8m.main-none-eabihf
4446
- name: Build
45-
run: cargo build --verbose --release --examples --target thumbv8m.main-none-eabihf --features ${{ matrix.mcu }},${{ env.FLAGS }}
47+
run: cargo build --verbose --release --examples --target thumbv8m.main-none-eabihf --features ${{ matrix.mcu }},${{ matrix.features }},${{ env.FLAGS }}
4648
- name: Test
47-
run: cargo test --lib --target x86_64-unknown-linux-gnu --features ${{ matrix.mcu }},${{ env.FLAGS }}
49+
run: cargo test --lib --target x86_64-unknown-linux-gnu --features ${{ matrix.mcu }},${{ matrix.features }},${{ env.FLAGS }}

src/rng.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,9 +433,9 @@ impl<MODE> rand_core::RngCore for Rng<MODE> {
433433
&mut self,
434434
dest: &mut [u8],
435435
) -> Result<(), rand_core::Error> {
436-
self.fill(dest).map_err(|e| {
436+
self.fill(dest).map_err(|_e| {
437437
core::num::NonZeroU32::new(
438-
rand_core::Error::CUSTOM_START + e as u32,
438+
rand_core::Error::CUSTOM_START,
439439
)
440440
// This should never fail as long as no enum variant is equal to 0
441441
.expect("Internal hal error")

0 commit comments

Comments
 (0)