Skip to content

Commit

Permalink
move string_extend tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Cameron Steffen authored and Cameron Steffen committed Oct 10, 2017
1 parent 6d94167 commit 3356d12
Show file tree
Hide file tree
Showing 4 changed files with 160 additions and 161 deletions.
31 changes: 0 additions & 31 deletions tests/ui/methods.rs
Expand Up @@ -189,15 +189,6 @@ impl IteratorFalsePositives {
}
}

#[derive(Copy, Clone)]
struct HasChars;

impl HasChars {
fn chars(self) -> std::str::Chars<'static> {
"HasChars".chars()
}
}

/// Checks implementation of `FILTER_NEXT` lint
fn filter_next() {
let v = vec![3, 2, 1, 0, -1, -2, -3];
Expand Down Expand Up @@ -431,25 +422,3 @@ struct MyError(()); // doesn't implement Debug
struct MyErrorWithParam<T> {
x: T
}

fn str_extend_chars() {
let abc = "abc";
let def = String::from("def");
let mut s = String::new();

s.push_str(abc);
s.extend(abc.chars());

s.push_str("abc");
s.extend("abc".chars());

s.push_str(&def);
s.extend(def.chars());

s.extend(abc.chars().skip(1));
s.extend("abc".chars().skip(1));
s.extend(['a', 'b', 'c'].iter());

let f = HasChars;
s.extend(f.chars());
}

0 comments on commit 3356d12

Please sign in to comment.