From 124561ff128d43dfd4a86645eac3fc2377a5f6ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=BD=C3=A1dn=C3=ADk?= Date: Thu, 2 Dec 2021 00:25:51 +0200 Subject: [PATCH] Rename add_decls() to use_decls() (#395) To reflect better what the method actually does. --- crates/nu-parser/src/parse_keywords.rs | 2 +- crates/nu-protocol/src/engine/engine_state.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/nu-parser/src/parse_keywords.rs b/crates/nu-parser/src/parse_keywords.rs index 8ee625ffd5..b1778cad39 100644 --- a/crates/nu-parser/src/parse_keywords.rs +++ b/crates/nu-parser/src/parse_keywords.rs @@ -763,7 +763,7 @@ pub fn parse_use( }; // Extend the current scope with the module's overlay - working_set.add_decls(decls_to_use); + working_set.use_decls(decls_to_use); // Create the Use command call let use_decl_id = working_set diff --git a/crates/nu-protocol/src/engine/engine_state.rs b/crates/nu-protocol/src/engine/engine_state.rs index 7474e18ec7..277a736cb0 100644 --- a/crates/nu-protocol/src/engine/engine_state.rs +++ b/crates/nu-protocol/src/engine/engine_state.rs @@ -595,7 +595,7 @@ impl<'a> StateWorkingSet<'a> { decl_id } - pub fn add_decls(&mut self, decls: Vec<(Vec, DeclId)>) { + pub fn use_decls(&mut self, decls: Vec<(Vec, DeclId)>) { let scope_frame = self .delta .scope