about summary refs log tree commit diff
path: root/library/std/src/sys/windows/os_str.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/sys/windows/os_str.rs')
-rw-r--r--library/std/src/sys/windows/os_str.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/library/std/src/sys/windows/os_str.rs b/library/std/src/sys/windows/os_str.rs
index 7e09a4fd561..78e92a3331a 100644
--- a/library/std/src/sys/windows/os_str.rs
+++ b/library/std/src/sys/windows/os_str.rs
@@ -1,6 +1,7 @@
 /// The underlying OsString/OsStr implementation on Windows is a
 /// wrapper around the "WTF-8" encoding; see the `wtf8` module for more.
 use crate::borrow::Cow;
+use crate::collections::TryReserveError;
 use crate::fmt;
 use crate::mem;
 use crate::rc::Rc;
@@ -104,10 +105,18 @@ impl Buf {
         self.inner.reserve(additional)
     }
 
+    pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError> {
+        self.inner.try_reserve(additional)
+    }
+
     pub fn reserve_exact(&mut self, additional: usize) {
         self.inner.reserve_exact(additional)
     }
 
+    pub fn try_reserve_exact(&mut self, additional: usize) -> Result<(), TryReserveError> {
+        self.inner.try_reserve_exact(additional)
+    }
+
     pub fn shrink_to_fit(&mut self) {
         self.inner.shrink_to_fit()
     }