Fix fallout
This commit is contained in:
@@ -143,7 +143,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for StringLitAsBytes {
|
||||
use utils::{snippet, in_macro};
|
||||
|
||||
if let ExprMethodCall(ref name, _, ref args) = e.node {
|
||||
if &*name.node.as_str() == "as_bytes" {
|
||||
if name.node.as_str() == "as_bytes" {
|
||||
if let ExprLit(ref lit) = args[0].node {
|
||||
if let LitKind::Str(ref lit_content, _) = lit.node {
|
||||
if lit_content.as_str().chars().all(|c| c.is_ascii()) && !in_macro(cx, args[0].span) {
|
||||
|
||||
Reference in New Issue
Block a user