Skip to content

Commit

Permalink
Avoid unnecessary call to format!
Browse files Browse the repository at this point in the history
  • Loading branch information
jhpratt committed Jun 20, 2022
1 parent eafddc5 commit e893d31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/error/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,6 @@ impl Format {
#[doc(hidden)] // Exposed only for the `declare_format_string` macro
pub fn into_invalid_serde_value<S: serde::Serializer>(self) -> S::Error {
use serde::ser::Error;
S::Error::custom(format!("{}", self))
S::Error::custom(self)
}
}

0 comments on commit e893d31

Please sign in to comment.