diff options
| author | kwantam <kwantam@gmail.com> | 2015-04-18 13:49:51 -0400 |
|---|---|---|
| committer | kwantam <kwantam@gmail.com> | 2015-04-21 15:31:51 -0400 |
| commit | c361e13d7155552cb6e45da5016cea36f87ecfec (patch) | |
| tree | eb03f86d7f11029bb49f15e098a55222fa3ea30b /src/libgetopts | |
| parent | f43c86cda46a423b947be427a5fea2614ca569dc (diff) | |
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/libgetopts')
| -rw-r--r-- | src/libgetopts/lib.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libgetopts/lib.rs b/src/libgetopts/lib.rs index 197199e743f..5782c57834e 100644 --- a/src/libgetopts/lib.rs +++ b/src/libgetopts/lib.rs @@ -91,7 +91,6 @@ #![deny(missing_docs)] #![feature(staged_api)] -#![feature(str_words)] #![feature(str_char)] #![cfg_attr(test, feature(rustc_private))] @@ -771,7 +770,7 @@ pub fn usage(brief: &str, opts: &[OptGroup]) -> String { // Normalize desc to contain words separated by one space character let mut desc_normalized_whitespace = String::new(); - for word in desc.words() { + for word in desc.split_whitespace() { desc_normalized_whitespace.push_str(word); desc_normalized_whitespace.push(' '); } |
