diff --git a/src/value/from.rs b/src/value/from.rs index 7b37ef688..858a6e48a 100644 --- a/src/value/from.rs +++ b/src/value/from.rs @@ -268,3 +268,15 @@ impl From<()> for Value { Value::Null } } + +impl From> for Value +where + T: Into, +{ + fn from(opt: Option) -> Self { + match opt { + None => Value::Null, + Some(value) => Into::into(value), + } + } +}