Fix minor warnings and debug log

This commit is contained in:
2026-04-08 21:15:15 -05:00
parent e882b3b325
commit d140f1e122
9 changed files with 153 additions and 142 deletions

View File

@@ -1,12 +1,12 @@
use std::num::NonZeroUsize;
// use std::num::NonZeroUsize;
#[derive(Debug, Clone)]
pub struct DebugLog {
enabled: bool,
current: String,
history: Vec<String>,
max_history: Option<NonZeroUsize>,
pos: usize,
// max_history: Option<NonZeroUsize>,
// pos: usize,
}
impl DebugLog {
@@ -15,8 +15,8 @@ impl DebugLog {
enabled: false,
current: String::new(),
history: vec![],
max_history: None,
pos: 0,
// max_history: None,
// pos: 0,
}
}
@@ -53,6 +53,10 @@ impl DebugLog {
pub fn enable(&mut self) {
self.enabled = true;
}
pub fn enabled(&self) -> bool {
self.enabled
}
}
impl std::fmt::Write for DebugLog {