mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
assistant: Fix loading local crate docs (#13147)
This PR fixes an issue where loading the crate-level docs with `/rustdoc` wasn't working as expected. Release Notes: - N/A
This commit is contained in:
parent
e8862c45cc
commit
2e87e1d26e
@ -180,7 +180,14 @@ impl SlashCommand for RustdocSlashCommand {
|
||||
let item_path = item_path.clone();
|
||||
async move {
|
||||
let item_docs = rustdoc_store
|
||||
.load(crate_name.clone(), Some(item_path.join("::")))
|
||||
.load(
|
||||
crate_name.clone(),
|
||||
if item_path.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(item_path.join("::"))
|
||||
},
|
||||
)
|
||||
.await;
|
||||
|
||||
if let Ok(item_docs) = item_docs {
|
||||
|
Loading…
Reference in New Issue
Block a user