Skip to content

Commit 2798772

Browse files
authored
Auto merge of #34173 - srinivasreddy:rm_redundant, r=alexcrichton
remove redundant assert statements
2 parents 7d2f75a + c605480 commit 2798772

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

src/libcollectionstest/str.rs

+14-16
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,6 @@ macro_rules! test_concat {
123123
fn test_concat_for_different_types() {
124124
test_concat!("ab", vec![s("a"), s("b")]);
125125
test_concat!("ab", vec!["a", "b"]);
126-
test_concat!("ab", vec!["a", "b"]);
127-
test_concat!("ab", vec![s("a"), s("b")]);
128126
}
129127

130128
#[test]
@@ -194,24 +192,24 @@ fn test_unsafe_slice() {
194192

195193
#[test]
196194
fn test_starts_with() {
197-
assert!(("".starts_with("")));
198-
assert!(("abc".starts_with("")));
199-
assert!(("abc".starts_with("a")));
200-
assert!((!"a".starts_with("abc")));
201-
assert!((!"".starts_with("abc")));
202-
assert!((!"ödd".starts_with("-")));
203-
assert!(("ödd".starts_with("öd")));
195+
assert!("".starts_with(""));
196+
assert!("abc".starts_with(""));
197+
assert!("abc".starts_with("a"));
198+
assert!(!"a".starts_with("abc"));
199+
assert!(!"".starts_with("abc"));
200+
assert!(!"ödd".starts_with("-"));
201+
assert!("ödd".starts_with("öd"));
204202
}
205203

206204
#[test]
207205
fn test_ends_with() {
208-
assert!(("".ends_with("")));
209-
assert!(("abc".ends_with("")));
210-
assert!(("abc".ends_with("c")));
211-
assert!((!"a".ends_with("abc")));
212-
assert!((!"".ends_with("abc")));
213-
assert!((!"ddö".ends_with("-")));
214-
assert!(("ddö".ends_with("dö")));
206+
assert!("".ends_with(""));
207+
assert!("abc".ends_with(""));
208+
assert!("abc".ends_with("c"));
209+
assert!(!"a".ends_with("abc"));
210+
assert!(!"".ends_with("abc"));
211+
assert!(!"ddö".ends_with("-"));
212+
assert!("ddö".ends_with("dö"));
215213
}
216214

217215
#[test]

0 commit comments

Comments
 (0)