mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-11-01 07:59:49 +00:00
Error properly if we get an unknown variant
This commit is contained in:
1 parent
81dfaa4f3d
commit
7c60fa5276
1 file changed
+1
-1
+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