Convert a Rust array of [Value] back into a `Value::vector`. Supplying a single-element array will simply return its contained value.
(x: &[DataValue], vector_type: types::Type)
| 1508 | /// Convert a Rust array of [Value] back into a `Value::vector`. |
| 1509 | /// Supplying a single-element array will simply return its contained value. |
| 1510 | fn vectorizelanes(x: &[DataValue], vector_type: types::Type) -> ValueResult<DataValue> { |
| 1511 | // If the array is only one element, return it as a scalar. |
| 1512 | if x.len() == 1 { |
| 1513 | Ok(x[0].clone()) |
| 1514 | } else { |
| 1515 | vectorizelanes_all(x, vector_type) |
| 1516 | } |
| 1517 | } |
| 1518 | |
| 1519 | /// Convert a Rust array of [Value] back into a `Value::vector`. |
| 1520 | fn vectorizelanes_all(x: &[DataValue], vector_type: types::Type) -> ValueResult<DataValue> { |
no test coverage detected