joshurtree / hyprsession

Session saver for Hyprland
GNU General Public License v3.0
8 stars 4 forks source link

Cannot Install due to mismatched types #2

Open Ozy-Viking opened 2 months ago

Ozy-Viking commented 2 months ago

image

Terminal Output

[root@computer] # cargo install --root /usr/local hyprsession
    Updating crates.io index
  Downloaded hyprsession v0.1.3
  Downloaded 1 crate (22.3 KB) in 1.00s
  Installing hyprsession v0.1.3
    Updating crates.io index
     Locking 70 packages to latest compatible versions
      Adding addr2line v0.22.0 (latest: v0.24.1)
      Adding derive_more v0.99.18 (latest: v1.0.0)
      Adding gimli v0.29.0 (latest: v0.31.0)
      Adding hermit-abi v0.3.9 (latest: v0.4.0)
      Adding miniz_oxide v0.7.4 (latest: v0.8.0)
      Adding wasi v0.11.0+wasi-snapshot-preview1 (latest: v0.13.2+wasi-0.2.1)
      Adding windows-sys v0.52.0 (latest: v0.59.0)
  Downloaded autocfg v1.3.0
  Downloaded clap_lex v0.7.2
  Downloaded cfg-if v1.0.0
  Downloaded anstyle v1.0.8
  Downloaded anstream v0.6.15
  Downloaded ahash v0.8.11
  Downloaded is_terminal_polyfill v1.70.1
  Downloaded hyprland-macros v0.4.0-alpha.1
  Downloaded colorchoice v1.0.2
  Downloaded anstyle-parse v0.2.5
  Downloaded version_check v0.9.5
  Downloaded strsim v0.11.1
  Downloaded heck v0.5.0
  Downloaded anstyle-query v1.1.1
  Downloaded serde_repr v0.1.19
  Downloaded tokio-macros v2.4.0
  Downloaded itoa v1.0.11
  Downloaded utf8parse v0.2.2
  Downloaded paste v1.0.15
  Downloaded quote v1.0.37
  Downloaded once_cell v1.19.0
  Downloaded derive_more v0.99.18
  Downloaded serde_derive v1.0.209
  Downloaded clap_derive v4.5.13
  Downloaded unicode-ident v1.0.12
  Downloaded ryu v1.0.18
  Downloaded pin-project-lite v0.2.14
  Downloaded num-traits v0.2.19
  Downloaded socket2 v0.5.7
  Downloaded proc-macro2 v1.0.86
  Downloaded clap v4.5.16
  Downloaded hyprland v0.4.0-alpha.3
  Downloaded bytes v1.7.1
  Downloaded serde v1.0.209
  Downloaded mio v1.0.2
  Downloaded memchr v2.7.4
  Downloaded zerocopy v0.7.35
  Downloaded serde_json v1.0.127
  Downloaded clap_builder v4.5.15
  Downloaded aho-corasick v1.1.3
  Downloaded regex v1.10.6
  Downloaded syn v2.0.76
  Downloaded regex-syntax v0.8.4
  Downloaded regex-automata v0.4.7
  Downloaded tokio v1.39.3
  Downloaded libc v0.2.158
  Downloaded 46 crates (4.9 MB) in 0.46s
   Compiling proc-macro2 v1.0.86
   Compiling unicode-ident v1.0.12
   Compiling libc v0.2.158
   Compiling memchr v2.7.4
   Compiling serde v1.0.209
   Compiling version_check v0.9.5
   Compiling utf8parse v0.2.2
   Compiling autocfg v1.3.0
   Compiling serde_json v1.0.127
   Compiling paste v1.0.15
   Compiling regex-syntax v0.8.4
   Compiling anstyle v1.0.8
   Compiling anstyle-query v1.1.1
   Compiling colorchoice v1.0.2
   Compiling is_terminal_polyfill v1.70.1
   Compiling strsim v0.11.1
   Compiling anstyle-parse v0.2.5
   Compiling once_cell v1.19.0
   Compiling bytes v1.7.1
   Compiling pin-project-lite v0.2.14
   Compiling ryu v1.0.18
   Compiling cfg-if v1.0.0
   Compiling zerocopy v0.7.35
   Compiling itoa v1.0.11
   Compiling anstream v0.6.15
   Compiling clap_lex v0.7.2
   Compiling heck v0.5.0
   Compiling ahash v0.8.11
   Compiling num-traits v0.2.19
   Compiling clap_builder v4.5.15
   Compiling aho-corasick v1.1.3
   Compiling quote v1.0.37
   Compiling syn v2.0.76
   Compiling mio v1.0.2
   Compiling socket2 v0.5.7
   Compiling regex-automata v0.4.7
   Compiling regex v1.10.6
   Compiling serde_derive v1.0.209
   Compiling tokio-macros v2.4.0
   Compiling clap_derive v4.5.13
   Compiling serde_repr v0.1.19
   Compiling derive_more v0.99.18
   Compiling hyprland-macros v0.4.0-alpha.1
   Compiling tokio v1.39.3
   Compiling clap v4.5.16
   Compiling hyprland v0.4.0-alpha.3
   Compiling hyprsession v0.1.3
error[E0308]: mismatched types
  --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyprsession-0.1.3/src/session.rs:39:46
   |
39 |         |info: &Client| format!("{}", run_if(info.fullscreen, "fullscreen")),
   |                                       ------ ^^^^^^^^^^^^^^^ expected `bool`, found `FullscreenMode`
   |                                       |
   |                                       arguments to this function are incorrect
   |
note: function defined here
  --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyprsession-0.1.3/src/session.rs:26:4
   |
26 | fn run_if(prop: bool, val: &str) -> &str {
   |    ^^^^^^ ----------

For more information about this error, try `rustc --explain E0308`.
error: could not compile `hyprsession` (bin "hyprsession") due to 1 previous error
error: failed to compile `hyprsession v0.1.3`, intermediate artifacts can be found at `/tmp/cargo-installZJOxbv`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Remarks

I will see if I can fix it and send through as a pull request.

lcassa commented 3 days ago

I'm facing the same issue, any chances to get this merged @joshurtree ?