Skip to content

Commit

Permalink
Fix clippy errors and adjust error levels
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksmckinley committed Apr 20, 2024
1 parent d1a7c0f commit 4aa76fa
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 12 deletions.
1 change: 0 additions & 1 deletion src/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use crate::emulation_core::datapath::{Datapath, DatapathUpdateSignal, Syscall, U
use crate::emulation_core::mips::datapath::MipsDatapath;
use crate::emulation_core::riscv::datapath::RiscDatapath;
use futures::{FutureExt, SinkExt, StreamExt};
use gloo_console::log;
use instant::Instant;
use messages::DatapathUpdate;
use std::collections::HashSet;
Expand Down
1 change: 0 additions & 1 deletion src/agent/datapath_reducer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use crate::emulation_core::riscv::registers::{
RiscFpRegisters, RiscGpRegisterType, RiscGpRegisters,
};
use crate::emulation_core::stack::Stack;
use gloo_console::log;
use std::rc::Rc;
use yew::Reducible;

Expand Down
9 changes: 3 additions & 6 deletions src/bin/main.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
use gloo::file::FileList;
use gloo_console::log;
use gloo_console::warn;
use js_sys::Object;
use log::debug;
use log::Level;
use monaco::{
api::TextModel,
sys::{editor::IMarkerData, MarkerSeverity},
Expand Down Expand Up @@ -407,7 +405,7 @@ fn app(props: &AppProps) -> Html {
{
Ok(data) => data,
Err(e) => {
debug!("{:?}", e);
warn!("{:?}", e);
0
}
};
Expand Down Expand Up @@ -487,7 +485,7 @@ fn app(props: &AppProps) -> Html {
}
}
Err(err) => {
debug!("Error updating memory: {}", err)
warn!("Error updating memory: {}", err)
}
}

Expand Down Expand Up @@ -703,7 +701,6 @@ pub fn on_upload_file_clicked() {
}

fn main() {
console_log::init_with_level(Level::Debug).unwrap();
// Initialize and leak the communicator to ensure that the thread spawns immediately and the bridge to it lives
// for the remainder of the program.
let bridge = EmulationCoreAgent::spawner().spawn("./worker.js");
Expand Down
3 changes: 0 additions & 3 deletions src/ui/assembled_view/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use crate::emulation_core::stack::Stack;
// use monaco::api::TextModel;
use crate::parser::parser_structs_and_enums::ProgramInfo;
use crate::ui::swim_editor::tab::TabState;
use log::debug;
use wasm_bindgen::JsCast;
use web_sys::{HtmlElement, HtmlInputElement};
use yew::prelude::*;
Expand Down Expand Up @@ -74,15 +73,13 @@ pub fn TextSegment(props: &TextSegmentProps) -> Html {
let input = target.unwrap().unchecked_into::<HtmlInputElement>();

if input.checked() {
debug!("Breakpoint set at {:08x}", address as u64);
communicator.set_breakpoint(address as u64);
breakpoints.set({
let mut new_breakpoints = breakpoints.deref().clone();
new_breakpoints.insert(address as u64);
new_breakpoints
});
} else {
debug!("Breakpoint removed at {:08x}", address as u64);
communicator.remove_breakpoint(address as u64);
breakpoints.set({
let mut new_breakpoints = breakpoints.deref().clone();
Expand Down
1 change: 0 additions & 1 deletion src/ui/visual_datapath/utils.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! Helpful common functions used for the visual datapath.
use gloo::utils::{document, window};
use gloo_console::log;
use wasm_bindgen::JsCast;
use web_sys::{Element, HtmlCollection, HtmlElement, HtmlObjectElement, MouseEvent};
use yew::UseReducerHandle;
Expand Down

0 comments on commit 4aa76fa

Please sign in to comment.