MCPcopy Create free account
hub / github.com/distil/diffus / diff

Method diff

diffus/src/diffable_impls/option.rs:9–18  ·  view source on GitHub ↗
(&'a self, other: &'a Self)

Source from the content-addressed store, hash-verified

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)]

Callers 15

lcs_post_changeFunction · 0.45
diffFunction · 0.45
variant_changedFunction · 0.45
associate_changeFunction · 0.45
exampleFunction · 0.45
exampleFunction · 0.45
vis_checkFunction · 0.45
changed_contentsFunction · 0.45
enm_nested_testFunction · 0.45
enm_associated_changeFunction · 0.45
enm_variant_changeFunction · 0.45

Calls

no outgoing calls

Tested by 14

diffFunction · 0.36
variant_changedFunction · 0.36
associate_changeFunction · 0.36
exampleFunction · 0.36
exampleFunction · 0.36
vis_checkFunction · 0.36
changed_contentsFunction · 0.36
enm_nested_testFunction · 0.36
enm_associated_changeFunction · 0.36
enm_variant_changeFunction · 0.36
nestedFunction · 0.36