Page MenuHomeDevCentral

Provide ErrorResult type
ClosedPublic

Authored by dereckson on Sep 4 2018, 12:22.
Tags
None
Referenced Files
F25940832: D1660.id.diff
Sun, Apr 19, 04:38
F25904318: D1660.id.diff
Sat, Apr 18, 23:37
F25879944: D1660.id.diff
Sat, Apr 18, 20:26
Unknown Object (File)
Tue, Apr 14, 22:06
Unknown Object (File)
Sun, Apr 12, 12:54
Unknown Object (File)
Sat, Apr 11, 22:49
Unknown Object (File)
Sat, Apr 11, 08:27
Unknown Object (File)
Fri, Apr 10, 09:03
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.