Skip to content

Commit

Permalink
Use format args capture
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Oct 25, 2022
1 parent 549ef43 commit 7de1fc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub(crate) fn invalid_data(e: impl Into<Box<dyn std::error::Error + Send + Sync>
#[cfg(feature = "stl")]
#[cold]
pub(crate) fn with_location(e: io::Error, location: Location<'_>) -> io::Error {
io::Error::new(e.kind(), format!("{} ({})", e, location))
io::Error::new(e.kind(), format!("{e} ({location})"))
}

#[cfg(feature = "stl")]
Expand Down

0 comments on commit 7de1fc3

Please sign in to comment.