diff options
| author | Fenrir <[email protected]> | 2018-04-14 20:02:05 -0600 |
|---|---|---|
| committer | Fenrir <[email protected]> | 2018-04-21 16:35:01 -0600 |
| commit | b330206f5590d88a2f995321d2ea847ded951d1d (patch) | |
| tree | 4fecd0ca00b754c494e96b13e9837db48de93109 /ctr-std/src/sys/unix/os_str.rs | |
| parent | Move more implementation details to `imp` module (diff) | |
| download | archived-ctru-rs-b330206f5590d88a2f995321d2ea847ded951d1d.tar.xz archived-ctru-rs-b330206f5590d88a2f995321d2ea847ded951d1d.zip | |
Update for Rust nightly 2018-04-19
Diffstat (limited to 'ctr-std/src/sys/unix/os_str.rs')
| -rw-r--r-- | ctr-std/src/sys/unix/os_str.rs | 7 |
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) } } |