Page MenuHomeDevCentral

Provide ErrorResult type
ClosedPublic

Authored by dereckson on Sep 4 2018, 12:22.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Aug 1, 20:28
Unknown Object (File)
Fri, Aug 1, 13:50
Unknown Object (File)
Thu, Jul 31, 23:46
Unknown Object (File)
Wed, Jul 30, 10:22
Unknown Object (File)
Sat, Jul 26, 19:45
Unknown Object (File)
Sun, Jul 20, 23:24
Unknown Object (File)
Jul 4 2025, 09:34
Unknown Object (File)
Jun 30 2025, 19:59
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.