Skip to content

Commit 814277e

Browse files
Rename read_slice macro
1 parent c83eeae commit 814277e

4 files changed

Lines changed: 7 additions & 9 deletions

File tree

src/font/parser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use super::grammar::{
88
};
99
use crate::{
1010
font::grammar::{IndexToLocFormat, Platform, PlatformDouble},
11-
impl_read_for_datatype, read_slice,
11+
impl_read_for_datatype, impl_read_slice,
1212
};
1313
use anyhow::{bail, ensure, Result};
1414
use std::collections::BTreeMap;
@@ -625,7 +625,7 @@ impl<'a> TrueTypeFontParser<'a> {
625625

626626
// impl_read_for_datatype!(read_short_frac, ShortFrac, U16_BYTES);
627627

628-
read_slice!();
628+
impl_read_slice!();
629629
impl_read_for_datatype!(read_fixed, Fixed);
630630
impl_read_for_datatype!(read_fword, FWord);
631631
impl_read_for_datatype!(read_unsigned_fword, UnsignedFWord);

src/jpeg/decoder.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
use crate::{
2-
impl_read_for_datatype,
2+
impl_read_for_datatype, impl_read_slice,
33
jpeg::grammar::{
44
Component, EncodingProcess, HuffmanTable, Jpeg, Marker, QuantizationTable, StartOfFrame,
55
StartOfScan, JFIF,
66
},
7-
read_slice,
87
};
98

109
use anyhow::{anyhow, ensure, Result};
@@ -203,5 +202,5 @@ impl<'a> JpegDecoder<'a> {
203202
impl_read_for_datatype!(read_u8, u8);
204203
impl_read_for_datatype!(read_u16, u16);
205204
impl_read_for_datatype!(read_marker, Marker);
206-
read_slice!();
205+
impl_read_slice!();
207206
}

src/png/decoder.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22
use crate::util::event_log::{log_event, Event};
33
use crate::{
44
image::grammar::ColorType,
5-
impl_read_for_datatype,
5+
impl_read_for_datatype, impl_read_slice,
66
png::{
77
crc32::compute_crc,
88
grammar::{Chunk, ImageHeader, Png},
99
scanline_reader::ScanlineReader,
1010
},
11-
read_slice,
1211
};
1312
use anyhow::{bail, ensure, Result};
1413
use flate2::read::ZlibDecoder;
@@ -230,7 +229,7 @@ impl<'a> PngDecoder<'a> {
230229

231230
impl_read_for_datatype!(read_u8, u8);
232231
impl_read_for_datatype!(read_u32, u32);
233-
read_slice!();
232+
impl_read_slice!();
234233

235234
fn read_slice_until(&mut self, stop: u8) -> Result<&'a [u8]> {
236235
let cursor_start = self.cursor;

src/util/read_bytes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ macro_rules! impl_read_for_datatype {
1111
}
1212

1313
#[macro_export]
14-
macro_rules! read_slice {
14+
macro_rules! impl_read_slice {
1515
() => {
1616
#[allow(dead_code)]
1717
fn read_vec<T>(

0 commit comments

Comments
 (0)