You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Documentation for std::path::PathBuf::pop is slightly wrong #58474
The documentation for std::path::PathBuf::pop() says:
Returns false and does nothing if self.file_name is None. Otherwise, returns true.
However, self.file_name() is None when the path ends in ..—but pop() still does removes that component and returns true. The docs should probably be changed to reflect that pop()truncates and returns true unless self.parent() is None.
Activity
hellow554 commentedon Feb 15, 2019
@nathan would you open a PR and edit the required paragraph? Seems to be an easy issue :)
https://github.com/rust-lang/rust/blob/master/src/libstd/path.rs#L1231-L1261
nathan commentedon Feb 15, 2019
@hellow554 Sure thing! #58496
Rollup merge of rust-lang#58496 - nathan:doc-std-path-pathbuf-pop, r=…
Rollup merge of rust-lang#58496 - nathan:doc-std-path-pathbuf-pop, r=…