Skip to content

Commit

Permalink
Use Array.some instead of onEach to have better performance
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jan 15, 2021
1 parent 7cd8128 commit e727600
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustdoc/html/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ function defocusSearchBar() {
// Names didn't match so let's check if one of the generic types could.
if (literalSearch === true) {
if (obj.length > GENERICS_DATA && obj[GENERICS_DATA].length > 0) {
return onEach(obj[GENERICS_DATA],
return obj[GENERICS_DATA].some(
function(name) {
return name === val.name;
});
Expand Down

0 comments on commit e727600

Please sign in to comment.