Move variable assignment out of loop

This commit is contained in:
Surma
2021-01-05 15:29:57 +00:00
parent ad07584730
commit 36293d756b
2 changed files with 1 additions and 1 deletions

View File

@@ -107,8 +107,8 @@ pub fn resize(
to_linear(input_image[4 * i + j]),
(input_image[4 * i + 3] as f32) / 255.0,
);
preprocessed_input_image[4 * i + 3] = (input_image[4 * i + 3] as f32) / 255.0;
}
preprocessed_input_image[4 * i + 3] = (input_image[4 * i + 3] as f32) / 255.0;
}
let mut unprocessed_output_image = vec![0.0f32; num_output_pixels * 4];