Skip to content

Commit 8b0326c

Browse files
committed
fix test fail
1 parent 8398eaa commit 8b0326c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

clippy_lints/src/checked_conversions.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ fn get_implementing_type<'a>(path: &QPath<'_>, candidates: &'a [&str], function:
319319
if let QPath::TypeRelative(ty, path) = &path;
320320
if path.ident.name.as_str() == function;
321321
if let TyKind::Path(QPath::Resolved(None, tp)) = &ty.kind;
322-
if let [int] = &*tp.segments;
322+
if let [int] = tp.segments;
323323
then {
324324
let name = &int.ident.name.as_str();
325325
candidates.iter().find(|c| name == *c).copied()
@@ -333,7 +333,7 @@ fn get_implementing_type<'a>(path: &QPath<'_>, candidates: &'a [&str], function:
333333
fn int_ty_to_sym<'tcx>(path: &QPath<'_>) -> Option<&'tcx str> {
334334
if_chain! {
335335
if let QPath::Resolved(_, path) = *path;
336-
if let [ty] = &*path.segments;
336+
if let [ty] = path.segments;
337337
then {
338338
let name = &ty.ident.name.as_str();
339339
INTS.iter().find(|c| name == *c).copied()

clippy_lints/src/format.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ impl<'tcx> LateLintPass<'tcx> for UselessFormat {
5454
span_useless_format_empty(cx, call_site, "String::new()".to_owned(), applicability);
5555
} else {
5656
if_chain! {
57-
if let [e] = &*format_args.format_string_parts;
57+
if let [e] = format_args.format_string_parts;
5858
if let ExprKind::Lit(lit) = &e.kind;
5959
if let Some(s_src) = snippet_opt(cx, lit.span);
6060
then {

clippy_utils/src/higher.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ impl<'tcx> ForLoop<'tcx> {
3636
if let hir::ExprKind::Match(iterexpr, [arm], hir::MatchSource::ForLoopDesugar) = e.kind;
3737
if let hir::ExprKind::Call(_, [arg]) = iterexpr.kind;
3838
if let hir::ExprKind::Loop(block, ..) = arm.body.kind;
39-
if let [stmt] = &*block.stmts;
39+
if let [stmt] = block.stmts;
4040
if let hir::StmtKind::Expr(e) = stmt.kind;
4141
if let hir::ExprKind::Match(_, [_, some_arm], _) = e.kind;
4242
if let hir::PatKind::Struct(_, [field], _) = some_arm.pat.kind;

0 commit comments

Comments
 (0)