This commit is contained in:
Aleksey Kladov 2019-03-25 10:59:42 +03:00
parent 6f995f47ea
commit 6c4b06e2e3

View File

@ -603,9 +603,7 @@ pub enum BinOp {
impl BinExpr {
fn op_details(&self) -> Option<(&SyntaxNode, BinOp)> {
self.syntax()
.children()
.filter_map(|c| match c.kind() {
self.syntax().children().find_map(|c| match c.kind() {
PIPEPIPE => Some((c, BinOp::BooleanOr)),
AMPAMP => Some((c, BinOp::BooleanAnd)),
EQEQ => Some((c, BinOp::EqualityTest)),
@ -639,7 +637,6 @@ impl BinExpr {
CARETEQ => Some((c, BinOp::BitXorAssign)),
_ => None,
})
.next()
}
pub fn op_kind(&self) -> Option<BinOp> {