Delegate debug implementation for InternedString
authorAleksey Kladov <aleksey.kladov@gmail.com>
Thu, 15 Mar 2018 07:23:20 +0000 (10:23 +0300)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Thu, 15 Mar 2018 07:23:20 +0000 (10:23 +0300)
src/cargo/core/interning.rs

index dcab2c4d7092c1ea7517763000dc91c064c28840..395ce43cab47c21c7518892d56a6e4da527531b5 100644 (file)
@@ -70,13 +70,13 @@ impl Hash for InternedString {
 
 impl fmt::Debug for InternedString {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "InternedString {{ {} }}", self.to_inner())
+        fmt::Debug::fmt(self.to_inner(), f)
     }
 }
 
 impl fmt::Display for InternedString {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "{}", self.to_inner())
+        fmt::Display::fmt(self.to_inner(), f)
     }
 }