Skip to content

Commit eda171d

Browse files
committed
slight refactor to reduce line length
1 parent a238fd1 commit eda171d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustdoc/html/static/js/search.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2726,7 +2726,8 @@ class DocSearch {
27262726
// we are doing a return-type based search,
27272727
// deprioritize "clone-like" results,
27282728
// ie. functions that also take the queried type as an argument.
2729-
if (result.item && result.item.type && containsTypeFromQuery(result.item.type.inputs)) {
2729+
const hasType = result.item && result.item.type;
2730+
if (hasType && containsTypeFromQuery(result.item.type.inputs)) {
27302731
result.path_dist *= 100;
27312732
result.dist *= 100;
27322733
console.log(result);

0 commit comments

Comments
 (0)