Skip to content

Commit

Permalink
Use write_str
Browse files Browse the repository at this point in the history
  • Loading branch information
RReverser committed Aug 19, 2024
1 parent 51c1751 commit 437759c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ macro_rules! ascom_error_codes {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match *self {
$(
Self::$name => write!(f, "{}", stringify!($name)),
Self::$name => f.write_str(stringify!($name)),
)*
_ => match self.as_driver_error() {
Ok(driver_code) => write!(f, "DRIVER_ERROR[{driver_code}]"),
Expand Down

0 comments on commit 437759c

Please sign in to comment.