Skip to content

Commit 2403146

Browse files
Remove unneeded extra chars to reduce search-index size
1 parent 118e052 commit 2403146

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/librustdoc/html/markdown.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,11 @@ pub fn plain_summary_line(md: &str) -> String {
852852
s.push_str(&t);
853853
}
854854
}
855-
s
855+
if s.len() > 60 {
856+
s.chars().take(60).collect::<String>()
857+
} else {
858+
s
859+
}
856860
}
857861

858862
pub fn markdown_links(md: &str) -> Vec<(String, Option<Range<usize>>)> {

0 commit comments

Comments
 (0)