boolean formatting fix

This commit is contained in:
AF 2023-05-28 18:20:12 +00:00
parent 73c4458f23
commit 1ad533765f

View File

@ -21,15 +21,12 @@ pub enum BooleanParseError {
impl Display for BooleanParseError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
BooleanParseError::OutOfBounds(value) => {
Self::OutOfBounds(value) => {
f.write_fmt(format_args!("boolean value out of bounds: {}.", value))
}
BooleanParseError::Eof => {
f.write_fmt(format_args!("encountered EOF write parsing a boolean."))
}
BooleanParseError::ExtraData(length) => f.write_fmt(format_args!(
"encountered extra data of length {} while parsing a boolean",
length
Self::Eof => f.write_fmt(format_args!("encountered EOF write parsing a boolean.")),
Self::ExtraData(length) => f.write_fmt(format_args!(
"encountered extra data of length {length} while parsing a boolean.",
)),
}
}