Repository: serde-rs/json (language: rust)

Issue:
impl From<[T; N]> for Value
We have `impl From<&[T]> for Value` and `impl From<Vec<T>> for Value`, why don't we support the conversion from an array?

```rust
impl<T: Into<Value>, const N: usize> From<[T; N]> for Value {
    fn from(array: [T; N]) -> Self {
        let vec = array.into_iter().map(|v| v.into()).collect();
        Self::Array(vec)
    }
}
```


Discussion / hints:

Fix patch:
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<T: Into<Value>> From<Vec<T>> for Value {
     }
 }
 
+impl<T: Into<Value>, const N: usize> From<[T; N]> for Value {
+    fn from(array: [T; N]) -> Self {
+        Value::Array(array.into_iter().map(Into::into).collect())
+    }
+}
+
 impl<T: Clone + Into<Value>> From<&[T]> for Value {
     /// Convert a slice to `Value::Array`.
     ///


Test patch: