chore(clippy): assert_eq on bool
This commit is contained in:
parent
c4e1b13a2e
commit
d793ad8313
@ -144,11 +144,11 @@ mod tests {
|
||||
|
||||
let mut lock = FsLock::new(lockfile_path.clone());
|
||||
let result = lock.try_exclusive();
|
||||
assert_eq!(result.is_ok(), true);
|
||||
assert!(result.is_ok());
|
||||
|
||||
let mut failing_lock = FsLock::new(lockfile_path.clone());
|
||||
let result = failing_lock.try_exclusive();
|
||||
assert_eq!(result.is_err(), true);
|
||||
assert!(result.is_err());
|
||||
|
||||
// Clean-up.
|
||||
std::fs::remove_file(lockfile_path).unwrap();
|
||||
|
@ -697,7 +697,7 @@ mod tests {
|
||||
store.open().await.unwrap();
|
||||
|
||||
let contains = store.contains(&cid);
|
||||
assert_eq!(contains.await.unwrap(), false);
|
||||
assert!(!contains.await.unwrap());
|
||||
let get = store.get(&cid);
|
||||
assert_eq!(get.await.unwrap(), None);
|
||||
if store.remove(&cid).await.unwrap().is_ok() {
|
||||
@ -707,13 +707,13 @@ mod tests {
|
||||
let put = store.put(block.clone());
|
||||
assert_eq!(put.await.unwrap().0, cid.to_owned());
|
||||
let contains = store.contains(&cid);
|
||||
assert_eq!(contains.await.unwrap(), true);
|
||||
assert!(contains.await.unwrap());
|
||||
let get = store.get(&cid);
|
||||
assert_eq!(get.await.unwrap(), Some(block.clone()));
|
||||
|
||||
store.remove(&cid).await.unwrap().unwrap();
|
||||
let contains = store.contains(&cid);
|
||||
assert_eq!(contains.await.unwrap(), false);
|
||||
assert!(!contains.await.unwrap());
|
||||
let get = store.get(&cid);
|
||||
assert_eq!(get.await.unwrap(), None);
|
||||
}
|
||||
@ -753,7 +753,7 @@ mod tests {
|
||||
store.open().await.unwrap();
|
||||
|
||||
let contains = store.contains(col, &key);
|
||||
assert_eq!(contains.await.unwrap(), false);
|
||||
assert!(!contains.await.unwrap());
|
||||
let get = store.get(col, &key);
|
||||
assert_eq!(get.await.unwrap(), None);
|
||||
store.remove(col, &key).await.unwrap();
|
||||
@ -761,13 +761,13 @@ mod tests {
|
||||
let put = store.put(col, &key, &value);
|
||||
put.await.unwrap();
|
||||
let contains = store.contains(col, &key);
|
||||
assert_eq!(contains.await.unwrap(), true);
|
||||
assert!(contains.await.unwrap());
|
||||
let get = store.get(col, &key);
|
||||
assert_eq!(get.await.unwrap(), Some(value.to_vec()));
|
||||
|
||||
store.remove(col, &key).await.unwrap();
|
||||
let contains = store.contains(col, &key);
|
||||
assert_eq!(contains.await.unwrap(), false);
|
||||
assert!(!contains.await.unwrap());
|
||||
let get = store.get(col, &key);
|
||||
assert_eq!(get.await.unwrap(), None);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user