Skip to content

Commit f1d607d

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 163275 b: refs/heads/snap-stage3 c: 6460835 h: refs/heads/master i: 163273: 35cc738 163271: c887429 v: v3
1 parent 93a6bdb commit f1d607d

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 9146a919b616e39e528e4d7100d16eef52f1f852
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 4d4915aa286ca12527ca849a076bf4e7b5d90de1
4+
refs/heads/snap-stage3: 646083510ab82fa48091c942a2a4015bed8c15dc
55
refs/heads/try: 20cbbffeefc1f35e2ea63afce7b42fbd79611d42
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/libcollections/str.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -903,21 +903,21 @@ mod tests {
903903
#[test]
904904
fn test_find() {
905905
assert_eq!("hello".find('l'), Some(2u));
906-
assert_eq!("hello".find(|c:char| c == 'o'), Some(4u));
906+
assert_eq!("hello".find(|&: c:char| c == 'o'), Some(4u));
907907
assert!("hello".find('x').is_none());
908-
assert!("hello".find(|c:char| c == 'x').is_none());
908+
assert!("hello".find(|&: c:char| c == 'x').is_none());
909909
assert_eq!("ประเทศไทย中华Việt Nam".find('华'), Some(30u));
910-
assert_eq!("ประเทศไทย中华Việt Nam".find(|c: char| c == '华'), Some(30u));
910+
assert_eq!("ประเทศไทย中华Việt Nam".find(|&: c: char| c == '华'), Some(30u));
911911
}
912912

913913
#[test]
914914
fn test_rfind() {
915915
assert_eq!("hello".rfind('l'), Some(3u));
916-
assert_eq!("hello".rfind(|c:char| c == 'o'), Some(4u));
916+
assert_eq!("hello".rfind(|&: c:char| c == 'o'), Some(4u));
917917
assert!("hello".rfind('x').is_none());
918-
assert!("hello".rfind(|c:char| c == 'x').is_none());
918+
assert!("hello".rfind(|&: c:char| c == 'x').is_none());
919919
assert_eq!("ประเทศไทย中华Việt Nam".rfind('华'), Some(30u));
920-
assert_eq!("ประเทศไทย中华Việt Nam".rfind(|c: char| c == '华'), Some(30u));
920+
assert_eq!("ประเทศไทย中华Việt Nam".rfind(|&: c: char| c == '华'), Some(30u));
921921
}
922922

923923
#[test]
@@ -1281,7 +1281,7 @@ mod tests {
12811281
assert_eq!("11foo1bar11".trim_left_chars('1'), "foo1bar11");
12821282
let chars: &[char] = &['1', '2'];
12831283
assert_eq!("12foo1bar12".trim_left_chars(chars), "foo1bar12");
1284-
assert_eq!("123foo1bar123".trim_left_chars(|c: char| c.is_numeric()), "foo1bar123");
1284+
assert_eq!("123foo1bar123".trim_left_chars(|&: c: char| c.is_numeric()), "foo1bar123");
12851285
}
12861286

12871287
#[test]
@@ -1296,7 +1296,7 @@ mod tests {
12961296
assert_eq!("11foo1bar11".trim_right_chars('1'), "11foo1bar");
12971297
let chars: &[char] = &['1', '2'];
12981298
assert_eq!("12foo1bar12".trim_right_chars(chars), "12foo1bar");
1299-
assert_eq!("123foo1bar123".trim_right_chars(|c: char| c.is_numeric()), "123foo1bar");
1299+
assert_eq!("123foo1bar123".trim_right_chars(|&: c: char| c.is_numeric()), "123foo1bar");
13001300
}
13011301

13021302
#[test]
@@ -1311,7 +1311,7 @@ mod tests {
13111311
assert_eq!("11foo1bar11".trim_chars('1'), "foo1bar");
13121312
let chars: &[char] = &['1', '2'];
13131313
assert_eq!("12foo1bar12".trim_chars(chars), "foo1bar");
1314-
assert_eq!("123foo1bar123".trim_chars(|c: char| c.is_numeric()), "foo1bar");
1314+
assert_eq!("123foo1bar123".trim_chars(|&: c: char| c.is_numeric()), "foo1bar");
13151315
}
13161316

13171317
#[test]
@@ -1787,14 +1787,14 @@ mod tests {
17871787
let split: Vec<&str> = data.splitn(3, ' ').collect();
17881788
assert_eq!(split, vec!["\nMäry", "häd", "ä", "little lämb\nLittle lämb\n"]);
17891789

1790-
let split: Vec<&str> = data.splitn(3, |c: char| c == ' ').collect();
1790+
let split: Vec<&str> = data.splitn(3, |&: c: char| c == ' ').collect();
17911791
assert_eq!(split, vec!["\nMäry", "häd", "ä", "little lämb\nLittle lämb\n"]);
17921792

17931793
// Unicode
17941794
let split: Vec<&str> = data.splitn(3, 'ä').collect();
17951795
assert_eq!(split, vec!["\nM", "ry h", "d ", " little lämb\nLittle lämb\n"]);
17961796

1797-
let split: Vec<&str> = data.splitn(3, |c: char| c == 'ä').collect();
1797+
let split: Vec<&str> = data.splitn(3, |&: c: char| c == 'ä').collect();
17981798
assert_eq!(split, vec!["\nM", "ry h", "d ", " little lämb\nLittle lämb\n"]);
17991799
}
18001800

@@ -2588,7 +2588,7 @@ mod bench {
25882588
let s = "Mary had a little lamb, Little lamb, little-lamb.";
25892589
let len = s.split(' ').count();
25902590

2591-
b.iter(|| assert_eq!(s.split(|c: char| c == ' ').count(), len));
2591+
b.iter(|| assert_eq!(s.split(|&: c: char| c == ' ').count(), len));
25922592
}
25932593

25942594
#[bench]

0 commit comments

Comments
 (0)