Another batch of lint fixes (#36521)
- **Enable a bunch of extra lints** - **First batch of fixes** - **More fixes** Release Notes: - N/A
This commit is contained in:
parent
69b1c6d6f5
commit
6825715503
147 changed files with 788 additions and 1042 deletions
|
@ -33,13 +33,12 @@ impl SharedScreen {
|
|||
cx: &mut Context<Self>,
|
||||
) -> Self {
|
||||
let my_sid = track.sid();
|
||||
cx.subscribe(&room, move |_, _, ev, cx| match ev {
|
||||
call::room::Event::RemoteVideoTrackUnsubscribed { sid } => {
|
||||
if sid == &my_sid {
|
||||
cx.emit(Event::Close)
|
||||
}
|
||||
cx.subscribe(&room, move |_, _, ev, cx| {
|
||||
if let call::room::Event::RemoteVideoTrackUnsubscribed { sid } = ev
|
||||
&& sid == &my_sid
|
||||
{
|
||||
cx.emit(Event::Close)
|
||||
}
|
||||
_ => {}
|
||||
})
|
||||
.detach();
|
||||
|
||||
|
|
|
@ -3283,7 +3283,8 @@ impl Workspace {
|
|||
let task = self.load_path(project_path.clone(), window, cx);
|
||||
window.spawn(cx, async move |cx| {
|
||||
let (project_entry_id, build_item) = task.await?;
|
||||
let result = pane.update_in(cx, |pane, window, cx| {
|
||||
|
||||
pane.update_in(cx, |pane, window, cx| {
|
||||
pane.open_item(
|
||||
project_entry_id,
|
||||
project_path,
|
||||
|
@ -3295,8 +3296,7 @@ impl Workspace {
|
|||
cx,
|
||||
build_item,
|
||||
)
|
||||
});
|
||||
result
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -9150,13 +9150,12 @@ mod tests {
|
|||
|
||||
fn split_pane(cx: &mut VisualTestContext, workspace: &Entity<Workspace>) -> Entity<Pane> {
|
||||
workspace.update_in(cx, |workspace, window, cx| {
|
||||
let new_pane = workspace.split_pane(
|
||||
workspace.split_pane(
|
||||
workspace.active_pane().clone(),
|
||||
SplitDirection::Right,
|
||||
window,
|
||||
cx,
|
||||
);
|
||||
new_pane
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -9413,7 +9412,7 @@ mod tests {
|
|||
let workspace = workspace.clone();
|
||||
move |cx: &mut VisualTestContext| {
|
||||
workspace.update_in(cx, |workspace, window, cx| {
|
||||
if let Some(_) = workspace.active_modal::<TestModal>(cx) {
|
||||
if workspace.active_modal::<TestModal>(cx).is_some() {
|
||||
workspace.toggle_modal(window, cx, TestModal::new);
|
||||
workspace.toggle_modal(window, cx, TestModal::new);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue