File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
library/std/src/sys/windows Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 1
1
/// The underlying OsString/OsStr implementation on Windows is a
2
2
/// wrapper around the "WTF-8" encoding; see the `wtf8` module for more.
3
3
use crate :: borrow:: Cow ;
4
+ use crate :: collections:: TryReserveError ;
4
5
use crate :: fmt;
5
6
use crate :: mem;
6
7
use crate :: rc:: Rc ;
@@ -104,10 +105,18 @@ impl Buf {
104
105
self . inner . reserve ( additional)
105
106
}
106
107
108
+ pub fn try_reserve ( & mut self , additional : usize ) -> Result < ( ) , TryReserveError > {
109
+ self . inner . try_reserve ( additional)
110
+ }
111
+
107
112
pub fn reserve_exact ( & mut self , additional : usize ) {
108
113
self . inner . reserve_exact ( additional)
109
114
}
110
115
116
+ pub fn try_reserve_exact ( & mut self , additional : usize ) -> Result < ( ) , TryReserveError > {
117
+ self . inner . try_reserve_exact ( additional)
118
+ }
119
+
111
120
pub fn shrink_to_fit ( & mut self ) {
112
121
self . inner . shrink_to_fit ( )
113
122
}
You can’t perform that action at this time.
0 commit comments