Eliminate the function call in xxx_or (e.g. unwrap_or("".to_string())
#15802
Labels
xxx_or (e.g. unwrap_or("".to_string())
#15802
Is your feature request related to a problem or challenge?
I found some unnecessary functions are called, due to using
unwrap_or
rather thanunwrap_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
or_fun_call
lint to cratesunwrap_or
unnecessary_lazy_evaluations
to avoid abusingunwrap_or_else
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: