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
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.
The documentation for
std::path::PathBuf::pop()
says:However,
self.file_name()
isNone
when the path ends in..
—butpop()
still does removes that component and returnstrue
. The docs should probably be changed to reflect thatpop()
truncates and returns true unlessself.parent()
isNone
.(Playground)
Output:
The text was updated successfully, but these errors were encountered: