diff options
| author | Fuwn <[email protected]> | 2022-03-23 05:33:16 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-03-23 05:33:16 +0000 |
| commit | a68f1ecea23ec09289fd5ef6a59a0832e35db109 (patch) | |
| tree | 613d4795b59373507f77b4e63382421efcd96900 | |
| parent | chore: delete test.gif (diff) | |
| download | para-a68f1ecea23ec09289fd5ef6a59a0832e35db109.tar.xz para-a68f1ecea23ec09289fd5ef6a59a0832e35db109.zip | |
refactor(ppm): take slice instead of vector
| -rw-r--r-- | src/ppm.rs | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -317,9 +317,7 @@ impl PPMParser { self.stream.read_uint::<LittleEndian>(1).unwrap() >> 7 & 0x1 != 0 } - fn read_line_types( - #[allow(clippy::ptr_arg)] line_types: &Vec<u8>, - ) -> impl Generator<Yield = (usize, u8), Return = ()> + '_ { + fn read_line_types(line_types: &[u8]) -> impl Generator<Yield = (usize, u8), Return = ()> + '_ { move || { for index in 0..192 { let line_type = line_types.get(index / 4).unwrap() >> ((index % 4) * 2) & 0x03; |