You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: to_mutable.rs
    path of file: ./repos/databend/src/common/arrow/tests/it/arrow/array/primitive
    
    the code of the file until where you have to start completion: // Copyright 2020-2022 Jorge C. Leit√£o
// Copyright 2021 Datafuse Labs
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You ma
    
fn array_to_mutable() {
    let data = vec![1, 2, 3];
    let arr = PrimitiveArray::new(DataType::Int32, data.into(), None);

    // to mutable push and freeze again
    let mut mut_arr = arr.into_mut().unwrap_right();
    mut_arr.push(Some(5));
    let immut: PrimitiveArray<i32> = mut_arr.into();
    assert_eq!(immut.values().as_slice(), [1, 2, 3, 5]);

    // let's cause a realloc and see if miri is ok
    let mut mut_arr = immut.into_mut().unwrap_right();
    mut_arr.extend_constant(256, Some(9));
    let immut: PrimitiveArray<i32> = mut_arr.into();
    assert_eq!(immut.values().len(), 256 + 4);
}