parsers: use built-in string quoting instead of manual quoting

There is at least one branch of the FromStr implementation which passes
user input right into the error struct, so we cannot assume that `'` is
not part of that value.
This commit is contained in:
Jonas Schäfer 2024-06-25 15:51:40 +02:00 committed by Link Mauve
parent 8d8f3fea37
commit cb09ab865c

View file

@ -108,13 +108,13 @@ impl Display for DatatypeError {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
match self {
DatatypeError::MissingPrefix { input } => {
write!(f, "Missing prefix in validation datatype '{input}'.")
write!(f, "Missing prefix in validation datatype {input:?}.")
}
DatatypeError::InvalidType { input } => {
write!(f, "Invalid validation datatype '{input}'.")
write!(f, "Invalid validation datatype {input:?}.")
}
DatatypeError::UnknownType { input } => {
write!(f, "Unknown validation datatype '{input}'.")
write!(f, "Unknown validation datatype {input:?}.")
}
}
}