Skip to content

Commit

Permalink
Remove redundant comment about .unwrap
Browse files Browse the repository at this point in the history
  • Loading branch information
hegza committed Oct 30, 2020
1 parent 493354a commit 6c90230
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion clippy_lints/src/default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ fn field_reassigned_by_stmt<'tcx>(this: &Stmt<'tcx>, binding_name: Symbol) -> Op
fn fields_of_type(ty: Ty<'_>) -> Vec<Ident> {
if let Adt(adt, _) = ty.kind() {
if adt.is_struct() {
// unwrap is safe, because this is a struct and structs have only one variant
let variant = &adt.non_enum_variant();
return variant.fields.iter().map(|f| f.ident).collect();
}
Expand Down

0 comments on commit 6c90230

Please sign in to comment.