aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-04-02 10:25:24 +0100
committerAleksey Kladov <[email protected]>2019-04-02 10:25:24 +0100
commitf3a82c372ccaa079842f151b749fbe9b8b9eb004 (patch)
treee7dab9896f9ddfa0af3c880375d8408c7db758e6 /crates/ra_syntax
parent5287a2506c19b7f886556f8a73510f57dd234857 (diff)
remove flavor
Diffstat (limited to 'crates/ra_syntax')
-rw-r--r--crates/ra_syntax/src/ast.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_syntax/src/ast.rs b/crates/ra_syntax/src/ast.rs
index beef2c6e2..b0e0f8bf9 100644
--- a/crates/ra_syntax/src/ast.rs
+++ b/crates/ra_syntax/src/ast.rs
@@ -164,7 +164,7 @@ impl LetStmt {
164} 164}
165 165
166#[derive(Debug, Clone, PartialEq, Eq)] 166#[derive(Debug, Clone, PartialEq, Eq)]
167pub enum ElseBranchFlavor<'a> { 167pub enum ElseBranch<'a> {
168 Block(&'a Block), 168 Block(&'a Block),
169 IfExpr(&'a IfExpr), 169 IfExpr(&'a IfExpr),
170} 170}
@@ -173,12 +173,12 @@ impl IfExpr {
173 pub fn then_branch(&self) -> Option<&Block> { 173 pub fn then_branch(&self) -> Option<&Block> {
174 self.blocks().nth(0) 174 self.blocks().nth(0)
175 } 175 }
176 pub fn else_branch(&self) -> Option<ElseBranchFlavor> { 176 pub fn else_branch(&self) -> Option<ElseBranch> {
177 let res = match self.blocks().nth(1) { 177 let res = match self.blocks().nth(1) {
178 Some(block) => ElseBranchFlavor::Block(block), 178 Some(block) => ElseBranch::Block(block),
179 None => { 179 None => {
180 let elif: &IfExpr = child_opt(self)?; 180 let elif: &IfExpr = child_opt(self)?;
181 ElseBranchFlavor::IfExpr(elif) 181 ElseBranch::IfExpr(elif)
182 } 182 }
183 }; 183 };
184 Some(res) 184 Some(res)