Reverse the elements of the list in place
(
mc: &'gc Mutation<'gc>,
receiver: Value<'gc>,
_args: Vec<Value<'gc>>,
)
| 348 | |
| 349 | // Reverse the elements of the list in place |
| 350 | fn reverse<'gc>( |
| 351 | mc: &'gc Mutation<'gc>, |
| 352 | receiver: Value<'gc>, |
| 353 | _args: Vec<Value<'gc>>, |
| 354 | ) -> Result<Value<'gc>, VmError> { |
| 355 | let list = receiver.as_array()?; |
| 356 | |
| 357 | let mut list_mut = list.borrow_mut(mc); |
| 358 | list_mut.data.reverse(); |
| 359 | |
| 360 | Ok(receiver) |
| 361 | } |
nothing calls this directly
no test coverage detected