From 5a23111b77924ef5f1b1472eae0b6fe6d76547ac Mon Sep 17 00:00:00 2001 From: Sunshine Date: Fri, 7 Jun 2024 09:36:43 +0800 Subject: [PATCH] Follow ESLint instructions. --- src/librustdoc/html/static/js/search.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/librustdoc/html/static/js/search.js b/src/librustdoc/html/static/js/search.js index f4b81e4b7ee..e5a1f9d1be0 100644 --- a/src/librustdoc/html/static/js/search.js +++ b/src/librustdoc/html/static/js/search.js @@ -625,7 +625,6 @@ function initSearch(rawSearchIndex) { * @return {integer} */ function getIdentEndPosition(parserState) { - const start = parserState.pos; let afterIdent = consumeIdent(parserState); let end = parserState.pos; let macroExclamation = -1; @@ -2167,7 +2166,7 @@ function initSearch(rawSearchIndex) { }; const [crateDescs, descs] = await Promise.all([ Promise.all(crateAliases.map(fetchDesc)), - Promise.all(aliases.map(fetchDesc)) + Promise.all(aliases.map(fetchDesc)), ]); const pushFunc = alias => { @@ -2183,9 +2182,13 @@ function initSearch(rawSearchIndex) { } }; - aliases.forEach((alias, i) => alias.desc = descs[i]); + aliases.forEach((alias, i) => { + alias.desc = descs[i]; + }); aliases.forEach(pushFunc); - crateAliases.forEach((alias, i) => alias.desc = crateDescs[i]); + crateAliases.forEach((alias, i) => { + alias.desc = crateDescs[i]; + }); crateAliases.forEach(pushFunc); }