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:
@@ -587,9 +587,14 @@
|
|||||||
} else if (item.parent !== undefined) {
|
} else if (item.parent !== undefined) {
|
||||||
var myparent = item.parent;
|
var myparent = item.parent;
|
||||||
var anchor = '#' + type + '.' + name;
|
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, '/') +
|
href = rootPath + item.path.replace(/::/g, '/') +
|
||||||
'/' + itemTypes[myparent.ty] +
|
'/' + parentType +
|
||||||
'.' + myparent.name +
|
'.' + myparent.name +
|
||||||
'.html' + anchor;
|
'.html' + anchor;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user