From 35ab560530b19f05036739c62dabe67cae06a1bd Mon Sep 17 00:00:00 2001 From: webbrain-one <295484252+webbrain-one@users.noreply.github.com> Date: Fri, 14 Aug 2026 01:31:23 +0300 Subject: [PATCH] Create result directory before saving images Prevents panic when the output folder is missing. Fixes #1. --- src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.rs b/src/main.rs index 103443e..d51cc29 100644 --- a/src/main.rs +++ b/src/main.rs @@ -69,6 +69,7 @@ fn generate_with_seed(seed: i32) { (blue * 255.0) as u8, ]); } + std::fs::create_dir_all("result").ok(); imgbuf.save(format!("result/result-{}.png", seed)).unwrap(); }