Skip to content

Commit d903ede

Browse files
committed
apply suggestions from code review
1 parent 4da57d2 commit d903ede

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
@@ -1915,10 +1915,9 @@ class DocSearch {
19151915
await Promise.all([this.getName(entry[field]), this.getPathData(entry[field])]) :
19161916
[null, null];
19171917
if (name !== null && path !== null) {
1918-
return { name: name, path: path };
1919-
} else {
1920-
return null;
1918+
return { name, path };
19211919
}
1920+
return null;
19221921
};
19231922

19241923
return {
@@ -2736,9 +2735,9 @@ class DocSearch {
27362735
list.push(out.length);
27372736
traitImplIdxMap.set(obj.traitPath, list);
27382737
} else {
2739-
const toRemove = traitImplIdxMap.get(obj.fullPath);
2740-
if (toRemove) {
2741-
removeIdxListAsc(out, toRemove);
2738+
const toRemoveList = traitImplIdxMap.get(obj.fullPath);
2739+
if (toRemoveList) {
2740+
removeIdxListAsc(out, toRemoveList);
27422741
}
27432742
traitImplIdxMap.delete(obj.fullPath);
27442743
}

0 commit comments

Comments
 (0)