Skip to content

Commit

Permalink
Declare word outside the loop, as recommended by eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
notriddle committed Mar 15, 2021
1 parent 8eba927 commit dcba95f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/librustdoc/html/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1836,7 +1836,7 @@ function defocusSearchBar() {
function buildIndex(rawSearchIndex) {
searchIndex = [];
var searchWords = [];
var i;
var i, word;
var currentIndex = 0;
var id = 0;

Expand Down Expand Up @@ -1905,10 +1905,10 @@ function defocusSearchBar() {
// This object should have exactly the same set of fields as the "crateRow"
// object defined above.
if (typeof itemNames[i] === "string") {
var word = itemNames[i].toLowerCase();
word = itemNames[i].toLowerCase();
searchWords.push(word);
} else {
var word = "";
word = "";
searchWords.push("");
}
var normalizedName = word.indexOf("_") === -1
Expand Down

0 comments on commit dcba95f

Please sign in to comment.