use url::Url;

fn print_fields(url: Url) -> () {
    println!("scheme: {}", url.scheme());
    println!("username: {}", url.username());

    if let Some(password) = url.password() {
        println!("password: {}", password);
    }

    if let Some(domain) = url.domain() {
        println!("domain: {}", domain);
    }

    if let Some(port) = url.port() {
        println!("port: {}", port);
    }
    println!("path: {}", url.path());

    if let Some(query) = url.query() {
        println!("query: {}", query);
    }

    if let Some(fragment) = url.fragment() {
        println!("fragment: {}", fragment);
    }
}
fn main() {
    let urls = vec![
        "foo: