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:
parent
8d8f3fea37
commit
cb09ab865c
1 changed files with 3 additions and 3 deletions
|
@ -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:?}.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue