fix needless borrows

This commit is contained in:
Alex Janka 2024-09-25 11:04:29 +10:00
parent 18814338da
commit 98cb611cdd

View file

@ -190,7 +190,7 @@ async fn code_trigger<T: AsRef<str> + std::cmp::PartialEq<str>>(
if workspace.focused { if workspace.focused {
let width = workspace.rect.width; let width = workspace.rect.width;
let mut workspace = get_with_id(&tree, workspace.id)?; let mut workspace = get_with_id(tree, workspace.id)?;
if workspace if workspace
.output .output
.as_ref() .as_ref()
@ -213,8 +213,8 @@ async fn code_trigger<T: AsRef<str> + std::cmp::PartialEq<str>>(
&& workspace.focus.len() == 2 && workspace.focus.len() == 2
{ {
let (code, other) = { let (code, other) = {
let a = get_with_id(&tree, workspace.focus[0])?; let a = get_with_id(tree, workspace.focus[0])?;
let b = get_with_id(&tree, workspace.focus[1])?; let b = get_with_id(tree, workspace.focus[1])?;
if contains_child(a, id) { if contains_child(a, id) {
(a, b) (a, b)
} else { } else {