Skip to content

Commit

Permalink
Merge pull request #9 from HazelSh/main
Browse files Browse the repository at this point in the history
rework to no longer use the path alloc::prelude, as it's now removed
  • Loading branch information
antoinevg authored Feb 20, 2022
2 parents 4d827f5 + eb0c533 commit 209d938
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/audio.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#[cfg(any(feature = "alloc"))] extern crate alloc;
#[cfg(any(feature = "alloc"))] use alloc::prelude::v1::Box;
#[cfg(any(feature = "alloc"))] use alloc::boxed::Box;

use stm32h7xx_hal as hal;
use hal::gpio;
Expand Down Expand Up @@ -155,7 +155,7 @@ impl<'a> Interface<'a> {
fs: FS,

#[cfg(not(feature = "alloc"))] function_ptr: None,
#[cfg(any(feature = "alloc"))] closure: None,
#[cfg(any(feature = "alloc"))] closure: Option::None,

ak4556_reset: Some(pins.0),
hal_dma1_stream0: Some(dma1_str0),
Expand Down
4 changes: 2 additions & 2 deletions src/midi.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#[cfg(any(feature = "alloc"))] extern crate alloc;
#[cfg(any(feature = "alloc"))] use alloc::prelude::v1::Box;
#[cfg(any(feature = "alloc"))] use alloc::boxed::Box;

pub use stm32h7xx_hal as hal;
use hal::prelude::*;
Expand Down Expand Up @@ -50,7 +50,7 @@ impl<'a> Interface<'a> {
tx,

#[cfg(not(feature = "alloc"))] function_ptr: None,
#[cfg(any(feature = "alloc"))] closure: None,
#[cfg(any(feature = "alloc"))] closure: Option::None,

_marker: core::marker::PhantomData
})
Expand Down

0 comments on commit 209d938

Please sign in to comment.