rustdoc: Don't include the path for primitive methods in the search results

Displaying `std::u32::max_value` is misleading so just display
`u32::max_value`.
This commit is contained in:
Oliver Middleton 2016-08-13 15:54:14 +01:00
parent 5940150841
commit 616b101e3f

View File

@ -587,9 +587,14 @@
} else if (item.parent !== undefined) {
var myparent = item.parent;
var anchor = '#' + type + '.' + name;
displayPath = item.path + '::' + myparent.name + '::';
var parentType = itemTypes[myparent.ty];
if (parentType === "primitive") {
displayPath = myparent.name + '::';
} else {
displayPath = item.path + '::' + myparent.name + '::';
}
href = rootPath + item.path.replace(/::/g, '/') +
'/' + itemTypes[myparent.ty] +
'/' + parentType +
'.' + myparent.name +
'.html' + anchor;
} else {