mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 09:21:05 +00:00
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:
@@ -152,25 +152,6 @@ impl From<BadOrigin> for &'static str {
|
||||
}
|
||||
}
|
||||
|
||||
/// Error that can be returned by our impl of `StoredMap`.
|
||||
#[derive(Encode, Decode, RuntimeDebug)]
|
||||
pub enum StoredMapError {
|
||||
/// Attempt to create map value when it is a consumer and there are no providers in place.
|
||||
NoProviders,
|
||||
/// Attempt to anull/remove value when it is the last provider and there is still at
|
||||
/// least one consumer left.
|
||||
ConsumerRemaining,
|
||||
}
|
||||
|
||||
impl From<StoredMapError> for &'static str {
|
||||
fn from(e: StoredMapError) -> &'static str {
|
||||
match e {
|
||||
StoredMapError::NoProviders => "No providers",
|
||||
StoredMapError::ConsumerRemaining => "Consumer remaining",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// An error that indicates that a lookup failed.
|
||||
#[derive(Encode, Decode, RuntimeDebug)]
|
||||
pub struct LookupError;
|
||||
|
||||
Reference in New Issue
Block a user