The unwrap_or_else method allows to pass a closure,
and so allows lazy evaluation of the argument.
Details
Details
- Reviewers
amj dereckson - Commits
- rLF56b5eae8479a: Lazy evaluate default values
println!("Mounting at {}", entry_point);
Diff Detail
Diff Detail
- Repository
- rLF Limiting Factor
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
I'm not sure the performance improvement justify a commit. These kind of optimization can probably be done by the compiler because String::from("/") have no side effect.