mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
remove flavor
This commit is contained in:
parent
5287a2506c
commit
f3a82c372c
3 changed files with 10 additions and 10 deletions
|
@ -516,8 +516,8 @@ impl ExprCollector {
|
|||
let else_branch = e
|
||||
.else_branch()
|
||||
.map(|b| match b {
|
||||
ast::ElseBranchFlavor::Block(it) => self.collect_block(it),
|
||||
ast::ElseBranchFlavor::IfExpr(elif) => {
|
||||
ast::ElseBranch::Block(it) => self.collect_block(it),
|
||||
ast::ElseBranch::IfExpr(elif) => {
|
||||
let expr: &ast::Expr = ast::Expr::cast(elif.syntax()).unwrap();
|
||||
self.collect_expr(expr)
|
||||
}
|
||||
|
@ -533,8 +533,8 @@ impl ExprCollector {
|
|||
let condition = self.collect_expr_opt(e.condition().and_then(|c| c.expr()));
|
||||
let then_branch = self.collect_block_opt(e.then_branch());
|
||||
let else_branch = e.else_branch().map(|b| match b {
|
||||
ast::ElseBranchFlavor::Block(it) => self.collect_block(it),
|
||||
ast::ElseBranchFlavor::IfExpr(elif) => {
|
||||
ast::ElseBranch::Block(it) => self.collect_block(it),
|
||||
ast::ElseBranch::IfExpr(elif) => {
|
||||
let expr: &ast::Expr = ast::Expr::cast(elif.syntax()).unwrap();
|
||||
self.collect_expr(expr)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue