Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the first paragraph, instead of cookie-cutter text, for rustdoc descriptions #82351

Merged
merged 8 commits into from
Feb 22, 2021
Prev Previous commit
Next Next commit
Revert changes to all.html
This code wasn't actually working, and trying to SEO optimize that page is pointless anyway.
notriddle committed Feb 21, 2021
commit bcef5e70774c792b17b5092859392f131f78bd3a
7 changes: 1 addition & 6 deletions src/librustdoc/html/render/mod.rs
Original file line number Diff line number Diff line change
@@ -534,17 +534,12 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
if !root_path.ends_with('/') {
root_path.push('/');
}
let description = krate
.module
.as_ref()
.and_then(|item| Some(plain_text_summary(item.doc_value()?.as_str())))
.unwrap_or_else(|| String::from("List of all items in this crate"));
let mut page = layout::Page {
title: "List of all items in this crate",
css_class: "mod",
root_path: "../",
static_root_path: self.shared.static_root_path.as_deref(),
description: description.as_str(),
description: "List of all items in this crate",
keywords: BASIC_KEYWORDS,
resource_suffix: &self.shared.resource_suffix,
extra_scripts: &[],