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:
parent
d50905e000
commit
dc64ec9cc8
802 changed files with 3775 additions and 3662 deletions
|
@ -1,4 +1,4 @@
|
|||
use language::{with_parser, with_query_cursor, Language};
|
||||
use language::{Language, with_parser, with_query_cursor};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use sha2::{Digest, Sha256};
|
||||
use std::{
|
||||
|
@ -203,7 +203,7 @@ fn chunk_text_with_syntactic_ranges(
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use language::{tree_sitter_rust, Language, LanguageConfig, LanguageMatcher};
|
||||
use language::{Language, LanguageConfig, LanguageMatcher, tree_sitter_rust};
|
||||
use unindent::Unindent as _;
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -10,7 +10,7 @@ pub use open_ai::*;
|
|||
use sha2::{Digest, Sha256};
|
||||
|
||||
use anyhow::Result;
|
||||
use futures::{future::BoxFuture, FutureExt};
|
||||
use futures::{FutureExt, future::BoxFuture};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::{fmt, future};
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use crate::{Embedding, EmbeddingProvider, TextToEmbed};
|
||||
use anyhow::{anyhow, Context as _, Result};
|
||||
use client::{proto, Client};
|
||||
use anyhow::{Context as _, Result, anyhow};
|
||||
use client::{Client, proto};
|
||||
use collections::HashMap;
|
||||
use futures::{future::BoxFuture, FutureExt};
|
||||
use futures::{FutureExt, future::BoxFuture};
|
||||
use std::sync::Arc;
|
||||
|
||||
pub struct CloudEmbeddingProvider {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use anyhow::{Context as _, Result};
|
||||
use futures::{future::BoxFuture, AsyncReadExt as _, FutureExt};
|
||||
use futures::{AsyncReadExt as _, FutureExt, future::BoxFuture};
|
||||
use http_client::HttpClient;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::sync::Arc;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use anyhow::{Context as _, Result};
|
||||
use futures::{future::BoxFuture, AsyncReadExt as _, FutureExt};
|
||||
use futures::{AsyncReadExt as _, FutureExt, future::BoxFuture};
|
||||
use http_client::HttpClient;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::sync::Arc;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use crate::{Embedding, EmbeddingProvider, TextToEmbed};
|
||||
use anyhow::Result;
|
||||
use futures::{future::BoxFuture, FutureExt};
|
||||
use futures::{FutureExt, future::BoxFuture};
|
||||
use http_client::HttpClient;
|
||||
pub use open_ai::OpenAiEmbeddingModel;
|
||||
use std::sync::Arc;
|
||||
|
|
|
@ -3,12 +3,12 @@ use crate::{
|
|||
embedding::{Embedding, EmbeddingProvider, TextToEmbed},
|
||||
indexing::{IndexingEntryHandle, IndexingEntrySet},
|
||||
};
|
||||
use anyhow::{anyhow, Context as _, Result};
|
||||
use anyhow::{Context as _, Result, anyhow};
|
||||
use collections::Bound;
|
||||
use feature_flags::FeatureFlagAppExt;
|
||||
use fs::Fs;
|
||||
use fs::MTime;
|
||||
use futures::{stream::StreamExt, FutureExt as _};
|
||||
use futures::{FutureExt as _, stream::StreamExt};
|
||||
use futures_batch::ChunksTimeoutStreamExt;
|
||||
use gpui::{App, AppContext as _, Entity, Task};
|
||||
use heed::types::{SerdeBincode, Str};
|
||||
|
|
|
@ -3,7 +3,7 @@ use crate::{
|
|||
summary_index::FileSummary,
|
||||
worktree_index::{WorktreeIndex, WorktreeIndexHandle},
|
||||
};
|
||||
use anyhow::{anyhow, Context as _, Result};
|
||||
use anyhow::{Context as _, Result, anyhow};
|
||||
use collections::HashMap;
|
||||
use fs::Fs;
|
||||
use futures::FutureExt;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use crate::ProjectIndex;
|
||||
use gpui::{
|
||||
canvas, div, list, uniform_list, AnyElement, App, CursorStyle, Entity, EventEmitter,
|
||||
FocusHandle, Focusable, IntoElement, ListOffset, ListState, MouseMoveEvent, Render,
|
||||
UniformListScrollHandle,
|
||||
AnyElement, App, CursorStyle, Entity, EventEmitter, FocusHandle, Focusable, IntoElement,
|
||||
ListOffset, ListState, MouseMoveEvent, Render, UniformListScrollHandle, canvas, div, list,
|
||||
uniform_list,
|
||||
};
|
||||
use project::WorktreeId;
|
||||
use settings::Settings;
|
||||
|
|
|
@ -269,7 +269,7 @@ mod tests {
|
|||
use embedding_index::{ChunkedFile, EmbeddingIndex};
|
||||
use feature_flags::FeatureFlagAppExt;
|
||||
use fs::FakeFs;
|
||||
use futures::{future::BoxFuture, FutureExt};
|
||||
use futures::{FutureExt, future::BoxFuture};
|
||||
use gpui::TestAppContext;
|
||||
use indexing::IndexingEntrySet;
|
||||
use language::language_settings::AllLanguageSettings;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
use anyhow::{anyhow, Context as _, Result};
|
||||
use anyhow::{Context as _, Result, anyhow};
|
||||
use arrayvec::ArrayString;
|
||||
use fs::{Fs, MTime};
|
||||
use futures::{stream::StreamExt, TryFutureExt};
|
||||
use futures::{TryFutureExt, stream::StreamExt};
|
||||
use futures_batch::ChunksTimeoutStreamExt;
|
||||
use gpui::{App, AppContext as _, Entity, Task};
|
||||
use heed::{
|
||||
types::{SerdeBincode, Str},
|
||||
RoTxn,
|
||||
types::{SerdeBincode, Str},
|
||||
};
|
||||
use language_model::{
|
||||
LanguageModelCompletionEvent, LanguageModelId, LanguageModelRegistry, LanguageModelRequest,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue