From 8f3ea6ccb3e498912b3d03395de5603c1b3f1ad0 Mon Sep 17 00:00:00 2001 From: "Joseph T. Lyons" Date: Mon, 25 Dec 2023 03:47:28 -0500 Subject: [PATCH] Remove silencing of warnings and fix warnings --- crates/zed2/src/main.rs | 5 +---- crates/zed2/src/open_listener.rs | 11 +++++------ 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/crates/zed2/src/main.rs b/crates/zed2/src/main.rs index a248e4537bcf111e46933f24df32b0171b9d8720..f1fd168ffd832bcd2533dbb6e03c5fa13b571f85 100644 --- a/crates/zed2/src/main.rs +++ b/crates/zed2/src/main.rs @@ -1,6 +1,3 @@ -#![allow(unused_variables, dead_code, unused_mut)] -// todo!() this is to make transition easier. - // Allow binary to be called Zed for a nice application menu when running executable directly #![allow(non_snake_case)] @@ -411,7 +408,7 @@ async fn installation_id() -> Result<(String, bool)> { Ok((installation_id, false)) } -async fn restore_or_create_workspace(app_state: &Arc, mut cx: AsyncAppContext) { +async fn restore_or_create_workspace(app_state: &Arc, cx: AsyncAppContext) { async_maybe!({ if let Some(location) = workspace::last_opened_workspace_paths().await { cx.update(|cx| workspace::open_paths(location.paths().as_ref(), app_state, None, cx))? diff --git a/crates/zed2/src/open_listener.rs b/crates/zed2/src/open_listener.rs index b45254f7174c600f27ff552fef8ae7c2a2be7446..6db020a785788d1fe0d05cd2a4d10d937f2b5ac4 100644 --- a/crates/zed2/src/open_listener.rs +++ b/crates/zed2/src/open_listener.rs @@ -251,12 +251,11 @@ pub async fn handle_cli_connection( let wait = async move { if paths.is_empty() { let (done_tx, done_rx) = oneshot::channel(); - let _subscription = - workspace.update(&mut cx, |workspace, cx| { - cx.on_release(move |_, _, _| { - let _ = done_tx.send(()); - }) - }); + let _subscription = workspace.update(&mut cx, |_, cx| { + cx.on_release(move |_, _, _| { + let _ = done_tx.send(()); + }) + }); let _ = done_rx.await; } else { let _ = futures::future::try_join_all(item_release_futures)