Page MenuHomeDevCentral

Provide ErrorResult type
ClosedPublic

Authored by dereckson on Sep 4 2018, 12:22.
Tags
None
Referenced Files
F53597099: D1660.diff
Sun, Oct 11, 02:03
Unknown Object (File)
Sat, Oct 10, 14:14
Unknown Object (File)
Thu, Oct 8, 00:20
Unknown Object (File)
Wed, Oct 7, 01:22
Unknown Object (File)
Tue, Oct 6, 13:05
Unknown Object (File)
Tue, Sep 29, 19:07
Unknown Object (File)
Sat, Sep 26, 06:59
Unknown Object (File)
Tue, Sep 22, 23:45
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.