Improve getting literal representation
This commit is contained in:
parent
15ecf06948
commit
fc33b2567c
@ -368,7 +368,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TypeLimits {
|
||||
let src = cx.sess().codemap().span_to_snippet(lit.span).ok()?;
|
||||
let firstch = src.chars().next()?;
|
||||
|
||||
if let Some(0) = char::to_digit(firstch, 10) {
|
||||
if firstch == '0' {
|
||||
match src.chars().nth(1) {
|
||||
Some('x') | Some('b') => return Some(src),
|
||||
_ => return None,
|
||||
|
Loading…
x
Reference in New Issue
Block a user