about summary refs log tree commit diff
path: root/library/std/src/sys/os_str/wtf8.rs
diff options
context:
space:
mode:
authorThalia Archibald <thalia@archibald.dev>2025-02-05 19:37:27 -0800
committerThalia Archibald <thalia@archibald.dev>2025-02-19 18:43:24 -0800
commit0842f2c65c766301be488256a18d89e90c3b6304 (patch)
tree6256cfd97ea1e68d751ccc71fe8fd7807f0da386 /library/std/src/sys/os_str/wtf8.rs
parent4e1356b95972c1a52acb9f0dd078687132ec02be (diff)
downloadrust-0842f2c65c766301be488256a18d89e90c3b6304.tar.gz
rust-0842f2c65c766301be488256a18d89e90c3b6304.zip
Add fast path for displaying pre-validated Wtf8Buf
Diffstat (limited to 'library/std/src/sys/os_str/wtf8.rs')
-rw-r--r--library/std/src/sys/os_str/wtf8.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/sys/os_str/wtf8.rs b/library/std/src/sys/os_str/wtf8.rs
index 19728d33990..8acec6f949f 100644
--- a/library/std/src/sys/os_str/wtf8.rs
+++ b/library/std/src/sys/os_str/wtf8.rs
@@ -41,13 +41,13 @@ impl AsInner<Wtf8> for Buf {
 
 impl fmt::Debug for Buf {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        fmt::Debug::fmt(self.as_slice(), f)
+        fmt::Debug::fmt(&self.inner, f)
     }
 }
 
 impl fmt::Display for Buf {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        fmt::Display::fmt(self.as_slice(), f)
+        fmt::Display::fmt(&self.inner, f)
     }
 }