mirror of
https://github.com/TECHNOFAB11/aerosol.git
synced 2025-12-11 23:50:07 +01:00
refactor: use eyre instead of anyhow
This commit is contained in:
parent
698dfa31e6
commit
8b159d2b56
6 changed files with 21 additions and 21 deletions
|
|
@ -36,14 +36,14 @@ pub(crate) fn unwrap_resource<T: Resource>(opt: Option<T>) -> T {
|
|||
}
|
||||
}
|
||||
|
||||
pub(crate) fn unwrap_constructed<T: Resource, U>(res: Result<U, impl Into<anyhow::Error>>) -> U {
|
||||
pub(crate) fn unwrap_constructed<T: Resource, U>(res: Result<U, impl Into<eyre::Error>>) -> U {
|
||||
match res {
|
||||
Ok(x) => x,
|
||||
Err(e) => panic!("Failed to construct `{}`: {}", type_name::<T>(), e.into()),
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn unwrap_constructed_hlist<T, U>(res: Result<U, impl Into<anyhow::Error>>) -> U {
|
||||
pub(crate) fn unwrap_constructed_hlist<T, U>(res: Result<U, impl Into<eyre::Error>>) -> U {
|
||||
match res {
|
||||
Ok(x) => x,
|
||||
Err(e) => panic!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue