Skip to content

Commit

Permalink
rustdoc: Cleanup a pattern match in external_generic_args()
Browse files Browse the repository at this point in the history
  • Loading branch information
camelid committed Sep 11, 2021
1 parent 913764d commit 280fc2d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/librustdoc/clean/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,8 @@ fn external_generic_args(
.collect();

if cx.tcx.fn_trait_kind_from_lang_item(did).is_some() {
assert!(ty_kind.is_some());
let inputs = match ty_kind {
Some(ty::Tuple(ref tys)) => tys.iter().map(|t| t.expect_ty().clean(cx)).collect(),
let inputs = match ty_kind.unwrap() {
ty::Tuple(tys) => tys.iter().map(|t| t.expect_ty().clean(cx)).collect(),
_ => return GenericArgs::AngleBracketed { args, bindings },
};
let output = None;
Expand Down

0 comments on commit 280fc2d

Please sign in to comment.