Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
gpui: Use async-task 4.7
Piotr Osiewicza984a158fc4f
diff --git a/Cargo.lock b/Cargo.lockindex 0316c343cb4..32954a86aea 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -576,8 +576,9 @@ dependencies = [[[package]]name = "async-task"-version = "4.0.3"-source = "git+https://github.com/zed-industries/async-task?rev=341b57d6de98cdfd7b418567b8de2022ca993a6e#341b57d6de98cdfd7b418567b8de2022ca993a6e"+version = "4.7.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799"[[package]]name = "async-tls"diff --git a/Cargo.toml b/Cargo.tomlindex 9f2bc145901..3e3c9e9999c 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -164,7 +164,6 @@ tree-sitter-uiua = {git = "https://github.com/shnarazk/tree-sitter-uiua", rev =[patch.crates-io]tree-sitter = { git = "https://github.com/tree-sitter/tree-sitter", rev = "31c40449749c4263a91a43593831b82229049a4c" }-async-task = { git = "https://github.com/zed-industries/async-task", rev = "341b57d6de98cdfd7b418567b8de2022ca993a6e" }# wasmtime = { git = "https://github.com/bytecodealliance/wasmtime", rev = "v16.0.0" }# TODO - Remove when a version is released with this PR: https://github.com/servo/core-foundation-rs/pull/457diff --git a/crates/gpui/Cargo.toml b/crates/gpui/Cargo.tomlindex 7cf6889054a..d654131a56c 100644--- a/crates/gpui/Cargo.toml+++ b/crates/gpui/Cargo.toml@@ -19,7 +19,7 @@ gpui_macros = { path = "../gpui_macros" }util = { path = "../util" }sum_tree = { path = "../sum_tree" }sqlez = { path = "../sqlez" }-async-task = "4.0.3"+async-task = "4.7"backtrace = { version = "0.3", optional = true }ctor.workspace = truelinkme = "0.3"diff --git a/crates/gpui/src/platform/mac/dispatcher.rs b/crates/gpui/src/platform/mac/dispatcher.rsindex feb8925426f..06bef49b7a9 100644--- a/crates/gpui/src/platform/mac/dispatcher.rs+++ b/crates/gpui/src/platform/mac/dispatcher.rs@@ -11,7 +11,7 @@ use objc::{};use parking::{Parker, Unparker};use parking_lot::Mutex;-use std::{ffi::c_void, sync::Arc, time::Duration};+use std::{ffi::c_void, ptr::NonNull, sync::Arc, time::Duration};include!(concat!(env!("OUT_DIR"), "/dispatch_sys.rs"));@@ -47,7 +47,7 @@ impl PlatformDispatcher for MacDispatcher {unsafe {dispatch_async_f(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT.try_into().unwrap(), 0),- runnable.into_raw() as *mut c_void,+ runnable.into_raw().as_ptr() as *mut c_void,Some(trampoline),);}@@ -57,7 +57,7 @@ impl PlatformDispatcher for MacDispatcher {unsafe {dispatch_async_f(dispatch_get_main_queue(),- runnable.into_raw() as *mut c_void,+ runnable.into_raw().as_ptr() as *mut c_void,Some(trampoline),);}@@ -71,7 +71,7 @@ impl PlatformDispatcher for MacDispatcher {dispatch_after_f(when,queue,- runnable.into_raw() as *mut c_void,+ runnable.into_raw().as_ptr() as *mut c_void,Some(trampoline),);}@@ -91,6 +91,6 @@ impl PlatformDispatcher for MacDispatcher {}extern "C" fn trampoline(runnable: *mut c_void) {- let task = unsafe { Runnable::from_raw(runnable as *mut ()) };+ let task = unsafe { Runnable::<()>::from_raw(NonNull::new_unchecked(runnable as *mut ())) };task.run();}