about summary refs log tree commit diff
path: root/library/std/src/sys/os_str
diff options
context:
space:
mode:
authorash <97464181+Borgerr@users.noreply.github.com>2024-06-23 08:36:23 -0600
committerash <97464181+Borgerr@users.noreply.github.com>2024-06-25 07:36:34 -0600
commitb08cd69684e4b121399b3ea0f9ee6cc4a51cad07 (patch)
tree1f6ec4f4305608db64830fb26f642bcfc6258f20 /library/std/src/sys/os_str
parent2155c6c47761391673a2794430dc78436c25bbf8 (diff)
inner truncate methods for UEFI platforms
Diffstat (limited to 'library/std/src/sys/os_str')
-rw-r--r--library/std/src/sys/os_str/bytes.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/library/std/src/sys/os_str/bytes.rs b/library/std/src/sys/os_str/bytes.rs
index f7c6b0877aa..e494f7d1dea 100644
--- a/library/std/src/sys/os_str/bytes.rs
+++ b/library/std/src/sys/os_str/bytes.rs
@@ -207,6 +207,11 @@ impl Buf {
     pub(crate) fn as_mut_vec_for_path_buf(&mut self) -> &mut Vec<u8> {
         &mut self.inner
     }
+
+    #[inline]
+    pub(crate) fn truncate(&mut self, len: usize) {
+        self.inner.truncate(len);
+    }
 }
 
 impl Slice {