From c23a457e72abe608715ac76f076f47dc42af07a5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 20:31:44 +0200 Subject: Merging upstream version 1.74.1+dfsg1. Signed-off-by: Daniel Baumann --- vendor/gix-pack/src/data/entry/decode.rs | 8 ++++---- vendor/gix-pack/src/data/entry/header.rs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'vendor/gix-pack/src/data/entry') diff --git a/vendor/gix-pack/src/data/entry/decode.rs b/vendor/gix-pack/src/data/entry/decode.rs index 79d7aecff..b81320319 100644 --- a/vendor/gix-pack/src/data/entry/decode.rs +++ b/vendor/gix-pack/src/data/entry/decode.rs @@ -47,16 +47,16 @@ impl data::Entry { /// Instantiate an `Entry` from the reader `r`, providing the `pack_offset` to allow tracking the start of the entry data section. pub fn from_read( - mut r: impl io::Read, + r: &mut dyn io::Read, pack_offset: data::Offset, hash_len: usize, ) -> Result { - let (type_id, size, mut consumed) = streaming_parse_header_info(&mut r)?; + let (type_id, size, mut consumed) = streaming_parse_header_info(r)?; use crate::data::entry::Header::*; let object = match type_id { OFS_DELTA => { - let (distance, leb_bytes) = leb64_from_read(&mut r)?; + let (distance, leb_bytes) = leb64_from_read(r)?; let delta = OfsDelta { base_distance: distance, }; @@ -89,7 +89,7 @@ impl data::Entry { } #[inline] -fn streaming_parse_header_info(mut read: impl io::Read) -> Result<(u8, u64, usize), io::Error> { +fn streaming_parse_header_info(read: &mut dyn io::Read) -> Result<(u8, u64, usize), io::Error> { let mut byte = [0u8; 1]; read.read_exact(&mut byte)?; let mut c = byte[0]; diff --git a/vendor/gix-pack/src/data/entry/header.rs b/vendor/gix-pack/src/data/entry/header.rs index 4d0dbf4d2..358bd743c 100644 --- a/vendor/gix-pack/src/data/entry/header.rs +++ b/vendor/gix-pack/src/data/entry/header.rs @@ -83,7 +83,7 @@ impl Header { /// /// Returns the amount of bytes written to `out`. /// `decompressed_size_in_bytes` is the full size in bytes of the object that this header represents - pub fn write_to(&self, decompressed_size_in_bytes: u64, mut out: impl io::Write) -> io::Result { + pub fn write_to(&self, decompressed_size_in_bytes: u64, out: &mut dyn io::Write) -> io::Result { let mut size = decompressed_size_in_bytes; let mut written = 1; let mut c: u8 = (self.as_type_id() << 4) | (size as u8 & 0b0000_1111); @@ -115,7 +115,7 @@ impl Header { /// The size of the header in bytes when serialized pub fn size(&self, decompressed_size: u64) -> usize { - self.write_to(decompressed_size, io::sink()) + self.write_to(decompressed_size, &mut io::sink()) .expect("io::sink() to never fail") } } -- cgit v1.2.3