Change redundant_pattern_matching to also lint std::net::IpAddr
Suggest using utility methods `is_ipv4` and `is_ipv6`.
This commit is contained in:
parent
f897d27d8b
commit
dc075b4266
11 changed files with 341 additions and 36 deletions
|
|
@ -58,6 +58,8 @@ pub const INTO: [&str; 3] = ["core", "convert", "Into"];
|
|||
pub const INTO_ITERATOR: [&str; 5] = ["core", "iter", "traits", "collect", "IntoIterator"];
|
||||
pub const IO_READ: [&str; 3] = ["std", "io", "Read"];
|
||||
pub const IO_WRITE: [&str; 3] = ["std", "io", "Write"];
|
||||
pub const IPADDR_V4: [&str; 4] = ["std", "net", "IpAddr", "V4"];
|
||||
pub const IPADDR_V6: [&str; 4] = ["std", "net", "IpAddr", "V6"];
|
||||
pub const ITERATOR: [&str; 5] = ["core", "iter", "traits", "iterator", "Iterator"];
|
||||
pub const LATE_CONTEXT: [&str; 2] = ["rustc_lint", "LateContext"];
|
||||
pub const LINKED_LIST: [&str; 4] = ["alloc", "collections", "linked_list", "LinkedList"];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue