assembler: purge unwrap and use more AssembleErrors
This commit is contained in:
@@ -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",
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user