Skip to content

Commit 77ee088

Browse files
Stabilize PathBuf capacity methods
1 parent 36b1a92 commit 77ee088

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/libstd/path.rs

+7-8
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,6 @@ impl PathBuf {
11161116
/// # Examples
11171117
///
11181118
/// ```
1119-
/// #![feature(path_buf_capacity)]
11201119
/// use std::path::PathBuf;
11211120
///
11221121
/// let mut path = PathBuf::with_capacity(10);
@@ -1130,7 +1129,7 @@ impl PathBuf {
11301129
///
11311130
/// [`with_capacity`]: ../ffi/struct.OsString.html#method.with_capacity
11321131
/// [`OsString`]: ../ffi/struct.OsString.html
1133-
#[unstable(feature = "path_buf_capacity", issue = "58234")]
1132+
#[stable(feature = "path_buf_capacity", since = "1.44.0")]
11341133
pub fn with_capacity(capacity: usize) -> PathBuf {
11351134
PathBuf { inner: OsString::with_capacity(capacity) }
11361135
}
@@ -1374,7 +1373,7 @@ impl PathBuf {
13741373
///
13751374
/// [`capacity`]: ../ffi/struct.OsString.html#method.capacity
13761375
/// [`OsString`]: ../ffi/struct.OsString.html
1377-
#[unstable(feature = "path_buf_capacity", issue = "58234")]
1376+
#[stable(feature = "path_buf_capacity", since = "1.44.0")]
13781377
pub fn capacity(&self) -> usize {
13791378
self.inner.capacity()
13801379
}
@@ -1383,7 +1382,7 @@ impl PathBuf {
13831382
///
13841383
/// [`clear`]: ../ffi/struct.OsString.html#method.clear
13851384
/// [`OsString`]: ../ffi/struct.OsString.html
1386-
#[unstable(feature = "path_buf_capacity", issue = "58234")]
1385+
#[stable(feature = "path_buf_capacity", since = "1.44.0")]
13871386
pub fn clear(&mut self) {
13881387
self.inner.clear()
13891388
}
@@ -1392,7 +1391,7 @@ impl PathBuf {
13921391
///
13931392
/// [`reserve`]: ../ffi/struct.OsString.html#method.reserve
13941393
/// [`OsString`]: ../ffi/struct.OsString.html
1395-
#[unstable(feature = "path_buf_capacity", issue = "58234")]
1394+
#[stable(feature = "path_buf_capacity", since = "1.44.0")]
13961395
pub fn reserve(&mut self, additional: usize) {
13971396
self.inner.reserve(additional)
13981397
}
@@ -1401,7 +1400,7 @@ impl PathBuf {
14011400
///
14021401
/// [`reserve_exact`]: ../ffi/struct.OsString.html#method.reserve_exact
14031402
/// [`OsString`]: ../ffi/struct.OsString.html
1404-
#[unstable(feature = "path_buf_capacity", issue = "58234")]
1403+
#[stable(feature = "path_buf_capacity", since = "1.44.0")]
14051404
pub fn reserve_exact(&mut self, additional: usize) {
14061405
self.inner.reserve_exact(additional)
14071406
}
@@ -1410,7 +1409,7 @@ impl PathBuf {
14101409
///
14111410
/// [`shrink_to_fit`]: ../ffi/struct.OsString.html#method.shrink_to_fit
14121411
/// [`OsString`]: ../ffi/struct.OsString.html
1413-
#[unstable(feature = "path_buf_capacity", issue = "58234")]
1412+
#[stable(feature = "path_buf_capacity", since = "1.44.0")]
14141413
pub fn shrink_to_fit(&mut self) {
14151414
self.inner.shrink_to_fit()
14161415
}
@@ -1419,7 +1418,7 @@ impl PathBuf {
14191418
///
14201419
/// [`shrink_to`]: ../ffi/struct.OsString.html#method.shrink_to
14211420
/// [`OsString`]: ../ffi/struct.OsString.html
1422-
#[unstable(feature = "path_buf_capacity", issue = "58234")]
1421+
#[unstable(feature = "shrink_to", issue = "56431")]
14231422
pub fn shrink_to(&mut self, min_capacity: usize) {
14241423
self.inner.shrink_to(min_capacity)
14251424
}

0 commit comments

Comments
 (0)