Skip to content

Commit fdc7c86

Browse files
Fix unwanted "empty-library" appearance
1 parent a0438c4 commit fdc7c86

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/docbuilder/rustwide_builder.rs

+8
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,14 @@ impl RustwideBuilder {
237237
for (&file, versioned) in files {
238238
let segments = file.rsplitn(2, '.').collect::<Vec<_>>();
239239
let file_name = if versioned {
240+
if segments[0] == "js"
241+
&& ["crates", "search-index"].iter().any(|x| *x == segments[1])
242+
{
243+
// We don't want to copy the `search-index.js` and `crates.js` files
244+
// into another directory, otherwise the "empty-library" will appear
245+
// into the crates list.
246+
continue;
247+
}
240248
format!("{}-{}.{}", segments[1], rustc_version, segments[0])
241249
} else {
242250
file.to_string()

0 commit comments

Comments
 (0)