You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Jails to set test config values and envvars for some tests, and the functions being tested all return a non-Figment Error type as a Result. The Jail body does not accept these errors as a valid return, and I have to either manually assert is_ok() or map the error into a String for every Result.
an example:
Ideally, the Jail body should accept something like Box<dyn Error> so that any application errors can be handled by early-?.
figment::Jail::expect_with(|jail| {// would be ideal, but doesnt workfallible_foo()?;// works but grossbreakable_bar().map_err(|e| format!("{e:?}"))?;Ok(())});
The text was updated successfully, but these errors were encountered:
I am using
Jail
s to set test config values and envvars for some tests, and the functions being tested all return a non-FigmentError
type as aResult
. TheJail
body does not accept these errors as a valid return, and I have to either manually assert is_ok() or map the error into a String for every Result.an example:
Ideally, the
Jail
body should accept something likeBox<dyn Error>
so that any application errors can be handled by early-?.The text was updated successfully, but these errors were encountered: