Skip to content

Commit e727600

Browse files
Use Array.some instead of onEach to have better performance
1 parent 7cd8128 commit e727600

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustdoc/html/static/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ function defocusSearchBar() {
901901
// Names didn't match so let's check if one of the generic types could.
902902
if (literalSearch === true) {
903903
if (obj.length > GENERICS_DATA && obj[GENERICS_DATA].length > 0) {
904-
return onEach(obj[GENERICS_DATA],
904+
return obj[GENERICS_DATA].some(
905905
function(name) {
906906
return name === val.name;
907907
});

0 commit comments

Comments
 (0)