Start with Upper case in error messages (#5045)

## Summary

To be consistent with the format used by other errors.

## Test Plan

N/A.
This commit is contained in:
Thomas de Zeeuw 2023-06-13 13:14:45 +02:00 committed by GitHub
parent 95ee6dcb3b
commit e1fd3965a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -231,11 +231,11 @@ impl Display for DisplayParseErrorType<'_> {
if let Some(expected) = expected.as_ref() { if let Some(expected) = expected.as_ref() {
write!( write!(
f, f,
"expected '{expected}', but got {tok}", "Expected '{expected}', but got {tok}",
tok = TruncateAtNewline(&tok) tok = TruncateAtNewline(&tok)
) )
} else { } else {
write!(f, "unexpected token {tok}", tok = TruncateAtNewline(&tok)) write!(f, "Unexpected token {tok}", tok = TruncateAtNewline(&tok))
} }
} }
ParseErrorType::Lexical(ref error) => write!(f, "{error}"), ParseErrorType::Lexical(ref error) => write!(f, "{error}"),