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 11/// The underlying OsString/OsStr implementation on Windows is a
22/// wrapper around the "WTF-8" encoding; see the `wtf8` module for more.
33use crate :: borrow:: Cow ;
4+ use crate :: collections:: TryReserveError ;
45use crate :: fmt;
56use crate :: mem;
67use 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 }
You can’t perform that action at this time.
0 commit comments