Skip to content

Commit c7e4ef4

Browse files
lengyijunxFrednet
andcommitted
Update clippy_lints/src/pathbuf_init_then_push.rs
Co-authored-by: Fridtjof Stoldt <[email protected]>
1 parent 218798b commit c7e4ef4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clippy_lints/src/pathbuf_init_then_push.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,7 @@ impl<'tcx> LateLintPass<'tcx> for PathbufThenPush<'tcx> {
151151
}
152152

153153
fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
154-
if self.searcher.is_none()
155-
&& let ExprKind::Assign(left, right, _) = expr.kind
154+
if let ExprKind::Assign(left, right, _) = expr.kind
156155
&& let ExprKind::Path(QPath::Resolved(None, path)) = left.kind
157156
&& let [name] = &path.segments
158157
&& let Res::Local(id) = path.res

0 commit comments

Comments
 (0)