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 force-pushed the task/fix-url-regression branch from 8d84967 to 011a7f5 Compare January 29, 2020 16:08
@kali kali merged commit de0d5c4 into master Jan 29, 2020
@MarcTreySonos
Copy link
Contributor Author

@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