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
This commit is contained in:
parent
f43c86cda4
commit
c361e13d71
11 changed files with 53 additions and 28 deletions
|
@ -31,7 +31,6 @@
|
|||
#![feature(std_misc)]
|
||||
#![feature(test)]
|
||||
#![feature(unicode)]
|
||||
#![feature(str_words)]
|
||||
#![feature(path_ext)]
|
||||
#![feature(path_relative_from)]
|
||||
#![feature(slice_patterns)]
|
||||
|
@ -240,7 +239,7 @@ pub fn main_args(args: &[String]) -> isize {
|
|||
|
||||
let test_args = matches.opt_strs("test-args");
|
||||
let test_args: Vec<String> = test_args.iter()
|
||||
.flat_map(|s| s.words())
|
||||
.flat_map(|s| s.split_whitespace())
|
||||
.map(|s| s.to_string())
|
||||
.collect();
|
||||
|
||||
|
@ -404,13 +403,13 @@ fn rust_input(cratefile: &str, externs: core::Externs, matches: &getopts::Matche
|
|||
}
|
||||
clean::NameValue(ref x, ref value)
|
||||
if "passes" == *x => {
|
||||
for pass in value.words() {
|
||||
for pass in value.split_whitespace() {
|
||||
passes.push(pass.to_string());
|
||||
}
|
||||
}
|
||||
clean::NameValue(ref x, ref value)
|
||||
if "plugins" == *x => {
|
||||
for p in value.words() {
|
||||
for p in value.split_whitespace() {
|
||||
plugins.push(p.to_string());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue