Remove Deserialize impl from MaybeUndefined
Change Serialize implementation to use the `untagged` attribute.
This handles the common case of directly serializing `MaybeUndefined`,
but deserializing into an `Option<T>`. We could add a more sophisticated
custom deserialize implementation later.
@@ -46,7 +46,8 @@ use std::borrow::Cow;
/// }
/// ```
#[allow(missing_docs)]
-#[derive(Serialize, Deserialize, Clone, Debug)]
+#[derive(Serialize, Clone, Debug)]
+#[serde(untagged)]
pub enum MaybeUndefined<T> {
Undefined,
Null,
