summaryrefslogtreecommitdiffstats
path: root/src/rep.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/rep.rs')
-rw-r--r--src/rep.rs13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/rep.rs b/src/rep.rs
index 40e5975..a6de7e8 100644
--- a/src/rep.rs
+++ b/src/rep.rs
@@ -188,15 +188,12 @@ pub struct Config {
impl Config {
pub fn env(&self) -> HashMap<String, String> {
let mut map = HashMap::new();
- match self.env {
- Some(ref vars) => {
- for e in vars {
- let pair: Vec<&str> = e.split("=").collect();
- map.insert(pair[0].to_owned(), pair[1].to_owned());
- }
+ if let Some(ref vars) = self.env {
+ for e in vars {
+ let pair: Vec<&str> = e.split('=').collect();
+ map.insert(pair[0].to_owned(), pair[1].to_owned());
}
- _ => (),
- };
+ }
map
}
}