Skip to content

Commit f565750

Browse files
bors[bot]newAM
andauthored
Merge #421
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 <[email protected]>
2 parents c7433b0 + a1dee3e commit f565750

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

embedded-hal-async/src/spi.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,28 @@ where
1313
T: SpiDevice + ?Sized + 'a,
1414
T::Bus: SpiBusRead<Word>,
1515
Word: Copy + 'static,
16-
= impl Future<Output = Result<(), T::Error>>;
16+
= impl Future<Output = Result<(), T::Error>> + 'a;
1717

1818
type WriteFuture<'a, T, Word>
1919
where
2020
T: SpiDevice + ?Sized + 'a,
2121
T::Bus: SpiBusWrite<Word>,
2222
Word: Copy + 'static,
23-
= impl Future<Output = Result<(), T::Error>>;
23+
= impl Future<Output = Result<(), T::Error>> + 'a;
2424

2525
type TransferFuture<'a, T, Word>
2626
where
2727
T: SpiDevice + ?Sized + 'a,
2828
T::Bus: SpiBus<Word>,
2929
Word: Copy + 'static,
30-
= impl Future<Output = Result<(), T::Error>>;
30+
= impl Future<Output = Result<(), T::Error>> + 'a;
3131

3232
type TransferInPlaceFuture<'a, T, Word>
3333
where
3434
T: SpiDevice + ?Sized + 'a,
3535
T::Bus: SpiBus<Word>,
3636
Word: Copy + 'static,
37-
= impl Future<Output = Result<(), T::Error>>;
37+
= impl Future<Output = Result<(), T::Error>> + 'a;
3838

3939
#[macro_export]
4040
/// Do an SPI transaction on a bus.
@@ -488,7 +488,7 @@ where
488488
{
489489
type Bus = BUS;
490490

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

0 commit comments

Comments
 (0)