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

Function nested

diffus-derive-test/src/lib.rs:291–320  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

289
290 #[test]
291 fn nested() {
292 let left = Outer {
293 inner: Inner {
294 x: "x".to_owned(),
295 y: 13,
296 },
297 lit: 3,
298 };
299 let right = Outer {
300 inner: Inner {
301 x: "x".to_owned(),
302 y: 37,
303 },
304 lit: 3,
305 };
306
307 let diff = left.diff(&right);
308
309 assert_eq!(
310 diff.change()
311 .unwrap()
312 .inner
313 .change()
314 .unwrap()
315 .y
316 .change()
317 .unwrap(),
318 &(&13, &37)
319 );
320 }
321
322 #[cfg(feature = "serialize-impl")]
323 mod serialize {

Callers

nothing calls this directly

Calls 1

diffMethod · 0.45

Tested by

no test coverage detected