hyper update breaks librespot
Closed this issue · 3 comments
Started a new project using librespot. But it failed to build:
error[E0432]: unresolved import
hyper::Url
--> /Users/mh/.cargo/git/checkouts/librespot-88dc5c33d49326b7/d95c0b3/src/apresolve.rs:5:19
|
5 | use hyper::{self, Url, Client};
| ^^^ noUrl
in the root. Did you mean to useUri
?error: aborting due to previous error
error: Could not compile
librespot
.
diffed against the Cargo.lock of a working librespot clone and replaced the dependency with the following commit:
source = "git+https://github.com/hyperium/hyper#c51a9993fa091c53a33fff6f49ea8a6963a4b972"
Now the compilation succeeds. Something after that commit is breaking librespot.
Url is removed from hyper. It is however easy to fix. Change let url = Url::...
in apresolve.rs to:
let url = Uri::from_str(APRESOLVE_ENDPOINT).expect("invalid AP resolve URL");
Make sure use std::str::FromStr;
is somewhere as well.
@Fulkerson would you mind making a PR with that fix please ?
Fixed by @Fulkerson in #180