assembler: purge unwrap and use more AssembleErrors

This commit is contained in:
2025-06-23 19:39:49 +01:00
parent f432fe7665
commit ed479ac146
12 changed files with 812 additions and 461 deletions
+7 -6
View File
@@ -5,11 +5,12 @@ use std::{fmt, sync::mpsc::Sender};
pub struct Logger {}
impl Logger {
pub fn new() -> Self {
pub const fn new() -> Self {
Self {}
}
pub fn log(&self, message: &str) {
_ = self;
println!("\x1b[32mINFO:\x1b[0m {message}");
}
}
@@ -90,11 +91,11 @@ impl fmt::Display for EntryType {
f,
"{:<5}",
match self {
EntryType::Debug => "DEBUG",
EntryType::Info => "INFO",
EntryType::Warn => "WARN",
EntryType::Error => "ERROR",
EntryType::Fatal => "FATAL",
Self::Debug => "DEBUG",
Self::Info => "INFO",
Self::Warn => "WARN",
Self::Error => "ERROR",
Self::Fatal => "FATAL",
}
)
}