blob: ae55b768b65536787a4b6e991a8c60c799934791 [file] [log] [blame]
#[derive(Debug, PartialEq, Eq)]
pub struct LabelError(pub String);
impl std::fmt::Display for LabelError {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(f, "{}", self.0)
}
}
impl std::error::Error for LabelError {
fn description(&self) -> &str {
&self.0
}
}
impl From<String> for LabelError {
fn from(msg: String) -> Self {
Self(msg)
}
}