Skip to content

Commit 48b8dd9

Browse files
committed
Apply map_unwrap_or to Clippy itself
1 parent 90ec92f commit 48b8dd9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

clippy_lints/src/derivable_impls.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ fn check_struct<'tcx>(
105105
if let TyKind::Path(QPath::Resolved(_, p)) = self_ty.kind
106106
&& let Some(PathSegment { args, .. }) = p.segments.last()
107107
{
108+
#[expect(clippy::map_unwrap_or)]
108109
let args = args.map(|a| a.args).unwrap_or(&[]);
109110

110111
// ty_args contains the generic parameters of the type declaration, while args contains the

0 commit comments

Comments
 (0)