We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10c466f commit 39d7281Copy full SHA for 39d7281
src/env.rs
@@ -77,10 +77,7 @@ impl Source for Environment {
77
};
78
79
// Define a prefix pattern to test and exclude from keys
80
- let prefix_pattern = match self.prefix {
81
- Some(ref prefix) => Some(prefix.clone() + "_"),
82
- _ => None,
83
- };
+ let prefix_pattern = self.prefix.as_ref().map(|prefix| prefix.clone() + "_");
84
85
for (key, value) in env::vars() {
86
// Treat empty environment variables as unset
0 commit comments