chore: Bump Rust edition to 2024 (#27800)

Follow-up to https://github.com/zed-industries/zed/pull/27791

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2025-03-31 20:55:27 +02:00 committed by GitHub
parent d50905e000
commit dc64ec9cc8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
802 changed files with 3775 additions and 3662 deletions

View file

@ -1,20 +1,21 @@
use crate::{
json_log::LogRecord,
protocol::{
message_len_from_buffer, read_message_with_len, write_message, MessageId, MESSAGE_LEN_SIZE,
MESSAGE_LEN_SIZE, MessageId, message_len_from_buffer, read_message_with_len, write_message,
},
proxy::ProxyLaunchError,
};
use anyhow::{anyhow, Context as _, Result};
use anyhow::{Context as _, Result, anyhow};
use async_trait::async_trait;
use collections::HashMap;
use futures::{
AsyncReadExt as _, Future, FutureExt as _, StreamExt as _,
channel::{
mpsc::{self, Sender, UnboundedReceiver, UnboundedSender},
oneshot,
},
future::{BoxFuture, Shared},
select, select_biased, AsyncReadExt as _, Future, FutureExt as _, StreamExt as _,
select, select_biased,
};
use gpui::{
App, AppContext as _, AsyncApp, BorrowAppContext, Context, Entity, EventEmitter, Global,
@ -25,9 +26,9 @@ use parking_lot::Mutex;
use paths;
use release_channel::{AppCommitSha, AppVersion, ReleaseChannel};
use rpc::{
proto::{self, build_typed_envelope, Envelope, EnvelopedMessage, PeerId, RequestMessage},
AnyProtoClient, EntityMessageSubscriber, ErrorExt, ProtoClient, ProtoMessageHandlerSet,
RpcError,
proto::{self, Envelope, EnvelopedMessage, PeerId, RequestMessage, build_typed_envelope},
};
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
@ -42,8 +43,8 @@ use std::{
ops::ControlFlow,
path::{Path, PathBuf},
sync::{
atomic::{AtomicU32, AtomicU64, Ordering::SeqCst},
Arc, Weak,
atomic::{AtomicU32, AtomicU64, Ordering::SeqCst},
},
time::{Duration, Instant},
};
@ -1291,7 +1292,7 @@ trait RemoteConnection: Send + Sync {
cx: &mut AsyncApp,
) -> Task<Result<i32>>;
fn upload_directory(&self, src_path: PathBuf, dest_path: PathBuf, cx: &App)
-> Task<Result<()>>;
-> Task<Result<()>>;
async fn kill(&self) -> Result<()>;
fn has_been_killed(&self) -> bool;
fn ssh_args(&self) -> Vec<String>;
@ -2371,11 +2372,12 @@ mod fake {
use anyhow::Result;
use async_trait::async_trait;
use futures::{
FutureExt, SinkExt, StreamExt,
channel::{
mpsc::{self, Sender},
oneshot,
},
select_biased, FutureExt, SinkExt, StreamExt,
select_biased,
};
use gpui::{App, AppContext as _, AsyncApp, SemanticVersion, Task, TestAppContext};
use release_channel::ReleaseChannel;