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.
master
Robin Krahl 4 years ago
parent bd71f41458
commit 0c080ab401
No known key found for this signature in database
GPG Key ID: 8E9B0870524F69D8

@ -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…
Cancel
Save