rollup merge of #22162: ogham/patch-1

It returns `false`, not `None`.
This commit is contained in:
Alex Crichton 2015-02-11 14:02:11 -08:00
commit 5e2b69c1b2

View File

@ -878,7 +878,8 @@ impl PathBuf {
/// Truncate `self` to `self.parent()`.
///
/// Returns `None` and does nothing if `self.parent()` is `None`.
/// Returns `false` and does nothing if `self.parent()` is `None`.
/// Otherwise, returns `true`.
pub fn pop(&mut self) -> bool {
match self.parent().map(|p| p.as_u8_slice().len()) {
Some(len) => {