use super::*;
impl fmt::Display for GlobError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let msg: &str = match self {
Self::UnclosedClass => ERR_UNCLOSED_CLASS,
Self::UnclosedBrace => ERR_UNCLOSED_BRACE,
Self::UnmatchedCloseBrace => ERR_UNMATCHED_CLOSE_BRACE,
Self::TrailingEscape => ERR_TRAILING_ESCAPE,
Self::InvalidRange => ERR_INVALID_RANGE,
Self::ExpansionLimitExceeded => ERR_EXPANSION_LIMIT,
};
f.write_str(msg)
}
}
impl Error for GlobError {}