diff --git a/src/chains.rs b/src/chains.rs index 297eb268d30..693aaef9979 100644 --- a/src/chains.rs +++ b/src/chains.rs @@ -209,7 +209,7 @@ impl ChainItemKind { fn is_tup_field_access(expr: &ast::Expr) -> bool { match expr.kind { ast::ExprKind::Field(_, ref field) => { - field.name.to_string().chars().all(|c| c.is_digit(10)) + field.name.as_str().chars().all(|c| c.is_digit(10)) } _ => false, }