aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/body/lower.rs
diff options
context:
space:
mode:
authorClemens Wasser <[email protected]>2021-06-07 12:59:01 +0100
committerClemens Wasser <[email protected]>2021-06-21 15:40:21 +0100
commit47747cd4120e260a144242aadd7732e11d133fe4 (patch)
treeba767d7da808c050e313446ac4cb90d810d0f4de /crates/hir_def/src/body/lower.rs
parent4402f2b280f58896ed0696f4243d88a58fd970ca (diff)
Apply some clippy suggestions
Diffstat (limited to 'crates/hir_def/src/body/lower.rs')
-rw-r--r--crates/hir_def/src/body/lower.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/hir_def/src/body/lower.rs b/crates/hir_def/src/body/lower.rs
index bed4c4994..f6e6cdbe2 100644
--- a/crates/hir_def/src/body/lower.rs
+++ b/crates/hir_def/src/body/lower.rs
@@ -690,9 +690,7 @@ impl ExprCollector<'_> {
690 } 690 }
691 } 691 }
692 ast::Stmt::Item(item) => { 692 ast::Stmt::Item(item) => {
693 if self.check_cfg(&item).is_none() { 693 self.check_cfg(&item);
694 return;
695 }
696 } 694 }
697 } 695 }
698 } 696 }
@@ -717,7 +715,8 @@ impl ExprCollector<'_> {
717 block.statements().for_each(|s| self.collect_stmt(s)); 715 block.statements().for_each(|s| self.collect_stmt(s));
718 block.tail_expr().and_then(|e| { 716 block.tail_expr().and_then(|e| {
719 let expr = self.maybe_collect_expr(e)?; 717 let expr = self.maybe_collect_expr(e)?;
720 Some(self.statements_in_scope.push(Statement::Expr { expr, has_semi: false })) 718 self.statements_in_scope.push(Statement::Expr { expr, has_semi: false });
719 Some(())
721 }); 720 });
722 721
723 let mut tail = None; 722 let mut tail = None;