diff --git a/src/main.rs b/src/main.rs index ff1a550..adebd8a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,8 +1,6 @@ #![windows_subsystem = "windows"] -use std::fs::File; - use image::Luma; -use native_dialog::{FileDialog, MessageDialog, MessageType}; +use native_dialog::FileDialog; use qrcode::QrCode; slint::slint!(); slint::include_modules!(); @@ -22,10 +20,12 @@ fn main() { .show_save_single_file() .expect("Unknown File Path") .unwrap(); - let mut savelocation = result.into_os_string().into_string().unwrap(); + let savelocation = result.into_os_string().into_string().unwrap(); let qrcode = QrCode::new(websitetext.as_bytes()).unwrap(); let image = qrcode.render::>().build(); - image.save(savelocation); + image + .save(savelocation) + .expect("Couldn't save file"); } }); app.run().unwrap();