misc: more clippy fixes, **switched to stable**

The switch was due to rust-analyzer bug on latest nightly, please use stable until [this bug](https://github.com/rust-lang/rust-analyzer/issues/20051) is fixed
This commit is contained in:
2025-06-22 00:42:44 +01:00
parent 1907bbb200
commit bbf893290f
4 changed files with 20 additions and 12 deletions
+5 -1
View File
@@ -7,7 +7,7 @@
//!
//! # Configuration
//!
//! This may be disabled like so in your `.dsarc.toml` file:
//! This may be disabled like so in your `.dsa.emulator.toml` file:
//!
//! ```toml
//! [misc]
@@ -16,6 +16,9 @@
//!
//! Alternatively, you can hide this in your Discord settings.
#[cfg(feature = "discord-rpc")]
use std::{path::PathBuf, sync::Arc, time::Duration};
use std::sync::mpsc::{Receiver, Sender};
#[cfg(feature = "discord-rpc")]
@@ -200,6 +203,7 @@ pub enum Activity {}
/// Gets the discord [`RpcClient`] or returns None if this has been disabled in the config
/// options.
#[cfg(feature = "config")]
#[allow(clippy::needless_pass_by_value, unused_variables)]
pub fn get_rpc_client_or_none(
config: &Config,
rpc_sender: Sender<Message>,
+4 -1
View File
@@ -5,7 +5,9 @@ use std::{
time::Duration,
};
use crate::emulator::misc::rpc::RpcClient;
#[allow(unused_imports)]
use crate::emulator::misc::rpc::{Activity, RpcClient};
use crate::emulator::system::{
model::{Command, PersistentState, Running, State},
processor::Processor,
@@ -14,6 +16,7 @@ use crate::emulator::system::{
use common::prelude::*;
#[expect(clippy::too_many_lines)]
#[allow(unused_variables)]
pub fn run_emulator(
cmd_rx: &Receiver<Command>,
state_tx: &Sender<State>,
+3 -2
View File
@@ -344,8 +344,8 @@ impl Editor {
}
// builds the current file
if ui.button("Build").clicked() && !self.unsaved
&& let Some(path) = &self.path {
if ui.button("Build").clicked() && !self.unsaved {
if 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,6 +371,7 @@ 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() {