Created
July 31, 2017 23:38
-
-
Save AzMoo/462643bb3b31165651d3c27538c83f82 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This errors with expected type `hyper::Uri` | |
let uri = "https://icanhazdadjoke.com/" | |
let work = client.get(uri).map(|res| { | |
println!("Response: {}", res.status()); | |
}); | |
// This works | |
let uri = "https://icanhazdadjoke.com/".parse().unwrap(); | |
let work = client.get(uri).map(|res| { | |
println!("Response: {}", res.status()); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment