suggest to remove prefix b in lint string

This commit is contained in:
csmoe 2018-10-09 17:53:59 +08:00
parent 42dde960f9
commit 2ed2d1a7e6
2 changed files with 92 additions and 45 deletions

View file

@ -1326,6 +1326,14 @@ impl LitKind {
}
}
/// Returns true if this literal is byte literal string false otherwise.
pub fn is_bytestr(&self) -> bool {
match self {
LitKind::ByteStr(_) => true,
_ => false,
}
}
/// Returns true if this is a numeric literal.
pub fn is_numeric(&self) -> bool {
match *self {