Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use crate url 2.0.0 #97

Merged
merged 1 commit into from
Jan 29, 2020
Merged

use crate url 2.0.0 #97

merged 1 commit into from
Jan 29, 2020

Conversation

MarcTreySonos
Copy link
Contributor

there is a regression in the latest version of the crate url version 2.1.1

the following code when invoked with an url whose scheme is ssh will return an error:

url.set_scheme("https").unwrap();

ref : https://github.com/rust-lang/cargo/blob/0.41.0/src/cargo/util/canonical_url.rs#L42

here is a simple test case to reproduce the issue :

extern crate url;
use url::Url;

fn main() {
    let mut url = Url::parse("ssh://example.net").unwrap();
    let result = url.set_scheme("https");
    assert_eq!(url.as_str(), "https://example.net/");
    assert!(result.is_ok());
}

it will work with :

cargo update --package url --precise 2.0.0

it will fail with:

cargo update --package url --precise 2.1.1

ref : https://github.com/servo/rust-url/blob/v2.1.1/src/lib.rs#L1987

@kali kali merged commit de0d5c4 into master Jan 29, 2020
@MarcTreySonos
Copy link
Contributor Author

@kali latest url is back into master : https://github.com/snipsco/dinghy/blob/master/Cargo.lock#L584

@kali kali deleted the task/fix-url-regression branch February 15, 2021 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants