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: primitive_block_iterator.rs
    path of file: ./repos/risinglight/src/storage/secondary/block
    
    the code of the file until where you have to start completion: // Copyright 2024 RisingLight Project Authors. Licensed under Apache-2.0.

use std::marker::PhantomData;

use super::super::PrimitiveFixedWidthEncode;
use super::{Block, BlockIterator, NonNullableBlockIterator};
use crate::array::{Array
    
    fn test_scan_i32() {
        let mut builder = PlainPrimitiveBlockBuilder::<i32>::new(128);
        builder.append(Some(&1));
        builder.append(Some(&2));
        builder.append(Some(&3));
        let data = builder.finish();

        let mut scanner = PlainPrimitiveBlockIterator::<i32>::new(Bytes::from(data), 3);

        let mut builder = I32ArrayBuilder::new();

        scanner.skip(1);
        assert_eq!(scanner.remaining_items(), 2);

        assert_eq!(scanner.next_batch(Some(1), &mut builder), 1);
        assert_eq!(builder.finish().to_vec(), vec![Some(2)]);

        let mut builder = I32ArrayBuilder::new();
        assert_eq!(scanner.next_batch(Some(2), &mut builder), 1);

        assert_eq!(builder.finish().to_vec(), vec![Some(3)]);

        let mut builder = I32ArrayBuilder::new();
        assert_eq!(scanner.next_batch(None, &mut builder), 0);
    }