Skip to content

Commit

Permalink
Fix error usage
Browse files Browse the repository at this point in the history
  • Loading branch information
allan2 committed Sep 6, 2024
1 parent 9ad1045 commit c4263c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dotenvy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub use dotenvy_macros::*;
pub fn var(key: &str) -> Result<String> {
env::var(key).map_err(|e| match e {
VarError::NotPresent => Error::NotPresent(key.to_owned()),
VarError::NotUnicode(s) => Error::NotUnicode(s),
VarError::NotUnicode(os_str) => Error::NotUnicode(os_str, key.to_owned()),
})
}

Expand Down

0 comments on commit c4263c8

Please sign in to comment.