Page MenuHomeDevCentral

Provide ErrorResult type
ClosedPublic

Authored by dereckson on Sep 4 2018, 12:22.
Tags
None
Referenced Files
F13437557: D1660.id4237.diff
Sat, Nov 22, 09:08
F13437546: D1660.id4236.diff
Sat, Nov 22, 09:08
F13433584: D1660.diff
Sat, Nov 22, 08:27
Unknown Object (File)
Tue, Nov 18, 17:07
Unknown Object (File)
Tue, Nov 18, 04:08
Unknown Object (File)
Mon, Nov 17, 23:28
Unknown Object (File)
Wed, Nov 12, 05:50
Unknown Object (File)
Wed, Nov 12, 02:18
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.