Rust 1.78 (#11314)
Notable things I've had to fix due to 1.78: - Better detection of unused items - New clippy lint (`assigning_clones`) that points out places where assignment operations with clone rhs could be replaced with more performant `clone_into` Release Notes: - N/A
This commit is contained in:
parent
9ec0927701
commit
1a9b0536a2
41 changed files with 49 additions and 433 deletions
|
@ -18,13 +18,6 @@ pub trait ToolbarItemView: Render + EventEmitter<ToolbarItemEvent> {
|
|||
) -> ToolbarItemLocation;
|
||||
|
||||
fn pane_focus_update(&mut self, _pane_focused: bool, _cx: &mut ViewContext<Self>) {}
|
||||
|
||||
/// Number of times toolbar's height will be repeated to get the effective height.
|
||||
/// Useful when multiple rows one under each other are needed.
|
||||
/// The rows have the same width and act as a whole when reacting to resizes and similar events.
|
||||
fn row_count(&self, _cx: &WindowContext) -> usize {
|
||||
1
|
||||
}
|
||||
}
|
||||
|
||||
trait ToolbarItemViewHandle: Send {
|
||||
|
@ -36,7 +29,6 @@ trait ToolbarItemViewHandle: Send {
|
|||
cx: &mut WindowContext,
|
||||
) -> ToolbarItemLocation;
|
||||
fn focus_changed(&mut self, pane_focused: bool, cx: &mut WindowContext);
|
||||
fn row_count(&self, cx: &WindowContext) -> usize;
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
|
@ -239,8 +231,4 @@ impl<T: ToolbarItemView> ToolbarItemViewHandle for View<T> {
|
|||
cx.notify();
|
||||
});
|
||||
}
|
||||
|
||||
fn row_count(&self, cx: &WindowContext) -> usize {
|
||||
self.read(cx).row_count(cx)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3322,7 +3322,7 @@ impl Workspace {
|
|||
}
|
||||
|
||||
if &update.id != &self.last_active_view_id {
|
||||
self.last_active_view_id = update.id.clone();
|
||||
self.last_active_view_id.clone_from(&update.id);
|
||||
self.update_followers(
|
||||
is_project_item,
|
||||
proto::update_followers::Variant::UpdateActiveView(update),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue