misc: clippy fixes

This commit is contained in:
2025-06-22 00:30:27 +01:00
parent 22a8785083
commit 1907bbb200
9 changed files with 21 additions and 26 deletions
+1 -8
View File
@@ -16,14 +16,7 @@
//!
//! Alternatively, you can hide this in your Discord settings.
use std::{
path::PathBuf,
sync::{
Arc,
mpsc::{Receiver, Sender},
},
time::Duration,
};
use std::sync::mpsc::{Receiver, Sender};
#[cfg(feature = "discord-rpc")]
use discord_presence::{Client, DiscordError, models::ActivityTimestamps};
+1 -1
View File
@@ -5,7 +5,7 @@ use std::{
time::Duration,
};
use crate::emulator::misc::rpc::{Activity, RpcClient};
use crate::emulator::misc::rpc::RpcClient;
use crate::emulator::system::{
model::{Command, PersistentState, Running, State},
processor::Processor,
+2 -3
View File
@@ -344,8 +344,8 @@ impl Editor {
}
// builds the current file
if ui.button("Build").clicked() && !self.unsaved {
if let Some(path) = &self.path {
if ui.button("Build").clicked() && !self.unsaved
&& let Some(path) = &self.path {
let mut assembler = CompilerEngine::new();
if let Err(error) = assembler.assemble(path) {
self.error = Some(format!("Failed to assemble: {error:?}"));
@@ -371,7 +371,6 @@ impl Editor {
.flat_map(|i| i.encode().to_be_bytes().to_vec())
.collect();
}
}
// Loads the generated binary into the assembler at the provided offset
if ui.button("Load").clicked() {