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
+2
View File
@@ -7,6 +7,7 @@ default-run = "emulator"
[lib]
name = "dsa_rs"
path = "src/lib.rs"
type = "cdylib"
[[bin]]
name = "emulator"
@@ -23,6 +24,7 @@ dirs = "6.0.0"
discord-presence = { version = "1.6.0", optional = true }
toml = { version = "0.8.23", optional = true }
serde = { version = "1.0.219", features = ["derive"], optional = true }
winit = { version = "0.30.11", features = ["android-native-activity"] }
[features]
default = ["config"]
+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() {