aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src
diff options
context:
space:
mode:
Diffstat (limited to 'helix-view/src')
-rw-r--r--helix-view/src/document.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs
index 23c2dbc6..b0257f03 100644
--- a/helix-view/src/document.rs
+++ b/helix-view/src/document.rs
@@ -311,8 +311,7 @@ where
T: Default,
F: FnOnce(T) -> T,
{
- let t = mem::take(mut_ref);
- let _ = mem::replace(mut_ref, f(t));
+ *mut_ref = f(mem::take(mut_ref));
}
use helix_lsp::lsp;