Skip to content

Commit 967a6b0

Browse files
show "all items" link even if crate doesn't have a version
1 parent 63ac3c7 commit 967a6b0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/librustdoc/html/render.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4095,11 +4095,12 @@ impl<'a> fmt::Display for Sidebar<'a> {
40954095
write!(fmt,
40964096
"<div class='block version'>\
40974097
<p>Version {}</p>\
4098-
</div>
4099-
<a id='all-types' href='all.html'><p>See all {}'s items</p></a>",
4100-
version,
4101-
it.name.as_ref().unwrap())?;
4098+
</div>",
4099+
version)?;
41024100
}
4101+
4102+
write!(fmt, "<a id='all-types' href='all.html'><p>See all {}'s items</p></a>",
4103+
it.name.as_ref().expect("crates always have a name"))?;
41034104
}
41044105

41054106
write!(fmt, "<div class=\"sidebar-elems\">")?;

0 commit comments

Comments
 (0)