From 1ad533765f602364099d37579d526d2cc87e383d Mon Sep 17 00:00:00 2001 From: timofey Date: Sun, 28 May 2023 18:20:12 +0000 Subject: [PATCH] `boolean` formatting fix --- src/rstd/atomic/boolean.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/rstd/atomic/boolean.rs b/src/rstd/atomic/boolean.rs index 6788494..1c39de7 100644 --- a/src/rstd/atomic/boolean.rs +++ b/src/rstd/atomic/boolean.rs @@ -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.", )), } }