mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-24 21:37:57 +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))
|
||||
}
|
||||
_ => unreachable!(),
|
||||
_ => Err(d.syntax_error()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user