Fix dogfood filter-map

This commit is contained in:
Manish Goregaokar 2017-09-25 19:52:13 -07:00
parent 2551bd8924
commit 1b4aba47b7
No known key found for this signature in database
GPG Key ID: 3BBF4D3E2EF79F98

View File

@ -184,16 +184,18 @@ fn check_ty(cx: &LateContext, ast_ty: &hir::Ty, is_local: bool) {
check_ty(cx, ty, is_local);
for ty in p.segments
.iter()
.filter_map(|seg| seg.parameters.as_ref())
.flat_map(|params| params.types.iter())
.flat_map(|seg| seg.parameters.as_ref()
.map_or_else(|| [].iter(),
|params| params.types.iter()))
{
check_ty(cx, ty, is_local);
}
},
QPath::Resolved(None, ref p) => for ty in p.segments
.iter()
.filter_map(|seg| seg.parameters.as_ref())
.flat_map(|params| params.types.iter())
.flat_map(|seg| seg.parameters.as_ref()
.map_or_else(|| [].iter(),
|params| params.types.iter()))
{
check_ty(cx, ty, is_local);
},