Closed
Description
Url::join
has a very confusing name.
I would expect it to append a path segment.
Instead, it replaces the whole base path, which is quite awkward.
If you want to actually join, you have to:
let segments = url.path_segments_mut().unwrap()pop_if_empty().push("new-segment");
Personally I think join should append a new segment, but changing this might be too late...
If so, the time is now, before a 1.0.
Otherwise, I would suggest adding a new method, something like add_segment
.
Metadata
Metadata
Assignees
Labels
No labels