Skip to content

Commit dcba95f

Browse files
committed
Declare word outside the loop, as recommended by eslint
1 parent 8eba927 commit dcba95f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustdoc/html/static/main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1836,7 +1836,7 @@ function defocusSearchBar() {
18361836
function buildIndex(rawSearchIndex) {
18371837
searchIndex = [];
18381838
var searchWords = [];
1839-
var i;
1839+
var i, word;
18401840
var currentIndex = 0;
18411841
var id = 0;
18421842

@@ -1905,10 +1905,10 @@ function defocusSearchBar() {
19051905
// This object should have exactly the same set of fields as the "crateRow"
19061906
// object defined above.
19071907
if (typeof itemNames[i] === "string") {
1908-
var word = itemNames[i].toLowerCase();
1908+
word = itemNames[i].toLowerCase();
19091909
searchWords.push(word);
19101910
} else {
1911-
var word = "";
1911+
word = "";
19121912
searchWords.push("");
19131913
}
19141914
var normalizedName = word.indexOf("_") === -1

0 commit comments

Comments
 (0)