diff --git a/src/data_pipeline/environment/mod.rs b/src/data_pipeline/environment/mod.rs index 4f7c57c..10a69d3 100644 --- a/src/data_pipeline/environment/mod.rs +++ b/src/data_pipeline/environment/mod.rs @@ -88,7 +88,7 @@ impl DataPipelineEnvironment { let config: Vec<_> = lines .iter() .flat_map(|x| { - let split_pair = x.split('=').collect::>(); + let mut split_pair = x.split('=').collect::>(); let split_key = split_pair.first(); let some_key = split_key.is_some(); let key = if some_key { @@ -99,16 +99,8 @@ impl DataPipelineEnvironment { } else { String::new() }; - let split_value = split_pair.get(1); - let some_value = split_value.is_some(); - let value = if some_value { - match split_value.unwrap().trim().parse::() { - Ok(value) => value, - Err(_) => String::new(), - } - } else { - String::new() - }; + split_pair.remove(0); + let value = split_pair.join(""); let map = vec![(key, value)]; map })