misc: clippy fixes
This commit is contained in:
@@ -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};
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user