relative-path icon indicating copy to clipboard operation
relative-path copied to clipboard

Documentation and behavior mismatch for RelativePathBuf::push

Open stormshield-guillaumed opened this issue 1 year ago • 1 comments

From the RelativePathBuf::push documentation :

Extends `self` with `path`.

If `path` is absolute, it replaces the current path.

When I run this code :

let mut path = RelativePathBuf::from("a/b/c");
path.push("/d/e/f");
println!("{}", path);

It prints :

a/b/c/d/e/f

This is the expected result but the documentation says otherwise.

stormshield-guillaumed avatar Jun 21 '23 09:06 stormshield-guillaumed

Thanks!

udoprog avatar Jun 21 '23 10:06 udoprog

I also caught this. It would be great to remove this from the docs. Thanks!

mhnap avatar May 03 '24 16:05 mhnap

Removed and released a documentation fix. Thank you!

udoprog avatar May 03 '24 16:05 udoprog