diff --git a/src/value/from.rs b/src/value/from.rs index 2dae925a1..df4b2038c 100644 --- a/src/value/from.rs +++ b/src/value/from.rs @@ -183,6 +183,12 @@ impl> From> for Value { } } +impl, const N: usize> From<[T; N]> for Value { + fn from(array: [T; N]) -> Self { + Value::Array(array.into_iter().map(Into::into).collect()) + } +} + impl> From<&[T]> for Value { /// Convert a slice to `Value::Array`. ///