Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

indexed_docs: Normalize `-` in crate names to `_` when computing rustdoc output path (#16234)

Marshall Bowers8ad7d693788a
diff --git a/crates/indexed_docs/src/providers/rustdoc.rs b/crates/indexed_docs/src/providers/rustdoc.rs
index 691d39fc0ad..02192855dda 100644
--- a/crates/indexed_docs/src/providers/rustdoc.rs
+++ b/crates/indexed_docs/src/providers/rustdoc.rs
@@ -91,7 +91,7 @@ impl IndexedDocsProvider for LocalRustdocProvider {
let item = item.cloned();
async move {
let target_doc_path = cargo_workspace_root.join("target/doc");
- let mut local_cargo_doc_path = target_doc_path.join(crate_name.as_ref());
+ let mut local_cargo_doc_path = target_doc_path.join(crate_name.as_ref().replace('-', "_"));
if !fs.is_dir(&local_cargo_doc_path).await {
let cargo_doc_exists_at_all = fs.is_dir(&target_doc_path).await;