minor: Further simplify take_with

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

@ -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;

Loading…
Cancel
Save