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 Passed - Unit
No Test Coverage - Branch
- fix-unwrap-or
- Build Status
Buildable 3558 Build 3807: arc lint + arc unit
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.