Show error message if an item could not be found
With the introduction of the search index, I mistakenly removed the error message for missing items. This patch fixes that.
This commit is contained in:
parent
bd71f41458
commit
0c080ab401
@ -140,7 +140,10 @@ fn search_item(
|
||||
items.dedup();
|
||||
|
||||
if items.is_empty() {
|
||||
Ok(None)
|
||||
Err(anyhow::anyhow!(
|
||||
"Could not find documentation for {}",
|
||||
&keyword
|
||||
))
|
||||
} else if items.len() == 1 {
|
||||
Ok(Some(items[0].clone()))
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user