mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
replace_match_with_if_let
works on more binary matches
This commit is contained in:
parent
f1819525f5
commit
251f0c6090
2 changed files with 141 additions and 24 deletions
|
@ -49,6 +49,10 @@ impl ast::BlockExpr {
|
|||
pub fn items(&self) -> AstChildren<ast::Item> {
|
||||
support::children(self.syntax())
|
||||
}
|
||||
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.statements().next().is_none() && self.tail_expr().is_none()
|
||||
}
|
||||
}
|
||||
|
||||
impl ast::Expr {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue