Module clippy_utils::eager_or_lazy
source · Expand description
Utilities for evaluating whether eagerly evaluated expressions can be made lazy and vice versa.
Things to consider:
- has the expression side-effects?
- is the expression computationally expensive?
See lints:
- unnecessary-lazy-evaluations
- or-fun-call
- option-if-let-else
Enums
Functions
Determine the eagerness of the given function call.
Whether the given expression should be changed to evaluate eagerly
Whether the given expression should be changed to evaluate lazily