aboutsummaryrefslogtreecommitdiff
path: root/ctr-std/src/sys/unix/os_str.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ctr-std/src/sys/unix/os_str.rs')
-rw-r--r--ctr-std/src/sys/unix/os_str.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/ctr-std/src/sys/unix/os_str.rs b/ctr-std/src/sys/unix/os_str.rs
index 543c22e..e0da5bd 100644
--- a/ctr-std/src/sys/unix/os_str.rs
+++ b/ctr-std/src/sys/unix/os_str.rs
@@ -19,7 +19,7 @@ use rc::Rc;
use sync::Arc;
use sys_common::{AsInner, IntoInner};
use sys_common::bytestring::debug_fmt_bytestring;
-use std_unicode::lossy::Utf8Lossy;
+use core::str::lossy::Utf8Lossy;
#[derive(Clone, Hash)]
pub struct Buf {
@@ -104,6 +104,11 @@ impl Buf {
self.inner.shrink_to_fit()
}
+ #[inline]
+ pub fn shrink_to(&mut self, min_capacity: usize) {
+ self.inner.shrink_to(min_capacity)
+ }
+
pub fn as_slice(&self) -> &Slice {
unsafe { mem::transmute(&*self.inner) }
}