Page MenuHomeDevCentral

Lazy evaluate default values
ClosedPublic

Authored by dereckson on May 30 2020, 22:52.
Tags
None
Referenced Files
F27192076: D2289.id5876.diff
Thu, Apr 30, 14:28
F27192048: D2289.id5767.diff
Thu, Apr 30, 14:28
F27192040: D2289.id5769.diff
Thu, Apr 30, 14:28
F27167632: D2289.diff
Thu, Apr 30, 00:32
Unknown Object (File)
Mon, Apr 27, 01:22
Unknown Object (File)
Mon, Apr 27, 00:20
Unknown Object (File)
Sun, Apr 26, 18:16
Unknown Object (File)
Sat, Apr 25, 21:26
Subscribers
None

Details

Summary

The unwrap_or_else method allows to pass a closure,
and so allows lazy evaluation of the argument.

Test Plan

println!("Mounting at {}", entry_point);

Diff Detail

Repository
rLF Limiting Factor
Lint
Lint Passed
Unit
No Test Coverage
Branch
master
Build Status
Buildable 3556
Build 3805: arc lint + arc unit

Event Timeline

dereckson created this revision.

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.

This revision is now accepted and ready to land.Sep 24 2020, 20:05
This revision was automatically updated to reflect the committed changes.