Cargo clippy: fix the majority of errors
This commit is contained in:
parent
871d927596
commit
6968a4e449
19 changed files with 69 additions and 91 deletions
|
|
@ -110,7 +110,7 @@ impl HandlerLocked {
|
|||
anyhow::bail!("already received piece {}", index);
|
||||
}
|
||||
let offset_end = offset + size;
|
||||
(&mut self.buffer[offset..offset_end]).copy_from_slice(data);
|
||||
self.buffer[offset..offset_end].copy_from_slice(data);
|
||||
self.received_pieces[index as usize] = true;
|
||||
|
||||
if self.received_pieces.iter().all(|p| *p) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue