Skip to content

Commit 84132d8

Browse files
Refactoring to decrease using memory
1 parent ce28720 commit 84132d8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1127,8 +1127,9 @@ impl Executor {
11271127
// Open image file
11281128
"open-image" => {
11291129
let image_path: &str = &self.pop_stack().get_string();
1130-
let img: Mat = imgcodecs::imread(image_path, imgcodecs::IMREAD_COLOR).unwrap();
1131-
self.stack.push(Type::Image(img))
1130+
self.stack.push(Type::Image(
1131+
imgcodecs::imread(image_path, imgcodecs::IMREAD_COLOR).unwrap(),
1132+
))
11321133
}
11331134

11341135
// Show image using GUI window

0 commit comments

Comments
 (0)