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,6 +1,6 @@
use anyhow::{Context as _, Result};
use base64::prelude::*;
use rand::{thread_rng, Rng as _};
use rand::{Rng as _, thread_rng};
use rsa::pkcs1::{DecodeRsaPublicKey, EncodeRsaPublicKey};
use rsa::traits::PaddingScheme;
use rsa::{Oaep, Pkcs1v15Encrypt, RsaPrivateKey, RsaPublicKey};

View file

@ -37,8 +37,8 @@ impl Connection {
executor: gpui::BackgroundExecutor,
) -> (Self, Self, std::sync::Arc<std::sync::atomic::AtomicBool>) {
use std::sync::{
atomic::{AtomicBool, Ordering::SeqCst},
Arc,
atomic::{AtomicBool, Ordering::SeqCst},
};
let killed = Arc::new(AtomicBool::new(false));

View file

@ -1,6 +1,6 @@
use crate::proto;
use serde::{Deserialize, Serialize};
use serde_json::{map, Value};
use serde_json::{Value, map};
use strum::VariantNames;
const KIND: &str = "kind";

View file

@ -1,27 +1,27 @@
use super::{
Connection,
proto::{
self, AnyTypedEnvelope, EnvelopedMessage, MessageStream, PeerId, Receipt, RequestMessage,
TypedEnvelope,
},
Connection,
};
use anyhow::{anyhow, Context as _, Result};
use anyhow::{Context as _, Result, anyhow};
use collections::HashMap;
use futures::{
FutureExt, SinkExt, Stream, StreamExt, TryFutureExt,
channel::{mpsc, oneshot},
stream::BoxStream,
FutureExt, SinkExt, Stream, StreamExt, TryFutureExt,
};
use parking_lot::{Mutex, RwLock};
use proto::{ErrorCode, ErrorCodeExt, ErrorExt, RpcError};
use serde::{ser::SerializeStruct, Serialize};
use serde::{Serialize, ser::SerializeStruct};
use std::{
fmt, future,
future::Future,
sync::atomic::Ordering::SeqCst,
sync::{
atomic::{self, AtomicU32},
Arc,
atomic::{self, AtomicU32},
},
time::Duration,
time::Instant,
@ -1030,10 +1030,12 @@ mod tests {
let _ = io_ended_rx.await;
let _ = messages_ended_rx.await;
assert!(server_conn
.send(WebSocketMessage::Binary(vec![]))
.await
.is_err());
assert!(
server_conn
.send(WebSocketMessage::Binary(vec![]))
.await
.is_err()
);
}
#[gpui::test(iterations = 50)]

View file

@ -1,13 +1,13 @@
use anyhow::anyhow;
use collections::HashMap;
use futures::{
future::{BoxFuture, LocalBoxFuture},
Future, FutureExt as _,
future::{BoxFuture, LocalBoxFuture},
};
use gpui::{AnyEntity, AnyWeakEntity, AsyncApp, Entity};
use proto::{
error::ErrorExt as _, AnyTypedEnvelope, EntityMessage, Envelope, EnvelopedMessage,
RequestMessage, TypedEnvelope,
AnyTypedEnvelope, EntityMessage, Envelope, EnvelopedMessage, RequestMessage, TypedEnvelope,
error::ErrorExt as _,
};
use std::{
any::TypeId,

View file

@ -11,7 +11,7 @@ pub use extension::*;
pub use llm::*;
pub use notification::*;
pub use peer::*;
pub use proto::{error::*, Receipt, TypedEnvelope};
pub use proto::{Receipt, TypedEnvelope, error::*};
mod macros;
#[cfg(feature = "gpui")]