From c4a40fab253320f7836207dcb6bca125124f15da Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 19 Mar 2020 13:08:36 +0100 Subject: [PATCH] library: shape: sphere: optional deserialization --- src/shape/sphere.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shape/sphere.rs b/src/shape/sphere.rs index c85d3fb..56ce835 100644 --- a/src/shape/sphere.rs +++ b/src/shape/sphere.rs @@ -8,6 +8,7 @@ use serde::Deserialize; #[derive(Clone, Debug, PartialEq, Deserialize)] pub struct Sphere { /// The sphere is inverted if it is expected to be seen from the inside. + #[serde(default)] inverted: bool, /// The center of the sphere in space. center: Point,