diff --git a/crates/immo-core/src/euros.rs b/crates/immo-core/src/euros.rs index 1f38da0..7ad41f2 100644 --- a/crates/immo-core/src/euros.rs +++ b/crates/immo-core/src/euros.rs @@ -1,4 +1,4 @@ -use std::fmt; +use std::{fmt, ops::Add}; use rust_decimal::{Decimal, prelude::ToPrimitive}; use thiserror::Error; @@ -48,6 +48,16 @@ impl fmt::Display for Euros { } } +impl Add for Euros { + type Output = Self; + + fn add(self, rhs: Self) -> Self::Output { + Euros { + value_as_cents: self.value_as_cents + rhs.value_as_cents, + } + } +} + #[cfg(test)] mod tests { use super::*;