summaryrefslogtreecommitdiffstats
path: root/src/util/env.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/env.rs')
-rw-r--r--src/util/env.rs13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/util/env.rs b/src/util/env.rs
index a001b25..b1c0170 100644
--- a/src/util/env.rs
+++ b/src/util/env.rs
@@ -1,13 +1,18 @@
-use anyhow::Result;
use anyhow::anyhow;
+use anyhow::Result;
use crate::util::EnvironmentVariableName;
pub fn parse_to_env(s: &str) -> Result<(EnvironmentVariableName, String)> {
let v = s.split('=').collect::<Vec<_>>();
Ok((
- EnvironmentVariableName::from(*v.get(0).ok_or_else(|| anyhow!("Environment variable has no key: {}", s))?),
- String::from(*v.get(1).ok_or_else(|| anyhow!("Environment variable has no key: {}", s))?)
+ EnvironmentVariableName::from(
+ *v.get(0)
+ .ok_or_else(|| anyhow!("Environment variable has no key: {}", s))?,
+ ),
+ String::from(
+ *v.get(1)
+ .ok_or_else(|| anyhow!("Environment variable has no key: {}", s))?,
+ ),
))
}
-