Open
Description
The current interface
pub trait Storage: ReadonlyStorage {
// ...
fn remove(&mut self, key: &[u8]) -> StdResult<()>;
}
doen't allow to differentiate if a key existed before removal or not. If this becomes an interesting information, the trait and its implementations can be changed to
pub trait Storage: ReadonlyStorage {
// ...
/// Returns true iff an removal happened, i.e. the key existed before.
fn remove(&mut self, key: &[u8]) -> StdResult<bool>;
}