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
1 changed files with 8 additions and 1 deletions
|
@ -180,7 +180,14 @@ impl SlashCommand for RustdocSlashCommand {
|
||||||
let item_path = item_path.clone();
|
let item_path = item_path.clone();
|
||||||
async move {
|
async move {
|
||||||
let item_docs = rustdoc_store
|
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;
|
.await;
|
||||||
|
|
||||||
if let Ok(item_docs) = item_docs {
|
if let Ok(item_docs) = item_docs {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue