From d36f94d96c7ff843c99a8aab7d09789d70fd6cb7 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sun, 26 May 2024 14:39:52 -0700 Subject: [PATCH] Remove additional call to Parser::shared() --- src/complete.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/complete.rs b/src/complete.rs index b8794cd71..c905ec2b4 100644 --- a/src/complete.rs +++ b/src/complete.rs @@ -1941,13 +1941,13 @@ impl<'ctx> Completer<'ctx> { let wants_transient = (ad.wrap_depth > 0 || !ad.var_assignments.is_empty()) && !is_autosuggest; if wants_transient { - let parser_ref = self.ctx.parser().shared(); - parser_ref + let parser = self.ctx.parser(); + parser .libdata_mut() .transient_commandlines .push(cmdline.to_owned()); _remove_transient = Some(ScopeGuard::new((), move |_| { - parser_ref.libdata_mut().transient_commandlines.pop(); + parser.libdata_mut().transient_commandlines.pop(); })); }