[functional-tests] Fix clippy warnings

This commit is contained in:
Joe Thornber
2020-08-07 15:41:21 +01:00
parent fa4ea3e2d9
commit 8f76371bb2
9 changed files with 46 additions and 58 deletions

View File

@@ -148,12 +148,12 @@ impl NodeVisitor<IndexEntry> for IndexVisitor {
fn visit(&mut self, _w: &BTreeWalker, _b: &Block, node: &Node<IndexEntry>) -> Result<()> {
if let Node::Leaf {
header: _h,
keys,
keys: _k,
values,
} = node {
for n in 0..keys.len() {
for v in values {
// FIXME: check keys are in incremental order
let v = values[n].clone();
let v = v.clone();
self.entries.push(v);
}
}

View File

@@ -359,13 +359,7 @@ where
reader.trim_text(true);
let mut buf = Vec::new();
loop {
match handle_event(&mut reader, &mut buf, visitor)? {
Visit::Continue => {}
Visit::Stop => break,
}
}
while let Visit::Continue = handle_event(&mut reader, &mut buf, visitor)? {}
Ok(())
}
@@ -380,7 +374,7 @@ impl MetadataVisitor for SBVisitor {
self.superblock = Some(sb.clone());
Ok(Visit::Stop)
}
fn superblock_e(&mut self) -> Result<Visit> {
Ok(Visit::Continue)
}
@@ -405,7 +399,7 @@ pub fn read_superblock<R>(input: R) -> Result<Superblock>
where
R: Read,
{
let mut v = SBVisitor {superblock: None};
let mut v = SBVisitor { superblock: None };
read(input, &mut v)?;
Ok(v.superblock.unwrap())
}