Skip to content

Commit 586073e

Browse files
committed
Remove unnecessary parens from core and alloc
1 parent d005b39 commit 586073e

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

library/alloc/tests/str.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2297,21 +2297,21 @@ fn utf8_chars() {
22972297
assert_eq!(schs.len(), 4);
22982298
assert_eq!(schs.iter().cloned().collect::<String>(), s);
22992299

2300-
assert!((from_utf8(s.as_bytes()).is_ok()));
2300+
assert!(from_utf8(s.as_bytes()).is_ok());
23012301
// invalid prefix
2302-
assert!((!from_utf8(&[0x80]).is_ok()));
2302+
assert!(!from_utf8(&[0x80]).is_ok());
23032303
// invalid 2 byte prefix
2304-
assert!((!from_utf8(&[0xc0]).is_ok()));
2305-
assert!((!from_utf8(&[0xc0, 0x10]).is_ok()));
2304+
assert!(!from_utf8(&[0xc0]).is_ok());
2305+
assert!(!from_utf8(&[0xc0, 0x10]).is_ok());
23062306
// invalid 3 byte prefix
2307-
assert!((!from_utf8(&[0xe0]).is_ok()));
2308-
assert!((!from_utf8(&[0xe0, 0x10]).is_ok()));
2309-
assert!((!from_utf8(&[0xe0, 0xff, 0x10]).is_ok()));
2307+
assert!(!from_utf8(&[0xe0]).is_ok());
2308+
assert!(!from_utf8(&[0xe0, 0x10]).is_ok());
2309+
assert!(!from_utf8(&[0xe0, 0xff, 0x10]).is_ok());
23102310
// invalid 4 byte prefix
2311-
assert!((!from_utf8(&[0xf0]).is_ok()));
2312-
assert!((!from_utf8(&[0xf0, 0x10]).is_ok()));
2313-
assert!((!from_utf8(&[0xf0, 0xff, 0x10]).is_ok()));
2314-
assert!((!from_utf8(&[0xf0, 0xff, 0xff, 0x10]).is_ok()));
2311+
assert!(!from_utf8(&[0xf0]).is_ok());
2312+
assert!(!from_utf8(&[0xf0, 0x10]).is_ok());
2313+
assert!(!from_utf8(&[0xf0, 0xff, 0x10]).is_ok());
2314+
assert!(!from_utf8(&[0xf0, 0xff, 0xff, 0x10]).is_ok());
23152315
}
23162316

23172317
#[test]

library/core/tests/tuple.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fn test_partial_ord() {
3737
assert!(!((1.0f64, 2.0f64) <= (f64::NAN, 3.0)));
3838
assert!(!((1.0f64, 2.0f64) > (f64::NAN, 3.0)));
3939
assert!(!((1.0f64, 2.0f64) >= (f64::NAN, 3.0)));
40-
assert!(((1.0f64, 2.0f64) < (2.0, f64::NAN)));
40+
assert!((1.0f64, 2.0f64) < (2.0, f64::NAN));
4141
assert!(!((2.0f64, 2.0f64) < (2.0, f64::NAN)));
4242
}
4343

0 commit comments

Comments
 (0)