Skip to content

Commit

Permalink
Update clippy_lints/src/functions.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Eduardo Broto <ebroto@tutanota.com>
  • Loading branch information
llogiq and ebroto authored Oct 11, 2020
1 parent 4ee95ed commit 47e8464
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions clippy_lints/src/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,7 @@ fn check_result_unit_err(cx: &LateContext<'_>, decl: &hir::FnDecl<'_>, item_span
if let hir::TyKind::Path(ref qpath) = ty.kind {
if is_type_diagnostic_item(cx, hir_ty_to_ty(cx.tcx, ty), sym!(result_type)) {
if let Some(ref args) = last_path_segment(qpath).args {
if args.args.len() == 2 {
if let hir::GenericArg::Type(ref err_ty) = args.args[1] {
if let [_, hir::GenericArg::Type(ref err_ty)] = args.args {
if let hir::TyKind::Tup(t) = err_ty.kind {
if t.is_empty() {
span_lint_and_help(
Expand Down

0 comments on commit 47e8464

Please sign in to comment.