Skip to content

Commit 39d7281

Browse files
committed
Clippy: Remove manual implementation of map
Because clippy complains on nightly. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
1 parent 10c466f commit 39d7281

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/env.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,7 @@ impl Source for Environment {
7777
};
7878

7979
// 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-
};
80+
let prefix_pattern = self.prefix.as_ref().map(|prefix| prefix.clone() + "_");
8481

8582
for (key, value) in env::vars() {
8683
// Treat empty environment variables as unset

0 commit comments

Comments
 (0)