summaryrefslogtreecommitdiff
path: root/src/debug.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug.rs')
-rw-r--r--src/debug.rs11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/debug.rs b/src/debug.rs
index 6270948..7fd4ea5 100644
--- a/src/debug.rs
+++ b/src/debug.rs
@@ -5,7 +5,6 @@ use std::time::Instant;
const NORMAL: &str = "\x1b[0m";
-const BOLD: &str = "\x1b[1m";
const DIM: &str = "\x1b[2m";
const YELLOW: &str = "\x1b[33m";
const BLUE: &str = "\x1b[34m";
@@ -13,29 +12,21 @@ const BLUE: &str = "\x1b[34m";
pub struct DebugState {
pub enabled: bool,
- pub verbose: bool,
last_cycle: usize,
last_mark: Instant,
symbols: DebugSymbols,
}
impl DebugState {
- pub fn new<P: AsRef<Path>>(enabled: bool, verbose: bool, symbols_path: Option<P>) -> Self {
+ pub fn new<P: AsRef<Path>>(enabled: bool, symbols_path: Option<P>) -> Self {
Self {
enabled,
- verbose,
last_cycle: 0,
last_mark: Instant::now(),
symbols: DebugSymbols::from_path_opt(symbols_path),
}
}
- pub fn info(&self, string: &str) {
- if self.verbose {
- eprintln!("{BOLD}{BLUE}[INFO]{NORMAL}: {string}{NORMAL}");
- }
- }
-
pub fn debug_summary(&mut self, core: &BedrockCore) {
if self.enabled {
let prev_pc = core.mem.pc.wrapping_sub(1);