diff --git a/src/main.rs b/src/main.rs index 000826a..1052b9e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -28,17 +28,20 @@ fn main() { opts.optopt("S", "seed", "Rainbow seed, 0 = random", ""); opts.optflag("h", "help", "Show this message"); + // @todo do not panic! let matches = match opts.parse(&args[1..]) { Ok(m) => { m } Err(f) => { panic!(f.to_string()) } }; + // print usage? if matches.opt_present("h") { print_usage(&program, opts); return; } + // get spread. // @todo this is nasty... fix this. let spread : f32 = match matches.opt_default("spread", "3.0") { Some(s) => { @@ -51,6 +54,7 @@ fn main() { None => 3.0 }; + // get freq. // @todo this is nasty... fix this. let freq : f32 = match matches.opt_default("freq", "0.1") { Some(s) => { @@ -63,6 +67,7 @@ fn main() { None => 0.1 }; + // get seed. // @todo this is nasty... fix this. let mut seed : i32 = match matches.opt_default("seed", "0") { Some(s) => { @@ -77,6 +82,7 @@ fn main() { let stdin = io::stdin(); + // @todo I want to use chars() instead, but it's unstable right now :( for line in stdin.lock().lines() { seed += 1;