You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most of the result.unwrap_or_else(|| <some value, or object property>) code can be replaced with result.unwrap_or(<some value>). This is mostly a readability issue and probably gives extra work to the inliner/optimizer similar to other redundant closures.
The text was updated successfully, but these errors were encountered:
Thinking about this a little, I think I might be able to implement this lint for at least the subset of cases. Unfortunately it doesn't help that clippy::author doesn't expand closures :)
Most of the
result.unwrap_or_else(|| <some value, or object property>)
code can be replaced withresult.unwrap_or(<some value>)
. This is mostly a readability issue and probably gives extra work to the inliner/optimizer similar to other redundant closures.The text was updated successfully, but these errors were encountered: