Skip to content

Commit

Permalink
fix: clippy issue
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Jul 24, 2023
1 parent c52187e commit a9a8c5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontends/sdl/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ impl Emulator {

pub fn load_rom(&mut self, path: Option<&str>) {
let rom_path: &str = path.unwrap_or(&self.rom_path);
let ram_path = replace_ext(rom_path, "sav").unwrap_or("invalid".to_string());
let ram_path = replace_ext(rom_path, "sav").unwrap_or_else(|| "invalid".to_string());
let rom = self.system.load_rom_file(
rom_path,
if Path::new(&ram_path).exists() {
Expand Down

0 comments on commit a9a8c5f

Please sign in to comment.