1
Fork 0

Remove a span from hir::ExprKind::MethodCall

This commit is contained in:
Cameron Steffen 2021-12-01 11:17:50 -06:00
parent ec00cf80a3
commit 82f613ee3b
91 changed files with 162 additions and 168 deletions

View file

@ -370,7 +370,7 @@ fn check_for_is_empty(
}
fn check_cmp(cx: &LateContext<'_>, span: Span, method: &Expr<'_>, lit: &Expr<'_>, op: &str, compare_to: u32) {
if let (&ExprKind::MethodCall(method_path, _, args, _), &ExprKind::Lit(ref lit)) = (&method.kind, &lit.kind) {
if let (&ExprKind::MethodCall(method_path, args, _), &ExprKind::Lit(ref lit)) = (&method.kind, &lit.kind) {
// check if we are in an is_empty() method
if let Some(name) = get_item_name(cx, method) {
if name.as_str() == "is_empty" {