Fix clippy::needless_borrow lint violations (#36444)
Release Notes: - N/A
This commit is contained in:
parent
eecf142f06
commit
9e0e233319
242 changed files with 801 additions and 821 deletions
|
@ -1166,7 +1166,7 @@ impl MessageEditor {
|
|||
.buffer_font(cx)
|
||||
});
|
||||
|
||||
let file_icon = FileIcons::get_icon(&path, cx)
|
||||
let file_icon = FileIcons::get_icon(path, cx)
|
||||
.map(Icon::from_path)
|
||||
.map(|icon| icon.color(Color::Muted).size(IconSize::Small))
|
||||
.unwrap_or_else(|| {
|
||||
|
@ -1559,9 +1559,8 @@ impl ContextCreasesAddon {
|
|||
cx: &mut Context<Editor>,
|
||||
) {
|
||||
self.creases.entry(key).or_default().extend(creases);
|
||||
self._subscription = Some(cx.subscribe(
|
||||
&context_store,
|
||||
|editor, _, event, cx| match event {
|
||||
self._subscription = Some(
|
||||
cx.subscribe(context_store, |editor, _, event, cx| match event {
|
||||
ContextStoreEvent::ContextRemoved(key) => {
|
||||
let Some(this) = editor.addon_mut::<Self>() else {
|
||||
return;
|
||||
|
@ -1581,8 +1580,8 @@ impl ContextCreasesAddon {
|
|||
editor.edit(ranges.into_iter().zip(replacement_texts), cx);
|
||||
cx.notify();
|
||||
}
|
||||
},
|
||||
))
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
pub fn into_inner(self) -> HashMap<AgentContextKey, Vec<(CreaseId, SharedString)>> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue