nyar_error/duplicates/
kind.rs

1use super::*;
2
3impl Debug for DuplicateKind {
4    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
5        match self {
6            Self::Type => f.write_str("Type"),
7            Self::Function => f.write_str("Function"),
8            Self::Variable => f.write_str("Variable"),
9            Self::Key => f.write_str("Key"),
10        }
11    }
12}
13
14impl Display for DuplicateKind {
15    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
16        match self {
17            Self::Type => f.write_str("type"),
18            Self::Function => f.write_str("function"),
19            Self::Variable => f.write_str("variable"),
20            Self::Key => f.write_str("key"),
21        }
22    }
23}