refactor!(argus-core): remove unnecessary traits and Copy constraints
This commit is contained in:
parent
86cef692dc
commit
28a79cb88c
9 changed files with 255 additions and 271 deletions
|
|
@ -87,6 +87,16 @@ pub enum Error {
|
|||
},
|
||||
}
|
||||
|
||||
impl Error {
|
||||
/// An [`InvalidCast`](Error::InvalidCast) error from `T` to `U`.
|
||||
pub fn invalid_cast<T, U>() -> Self {
|
||||
Self::InvalidCast {
|
||||
from: std::any::type_name::<T>(),
|
||||
to: std::any::type_name::<U>(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Alias for [`Error`](enum@Error)
|
||||
pub type ArgusError = Error;
|
||||
/// Alias for [`Result<T, ArgusError>`]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue