diff --git a/src/value/from.rs b/src/value/from.rs index 7b37ef688..bd137b4cf 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 => Self::Null, + Some(value) => Into::into(value), + } + } +}