Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd Url::path_segments_mut, fix #188 #194
Conversation
|
This looks great! |
|
I think it looks good even though I find this a bit unexpected: extern crate url;
fn main() {
let mut my_url = url::Url::parse("http://this/is/a").unwrap();
let new_url = my_url.join("./test").unwrap();
println!("{}", new_url.as_str());
my_url.path_segments_mut().unwrap().push("./test");
println!("{}", my_url.as_str());
}Which prints:
where I was expecting Anyhow, it's not a big deal as I can fi it by using So I am happy with the implementation. Thanks for your effort |
|
It is by design that Actually, I wonder what |
That's a good question. Maybe it should panic on Btw, r=me for the rest. |
|
I've added a commit to ignore . and make .. behave like pop() |
|
@bors-servo r=nox (IRC) |
|
|
Add Url::path_segments_mut, fix #188 @sfackler @maximih @jgillich How does this look? Would these new API help for your use cases? Can they be improved? @nox, please review and but don’t land yet. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-url/194) <!-- Reviewable:end -->
|
|
SimonSapin commentedMay 2, 2016
•
edited
@sfackler @maximih @jgillich How does this look? Would these new API help for your use cases? Can they be improved?
@nox, please review
but don’t land yet.This change is