(value: &SceneValue, line_no: usize)
| 76 | } |
| 77 | |
| 78 | fn parse_params(value: &SceneValue, line_no: usize) -> Result<Vec<AnimationParam>, String> { |
| 79 | let SceneValue::Array(items) = value else { |
| 80 | return Err(format!("line {}: params must be an array", line_no)); |
| 81 | }; |
| 82 | |
| 83 | let mut out = Vec::with_capacity(items.len()); |
| 84 | for item in items.iter() { |
| 85 | out.push(parse_param(item, line_no)?); |
| 86 | } |
| 87 | Ok(out) |
| 88 | } |
| 89 | |
| 90 | fn parse_param(value: &SceneValue, line_no: usize) -> Result<AnimationParam, String> { |
| 91 | match value { |
no test coverage detected