Skip to content

Commit 15f7300

Browse files
committed
refactor: inline some variables
1 parent a96f0aa commit 15f7300

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

crates/hir-def/src/body/lower.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ pub(super) fn lower(
8080
params: Option<ast::ParamList>,
8181
body: Option<ast::Expr>,
8282
) -> (Body, BodySourceMap) {
83-
let collector = ExprCollector::new(db, expander);
84-
collector.collect(params, body)
83+
ExprCollector::new(db, expander).collect(params, body)
8584
}
8685

8786
struct ExprCollector<'a> {
@@ -190,8 +189,7 @@ impl<'a> ExprCollector<'a> {
190189
}
191190

192191
fn collect_expr(&mut self, expr: ast::Expr) -> ExprId {
193-
let expr_id = self.maybe_collect_expr(expr).unwrap_or_else(|| self.missing_expr());
194-
expr_id
192+
self.maybe_collect_expr(expr).unwrap_or_else(|| self.missing_expr())
195193
}
196194

197195
/// Returns `None` if and only if the expression is `#[cfg]`d out.

0 commit comments

Comments
 (0)