提交 5e2b69c1 编写于 作者: A Alex Crichton

rollup merge of #22162: ogham/patch-1

It returns `false`, not `None`.
......@@ -878,7 +878,8 @@ pub fn push<P: ?Sized>(&mut self, path: &P) where P: AsPath {
/// 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) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册