Changed feature gate for new PathBuf methods
Feature gate changed to `path_buf_capacity` as per advice from @Mark-Simulacrum
This commit is contained in:
@@ -1164,7 +1164,7 @@ impl PathBuf {
|
|||||||
///
|
///
|
||||||
/// [`with_capacity`]: ../ffi/struct.OsString.html#method.with_capacity
|
/// [`with_capacity`]: ../ffi/struct.OsString.html#method.with_capacity
|
||||||
/// [`OsString`]: ../ffi/struct.OsString.html
|
/// [`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 {
|
pub fn with_capacity(capacity: usize) -> PathBuf {
|
||||||
PathBuf {
|
PathBuf {
|
||||||
inner: OsString::with_capacity(capacity)
|
inner: OsString::with_capacity(capacity)
|
||||||
@@ -1404,7 +1404,7 @@ impl PathBuf {
|
|||||||
///
|
///
|
||||||
/// [`capacity`]: ../ffi/struct.OsString.html#method.capacity
|
/// [`capacity`]: ../ffi/struct.OsString.html#method.capacity
|
||||||
/// [`OsString`]: ../ffi/struct.OsString.html
|
/// [`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 {
|
pub fn capacity(&self) -> usize {
|
||||||
self.inner.capacity()
|
self.inner.capacity()
|
||||||
}
|
}
|
||||||
@@ -1413,7 +1413,7 @@ impl PathBuf {
|
|||||||
///
|
///
|
||||||
/// [`clear`]: ../ffi/struct.OsString.html#method.clear
|
/// [`clear`]: ../ffi/struct.OsString.html#method.clear
|
||||||
/// [`OsString`]: ../ffi/struct.OsString.html
|
/// [`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) {
|
pub fn clear(&mut self) {
|
||||||
self.inner.clear()
|
self.inner.clear()
|
||||||
}
|
}
|
||||||
@@ -1422,7 +1422,7 @@ impl PathBuf {
|
|||||||
///
|
///
|
||||||
/// [`reserve`]: ../ffi/struct.OsString.html#method.reserve
|
/// [`reserve`]: ../ffi/struct.OsString.html#method.reserve
|
||||||
/// [`OsString`]: ../ffi/struct.OsString.html
|
/// [`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) {
|
pub fn reserve(&mut self, additional: usize) {
|
||||||
self.inner.reserve(additional)
|
self.inner.reserve(additional)
|
||||||
}
|
}
|
||||||
@@ -1431,7 +1431,7 @@ impl PathBuf {
|
|||||||
///
|
///
|
||||||
/// [`reserve_exact`]: ../ffi/struct.OsString.html#method.reserve_exact
|
/// [`reserve_exact`]: ../ffi/struct.OsString.html#method.reserve_exact
|
||||||
/// [`OsString`]: ../ffi/struct.OsString.html
|
/// [`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) {
|
pub fn reserve_exact(&mut self, additional: usize) {
|
||||||
self.inner.reserve_exact(additional)
|
self.inner.reserve_exact(additional)
|
||||||
}
|
}
|
||||||
@@ -1440,7 +1440,7 @@ impl PathBuf {
|
|||||||
///
|
///
|
||||||
/// [`shrink_to_fit`]: ../ffi/struct.OsString.html#method.shrink_to_fit
|
/// [`shrink_to_fit`]: ../ffi/struct.OsString.html#method.shrink_to_fit
|
||||||
/// [`OsString`]: ../ffi/struct.OsString.html
|
/// [`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) {
|
pub fn shrink_to_fit(&mut self) {
|
||||||
self.inner.shrink_to_fit()
|
self.inner.shrink_to_fit()
|
||||||
}
|
}
|
||||||
@@ -1449,7 +1449,7 @@ impl PathBuf {
|
|||||||
///
|
///
|
||||||
/// [`shrink_to`]: ../ffi/struct.OsString.html#method.shrink_to
|
/// [`shrink_to`]: ../ffi/struct.OsString.html#method.shrink_to
|
||||||
/// [`OsString`]: ../ffi/struct.OsString.html
|
/// [`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) {
|
pub fn shrink_to(&mut self, min_capacity: usize) {
|
||||||
self.inner.shrink_to(min_capacity)
|
self.inner.shrink_to(min_capacity)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user