mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-02 08:37:42 +00:00
Wrap inner tail expressions in MissingOkOrSomeInTailExpr
This commit is contained in:
parent
eb513c22f7
commit
1edbaa29f9
8 changed files with 69 additions and 11 deletions
|
@ -164,6 +164,7 @@ impl ast::IfExpr {
|
|||
pub fn then_branch(&self) -> Option<ast::BlockExpr> {
|
||||
self.blocks().next()
|
||||
}
|
||||
|
||||
pub fn else_branch(&self) -> Option<ElseBranch> {
|
||||
let res = match self.blocks().nth(1) {
|
||||
Some(block) => ElseBranch::Block(block),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue