Skip to content

Commit

Permalink
Use String instead of OsString for environment variables in config
Browse files Browse the repository at this point in the history
  • Loading branch information
bnavetta committed May 6, 2020
1 parent b660171 commit 994e7de
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rustic-backup"
version = "0.1.0"
version = "0.1.1"
description = "Restic wrapper for convenient backups"
authors = ["Ben Navetta <[email protected]>"]
readme = "README.md"
Expand Down
4 changes: 2 additions & 2 deletions src/restic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,15 @@ fn add_credentials(profile: &Profile, env: &mut HashMap<OsString, OsString>) ->
environment_file.display()
)
})?;
let env_vars: HashMap<OsString, OsString> =
let env_vars: HashMap<String, String> =
toml::from_str(&env_contents).with_context(|| {
format!(
"Could not parse environment file {}",
environment_file.display()
)
})?;
for (var, value) in env_vars {
env.insert(var, value);
env.insert(var.into(), value.into());
}
}

Expand Down

0 comments on commit 994e7de

Please sign in to comment.