Add From<Vec<String> implementation to Value (#1688)

This commit is contained in:
Alejandro 2023-03-07 10:52:34 +01:00 committed by GitHub
parent 5e2236dbfd
commit d7956ea73b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -415,6 +415,12 @@ impl From<Vec<&str>> for Value {
}
}
impl From<Vec<String>> for Value {
fn from(v: Vec<String>) -> Self {
Value::Array(Array::from(v))
}
}
impl From<Vec<i32>> for Value {
fn from(v: Vec<i32>) -> Self {
Value::Array(Array::from(v))