You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Specifically it's because next_path_element is only called once, instead of being called until it finds an Exit command. It makes sense to only call it once because an enum can only have one variant, but since the variant still counts as a path segment, an additional Exit should be consumed.
The text was updated successfully, but these errors were encountered:
When diffing an enum like:
Let's say we have the diff
Value::Str("A") -> Value::Str("B")
.The diff implementation will produce the following sequence of commands:
However, the apply implementation does not consume the final
Exit
command, causing the rest of the command stream to get out of sync.This is because of this code:
serde-diff/serde-diff-derive/src/serde_diff/mod.rs
Lines 362 to 379 in e461da4
Specifically it's because
next_path_element
is only called once, instead of being called until it finds anExit
command. It makes sense to only call it once because an enum can only have one variant, but since the variant still counts as a path segment, an additional Exit should be consumed.The text was updated successfully, but these errors were encountered: