chore: Fix clippy::needless_borrow up to an editor
This commit is contained in:
parent
c3102feeeb
commit
6c82380232
29 changed files with 86 additions and 88 deletions
|
@ -16,7 +16,7 @@ impl RenderOnce for KeyBinding {
|
|||
.flex_none()
|
||||
.gap_2()
|
||||
.children(self.key_binding.keystrokes().iter().map(|keystroke| {
|
||||
let key_icon = Self::icon_for_key(&keystroke);
|
||||
let key_icon = Self::icon_for_key(keystroke);
|
||||
|
||||
h_flex()
|
||||
.flex_none()
|
||||
|
|
|
@ -51,7 +51,7 @@ impl<M: ManagedView> PopoverMenu<M> {
|
|||
cx.subscribe(&new_menu, move |modal, _: &DismissEvent, cx| {
|
||||
if modal.focus_handle(cx).contains_focused(cx) {
|
||||
if previous_focus_handle.is_some() {
|
||||
cx.focus(&previous_focus_handle.as_ref().unwrap())
|
||||
cx.focus(previous_focus_handle.as_ref().unwrap())
|
||||
}
|
||||
}
|
||||
*menu2.borrow_mut() = None;
|
||||
|
|
|
@ -155,7 +155,7 @@ impl<M: ManagedView> Element for RightClickMenu<M> {
|
|||
cx.subscribe(&new_menu, move |modal, _: &DismissEvent, cx| {
|
||||
if modal.focus_handle(cx).contains_focused(cx) {
|
||||
if previous_focus_handle.is_some() {
|
||||
cx.focus(&previous_focus_handle.as_ref().unwrap())
|
||||
cx.focus(previous_focus_handle.as_ref().unwrap())
|
||||
}
|
||||
}
|
||||
*menu2.borrow_mut() = None;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue