File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -61,14 +61,16 @@ where
61
61
/// ```
62
62
macro_rules! spi_transaction_helper {
63
63
( $device: expr, move |$bus: ident| async move $closure_body: expr) => {
64
- $crate:: spi:: SpiDevice :: transaction( $device, move |$bus| async move {
64
+ $crate:: spi:: SpiDevice :: transaction( $device, move |$bus| {
65
65
// Safety: Implementers of the `SpiDevice` trait guarantee that the pointer is
66
66
// valid and dereferencable for the entire duration of the closure.
67
67
let $bus = unsafe { & mut * $bus } ;
68
- let result = $closure_body;
69
- let $bus = $bus; // Ensure that the bus reference was not moved out of the closure
70
- let _ = $bus; // Silence the "unused variable" warning from prevous line
71
- result
68
+ async move {
69
+ let result = $closure_body;
70
+ let $bus = $bus; // Ensure that the bus reference was not moved out of the closure
71
+ let _ = $bus; // Silence the "unused variable" warning from prevous line
72
+ result
73
+ }
72
74
} )
73
75
} ;
74
76
}
You can’t perform that action at this time.
0 commit comments