From a68f1ecea23ec09289fd5ef6a59a0832e35db109 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Wed, 23 Mar 2022 05:33:16 +0000 Subject: refactor(ppm): take slice instead of vector --- src/ppm.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/ppm.rs b/src/ppm.rs index d39d7ed..b1bee9b 100644 --- a/src/ppm.rs +++ b/src/ppm.rs @@ -317,9 +317,7 @@ impl PPMParser { self.stream.read_uint::(1).unwrap() >> 7 & 0x1 != 0 } - fn read_line_types( - #[allow(clippy::ptr_arg)] line_types: &Vec, - ) -> impl Generator + '_ { + fn read_line_types(line_types: &[u8]) -> impl Generator + '_ { move || { for index in 0..192 { let line_type = line_types.get(index / 4).unwrap() >> ((index % 4) * 2) & 0x03; -- cgit v1.2.3