Page MenuHomeDevCentral

Provide ErrorResult type
ClosedPublic

Authored by dereckson on Sep 4 2018, 12:22.
Tags
None
Referenced Files
F24792031: D1660.diff
Tue, Mar 10, 23:12
F24791810: D1660.diff
Tue, Mar 10, 23:01
F24786690: D1660.id4237.diff
Tue, Mar 10, 15:51
F24786644: D1660.diff
Tue, Mar 10, 15:50
Unknown Object (File)
Sun, Mar 8, 14:34
Unknown Object (File)
Sun, Mar 8, 05:38
Unknown Object (File)
Sun, Mar 8, 04:07
Unknown Object (File)
Sat, Mar 7, 02:06
Subscribers
None

Details

Summary

ErrorResult<T> is a convenience alias to avoid to write types like
Result<User, Box<dyn Error>>, to allow any object implementing the
standard library Error trait to serve as the error part of a result.

Test Plan
pub fn run(config: Config) -> ErrorResult<()> {
	something_dangerous()?;

	Ok(())
}

Diff Detail

Repository
rLF Limiting Factor
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dereckson created this revision.
This revision is now accepted and ready to land.Sep 4 2018, 12:22
This revision was automatically updated to reflect the committed changes.