You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Failed to compile when using: cargo install termusic.
When trying to compile the following error is displayed:
error[E0308]: mismatched types
--> /home/auronandace/.cargo/registry/src/index.crates.io-6f17d22bba15001f/termusic-playback-0.9.0/src/rusty_backend/mod.rs:656:60
|
656 | let client = Client::builder().default_headers(headers).build().unwrap();
| --------------- ^^^^^^^ expected `HeaderMap`, found `reqwest::header::HeaderMap`
| |
| arguments to this method are incorrect
|
= note: `reqwest::header::HeaderMap` and `HeaderMap` have similar names, but are actually distinct types
note: `reqwest::header::HeaderMap` is defined in crate `http`
--> /home/auronandace/.cargo/registry/src/index.crates.io-6f17d22bba15001f/http-0.2.12/src/header/map.rs:45:1
|
45 | pub struct HeaderMap<T = HeaderValue> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: `HeaderMap` is defined in crate `http`
--> /home/auronandace/.cargo/registry/src/index.crates.io-6f17d22bba15001f/http-1.1.0/src/header/map.rs:45:1
|
45 | pub struct HeaderMap<T = HeaderValue> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate `http` are being used?
note: method defined here
--> /home/auronandace/.cargo/registry/src/index.crates.io-6f17d22bba15001f/reqwest-0.12.5/src/async_impl/client.rs:826:12
|
826 | pub fn default_headers(mut self, headers: HeaderMap) -> ClientBuilder {
| ^^^^^^^^^^^^^^^
It appears to be confusing HeaderMap from versions 0.2.12 and 1.1.0 of the http crate.
It does compile fine when using cargo install --locked termusic.
The text was updated successfully, but these errors were encountered:
somewhat known issue, it is already fixed in master but no new version has been posted yet.
i recommend to directly install from git (cargo install --git https://github.com/tramhao/termusic.git, though i dont actually know if this only works for a single package or a whole workspace), or clone first and then manually install (cargo build --release && cp -f ./target/release/{termusic,termusic-server} ${CARGO_HOME}/bin/).
or if you are using arch, consider trying termusic-git
Environment & Versions
Logs:
compilation error, please see below
Description of the Problem
Failed to compile when using:
cargo install termusic
.When trying to compile the following error is displayed:
It appears to be confusing
HeaderMap
from versions0.2.12
and1.1.0
of thehttp
crate.It does compile fine when using
cargo install --locked termusic
.The text was updated successfully, but these errors were encountered: