reujab / wallpaper.rs

A cross-platform Rust library for getting and setting desktop wallpapers
The Unlicense
96 stars 24 forks source link

[BUG] master does not compile at apple and windows #17

Open LuckyTurtleDev opened 1 year ago

LuckyTurtleDev commented 1 year ago

It looks like that the current master is broken on windows and mac:

❯ cargo check --target x86_64-apple-darwin
    Checking wallpaper v4.0.0 (https://github.com/reujab/wallpaper.rs.git#20270387)
    Checking clap v3.2.23
error[E0433]: failed to resolve: use of undeclared crate or module `ini`
  --> /home/lukas/.cargo/git/checkouts/wallpaper.rs-e56f8913492c51cc/2027038/src/error.rs:14:24
   |
14 |     InvalidIni(#[from] ini::ini::Error),
   |                        ^^^ use of undeclared crate or module `ini`

error[E0412]: cannot find type `Path` in this scope
  --> /home/lukas/.cargo/git/checkouts/wallpaper.rs-e56f8913492c51cc/2027038/src/macos.rs:20:14
   |
20 |     P: AsRef<Path> + std::fmt::Display,
   |              ^^^^ not found in this scope
   |
help: consider importing this struct
   |
1  | use std::path::Path;
   |

error[E0308]: mismatched types
  --> /home/lukas/.cargo/git/checkouts/wallpaper.rs-e56f8913492c51cc/2027038/src/macos.rs:28:39
   |
18 | pub fn set_from_path<P>(path: P) -> Result<()>
   |                      - this type parameter
...
28 |                 enquote::enquote('"', path),
   |                 ----------------      ^^^^ expected `&str`, found type parameter `P`
   |                 |
   |                 arguments to this function are incorrect
   |
   = note:   expected reference `&str`
           found type parameter `P`
note: function defined here
  --> /home/lukas/.cargo/registry/src/github.com-1ecc6299db9ec823/enquote-1.1.0/src/lib.rs:19:8
   |
19 | pub fn enquote(quote: char, s: &str) -> String {
   |        ^^^^^^^

Some errors have detailed explanations: E0308, E0412, E0433.
For more information about an error, try `rustc --explain E0308`.
error: could not compile `wallpaper` due to 3 previous errors
❯ cargo check --target x86_64-pc-windows-gnu
    Checking wallpaper v4.0.0 (https://github.com/reujab/wallpaper.rs.git#20270387)
    Checking clap v3.2.23
error[E0433]: failed to resolve: use of undeclared crate or module `ini`
  --> /home/lukas/.cargo/git/checkouts/wallpaper.rs-e56f8913492c51cc/2027038/src/error.rs:14:24
   |
14 |     InvalidIni(#[from] ini::ini::Error),
   |                        ^^^ use of undeclared crate or module `ini`

error[E0433]: failed to resolve: use of undeclared crate or module `enquote`
  --> /home/lukas/.cargo/git/checkouts/wallpaper.rs-e56f8913492c51cc/2027038/src/error.rs:17:21
   |
17 |     Enquote(#[from] enquote::Error),
   |                     ^^^^^^^ use of undeclared crate or module `enquote`

For more information about this error, try `rustc --explain E0433`.
error: could not compile `wallpaper` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

Linux does work fine.

LuckyTurtleDev commented 1 year ago

It does looks like this happen because of #15 and #16