Skip to content

Commit 37af742

Browse files
lengyijunllogiq
andauthored
Update clippy_lints/src/needless_option_as_deref.rs
Co-authored-by: llogiq <[email protected]>
1 parent 4184cc3 commit 37af742

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

clippy_lints/src/needless_option_as_deref.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,7 @@ declare_lint_pass!(OptionNeedlessDeref=> [
3838

3939
impl<'tcx> LateLintPass<'tcx> for OptionNeedlessDeref {
4040
fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
41-
if expr.span.from_expansion() {
42-
return;
43-
}
44-
if in_macro(expr.span) {
41+
if expr.span.from_expansion() || in_macro(expr.span) {
4542
return;
4643
}
4744
let typeck = cx.typeck_results();

0 commit comments

Comments
 (0)