sway-core 0.71.0

Sway core language.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::engine_threading::{EqWithEngines, PartialEqWithEngines, PartialEqWithEnginesContext};

use super::{Expression, Scrutinee};
use sway_types::span;

#[derive(Debug, Clone)]
pub struct MatchBranch {
    pub scrutinee: Scrutinee,
    pub result: Expression,
    pub(crate) span: span::Span,
}

impl EqWithEngines for MatchBranch {}
impl PartialEqWithEngines for MatchBranch {
    fn eq(&self, other: &Self, ctx: &PartialEqWithEnginesContext) -> bool {
        self.scrutinee.eq(&other.scrutinee, ctx) && self.result.eq(&other.result, ctx)
    }
}