Skip to content

Commit

Permalink
Formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fintelia committed Aug 27, 2023
1 parent 4d7e730 commit 3f59314
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
14 changes: 12 additions & 2 deletions src/codecs/dxt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,13 @@ impl<R: Read> DxtDecoder<R> {
}

fn read_scanline(&mut self, buf: &mut [u8]) -> io::Result<usize> {
assert_eq!(u64::try_from(buf.len()), Ok(#[allow(deprecated)] self.scanline_bytes()));
assert_eq!(
u64::try_from(buf.len()),
Ok(
#[allow(deprecated)]
self.scanline_bytes()
)
);

let mut src =
vec![0u8; self.variant.encoded_bytes_per_block() * self.width_blocks as usize];
Expand Down Expand Up @@ -134,7 +140,11 @@ impl<'a, R: 'a + Read> ImageDecoder<'a> for DxtDecoder<R> {

fn into_reader(self) -> ImageResult<Self::Reader> {
Ok(DxtReader {
buffer: ImageReadBuffer::new(#[allow(deprecated)] self.scanline_bytes(), self.total_bytes()),
buffer: ImageReadBuffer::new(
#[allow(deprecated)]
self.scanline_bytes(),
self.total_bytes(),
),
decoder: self,
})
}
Expand Down
6 changes: 5 additions & 1 deletion src/codecs/tga/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,11 @@ impl<'a, R: 'a + Read + Seek> ImageDecoder<'a> for TgaDecoder<R> {

fn into_reader(self) -> ImageResult<Self::Reader> {
Ok(TGAReader {
buffer: ImageReadBuffer::new(#[allow(deprecated)] self.scanline_bytes(), self.total_bytes()),
buffer: ImageReadBuffer::new(
#[allow(deprecated)]
self.scanline_bytes(),
self.total_bytes(),
),
decoder: self,
})
}
Expand Down

0 comments on commit 3f59314

Please sign in to comment.