From 9db03b9bc8bdbc9cb0df8f022e61b97c1a6fc2ec Mon Sep 17 00:00:00 2001 From: Takayuki Maeda Date: Tue, 7 Jun 2022 02:33:23 +0900 Subject: suggest swapping a struct and a trait fmt --- compiler/rustc_span/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_span/src') diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs index adf5a744048..456cf6dbe27 100644 --- a/compiler/rustc_span/src/lib.rs +++ b/compiler/rustc_span/src/lib.rs @@ -338,7 +338,7 @@ impl<'a> FileNameDisplay<'a> { pub fn to_string_lossy(&self) -> Cow<'a, str> { match self.inner { FileName::Real(ref inner) => inner.to_string_lossy(self.display_pref), - _ => Cow::from(format!("{}", self)), + _ => Cow::from(self.to_string()), } } } -- cgit 1.4.1-3-g733a5