Skip to content

Commit 3d40e93

Browse files
committed
apply suggestions from code review
1 parent b66ec61 commit 3d40e93

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/librustdoc/html/static/js/search.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1890,10 +1890,9 @@ class DocSearch {
18901890
await Promise.all([this.getName(entry[field]), this.getPathData(entry[field])]) :
18911891
[null, null];
18921892
if (name !== null && path !== null) {
1893-
return { name: name, path: path };
1894-
} else {
1895-
return null;
1893+
return { name, path };
18961894
}
1895+
return null;
18971896
};
18981897

18991898
const [
@@ -2741,9 +2740,9 @@ class DocSearch {
27412740
list.push(out.length);
27422741
traitImplIdxMap.set(obj.traitPath, list);
27432742
} else {
2744-
const toRemove = traitImplIdxMap.get(obj.fullPath);
2745-
if (toRemove) {
2746-
removeIdxListAsc(out, toRemove);
2743+
const toRemoveList = traitImplIdxMap.get(obj.fullPath);
2744+
if (toRemoveList) {
2745+
removeIdxListAsc(out, toRemoveList);
27472746
}
27482747
traitImplIdxMap.delete(obj.fullPath);
27492748
}

0 commit comments

Comments
 (0)