mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
improve document
This commit is contained in:
parent
55fdd1e78c
commit
949d0709bd
1 changed files with 16 additions and 0 deletions
|
@ -24,6 +24,14 @@ declare_clippy_lint! {
|
|||
/// assert!(matches!(b'X', b'A'..=b'Z'));
|
||||
/// assert!(matches!('2', '0'..='9'));
|
||||
/// assert!(matches!('x', 'A'..='Z' | 'a'..='z'));
|
||||
///
|
||||
/// assert!((b'0'..=b'9').contains(&b'0'));
|
||||
/// assert!((b'a'..=b'z').contains(&b'a'));
|
||||
/// assert!((b'A'..=b'Z').contains(&b'A'));
|
||||
///
|
||||
/// assert!(('0'..='9').contains(&'0'));
|
||||
/// assert!(('a'..='z').contains(&'a'));
|
||||
/// assert!(('A'..='Z').contains(&'A'));
|
||||
/// }
|
||||
/// ```
|
||||
/// Use instead:
|
||||
|
@ -33,6 +41,14 @@ declare_clippy_lint! {
|
|||
/// assert!(b'X'.is_ascii_uppercase());
|
||||
/// assert!('2'.is_ascii_digit());
|
||||
/// assert!('x'.is_ascii_alphabetic());
|
||||
///
|
||||
/// assert!(b'0'.is_ascii_digit());
|
||||
/// assert!(b'a'.is_ascii_lowercase());
|
||||
/// assert!(b'A'.is_ascii_uppercase());
|
||||
///
|
||||
/// assert!('0'.is_ascii_digit());
|
||||
/// assert!('a'.is_ascii_lowercase());
|
||||
/// assert!('A'.is_ascii_uppercase());
|
||||
/// }
|
||||
/// ```
|
||||
#[clippy::version = "1.66.0"]
|
||||
|
|
Loading…
Reference in a new issue