mirror of
https://github.com/neondatabase/neon.git
synced 2026-10-18 09:42:53 +00:00
clippy nitpickery
This commit is contained in:
@@ -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<_>>()
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user