Skip to content

Commit

Permalink
fix mac and windows (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
LuckyTurtleDev authored Mar 29, 2024
1 parent 82e24b6 commit 30bdb8d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion more-wallpapers/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#[cfg(target_os = "linux")]
use std::env;
use std::{ffi::OsString, io, process::Command};
use std::io;
#[cfg(target_os = "linux")]
use std::{ffi::OsString, process::Command};
use thiserror::Error;

#[cfg(target_os = "linux")]
Expand Down Expand Up @@ -69,6 +71,7 @@ pub(crate) trait Context<V> {
C: std::fmt::Display;
}

/// add path as additional info to erro and convert it to a [WallpaperError].
impl<V> Context<V> for Result<V, io::Error> {
fn context<C>(self, context: C) -> Result<V, WallpaperError>
where
Expand Down
4 changes: 3 additions & 1 deletion more-wallpapers/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,10 @@ mod error;
use camino::{Utf8Path, Utf8PathBuf};
#[cfg(target_os = "linux")]
use error::load_env_var;
#[cfg(target_os = "linux")]
pub use error::CommandError;
use error::Context;
pub use error::{CommandError, WallpaperError};
pub use error::WallpaperError;
use std::io;
use strum_macros::{Display, EnumString};

Expand Down

0 comments on commit 30bdb8d

Please sign in to comment.