fixes for rustfmt + ast visitor

This commit is contained in:
Dinu Blanovschi 2023-11-04 20:39:15 +01:00
parent a3be235fcc
commit 494560cb57
2 changed files with 2 additions and 2 deletions

View File

@ -264,7 +264,7 @@ fn rewrite_closure_fn_decl(
"" ""
}; };
let is_async = if asyncness.is_async() { "async " } else { "" }; let is_async = if asyncness.is_async() { "async " } else { "" };
let mover = if capture == ast::CaptureBy::Value { let mover = if matches!(capture, ast::CaptureBy::Value { .. }) {
"move " "move "
} else { } else {
"" ""

View File

@ -368,7 +368,7 @@ fn needs_space_after_range(rhs: &ast::Expr) -> bool {
} }
} }
ast::ExprKind::Gen(capture_by, ref block, ref kind) => { ast::ExprKind::Gen(capture_by, ref block, ref kind) => {
let mover = if capture_by == ast::CaptureBy::Value { let mover = if matches!(capture_by, ast::CaptureBy::Value { .. }) {
"move " "move "
} else { } else {
"" ""