feat: Clippy mem drop,

re-arrange .lock() ordering, and use `value_capture!`, to satisfy has_significant_drop rule
This commit is contained in:
Jack Wills
2023-06-14 20:47:24 +00:00
parent 591b569e60
commit 3b61a704e2
4 changed files with 37 additions and 28 deletions
+2 -1
View File
@@ -197,7 +197,8 @@ impl Ui {
}
}
// This macro simplifies the definition and evaluation of variables by capturing and immediately evaluating an expression.
#[macro_export]
/// This macro simplifies the definition and evaluation of variables by capturing and immediately evaluating an expression.
macro_rules! value_capture {
($name:ident, $lock_expr:expr) => {
let $name = || $lock_expr;