diff options
author | Matthias Beyer <matthias.beyer@atos.net> | 2021-01-18 14:48:59 +0100 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@atos.net> | 2021-01-18 14:48:59 +0100 |
commit | 0295809436d8e178a7d0528b47b9d4313b292eef (patch) | |
tree | 55671566fb700328c81a34b322cfa55309e098f8 /src/util/env.rs | |
parent | 5bee5329b823431fd3c971f75281084617766edd (diff) |
Run `cargo fmt`
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
Diffstat (limited to 'src/util/env.rs')
-rw-r--r-- | src/util/env.rs | 13 |
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))?, + ), )) } - |