chore: apply some style suggestions (#7307)

This commit is contained in:
Matthias Seitz
2024-03-24 23:52:33 +01:00
committed by GitHub
parent 7e6d61a66a
commit a31202670b
39 changed files with 184 additions and 182 deletions

View File

@ -503,7 +503,7 @@ mod tests {
// GET
let tx = env.tx().expect(ERROR_INIT_TX);
let result = tx.get::<Headers>(key).expect(ERROR_GET);
assert!(result.expect(ERROR_RETURN_VALUE) == value);
assert_eq!(result.expect(ERROR_RETURN_VALUE), value);
tx.commit().expect(ERROR_COMMIT);
}
@ -1131,9 +1131,9 @@ mod tests {
let mut cursor = tx.cursor_dup_read::<PlainStorageState>().unwrap();
// Notice that value11 and value22 have been ordered in the DB.
assert!(Some(value00) == cursor.next_dup_val().unwrap());
assert!(Some(value11) == cursor.next_dup_val().unwrap());
assert!(Some(value22) == cursor.next_dup_val().unwrap());
assert_eq!(Some(value00), cursor.next_dup_val().unwrap());
assert_eq!(Some(value11), cursor.next_dup_val().unwrap());
assert_eq!(Some(value22), cursor.next_dup_val().unwrap());
}
// Seek value with exact subkey

View File

@ -96,8 +96,9 @@ mod tests {
let mut ommer = StoredBlockOmmers::default();
ommer.ommers.push(Header::default());
ommer.ommers.push(Header::default());
assert!(
ommer.clone() == StoredBlockOmmers::decompress::<Vec<_>>(ommer.compress()).unwrap()
assert_eq!(
ommer.clone(),
StoredBlockOmmers::decompress::<Vec<_>>(ommer.compress()).unwrap()
);
}