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:
parent
d3dd34a1d4
commit
91275b2c2b
5 changed files with 6 additions and 6 deletions
|
@ -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)
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue