about summary refs log tree commit diff
path: root/src/librustdoc/html
diff options
context:
space:
mode:
authorkwantam <kwantam@gmail.com>2015-04-18 13:49:51 -0400
committerkwantam <kwantam@gmail.com>2015-04-21 15:31:51 -0400
commitc361e13d7155552cb6e45da5016cea36f87ecfec (patch)
treeeb03f86d7f11029bb49f15e098a55222fa3ea30b /src/librustdoc/html
parentf43c86cda46a423b947be427a5fea2614ca569dc (diff)
downloadrust-c361e13d7155552cb6e45da5016cea36f87ecfec.tar.gz
rust-c361e13d7155552cb6e45da5016cea36f87ecfec.zip
implement rfc 1054: split_whitespace() fn, deprecate words()
For now, words() is left in (but deprecated), and Words is a type alias for
struct SplitWhitespace.

Also cleaned up references to s.words() throughout codebase.

Closes #15628
Diffstat (limited to 'src/librustdoc/html')
-rw-r--r--src/librustdoc/html/markdown.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs
index 334f05fb36f..17053e4f10a 100644
--- a/src/librustdoc/html/markdown.rs
+++ b/src/librustdoc/html/markdown.rs
@@ -274,7 +274,7 @@ pub fn render(w: &mut fmt::Formatter, s: &str, print_toc: bool) -> fmt::Result {
         };
 
         // Transform the contents of the header into a hyphenated string
-        let id = s.words().map(|s| s.to_ascii_lowercase())
+        let id = s.split_whitespace().map(|s| s.to_ascii_lowercase())
             .collect::<Vec<String>>().connect("-");
 
         // This is a terrible hack working around how hoedown gives us rendered