Skip to main content

luaur_compile_cli/methods/
compile_stats_operator_add.rs

1use crate::records::compile_stats::CompileStats;
2
3impl CompileStats {
4    pub fn compile_stats_operator_add(&self, other: &CompileStats) -> CompileStats {
5        let mut result = self.clone();
6        result.compile_stats_operator_add_assign(other);
7        result
8    }
9}
10
11#[allow(non_snake_case)]
12impl core::ops::Add<CompileStats> for CompileStats {
13    type Output = CompileStats;
14
15    fn add(self, other: CompileStats) -> Self::Output {
16        self.compile_stats_operator_add(&other)
17    }
18}
19
20#[allow(non_snake_case)]
21impl core::ops::Add<&CompileStats> for &CompileStats {
22    type Output = CompileStats;
23
24    fn add(self, other: &CompileStats) -> Self::Output {
25        self.compile_stats_operator_add(other)
26    }
27}