Rustup
This commit is contained in:
@@ -149,7 +149,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for StringLitAsBytes {
|
||||
use crate::utils::{in_macro, snippet};
|
||||
|
||||
if let ExprMethodCall(ref path, _, ref args) = e.node {
|
||||
if path.name == "as_bytes" {
|
||||
if path.ident.name == "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(args[0].span) {
|
||||
|
||||
Reference in New Issue
Block a user