Page MenuHomeDevCentral

Provide ErrorResult type
ClosedPublic

Authored by dereckson on Sep 4 2018, 12:22.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Feb 9, 03:23
Unknown Object (File)
Sun, Feb 8, 08:17
Unknown Object (File)
Thu, Feb 5, 21:12
Unknown Object (File)
Thu, Feb 5, 19:26
Unknown Object (File)
Thu, Feb 5, 07:56
Unknown Object (File)
Thu, Feb 5, 02:26
Unknown Object (File)
Wed, Feb 4, 10:52
Unknown Object (File)
Fri, Jan 30, 14:30
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.