fix clippy warnings
This commit is contained in:
committed by
Tomas Babej
parent
7b35121374
commit
41625f8b11
@@ -271,7 +271,7 @@ mod test {
|
||||
|
||||
let unsealed = Unsealed {
|
||||
version_id,
|
||||
payload: payload,
|
||||
payload,
|
||||
};
|
||||
let sealed = cryptor.seal(unsealed).unwrap();
|
||||
|
||||
@@ -291,7 +291,7 @@ mod test {
|
||||
|
||||
let unsealed = Unsealed {
|
||||
version_id,
|
||||
payload: payload,
|
||||
payload,
|
||||
};
|
||||
let mut sealed = cryptor.seal(unsealed).unwrap();
|
||||
sealed.version_id = Uuid::new_v4(); // change the version_id
|
||||
@@ -309,7 +309,7 @@ mod test {
|
||||
|
||||
let unsealed = Unsealed {
|
||||
version_id,
|
||||
payload: payload,
|
||||
payload,
|
||||
};
|
||||
let sealed = cryptor.seal(unsealed).unwrap();
|
||||
|
||||
|
||||
@@ -173,10 +173,7 @@ impl TaskDb {
|
||||
#[cfg(test)]
|
||||
pub(crate) fn operations(&mut self) -> Vec<ReplicaOp> {
|
||||
let mut txn = self.storage.txn().unwrap();
|
||||
txn.operations()
|
||||
.unwrap()
|
||||
.iter().cloned()
|
||||
.collect()
|
||||
txn.operations().unwrap().to_vec()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -119,12 +119,7 @@ mod test {
|
||||
|
||||
assert_eq!(
|
||||
db.working_set()?,
|
||||
vec![
|
||||
None,
|
||||
Some(uuids[1]),
|
||||
Some(uuids[3]),
|
||||
Some(uuids[4])
|
||||
]
|
||||
vec![None, Some(uuids[1]), Some(uuids[3]), Some(uuids[4])]
|
||||
);
|
||||
|
||||
rebuild(
|
||||
@@ -142,22 +137,11 @@ mod test {
|
||||
let exp = if renumber {
|
||||
// uuids[1] and uuids[4] are already in the working set, so are compressed
|
||||
// to the top, and then uuids[0] is added.
|
||||
vec![
|
||||
None,
|
||||
Some(uuids[1]),
|
||||
Some(uuids[4]),
|
||||
Some(uuids[0]),
|
||||
]
|
||||
vec![None, Some(uuids[1]), Some(uuids[4]), Some(uuids[0])]
|
||||
} else {
|
||||
// uuids[1] and uuids[4] are already in the working set, at indexes 1 and 3,
|
||||
// and then uuids[0] is added.
|
||||
vec![
|
||||
None,
|
||||
Some(uuids[1]),
|
||||
None,
|
||||
Some(uuids[4]),
|
||||
Some(uuids[0]),
|
||||
]
|
||||
vec![None, Some(uuids[1]), None, Some(uuids[4]), Some(uuids[0])]
|
||||
};
|
||||
|
||||
assert_eq!(db.working_set()?, exp);
|
||||
|
||||
Reference in New Issue
Block a user