fixed warnings

This commit is contained in:
Grant Wuerker 2018-11-18 16:31:22 -06:00
parent 005efc2e7a
commit 9148c20630
2 changed files with 10 additions and 10 deletions

View File

@ -104,7 +104,7 @@ mod tests {
let ssz = "some bytes".as_bytes();
let hash = &Hash256::from("some hash".as_bytes()).to_vec();
store.put_serialized_block(hash, ssz);
store.put_serialized_block(hash, ssz).unwrap();
assert_eq!(db.get(DB_COLUMN, hash).unwrap().unwrap(), ssz);
}
@ -116,7 +116,7 @@ mod tests {
let ssz = "some bytes".as_bytes();
let hash = &Hash256::from("some hash".as_bytes()).to_vec();
db.put(DB_COLUMN, hash, ssz);
db.put(DB_COLUMN, hash, ssz).unwrap();
assert_eq!(store.get_serialized_block(hash).unwrap().unwrap(), ssz);
}
@ -128,7 +128,7 @@ mod tests {
let ssz = "some bytes".as_bytes();
let hash = &Hash256::from("some hash".as_bytes()).to_vec();
db.put(DB_COLUMN, hash, ssz);
db.put(DB_COLUMN, hash, ssz).unwrap();
assert!(store.block_exists(hash).unwrap());
}
@ -141,7 +141,7 @@ mod tests {
let hash = &Hash256::from("some hash".as_bytes()).to_vec();
let other_hash = &Hash256::from("another hash".as_bytes()).to_vec();
db.put(DB_COLUMN, hash, ssz);
db.put(DB_COLUMN, hash, ssz).unwrap();
assert!(!store.block_exists(other_hash).unwrap());
}
@ -153,10 +153,10 @@ mod tests {
let ssz = "some bytes".as_bytes();
let hash = &Hash256::from("some hash".as_bytes()).to_vec();
db.put(DB_COLUMN, hash, ssz);
db.put(DB_COLUMN, hash, ssz).unwrap();
assert!(db.exists(DB_COLUMN, hash).unwrap());
store.delete_block(hash);
store.delete_block(hash).unwrap();
assert!(!db.exists(DB_COLUMN, hash).unwrap());
}

View File

@ -36,7 +36,7 @@ mod tests {
let store = PoWChainStore::new(db.clone());
let hash: &[u8] = &[rand::random()];
store.put_block_hash(hash);
store.put_block_hash(hash).unwrap();
assert!(db.exists(DB_COLUMN, hash).unwrap());
}
@ -47,7 +47,7 @@ mod tests {
let store = PoWChainStore::new(db.clone());
let hash: &[u8] = &[rand::random()];
db.put(DB_COLUMN, hash, &[0]);
db.put(DB_COLUMN, hash, &[0]).unwrap();
assert!(store.block_hash_exists(hash).unwrap());
}
@ -59,7 +59,7 @@ mod tests {
let hash: &[u8] = &[rand::random()];
let other_hash: &[u8] = &[rand::random()];
db.put(DB_COLUMN, hash, &[0]);
db.put(DB_COLUMN, hash, &[0]).unwrap();
assert!(!store.block_hash_exists(other_hash).unwrap());
}