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
|
@ -12,7 +12,7 @@ use std::path::PathBuf;
|
|||
use std::sync::{Arc, LazyLock};
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
use anyhow::{bail, Context, Result};
|
||||
use anyhow::{Context, Result, bail};
|
||||
use async_trait::async_trait;
|
||||
use collections::{HashSet, VecDeque};
|
||||
use fs::Fs;
|
||||
|
@ -209,9 +209,12 @@ impl IndexedDocsProvider for DocsDotRsProvider {
|
|||
async fn index_rustdoc(
|
||||
package: PackageName,
|
||||
database: Arc<IndexedDocsDatabase>,
|
||||
fetch_page: impl Fn(&PackageName, Option<&RustdocItem>) -> BoxFuture<'static, Result<Option<String>>>
|
||||
+ Send
|
||||
+ Sync,
|
||||
fetch_page: impl Fn(
|
||||
&PackageName,
|
||||
Option<&RustdocItem>,
|
||||
) -> BoxFuture<'static, Result<Option<String>>>
|
||||
+ Send
|
||||
+ Sync,
|
||||
) -> Result<()> {
|
||||
let Some(package_root_content) = fetch_page(&package, None).await? else {
|
||||
return Ok(());
|
||||
|
|
|
@ -7,8 +7,8 @@ use html_to_markdown::markdown::{
|
|||
HeadingHandler, ListHandler, ParagraphHandler, StyledTextHandler, TableHandler,
|
||||
};
|
||||
use html_to_markdown::{
|
||||
convert_html_to_markdown, HandleTag, HandlerOutcome, HtmlElement, MarkdownWriter,
|
||||
StartTagOutcome, TagHandler,
|
||||
HandleTag, HandlerOutcome, HtmlElement, MarkdownWriter, StartTagOutcome, TagHandler,
|
||||
convert_html_to_markdown,
|
||||
};
|
||||
use indexmap::IndexSet;
|
||||
use strum::IntoEnumIterator;
|
||||
|
@ -326,7 +326,7 @@ impl HandleTag for RustdocItemCollector {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use html_to_markdown::{convert_html_to_markdown, TagHandler};
|
||||
use html_to_markdown::{TagHandler, convert_html_to_markdown};
|
||||
use indoc::indoc;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
use std::path::PathBuf;
|
||||
use std::sync::atomic::AtomicBool;
|
||||
use std::sync::Arc;
|
||||
use std::sync::atomic::AtomicBool;
|
||||
|
||||
use anyhow::{anyhow, Result};
|
||||
use anyhow::{Result, anyhow};
|
||||
use async_trait::async_trait;
|
||||
use collections::HashMap;
|
||||
use derive_more::{Deref, Display};
|
||||
use futures::future::{self, BoxFuture, Shared};
|
||||
use futures::FutureExt;
|
||||
use futures::future::{self, BoxFuture, Shared};
|
||||
use fuzzy::StringMatchCandidate;
|
||||
use gpui::{App, BackgroundExecutor, Task};
|
||||
use heed::types::SerdeBincode;
|
||||
use heed::Database;
|
||||
use heed::types::SerdeBincode;
|
||||
use parking_lot::RwLock;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use util::ResultExt;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue