Skip associated types in search index

When searching for a keyword, we typically don’t want to match an
associated type.  With this patch, we skip associated types when
searching items in the search index.
This commit is contained in:
Robin Krahl 2020-07-20 10:44:37 +02:00
parent 1b8a2c23f6
commit 3d4fac0d5c

View File

@ -121,6 +121,12 @@ impl Index {
} else {
&item.path
};
if item.ty == 16 {
// Skip associated types (== item type 16)
continue;
}
let full_path = match item.parent {
Some(idx) => {
let parent = &data.paths[idx].1;