Skip to content

Commit

Permalink
Merge #421
Browse files Browse the repository at this point in the history
421: embedded-hal-async: fix compilation on latest nightly r=Dirbaio a=newAM

Compiling `embedded-hal-async` on the current nightly, rustc 1.66.0-nightly (5c8bff74b 2022-10-21), will fail.

This fixes compilation.

Co-authored-by: Alex Martens <alex@thinglab.org>
  • Loading branch information
bors[bot] and newAM authored Oct 23, 2022
2 parents c7433b0 + a1dee3e commit f565750
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions embedded-hal-async/src/spi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,28 @@ where
T: SpiDevice + ?Sized + 'a,
T::Bus: SpiBusRead<Word>,
Word: Copy + 'static,
= impl Future<Output = Result<(), T::Error>>;
= impl Future<Output = Result<(), T::Error>> + 'a;

type WriteFuture<'a, T, Word>
where
T: SpiDevice + ?Sized + 'a,
T::Bus: SpiBusWrite<Word>,
Word: Copy + 'static,
= impl Future<Output = Result<(), T::Error>>;
= impl Future<Output = Result<(), T::Error>> + 'a;

type TransferFuture<'a, T, Word>
where
T: SpiDevice + ?Sized + 'a,
T::Bus: SpiBus<Word>,
Word: Copy + 'static,
= impl Future<Output = Result<(), T::Error>>;
= impl Future<Output = Result<(), T::Error>> + 'a;

type TransferInPlaceFuture<'a, T, Word>
where
T: SpiDevice + ?Sized + 'a,
T::Bus: SpiBus<Word>,
Word: Copy + 'static,
= impl Future<Output = Result<(), T::Error>>;
= impl Future<Output = Result<(), T::Error>> + 'a;

#[macro_export]
/// Do an SPI transaction on a bus.
Expand Down Expand Up @@ -488,7 +488,7 @@ where
{
type Bus = BUS;

type TransactionFuture<'a, R, F, Fut> = impl Future<Output = Result<R, Self::Error>>
type TransactionFuture<'a, R, F, Fut> = impl Future<Output = Result<R, Self::Error>> + 'a
where
Self: 'a, R: 'a, F: FnOnce(*mut Self::Bus) -> Fut + 'a,
Fut: Future<Output = Result<R, <Self::Bus as ErrorType>::Error>> + 'a;
Expand Down

0 comments on commit f565750

Please sign in to comment.