aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ppm.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ppm.rs b/src/ppm.rs
index 06f696e..07d69b8 100644
--- a/src/ppm.rs
+++ b/src/ppm.rs
@@ -317,7 +317,7 @@ impl PPMParser {
self.stream.read_uint::<LittleEndian>(1).unwrap() >> 7 & 0x1 != 0
}
- fn read_line_types(line_types: Vec<u8>) -> impl Generator<Yield = (usize, u8), Return = ()> {
+ fn read_line_types(line_types: &Vec<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;
@@ -370,7 +370,7 @@ impl PPMParser {
let bitmap = &mut self.layers[layer];
{
- let mut generator = Self::read_line_types(line_types[layer].clone());
+ let mut generator = Self::read_line_types(&line_types[layer]);
while let std::ops::GeneratorState::Yielded((line, line_type)) =
std::pin::Pin::new(&mut generator).resume(())
{