Skip to content

Commit

Permalink
revert rename private field
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesvollmer committed Sep 20, 2023
1 parent b47a2cd commit 0c863fe
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/codecs/hdr/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ const SIGNATURE_LENGTH: usize = 10;
/// An Radiance HDR decoder
#[derive(Debug)]
pub struct HdrDecoder<R> {
reader: R,
r: R,
width: u32,
height: u32,
meta: HdrMetadata,
Expand Down Expand Up @@ -418,7 +418,7 @@ impl<R: BufRead> HdrDecoder<R> {
}

Ok(HdrDecoder {
reader: reader,
r: reader,

width,
height,
Expand All @@ -445,7 +445,7 @@ impl<R: BufRead> HdrDecoder<R> {
let pixel_count = self.width as usize * self.height as usize;
let mut ret = vec![Default::default(); pixel_count];
for chunk in ret.chunks_mut(self.width as usize) {
read_scanline(&mut self.reader, chunk)?;
read_scanline(&mut self.r, chunk)?;
}
Ok(ret)
}
Expand All @@ -462,7 +462,7 @@ impl<R: BufRead> HdrDecoder<R> {
let mut rgbe_pixel_line_tmp_buffer = vec![Default::default(); self.width as usize];

for y_index in 0 .. self.height as usize {
read_scanline(&mut self.reader, rgbe_pixel_line_tmp_buffer.as_mut())?;
read_scanline(&mut self.r, rgbe_pixel_line_tmp_buffer.as_mut())?;

for (x_index, &rgbe_pixel) in rgbe_pixel_line_tmp_buffer.iter().enumerate() {
store_rgbe_pixel(y_index * self.width as usize + x_index, rgbe_pixel);
Expand Down Expand Up @@ -494,7 +494,7 @@ impl<R: BufRead> IntoIterator for HdrDecoder<R> {

fn into_iter(self) -> Self::IntoIter {
HdrImageDecoderIterator {
r: self.reader,
r: self.r,
scanline_cnt: self.height as usize,
buf: vec![Default::default(); self.width as usize],
col: 0,
Expand Down

0 comments on commit 0c863fe

Please sign in to comment.