refactor: use eyre instead of anyhow

This commit is contained in:
technofab 2025-01-07 16:22:17 +01:00
parent 698dfa31e6
commit 8b159d2b56
6 changed files with 21 additions and 21 deletions

View file

@ -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!(