Skip to content

Commit f67f238

Browse files
committed
Use str::is_whitespace instead of dup'd is_whitespace function
1 parent e697456 commit f67f238

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/compiletest/runtest.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -358,13 +358,7 @@ fn make_run_args(config: config, _props: test_props, testfile: str) ->
358358
fn split_maybe_args(argstr: option<str>) -> [str] {
359359
fn rm_whitespace(v: [str]) -> [str] {
360360
fn flt(&&s: str) -> option<str> {
361-
if !is_whitespace(s) { option::some(s) } else { option::none }
362-
}
363-
364-
// FIXME: This should be in std
365-
fn is_whitespace(s: str) -> bool {
366-
for c: u8 in s { if c != ' ' as u8 { ret false; } }
367-
ret true;
361+
if !str::is_whitespace(s) { option::some(s) } else { option::none }
368362
}
369363
vec::filter_map(v, flt)
370364
}

0 commit comments

Comments
 (0)