提交 ea4fb8ee 编写于 作者: S Steven Fackler

Stabilize OsString::shrink_to_fit

Closes #40421
上级 05cbdb1b
......@@ -230,8 +230,6 @@ pub fn reserve_exact(&mut self, additional: usize) {
/// # Examples
///
/// ```
/// #![feature(osstring_shrink_to_fit)]
///
/// use std::ffi::OsString;
///
/// let mut s = OsString::from("foo");
......@@ -242,7 +240,7 @@ pub fn reserve_exact(&mut self, additional: usize) {
/// s.shrink_to_fit();
/// assert_eq!(3, s.capacity());
/// ```
#[unstable(feature = "osstring_shrink_to_fit", issue = "40421")]
#[stable(feature = "osstring_shrink_to_fit", since = "1.19.0")]
pub fn shrink_to_fit(&mut self) {
self.inner.shrink_to_fit()
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册