- let mut lasty: Vec<i32> = Vec::with_capacity(self.width + 1);
- lasty.resize(self.width + 1, 0);
- let mut lastu: Vec<i32> = Vec::with_capacity(self.width/2 + 1);
- lastu.resize(self.width/2 + 1, 0);
- let mut lastv: Vec<i32> = Vec::with_capacity(self.width/2 + 1);
- lastv.resize(self.width/2 + 1, 0);
+ let mut lasty: Vec<i32> = vec![0; self.width + 1];
+ let mut lastu: Vec<i32> = vec![0; self.width/2 + 1];
+ let mut lastv: Vec<i32> = vec![0; self.width/2 + 1];