Skip to content

Commit 38abcfc

Browse files
committed
Fix warning on current rustc versions
1 parent 5141360 commit 38abcfc

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/tests/mod.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ fn test_reqopt() {
5050
let short_args = vec!["-t".to_string(), "20".to_string()];
5151
match opts.parse(&short_args) {
5252
Ok(ref m) => {
53-
assert!((m.opt_present("test")));
53+
assert!(m.opt_present("test"));
5454
assert_eq!(m.opt_str("test").unwrap(), "20");
55-
assert!((m.opt_present("t")));
55+
assert!(m.opt_present("t"));
5656
assert_eq!(m.opt_str("t").unwrap(), "20");
5757
}
5858
_ => {
@@ -111,17 +111,17 @@ fn test_optopt() {
111111
Ok(ref m) => {
112112
assert!(m.opt_present("test"));
113113
assert_eq!(m.opt_str("test").unwrap(), "20");
114-
assert!((m.opt_present("t")));
114+
assert!(m.opt_present("t"));
115115
assert_eq!(m.opt_str("t").unwrap(), "20");
116116
}
117117
_ => panic!(),
118118
}
119119
let short_args = vec!["-t".to_string(), "20".to_string()];
120120
match opts.parse(&short_args) {
121121
Ok(ref m) => {
122-
assert!((m.opt_present("test")));
122+
assert!(m.opt_present("test"));
123123
assert_eq!(m.opt_str("test").unwrap(), "20");
124-
assert!((m.opt_present("t")));
124+
assert!(m.opt_present("t"));
125125
assert_eq!(m.opt_str("t").unwrap(), "20");
126126
}
127127
_ => panic!(),
@@ -443,19 +443,19 @@ fn test_optmulti() {
443443
opts.optmulti("t", "test", "testing", "TEST");
444444
match opts.parse(&long_args) {
445445
Ok(ref m) => {
446-
assert!((m.opt_present("test")));
446+
assert!(m.opt_present("test"));
447447
assert_eq!(m.opt_str("test").unwrap(), "20");
448-
assert!((m.opt_present("t")));
448+
assert!(m.opt_present("t"));
449449
assert_eq!(m.opt_str("t").unwrap(), "20");
450450
}
451451
_ => panic!(),
452452
}
453453
let short_args = vec!["-t".to_string(), "20".to_string()];
454454
match opts.parse(&short_args) {
455455
Ok(ref m) => {
456-
assert!((m.opt_present("test")));
456+
assert!(m.opt_present("test"));
457457
assert_eq!(m.opt_str("test").unwrap(), "20");
458-
assert!((m.opt_present("t")));
458+
assert!(m.opt_present("t"));
459459
assert_eq!(m.opt_str("t").unwrap(), "20");
460460
}
461461
_ => panic!(),
@@ -576,16 +576,16 @@ fn test_combined() {
576576
assert!(m.free[1] == "free1");
577577
assert_eq!(m.opt_str("s").unwrap(), "20");
578578
assert!(m.free[2] == "free2");
579-
assert!((m.opt_present("flag")));
579+
assert!(m.opt_present("flag"));
580580
assert_eq!(m.opt_str("long").unwrap(), "30");
581-
assert!((m.opt_present("f")));
581+
assert!(m.opt_present("f"));
582582
let pair = m.opt_strs("m");
583583
assert!(pair[0] == "40");
584584
assert!(pair[1] == "50");
585585
let pair = m.opt_strs("n");
586586
assert!(pair[0] == "-A B");
587587
assert!(pair[1] == "-60 70");
588-
assert!((!m.opt_present("notpresent")));
588+
assert!(!m.opt_present("notpresent"));
589589
}
590590
_ => panic!(),
591591
}

0 commit comments

Comments
 (0)