pub fn difference<V: Source>(
expected: &V,
found: &V,
path: &str,
) -> Option<Difference>Expand description
Where two canonical values first differ, as a path and the two forms.
The first difference and not all of them: a decoder that lost its place reports every member after the one it lost, and a report of forty differences says less than a report of the first.
Two aggregates are walked member by member and two collections element by element; anything else — including an aggregate against a collection — is compared as text, which is what says the two are different shapes rather than different values.
zerodds-lint: recursion-depth 128 — the shallower of the two values’
nesting. Both arms descend into a strictly smaller part of both
values, and neither is a type walk at all, so the walk ends because the
values are finite. A value file is serde_json’s to parse and its
RECURSION_LIMIT is 128.