Skip to content

Commit 6f9a460

Browse files
committed
Put back, fix ()-output optimization
1 parent 8081096 commit 6f9a460

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/librustdoc/html/render/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ impl Serialize for IndexItemFunctionType {
170170
_ => seq.serialize_element(&self.inputs)?,
171171
}
172172
match &self.output[..] {
173+
[] => {}
173174
[one] if one.generics.is_none() => seq.serialize_element(one)?,
174175
_ => seq.serialize_element(&self.output)?,
175176
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1910,7 +1910,7 @@ function initSearch(rawSearchIndex) {
19101910
output = buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA], lowercasePaths);
19111911
}
19121912
} else {
1913-
output = null;
1913+
output = [];
19141914
}
19151915
return {
19161916
inputs, output,

0 commit comments

Comments
 (0)