Skip to content

Commit

Permalink
chore: cleanup linting in test
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusc93 committed Dec 4, 2024
1 parent c08b8bf commit fded32a
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions extensions/warp-ipfs/tests/community.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4876,16 +4876,13 @@ mod test {
)
.await?;

let mut bytes = vec![];
loop {
match download_stream.next().await {
Some(b) => {
let mut b = b.unwrap().to_vec();
bytes.append(&mut b);
}
None => break,
}
let mut bytes = Vec::with_capacity(file.len());

while let Some(result) = download_stream.next().await {
let b = result.expect("valid");
bytes.extend(b.to_vec());
}

assert_eq!(bytes, file.to_vec());

let msg = instance_a
Expand Down

0 comments on commit fded32a

Please sign in to comment.