Skip to content

Commit

Permalink
add another error type
Browse files Browse the repository at this point in the history
  • Loading branch information
wiiznokes committed Dec 15, 2023
1 parent 4efec75 commit 9403bad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions crates/resource-resolver/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ pub enum Error {
/// IO error
#[error("{0}")]
Io(#[from] std::io::Error),
/// Environement variable error
#[error("{0}")]
Var(#[from] std::env::VarError),
}
2 changes: 1 addition & 1 deletion crates/resource-resolver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ pub fn resource_dir_with_suffix(suffix: &str) -> Result<PathBuf> {
}

// when cargo run
let root_crate_dir = env!("CARGO_MANIFEST_DIR");
let root_crate_dir = env::var("CARGO_MANIFEST_DIR")?;
Ok(PathBuf::from(root_crate_dir).join(suffix))
}

Expand Down

0 comments on commit 9403bad

Please sign in to comment.