Skip to content

Commit

Permalink
Changed feature gate for new PathBuf methods
Browse files Browse the repository at this point in the history
Feature gate changed to `path_buf_capacity` as per advice from @Mark-Simulacrum
  • Loading branch information
aaronstillwell committed Feb 17, 2019
1 parent dbf60d9 commit 35d8c44
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/libstd/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,7 @@ impl PathBuf {
///
/// [`with_capacity`]: ../ffi/struct.OsString.html#method.with_capacity
/// [`OsString`]: ../ffi/struct.OsString.html
#[unstable(feature = "path_buf_alias_os_string_methods", issue = "58234")]
#[unstable(feature = "path_buf_capacity", issue = "58234")]
pub fn with_capacity(capacity: usize) -> PathBuf {
PathBuf {
inner: OsString::with_capacity(capacity)
Expand Down Expand Up @@ -1404,7 +1404,7 @@ impl PathBuf {
///
/// [`capacity`]: ../ffi/struct.OsString.html#method.capacity
/// [`OsString`]: ../ffi/struct.OsString.html
#[unstable(feature = "path_buf_alias_os_string_methods", issue = "58234")]
#[unstable(feature = "path_buf_capacity", issue = "58234")]
pub fn capacity(&self) -> usize {
self.inner.capacity()
}
Expand All @@ -1413,7 +1413,7 @@ impl PathBuf {
///
/// [`clear`]: ../ffi/struct.OsString.html#method.clear
/// [`OsString`]: ../ffi/struct.OsString.html
#[unstable(feature = "path_buf_alias_os_string_methods", issue = "58234")]
#[unstable(feature = "path_buf_capacity", issue = "58234")]
pub fn clear(&mut self) {
self.inner.clear()
}
Expand All @@ -1422,7 +1422,7 @@ impl PathBuf {
///
/// [`reserve`]: ../ffi/struct.OsString.html#method.reserve
/// [`OsString`]: ../ffi/struct.OsString.html
#[unstable(feature = "path_buf_alias_os_string_methods", issue = "58234")]
#[unstable(feature = "path_buf_capacity", issue = "58234")]
pub fn reserve(&mut self, additional: usize) {
self.inner.reserve(additional)
}
Expand All @@ -1431,7 +1431,7 @@ impl PathBuf {
///
/// [`reserve_exact`]: ../ffi/struct.OsString.html#method.reserve_exact
/// [`OsString`]: ../ffi/struct.OsString.html
#[unstable(feature = "path_buf_alias_os_string_methods", issue = "58234")]
#[unstable(feature = "path_buf_capacity", issue = "58234")]
pub fn reserve_exact(&mut self, additional: usize) {
self.inner.reserve_exact(additional)
}
Expand All @@ -1440,7 +1440,7 @@ impl PathBuf {
///
/// [`shrink_to_fit`]: ../ffi/struct.OsString.html#method.shrink_to_fit
/// [`OsString`]: ../ffi/struct.OsString.html
#[unstable(feature = "path_buf_alias_os_string_methods", issue = "58234")]
#[unstable(feature = "path_buf_capacity", issue = "58234")]
pub fn shrink_to_fit(&mut self) {
self.inner.shrink_to_fit()
}
Expand All @@ -1449,7 +1449,7 @@ impl PathBuf {
///
/// [`shrink_to`]: ../ffi/struct.OsString.html#method.shrink_to
/// [`OsString`]: ../ffi/struct.OsString.html
#[unstable(feature = "path_buf_alias_os_string_methods", issue = "58234")]
#[unstable(feature = "path_buf_capacity", issue = "58234")]
pub fn shrink_to(&mut self, min_capacity: usize) {
self.inner.shrink_to(min_capacity)
}
Expand Down

0 comments on commit 35d8c44

Please sign in to comment.