1 error: redundant pattern matching, consider using `is_ipv4()`
2 --> $DIR/redundant_pattern_matching_ipaddr.rs:14:12
4 LL | if let V4(_) = &ipaddr {}
5 | -------^^^^^---------- help: try this: `if ipaddr.is_ipv4()`
7 = note: `-D clippy::redundant-pattern-matching` implied by `-D warnings`
9 error: redundant pattern matching, consider using `is_ipv4()`
10 --> $DIR/redundant_pattern_matching_ipaddr.rs:16:12
12 LL | if let V4(_) = V4(Ipv4Addr::LOCALHOST) {}
13 | -------^^^^^-------------------------- help: try this: `if V4(Ipv4Addr::LOCALHOST).is_ipv4()`
15 error: redundant pattern matching, consider using `is_ipv6()`
16 --> $DIR/redundant_pattern_matching_ipaddr.rs:18:12
18 LL | if let V6(_) = V6(Ipv6Addr::LOCALHOST) {}
19 | -------^^^^^-------------------------- help: try this: `if V6(Ipv6Addr::LOCALHOST).is_ipv6()`
21 error: redundant pattern matching, consider using `is_ipv4()`
22 --> $DIR/redundant_pattern_matching_ipaddr.rs:20:15
24 LL | while let V4(_) = V4(Ipv4Addr::LOCALHOST) {}
25 | ----------^^^^^-------------------------- help: try this: `while V4(Ipv4Addr::LOCALHOST).is_ipv4()`
27 error: redundant pattern matching, consider using `is_ipv6()`
28 --> $DIR/redundant_pattern_matching_ipaddr.rs:22:15
30 LL | while let V6(_) = V6(Ipv6Addr::LOCALHOST) {}
31 | ----------^^^^^-------------------------- help: try this: `while V6(Ipv6Addr::LOCALHOST).is_ipv6()`
33 error: redundant pattern matching, consider using `is_ipv4()`
34 --> $DIR/redundant_pattern_matching_ipaddr.rs:32:5
36 LL | / match V4(Ipv4Addr::LOCALHOST) {
38 LL | | V6(_) => false,
40 | |_____^ help: try this: `V4(Ipv4Addr::LOCALHOST).is_ipv4()`
42 error: redundant pattern matching, consider using `is_ipv6()`
43 --> $DIR/redundant_pattern_matching_ipaddr.rs:37:5
45 LL | / match V4(Ipv4Addr::LOCALHOST) {
46 LL | | V4(_) => false,
49 | |_____^ help: try this: `V4(Ipv4Addr::LOCALHOST).is_ipv6()`
51 error: redundant pattern matching, consider using `is_ipv6()`
52 --> $DIR/redundant_pattern_matching_ipaddr.rs:42:5
54 LL | / match V6(Ipv6Addr::LOCALHOST) {
55 LL | | V4(_) => false,
58 | |_____^ help: try this: `V6(Ipv6Addr::LOCALHOST).is_ipv6()`
60 error: redundant pattern matching, consider using `is_ipv4()`
61 --> $DIR/redundant_pattern_matching_ipaddr.rs:47:5
63 LL | / match V6(Ipv6Addr::LOCALHOST) {
65 LL | | V6(_) => false,
67 | |_____^ help: try this: `V6(Ipv6Addr::LOCALHOST).is_ipv4()`
69 error: redundant pattern matching, consider using `is_ipv4()`
70 --> $DIR/redundant_pattern_matching_ipaddr.rs:52:20
72 LL | let _ = if let V4(_) = V4(Ipv4Addr::LOCALHOST) {
73 | -------^^^^^-------------------------- help: try this: `if V4(Ipv4Addr::LOCALHOST).is_ipv4()`
75 error: redundant pattern matching, consider using `is_ipv4()`
76 --> $DIR/redundant_pattern_matching_ipaddr.rs:60:20
78 LL | let _ = if let V4(_) = gen_ipaddr() {
79 | -------^^^^^--------------- help: try this: `if gen_ipaddr().is_ipv4()`
81 error: redundant pattern matching, consider using `is_ipv6()`
82 --> $DIR/redundant_pattern_matching_ipaddr.rs:62:19
84 LL | } else if let V6(_) = gen_ipaddr() {
85 | -------^^^^^--------------- help: try this: `if gen_ipaddr().is_ipv6()`
87 error: redundant pattern matching, consider using `is_ipv4()`
88 --> $DIR/redundant_pattern_matching_ipaddr.rs:74:12
90 LL | if let V4(_) = V4(Ipv4Addr::LOCALHOST) {}
91 | -------^^^^^-------------------------- help: try this: `if V4(Ipv4Addr::LOCALHOST).is_ipv4()`
93 error: redundant pattern matching, consider using `is_ipv6()`
94 --> $DIR/redundant_pattern_matching_ipaddr.rs:76:12
96 LL | if let V6(_) = V6(Ipv6Addr::LOCALHOST) {}
97 | -------^^^^^-------------------------- help: try this: `if V6(Ipv6Addr::LOCALHOST).is_ipv6()`
99 error: redundant pattern matching, consider using `is_ipv4()`
100 --> $DIR/redundant_pattern_matching_ipaddr.rs:78:15
102 LL | while let V4(_) = V4(Ipv4Addr::LOCALHOST) {}
103 | ----------^^^^^-------------------------- help: try this: `while V4(Ipv4Addr::LOCALHOST).is_ipv4()`
105 error: redundant pattern matching, consider using `is_ipv6()`
106 --> $DIR/redundant_pattern_matching_ipaddr.rs:80:15
108 LL | while let V6(_) = V6(Ipv6Addr::LOCALHOST) {}
109 | ----------^^^^^-------------------------- help: try this: `while V6(Ipv6Addr::LOCALHOST).is_ipv6()`
111 error: redundant pattern matching, consider using `is_ipv4()`
112 --> $DIR/redundant_pattern_matching_ipaddr.rs:82:5
114 LL | / match V4(Ipv4Addr::LOCALHOST) {
115 LL | | V4(_) => true,
116 LL | | V6(_) => false,
118 | |_____^ help: try this: `V4(Ipv4Addr::LOCALHOST).is_ipv4()`
120 error: redundant pattern matching, consider using `is_ipv6()`
121 --> $DIR/redundant_pattern_matching_ipaddr.rs:87:5
123 LL | / match V6(Ipv6Addr::LOCALHOST) {
124 LL | | V4(_) => false,
125 LL | | V6(_) => true,
127 | |_____^ help: try this: `V6(Ipv6Addr::LOCALHOST).is_ipv6()`
129 error: aborting due to 18 previous errors