minor: Further simplify take_with

pull/924/head
Blaž Hrastnik 3 years ago
parent 2505802d39
commit e36ad8b4ed

@ -311,8 +311,7 @@ where
T: Default, T: Default,
F: FnOnce(T) -> T, F: FnOnce(T) -> T,
{ {
let t = mem::take(mut_ref); *mut_ref = f(mem::take(mut_ref));
let _ = mem::replace(mut_ref, f(t));
} }
use helix_lsp::lsp; use helix_lsp::lsp;

Loading…
Cancel
Save