Closed
Description
Is your feature request related to a problem or challenge?
I found some unnecessary functions are called, due to using unwrap_or
rather than unwrap_or_else
in funcation call case (some fucntion calls may be not really cheap).
I have eliminate some of them in SessionStateBuilder::build
(#15800 ), but I think we should use lints to ensure it.
Describe the solution you'd like
- Add
or_fun_call
lint to crates - Make clippy again by eliminating the function call in
unwrap_or
- It is better to also add
unnecessary_lazy_evaluations
to avoid abusingunwrap_or_else
Describe alternatives you've considered
No response
Additional context
No response