(&'a self, other: &'a Self)
| 7 | type Diff = enm::Edit<'a, Self, T::Diff>; |
| 8 | |
| 9 | fn diff(&'a self, other: &'a Self) -> edit::Edit<Self> { |
| 10 | match (self, other) { |
| 11 | (None, None) => edit::Edit::Copy(self), |
| 12 | (Some(a), Some(b)) => match a.diff(&b) { |
| 13 | edit::Edit::Copy(_) => edit::Edit::Copy(self), |
| 14 | edit::Edit::Change(diff) => edit::Edit::Change(enm::Edit::AssociatedChanged(diff)), |
| 15 | }, |
| 16 | _ => edit::Edit::Change(enm::Edit::VariantChanged(self, other)), |
| 17 | } |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | #[cfg(test)] |
no outgoing calls