@@ -234,10 +234,10 @@ impl<'a, 'tcx> DocFolder for CacheBuilder<'a, 'tcx> {
234
234
&& ( self . cache . masked_crates . contains ( & item. item_id . krate ( ) )
235
235
|| i. trait_
236
236
. as_ref ( )
237
- . map_or ( false , |t| is_from_private_dep ( self . tcx , self . cache , t. def_id ( ) ) )
237
+ . is_some_and ( |t| is_from_private_dep ( self . tcx , self . cache , t. def_id ( ) ) )
238
238
|| i. for_
239
239
. def_id ( self . cache )
240
- . map_or ( false , |d| is_from_private_dep ( self . tcx , self . cache , d) ) )
240
+ . is_some_and ( |d| is_from_private_dep ( self . tcx , self . cache , d) ) )
241
241
{
242
242
return None ;
243
243
}
@@ -279,7 +279,7 @@ impl<'a, 'tcx> DocFolder for CacheBuilder<'a, 'tcx> {
279
279
. cache
280
280
. parent_stack
281
281
. last ( )
282
- . map_or ( false , |parent| parent. is_trait_impl ( ) ) =>
282
+ . is_some_and ( |parent| parent. is_trait_impl ( ) ) =>
283
283
{
284
284
// skip associated items in trait impls
285
285
( ( None , None ) , false )
@@ -341,7 +341,7 @@ impl<'a, 'tcx> DocFolder for CacheBuilder<'a, 'tcx> {
341
341
// A crate has a module at its root, containing all items,
342
342
// which should not be indexed. The crate-item itself is
343
343
// inserted later on when serializing the search-index.
344
- if item. item_id . as_def_id ( ) . map_or ( false , |idx| !idx. is_crate_root ( ) )
344
+ if item. item_id . as_def_id ( ) . is_some_and ( |idx| !idx. is_crate_root ( ) )
345
345
&& let ty = item. type_ ( )
346
346
&& ( ty != ItemType :: StructField
347
347
|| u16:: from_str_radix ( s. as_str ( ) , 10 ) . is_err ( ) )
0 commit comments