Remove IncRefError, DecRefError and StoredMapError (#9384)

All of them are a subset of `DispatchError` anyway, no need to have
special errors IMHO.
This commit is contained in:
Bastian Köcher
2021-07-20 10:39:26 +02:00
committed by GitHub
parent 6d9e05cb9a
commit 2b282a9435
9 changed files with 45 additions and 98 deletions
-9
View File
@@ -516,15 +516,6 @@ impl From<crate::traits::BadOrigin> for DispatchError {
}
}
impl From<crate::traits::StoredMapError> for DispatchError {
fn from(e: crate::traits::StoredMapError) -> Self {
match e {
crate::traits::StoredMapError::ConsumerRemaining => Self::ConsumerRemaining,
crate::traits::StoredMapError::NoProviders => Self::NoProviders,
}
}
}
/// Description of what went wrong when trying to complete an operation on a token.
#[derive(Eq, PartialEq, Clone, Copy, Encode, Decode, Debug)]
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]