cargo fmt
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
use std::{num::ParseIntError, sync::mpsc::Sender};
|
||||
|
||||
use crate::emulator::{system::model::{Command, State}, ui::interface::Component};
|
||||
use crate::emulator::{
|
||||
system::model::{Command, State},
|
||||
ui::interface::Component,
|
||||
};
|
||||
|
||||
pub struct MemoryInspector {
|
||||
view_size: u32,
|
||||
@@ -63,7 +66,9 @@ impl Component for MemoryInspector {
|
||||
if search_clicked || enter_pressed {
|
||||
if let Ok(new) = parse_address(&self.addr_input) {
|
||||
self.view_addr = new;
|
||||
self.sender.send(Command::Read(new, self.view_size)).unwrap();
|
||||
self.sender
|
||||
.send(Command::Read(new, self.view_size))
|
||||
.unwrap();
|
||||
} else {
|
||||
state.error = Some("Invalid address".to_string());
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
pub mod control_unit;
|
||||
pub mod interface;
|
||||
pub mod menu;
|
||||
pub mod memory_inspector;
|
||||
pub mod menu;
|
||||
pub mod stack_inspector;
|
||||
@@ -1,14 +1,18 @@
|
||||
use crate::{common::instructions::Register, emulator::{system::model::State, ui::interface::{Component, EmulatorUI}}};
|
||||
use crate::{
|
||||
common::instructions::Register,
|
||||
emulator::{
|
||||
system::model::State,
|
||||
ui::interface::{Component, EmulatorUI},
|
||||
},
|
||||
};
|
||||
|
||||
pub struct StackInspector {
|
||||
visible: bool
|
||||
visible: bool,
|
||||
}
|
||||
|
||||
impl StackInspector {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
visible: false
|
||||
}
|
||||
Self { visible: false }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,6 +64,3 @@ impl Component for StackInspector {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
+4
-1
@@ -5,7 +5,10 @@ use std::{
|
||||
|
||||
use dsa_rs::emulator::{
|
||||
system::{emulator::run_emulator, memory::MainStore, processor::Processor},
|
||||
ui::{control_unit::ControlPanel, interface::EmulatorUI, memory_inspector::MemoryInspector, stack_inspector::StackInspector},
|
||||
ui::{
|
||||
control_unit::ControlPanel, interface::EmulatorUI, memory_inspector::MemoryInspector,
|
||||
stack_inspector::StackInspector,
|
||||
},
|
||||
};
|
||||
|
||||
fn main() -> Result<(), eframe::Error> {
|
||||
|
||||
Reference in New Issue
Block a user