about summary refs log tree commit diff
path: root/src/libstd/sys_common
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-03-28 22:18:13 +0000
committerbors <bors@rust-lang.org>2018-03-28 22:18:13 +0000
commitd52c44ea8df9f9045e6059cb2d37df743be50bb1 (patch)
treec23ef9f643221d7f4b1869f7a681248cff99f304 /src/libstd/sys_common
parente5277c1457d397f22ba18a1d40c1318729becbb4 (diff)
parent30560bb99a8875560bbad9030715520b8300110c (diff)
downloadrust-d52c44ea8df9f9045e6059cb2d37df743be50bb1.tar.gz
rust-d52c44ea8df9f9045e6059cb2d37df743be50bb1.zip
Auto merge of #49460 - kennytm:rollup, r=kennytm
Rollup of 12 pull requests

- Successful merges: #49243, #49329, #49364, #49400, #49405, #49427, #49428, #49429, #49439, #49442, #49444, #49452
- Failed merges:
Diffstat (limited to 'src/libstd/sys_common')
-rw-r--r--src/libstd/sys_common/wtf8.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstd/sys_common/wtf8.rs b/src/libstd/sys_common/wtf8.rs
index 78b2bb5fe6e..dda4e1bab3b 100644
--- a/src/libstd/sys_common/wtf8.rs
+++ b/src/libstd/sys_common/wtf8.rs
@@ -253,6 +253,11 @@ impl Wtf8Buf {
         self.bytes.shrink_to_fit()
     }
 
+    #[inline]
+    pub fn shrink_to(&mut self, min_capacity: usize) {
+        self.bytes.shrink_to(min_capacity)
+    }
+
     /// Returns the number of bytes that this string buffer can hold without reallocating.
     #[inline]
     pub fn capacity(&self) -> usize {