use crate::Weight;
use std::{error::Error, fmt};
#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)]
pub enum IconError {
WeightNotEnabled(Weight),
}
impl fmt::Display for IconError {
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Self::WeightNotEnabled(weight) => write!(
formatter,
"the `{weight}` Phosphor weight is disabled; enable the `{weight}` Cargo feature"
),
}
}
}
impl Error for IconError {}