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
6161/// ```
6262macro_rules! spi_transaction_helper {
6363 ( $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| {
6565 // Safety: Implementers of the `SpiDevice` trait guarantee that the pointer is
6666 // valid and dereferencable for the entire duration of the closure.
6767 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+ }
7274 } )
7375 } ;
7476}
You can’t perform that action at this time.
0 commit comments