Skip to content

Commit e265617

Browse files
committed
fix clippy
1 parent 6af5e21 commit e265617

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/tools/clippy/clippy_utils/src/ast_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ pub fn eq_expr_opt(l: Option<&P<Expr>>, r: Option<&P<Expr>>) -> bool {
136136
pub fn eq_struct_rest(l: &StructRest, r: &StructRest) -> bool {
137137
match (l, r) {
138138
(StructRest::Base(lb), StructRest::Base(rb)) => eq_expr(lb, rb),
139-
(StructRest::Rest(_), StructRest::Rest(_)) | (StructRest::None, StructRest::None) => true,
139+
(StructRest::Rest(_), StructRest::Rest(_)) | (StructRest::None(_), StructRest::None(_)) => true,
140140
_ => false,
141141
}
142142
}

src/tools/clippy/clippy_utils/src/higher.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ impl<'a> Range<'a> {
236236
limits: ast::RangeLimits::Closed,
237237
})
238238
},
239-
ExprKind::Struct(path, fields, StructTailExpr::None) => match (path, fields) {
239+
ExprKind::Struct(path, fields, StructTailExpr::None(_)) => match (path, fields) {
240240
(QPath::LangItem(hir::LangItem::RangeFull, ..), []) => Some(Range {
241241
start: None,
242242
end: None,

src/tools/clippy/clippy_utils/src/hir_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ impl HirEqInterExpr<'_, '_, '_> {
386386
self.eq_qpath(l_path, r_path)
387387
&& match (lo, ro) {
388388
(StructTailExpr::Base(l),StructTailExpr::Base(r)) => self.eq_expr(l, r),
389-
(StructTailExpr::None, StructTailExpr::None) => true,
389+
(StructTailExpr::None(_), StructTailExpr::None(_)) => true,
390390
(StructTailExpr::DefaultFields(_), StructTailExpr::DefaultFields(_)) => true,
391391
_ => false,
392392
}

0 commit comments

Comments
 (0)