Files
fudge2.1/src/errors.rs

20 lines
434 B
Rust
Raw Normal View History

2025-10-23 16:15:25 +02:00
use std::error::Error;
use std::fmt::{Debug, Display, Formatter, Pointer};
pub struct CLIArgumentError(pub &'static str);
impl Display for CLIArgumentError {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
f.write_str(self.0)
}
}
impl Debug for CLIArgumentError {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", self.0)
}
}
impl Error for CLIArgumentError {}