Closed davidpdrsn closed 5 months ago
This fixes a few issues with arrays that I discovered:
<[T; N]>::from_reflect
Value::List
Vec::as_array
Vec::as_array_mut
Vec::into_array
Some(_)
Value::as_array
Value::as_array_mut
Value::into_array
Basically lists are a subtype of arrays so if something is a list then its also an array, i.e. as_array should work on a &dyn List.
as_array
&dyn List
Checklist
Description of Changes
This fixes a few issues with arrays that I discovered:
<[T; N]>::from_reflect
forValue::List
would previously fail. It now works if the lengths match.Vec::as_array
,Vec::as_array_mut
,Vec::into_array
now correctly returnSome(_)
.Value::as_array
,Value::as_array_mut
,Value::into_array
now correctly returnSome(_)
forValue::List
.Basically lists are a subtype of arrays so if something is a list then its also an array, i.e.
as_array
should work on a&dyn List
.