diff --git a/src/lib.rs b/src/lib.rs index 5a77244..d90338a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -148,8 +148,8 @@ impl<'a> Serialize for Serde<&'a Option> { where S: Serializer { match self.0 { - Some(ref value) => serializer.serialize_some(&Serde(value)), - None => serializer.serialize_none(), + &Some(ref value) => serializer.serialize_some(&Serde(value)), + &None => serializer.serialize_none(), } } }