Skip to content

Commit a736e62

Browse files
committed
apply suggestions from code review
1 parent e6b595e commit a736e62

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 {
@@ -2735,9 +2734,9 @@ class DocSearch {
27352734
list.push(out.length);
27362735
traitImplIdxMap.set(obj.traitPath, list);
27372736
} else {
2738-
const toRemove = traitImplIdxMap.get(obj.fullPath);
2739-
if (toRemove) {
2740-
removeIdxListAsc(out, toRemove);
2737+
const toRemoveList = traitImplIdxMap.get(obj.fullPath);
2738+
if (toRemoveList) {
2739+
removeIdxListAsc(out, toRemoveList);
27412740
}
27422741
traitImplIdxMap.delete(obj.fullPath);
27432742
}

0 commit comments

Comments
 (0)