Skip to content

Commit

Permalink
Update clippy_lints/src/unnecessary_reserve.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Alex <69764315+Serial-ATA@users.noreply.github.com>
  • Loading branch information
kyoto7250 and Serial-ATA authored Aug 14, 2022
1 parent cf56250 commit 1cb9c25
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clippy_lints/src/unnecessary_reserve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ fn check_extend_method(
fn equal_ident(left: &rustc_hir::Expr<'_>, right: &rustc_hir::Expr<'_>) -> bool {
fn ident_name(expr: &rustc_hir::Expr<'_>) -> Option<rustc_span::Symbol> {
if let ExprKind::Path(QPath::Resolved(None, inner_path)) = expr.kind
&& let [inner_seg] = inner_path.segments {
&& let [inner_seg] = inner_path.segments
{
return Some(inner_seg.ident.name);
}
None
Expand Down

0 comments on commit 1cb9c25

Please sign in to comment.