Merge commit 'b52fb5234c' into clippyup
This commit is contained in:
parent
854f751b26
commit
98bf99e2f8
689 changed files with 15493 additions and 688 deletions
|
|
@ -825,8 +825,9 @@ declare_clippy_lint! {
|
|||
declare_clippy_lint! {
|
||||
/// ### What it does
|
||||
/// Checks for calls to `.or(foo(..))`, `.unwrap_or(foo(..))`,
|
||||
/// etc., and suggests to use `or_else`, `unwrap_or_else`, etc., or
|
||||
/// `unwrap_or_default` instead.
|
||||
/// `.or_insert(foo(..))` etc., and suggests to use `.or_else(|| foo(..))`,
|
||||
/// `.unwrap_or_else(|| foo(..))`, `.unwrap_or_default()` or `.or_default()`
|
||||
/// etc. instead.
|
||||
///
|
||||
/// ### Why is this bad?
|
||||
/// The function will always be called and potentially
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue