From: Guillaume Gomez Date: Tue, 11 Dec 2018 09:57:45 +0000 (+0100) Subject: Remove unneeded extra chars to reduce search-index size X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=24031466b7f690c708c30164ab3b07bcc82b7f89;p=rust.git Remove unneeded extra chars to reduce search-index size --- diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs index 00ca4fed2f4..2ffde297cc5 100644 --- a/src/librustdoc/html/markdown.rs +++ b/src/librustdoc/html/markdown.rs @@ -852,7 +852,11 @@ fn next(&mut self) -> Option { s.push_str(&t); } } - s + if s.len() > 60 { + s.chars().take(60).collect::() + } else { + s + } } pub fn markdown_links(md: &str) -> Vec<(String, Option>)> {