Deserialising array from `Value` allows extraneous values
Closed this issue · 0 comments
juntyr commented
The following should fail as the array is of length two but three elements are provided.
let err = Value::Seq(vec![
Value::Number(Number::new(1)),
Value::Number(Number::new(2)),
Value::Number(Number::new(3)),
])
.into_rust::<[i32; 2]>()
.unwrap_err();
However, deserialising succeeds.