Did some clippy things and wad.rs is being developed
This commit is contained in:
13
src/main.rs
13
src/main.rs
@@ -71,7 +71,7 @@ impl Default for RustDoomLauncher {
|
||||
impl RustDoomLauncher {
|
||||
// There must be a better way than this - maybe for the RustDoomLauncher to
|
||||
// have a config thing
|
||||
fn get_config_file_stuff(&mut self) -> () {
|
||||
fn get_config_file_stuff(&mut self) {
|
||||
let config = load_config(&self.config_filename).unwrap();
|
||||
if let Some(iwads) = config.iwads {
|
||||
for iwad in iwads {
|
||||
@@ -90,7 +90,7 @@ impl RustDoomLauncher {
|
||||
}
|
||||
}
|
||||
|
||||
fn launch_doom(&self) -> () {
|
||||
fn launch_doom(&self) {
|
||||
match self.command_manager.generate_command() {
|
||||
Err(e) => {
|
||||
let text = match e {
|
||||
@@ -106,7 +106,12 @@ impl RustDoomLauncher {
|
||||
},
|
||||
Ok((launcher, command)) => {
|
||||
// Note to self, don't hit launch button when running from emacs
|
||||
Command::new(launcher).args(command).spawn();
|
||||
let result = Command::new(launcher).args(command).spawn();
|
||||
match result {
|
||||
Err(e) => panic!("{}", e),
|
||||
Ok(_o) => ()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -140,7 +145,7 @@ impl eframe::App for RustDoomLauncher {
|
||||
}
|
||||
|
||||
fn update(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) {
|
||||
if self.config_file_loaded == false {
|
||||
if !self.config_file_loaded {
|
||||
self.get_config_file_stuff();
|
||||
self.config_file_loaded = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user