clippy nitpickery

This commit is contained in:
Christian Schwarz
2024-04-17 13:26:59 +00:00
parent 78233dc969
commit 99056dde13
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -184,7 +184,7 @@ impl EphemeralFile {
}
// Write the payload
self.file.write_all_borrowed(&srcbuf).await?;
self.file.write_all_borrowed(srcbuf).await?;
// TODO: bring back pre-warming of page cache, using another sandwich layer
@@ -177,7 +177,7 @@ impl OwnedAsyncWriter for Vec<u8> {
}
async fn write_all_borrowed(&mut self, buf: &[u8]) -> std::io::Result<usize> {
self.extend_from_slice(&buf[..]);
self.extend_from_slice(buf);
Ok(buf.len())
}
}
@@ -288,7 +288,7 @@ mod tests {
let expect: &[&[u8]] = &[b"ab", b"cd", b"ef", b"gh", b"ij", b"kl", b"mn", b"o"];
expect
}
.into_iter()
.iter()
.map(|v| v[..].to_vec())
.collect::<Vec<_>>()
);