minor: Further simplify take_with
This commit is contained in:
parent
2505802d39
commit
e36ad8b4ed
1 changed files with 1 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue