replaced some unwrap_or with unwrap_or_else
This commit is contained in:
@@ -378,14 +378,14 @@ fn add_query_description_impl(
|
||||
let t = &(t.0).0;
|
||||
quote! { #t }
|
||||
})
|
||||
.unwrap_or(quote! { _ });
|
||||
.unwrap_or_else(|| quote! { _ });
|
||||
let value = args
|
||||
.as_ref()
|
||||
.map(|t| {
|
||||
let t = &(t.1).0;
|
||||
quote! { #t }
|
||||
})
|
||||
.unwrap_or(quote! { _ });
|
||||
.unwrap_or_else(|| quote! { _ });
|
||||
// expr is a `Block`, meaning that `{ #expr }` gets expanded
|
||||
// to `{ { stmts... } }`, which triggers the `unused_braces` lint.
|
||||
quote! {
|
||||
|
||||
Reference in New Issue
Block a user