REVIEW: minor nits

This commit is contained in:
Christian Schwarz
2025-04-10 08:58:06 +02:00
parent 2a29b3de89
commit dd3178836d
4 changed files with 6 additions and 6 deletions

View File

@@ -235,7 +235,7 @@ impl BlobWriter {
ctx: &RequestContext,
algorithm: ImageCompressionAlgorithm,
) -> (FullSlice<Buf>, Result<(u64, CompressionInfo), Error>) {
let offset = self.size();
let offset = self.offset;
let mut compression_info = CompressionInfo {
written_compressed: false,
compressed_size: None,

View File

@@ -245,7 +245,7 @@ async fn download_object(
};
buffered.write_buffered_borrowed(&chunk, ctx).await?;
}
let inner = buffered.shutdown(|_| None).await?;
let inner = buffered.shutdown(|_| None).await?; // TODO: if we leave handle_tail=None here, it means we'll cut off layers that aren't a tail sz multiple
Ok(inner)
}
.await?;

View File

@@ -772,7 +772,7 @@ impl Drop for DeltaLayerWriter {
{
Ok(vfile) => vfile,
Err(e) => {
error!(err=%e, "failed to remove image layer writer file");
error!(err=%e, "failed to remove delta layer writer file");
drop(_gate_guard);
return;
}
@@ -781,7 +781,7 @@ impl Drop for DeltaLayerWriter {
if let Err(e) = std::fs::remove_file(vfile.path())
.maybe_fatal_err("failed to remove the virtual file")
{
error!(err=%e, path=%vfile.path(), "failed to remove image layer writer file");
error!(err=%e, path=%vfile.path(), "failed to remove delta layer writer file");
}
drop(_gate_guard);
});

View File

@@ -186,7 +186,7 @@ where
Ok((recycled, flush_control))
}
pub(super) async fn handle_error<T>(&mut self) -> std::io::Result<T> {
async fn handle_error<T>(&mut self) -> std::io::Result<T> {
Err(self
.shutdown()
.await
@@ -196,7 +196,7 @@ where
/// Cleans up the channel, join the flush task.
pub async fn shutdown(&mut self) -> std::io::Result<RequestContext> {
let handle = self
let handle: FlushHandleInner<Buf, W> = self
.inner
.take()
.expect("must not use after we returned an error");