diff --git a/src/complete.rs b/src/complete.rs index 6a69e57ba..b8794cd71 100644 --- a/src/complete.rs +++ b/src/complete.rs @@ -1868,7 +1868,7 @@ impl<'ctx> Completer<'ctx> { fn apply_var_assignments<'a>( &mut self, var_assignments: impl IntoIterator, - ) -> Option> { + ) -> Option> { if !self.ctx.has_parser() { return None; } @@ -1923,8 +1923,8 @@ impl<'ctx> Completer<'ctx> { } } - let parser_ref = self.ctx.parser().shared(); - Some(ScopeGuard::new((), move |_| parser_ref.pop_block(block))) + let parser = self.ctx.parser(); + Some(ScopeGuard::new((), move |_| parser.pop_block(block))) } /// Complete a command by invoking user-specified completions.