mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 18:21:45 +00:00
Relax PartialEq constraint on error enums (#1179)
This commit is contained in:
@@ -3,7 +3,7 @@ use crate::hot_cold_store::HotColdDBError;
|
||||
use ssz::DecodeError;
|
||||
use types::{BeaconStateError, Hash256};
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug)]
|
||||
pub enum Error {
|
||||
SszDecodeError(DecodeError),
|
||||
VectorChunkError(ChunkError),
|
||||
|
||||
@@ -337,20 +337,20 @@ mod tests {
|
||||
let key = Hash256::random();
|
||||
let item = StorableThing { a: 1, b: 42 };
|
||||
|
||||
assert_eq!(store.exists::<StorableThing>(&key), Ok(false));
|
||||
assert_eq!(store.exists::<StorableThing>(&key).unwrap(), false);
|
||||
|
||||
store.put(&key, &item).unwrap();
|
||||
|
||||
assert_eq!(store.exists::<StorableThing>(&key), Ok(true));
|
||||
assert_eq!(store.exists::<StorableThing>(&key).unwrap(), true);
|
||||
|
||||
let retrieved = store.get(&key).unwrap().unwrap();
|
||||
assert_eq!(item, retrieved);
|
||||
|
||||
store.delete::<StorableThing>(&key).unwrap();
|
||||
|
||||
assert_eq!(store.exists::<StorableThing>(&key), Ok(false));
|
||||
assert_eq!(store.exists::<StorableThing>(&key).unwrap(), false);
|
||||
|
||||
assert_eq!(store.get::<StorableThing>(&key), Ok(None));
|
||||
assert_eq!(store.get::<StorableThing>(&key).unwrap(), None);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user