mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-12 14:21:01 +00:00
Error properly if we get an unknown variant
This commit is contained in:
+1
-1
@@ -28,7 +28,7 @@ impl<E, D: Deserializer<E>> Deserializable<E, D> for Animal {
|
|||||||
|
|
||||||
Ok(Frog(x0, x1))
|
Ok(Frog(x0, x1))
|
||||||
}
|
}
|
||||||
_ => unreachable!(),
|
_ => Err(d.syntax_error()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user