use core::{error::Error, fmt};
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[non_exhaustive]
pub enum CompactionError {
HeterogeneousResolution,
DuplicateInput,
}
impl fmt::Display for CompactionError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match *self {
Self::HeterogeneousResolution => {
write!(f, "heterogeneous resolution")
}
Self::DuplicateInput => write!(f, "duplicate indices"),
}
}
}
impl Error for CompactionError {
fn source(&self) -> Option<&(dyn Error + 'static)> {
None
}
}