1
Fork 0

Avoid ref when using format! for perf

Clean up a few minor refs in `format!` macro, as it has a tiny perf
cost. A few more minor related cleanups.
This commit is contained in:
Yuri Astrakhan 2024-07-19 11:51:21 -04:00
parent d3dd34a1d4
commit 91275b2c2b
5 changed files with 6 additions and 6 deletions

View file

@ -775,7 +775,7 @@ impl Error {
///
/// impl Display for MyError {
/// fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
/// write!(f, "MyError: {}", &self.v)
/// write!(f, "MyError: {}", self.v)
/// }
/// }
///