From 03febb8cab92e69943c4b768cd7731078371cbe7 Mon Sep 17 00:00:00 2001 From: Sam Hedin Date: Sat, 6 Jun 2020 12:19:20 +0200 Subject: [PATCH] Formatting --- .../src/env/directory_specific_environment.rs | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/crates/nu-cli/src/env/directory_specific_environment.rs b/crates/nu-cli/src/env/directory_specific_environment.rs index 11d8ee723..0a7f054e6 100644 --- a/crates/nu-cli/src/env/directory_specific_environment.rs +++ b/crates/nu-cli/src/env/directory_specific_environment.rs @@ -96,17 +96,21 @@ impl DirectorySpecificEnvironment { keys_in_current_nufile.push(k.clone()); //this is used to keep track of which directory added which variables } - self.overwritten_env_values.insert( //If we are about to overwrite any environment variables, we save them first so they can be restored later. + self.overwritten_env_values.insert( + //If we are about to overwrite any environment variables, we save them first so they can be restored later. wdir.to_path_buf(), - keys_in_current_nufile.iter().fold(vec![], |mut keyvals, key| { - if let Some(val) = std::env::var_os(key) { - keyvals.push((key.clone(), val)); - } - keyvals - }), + keys_in_current_nufile + .iter() + .fold(vec![], |mut keyvals, key| { + if let Some(val) = std::env::var_os(key) { + keyvals.push((key.clone(), val)); + } + keyvals + }), ); - self.added_env_vars.insert(wdir.to_path_buf(), keys_in_current_nufile); + self.added_env_vars + .insert(wdir.to_path_buf(), keys_in_current_nufile); break; } else { working_dir = working_dir.unwrap().parent();