Skip to content

Commit 013fbc6

Browse files
committed
Fix windows build
Signed-off-by: Xuanwo <[email protected]>
1 parent c40ac57 commit 013fbc6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

library/std/src/sys/windows/os_str.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/// The underlying OsString/OsStr implementation on Windows is a
22
/// wrapper around the "WTF-8" encoding; see the `wtf8` module for more.
33
use crate::borrow::Cow;
4+
use crate::collections::TryReserveError;
45
use crate::fmt;
56
use crate::mem;
67
use crate::rc::Rc;
@@ -104,10 +105,18 @@ impl Buf {
104105
self.inner.reserve(additional)
105106
}
106107

108+
pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError> {
109+
self.inner.try_reserve(additional)
110+
}
111+
107112
pub fn reserve_exact(&mut self, additional: usize) {
108113
self.inner.reserve_exact(additional)
109114
}
110115

116+
pub fn try_reserve_exact(&mut self, additional: usize) -> Result<(), TryReserveError> {
117+
self.inner.try_reserve_exact(additional)
118+
}
119+
111120
pub fn shrink_to_fit(&mut self) {
112121
self.inner.shrink_to_fit()
113122
}

0 commit comments

Comments
 (0)