We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
drop($bus)
let $bus = $bus
1 parent 93eb20f commit eeec389Copy full SHA for eeec389
embedded-hal-async/src/spi.rs
@@ -66,7 +66,8 @@ macro_rules! spi_transaction_helper {
66
// valid and dereferencable for the entire duration of the closure.
67
let $bus = unsafe { &mut *$bus };
68
let result = $closure_body;
69
- ::core::mem::drop($bus); // Ensure that the bus reference was not moved out of the closure
+ 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
72
})
73
};
0 commit comments