| 1 | struct SDiff<'__daft, 'a: '__daft, T: '__daft, U: '__daft> |
| 2 | where |
| 3 | T: Diffable + Eq + 'a, |
| 4 | U: Diffable + 'a, |
| 5 | { |
| 6 | a: <BTreeMap<usize, T> as ::daft::Diffable>::Diff<'__daft>, |
| 7 | b: <usize as ::daft::Diffable>::Diff<'__daft>, |
| 8 | c: <&'a U as ::daft::Diffable>::Diff<'__daft>, |
| 9 | d: <&'a str as ::daft::Diffable>::Diff<'__daft>, |
| 10 | } |
| 11 | impl<'__daft, 'a: '__daft, T: '__daft, U: '__daft> ::core::fmt::Debug |
| 12 | for SDiff<'__daft, 'a, T, U> |
| 13 | where |
| 14 | T: Diffable + Eq + 'a, |
| 15 | U: Diffable + 'a, |
| 16 | <BTreeMap<usize, T> as ::daft::Diffable>::Diff<'__daft>: ::core::fmt::Debug, |
| 17 | <usize as ::daft::Diffable>::Diff<'__daft>: ::core::fmt::Debug, |
| 18 | <&'a U as ::daft::Diffable>::Diff<'__daft>: ::core::fmt::Debug, |
| 19 | <&'a str as ::daft::Diffable>::Diff<'__daft>: ::core::fmt::Debug, |
| 20 | { |
| 21 | fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| 22 | f.debug_struct(stringify!(SDiff)) |
| 23 | .field(stringify!(a), &self.a) |
| 24 | .field(stringify!(b), &self.b) |
| 25 | .field(stringify!(c), &self.c) |
| 26 | .field(stringify!(d), &self.d) |
| 27 | .finish() |
| 28 | } |
| 29 | } |
| 30 | impl<'__daft, 'a: '__daft, T: '__daft, U: '__daft> ::core::cmp::PartialEq |
| 31 | for SDiff<'__daft, 'a, T, U> |
| 32 | where |
| 33 | T: Diffable + Eq + 'a, |
| 34 | U: Diffable + 'a, |
| 35 | <BTreeMap<usize, T> as ::daft::Diffable>::Diff<'__daft>: ::core::cmp::PartialEq, |
| 36 | <usize as ::daft::Diffable>::Diff<'__daft>: ::core::cmp::PartialEq, |
| 37 | <&'a U as ::daft::Diffable>::Diff<'__daft>: ::core::cmp::PartialEq, |
| 38 | <&'a str as ::daft::Diffable>::Diff<'__daft>: ::core::cmp::PartialEq, |
| 39 | { |
| 40 | fn eq(&self, other: &Self) -> bool { |
| 41 | self.a == other.a && self.b == other.b && self.c == other.c && self.d == other.d |
| 42 | } |
| 43 | } |
| 44 | impl<'__daft, 'a: '__daft, T: '__daft, U: '__daft> ::core::cmp::Eq |
| 45 | for SDiff<'__daft, 'a, T, U> |
| 46 | where |
| 47 | T: Diffable + Eq + 'a, |
| 48 | U: Diffable + 'a, |
| 49 | <BTreeMap<usize, T> as ::daft::Diffable>::Diff<'__daft>: ::core::cmp::Eq, |
| 50 | <usize as ::daft::Diffable>::Diff<'__daft>: ::core::cmp::Eq, |
| 51 | <&'a U as ::daft::Diffable>::Diff<'__daft>: ::core::cmp::Eq, |
| 52 | <&'a str as ::daft::Diffable>::Diff<'__daft>: ::core::cmp::Eq, |
| 53 | {} |
| 54 | impl<'a, T, U> ::daft::Diffable for S<'a, T, U> |
| 55 | where |
| 56 | T: Diffable + Eq + 'a, |
| 57 | U: Diffable + 'a, |
| 58 | { |
| 59 | type Diff<'__daft> = SDiff<'__daft, 'a, T, U> where Self: '__daft; |
| 60 | fn diff<'__daft>(&'__daft self, other: &'__daft Self) -> SDiff<'__daft, 'a, T, U> { |
| 61 | Self::Diff { |
| 62 | a: ::daft::Diffable::diff(&self.a, &other.a), |
| 63 | b: ::daft::Diffable::diff(&self.b, &other.b), |
| 64 | c: ::daft::Diffable::diff(&self.c, &other.c), |
| 65 | d: ::daft::Diffable::diff(&self.d, &other.d), |
| 66 | } |
| 67 | } |
| 68 | } |