Replace ViewContext::spawn with ViewContext::spawn_weak

This commit is contained in:
Antonio Scandurra 2023-04-26 10:23:27 +02:00
parent 09f7e41907
commit 94c2eaad23
20 changed files with 83 additions and 73 deletions

View file

@ -503,7 +503,7 @@ fn open_log_file(
workspace
.with_local_workspace(&app_state.clone(), cx, move |_, cx| {
cx.spawn_weak(|workspace, mut cx| async move {
cx.spawn(|workspace, mut cx| async move {
let (old_log, new_log) = futures::join!(
app_state.fs.load(&paths::OLD_LOG),
app_state.fs.load(&paths::LOG)
@ -558,7 +558,7 @@ fn open_telemetry_log_file(
cx: &mut ViewContext<Workspace>,
) {
workspace.with_local_workspace(&app_state.clone(), cx, move |_, cx| {
cx.spawn_weak(|workspace, mut cx| async move {
cx.spawn(|workspace, mut cx| async move {
let workspace = workspace.upgrade(&cx)?;
async fn fetch_log_string(app_state: &Arc<AppState>) -> Option<String> {