We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e461da4 commit 9eeff6cCopy full SHA for 9eeff6c
src/implementation.rs
@@ -409,3 +409,27 @@ impl<T: SerdeDiff + Serialize + for<'a> Deserialize<'a>> SerdeDiff for Option<T>
409
410
type Unit = ();
411
opaque_serde_diff!(Unit);
412
+
413
+impl<T> SerdeDiff for Box<T>
414
+where
415
+ T: SerdeDiff,
416
+{
417
+ fn diff<'a, S: SerializeSeq>(
418
+ &self,
419
+ ctx: &mut crate::difference::DiffContext<'a, S>,
420
+ other: &Self,
421
+ ) -> Result<bool, S::Error> {
422
+ self.as_ref().diff(ctx, other)
423
+ }
424
425
+ fn apply<'de, A>(
426
+ &mut self,
427
+ seq: &mut A,
428
+ ctx: &mut crate::apply::ApplyContext,
429
+ ) -> Result<bool, <A as serde::de::SeqAccess<'de>>::Error>
430
+ where
431
+ A: de::SeqAccess<'de>,
432
+ {
433
+ self.as_mut().apply(seq, ctx)
434
435
+}
0 commit comments