Impl grammar

This commit is contained in:
2026-05-10 16:59:21 +02:00
parent dfa5487031
commit 22b1b377f3
2 changed files with 38 additions and 2 deletions
+20
View File
@@ -1,9 +1,29 @@
use <std::fmt>;
public enum LogLevel {
Info,
Warning,
Error,
}
impl fmt::Display for LogLevel {
std::fmt::Result fmt(self*, std::fmt::Formatter<'_> mut* f) {
match (self) {
LogLevel::Info => {
write!(f, "[INFO]");
}
LogLevel::Warning => {
write!(f, "[WARN]");
}
LogLevel::Error => {
write!(f, "[ERROR]");
}
}
}
}
public class Logger {
String prefix;