diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main.rs b/src/main.rs index d928c09..6194ef0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -226,8 +226,8 @@ fn validate_legend(input: String) -> Result<(), String> { fn run() -> MainResult<()> { let matches = App::new(APP_NAME) .version("0.1") - .author("Daniel <kingdread@gmx.de>") - .about("Renders GW2 skills and traits.") + .author("Peter Parker IV") + .about("Renders Guild Wars 2 skills and traits.") .arg( Arg::with_name("profession") .help("Selects which profession to use.") @@ -304,12 +304,12 @@ fn run() -> MainResult<()> { } let mut renderer = render::Renderer::new(&mut api, Default::default()); - let img = renderer.render_buildtemplate(&build).unwrap(); - let filename = matches.value_of("outfile").unwrap(); - img.save(filename)?; - - if !matches.is_present("quiet") { - println!("Image saved in {}", filename); + if let Ok(img) = renderer.render_buildtemplate(&build) { + let filename = matches.value_of("outfile").unwrap(); + img.save(filename)?; + if !matches.is_present("quiet") { + println!("Image saved in {}", filename); + } } Ok(()) |