Change summary
crates/assistant/src/slash_command/rustdoc_command.rs | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
Detailed changes
@@ -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 {