replaced some unwrap_or with unwrap_or_else
This commit is contained in:
parent
446d4533e8
commit
5ff1be197e
6 changed files with 11 additions and 11 deletions
|
@ -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! {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue