about summary refs log tree commit diff
path: root/src/libstd/sys/windows
diff options
context:
space:
mode:
authorGiles Cope <gilescope@gmail.com>2017-06-19 23:00:45 +0100
committerGiles Cope <gilescope@gmail.com>2017-06-19 23:00:45 +0100
commit4b8446a2333ca7a22a594a24e3eb541cf5265792 (patch)
tree84ac480b1cb9c6172ec41fb17aa1e526e163ed38 /src/libstd/sys/windows
parent1ec1b1f1eb1bd0ea1f9396ade1015d00f9149a1d (diff)
parent04145943a25c3b8c7e7d7fe8c2efb04f259c25fb (diff)
downloadrust-4b8446a2333ca7a22a594a24e3eb541cf5265792.tar.gz
rust-4b8446a2333ca7a22a594a24e3eb541cf5265792.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/libstd/sys/windows')
-rw-r--r--src/libstd/sys/windows/os_str.rs26
1 files changed, 19 insertions, 7 deletions
diff --git a/src/libstd/sys/windows/os_str.rs b/src/libstd/sys/windows/os_str.rs
index f401e7b35c8..3eb4582718b 100644
--- a/src/libstd/sys/windows/os_str.rs
+++ b/src/libstd/sys/windows/os_str.rs
@@ -12,7 +12,7 @@
 /// wrapper around the "WTF-8" encoding; see the `wtf8` module for more.
 
 use borrow::Cow;
-use fmt::{self, Debug};
+use fmt;
 use sys_common::wtf8::{Wtf8, Wtf8Buf};
 use mem;
 use sys_common::{AsInner, IntoInner};
@@ -34,9 +34,15 @@ impl AsInner<Wtf8> for Buf {
     }
 }
 
-impl Debug for Buf {
-    fn fmt(&self, formatter: &mut fmt::Formatter) -> Result<(), fmt::Error> {
-        self.as_slice().fmt(formatter)
+impl fmt::Debug for Buf {
+    fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+        fmt::Debug::fmt(self.as_slice(), formatter)
+    }
+}
+
+impl fmt::Display for Buf {
+    fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+        fmt::Display::fmt(self.as_slice(), formatter)
     }
 }
 
@@ -44,9 +50,15 @@ pub struct Slice {
     pub inner: Wtf8
 }
 
-impl Debug for Slice {
-    fn fmt(&self, formatter: &mut fmt::Formatter) -> Result<(), fmt::Error> {
-        self.inner.fmt(formatter)
+impl fmt::Debug for Slice {
+    fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+        fmt::Debug::fmt(&self.inner, formatter)
+    }
+}
+
+impl fmt::Display for Slice {
+    fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+        fmt::Display::fmt(&self.inner, formatter)
     }
 }