diff --git a/src/main.rs b/src/main.rs index 354b88c..657bcc1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,5 @@ use clap::Parser; use crossterm::terminal::size; -use std::env; use unicode_width::UnicodeWidthStr; mod mikuart; @@ -21,10 +20,7 @@ fn main() -> Result<(), Box> { let args = Args::parse(); let text = args.text; - let style = match args.style { - Some(s) => s, - None => -1, // Default to -1 to select a random style - }; + let style = args.style.unwrap_or(-1); // Default to -1 to select a random style draw_miku_says(&text, style)?; Ok(())