Skip to content

Commit

Permalink
more generic whitespace check
Browse files Browse the repository at this point in the history
  • Loading branch information
jondot committed May 15, 2024
1 parent 5c438bf commit 32e9717
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion teller-providers/src/providers/dotenv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ fn save(path: &Path, data: &BTreeMap<String, String>) -> Result<String> {
};

let value = json_value.unwrap_or_else(|| v.to_string());
if value.contains([' ', '\t']) {
if value.chars().any(char::is_whitespace) {
out.push_str(&format!("{k}=\"{value}\"\n"));
} else {
out.push_str(&format!("{k}={value}\n"));
Expand Down

0 comments on commit 32e9717

Please sign in to comment.