For the life of me I have no idea why this just produces 52 byte slop each time

use asset_importer::{Importer, Vector3D};
use bytemuck::{Pod, Zeroable, cast_slice};
use clap::{Parser, Subcommand};
use glam::{Vec2, Vec3};
use speedy::Writable;

#[derive(Parser)]
#[command(name = "")]
#[command(about = "")]
struct Cli {
    src: String,
    dst: String,
}

#[derive(Writable)]
struct Model {
    vertex_buffer: Vec<u8>,
    index_buffer: Vec<u8>,
    index_format: IndexFormat,
}

#[repr(C)]
#[derive(Zeroable, Pod, Clone, Copy)]
struct Vertex {
    position: Vec3,
    uv: Vec2,
    normal: Vec3,
}

#[derive(Writable)]
enum IndexFormat {
    U8,
    U16,
    U32,
}

fn main() -> anyhow::Result<()> {
    let cli = Cli::parse();
    let scene = Importer::new().read_file(cli.src).import()?;
    scene
        .meshes()
        .map(|m| {
            let v: Vec<u32> = m.triangle_indices_iter().collect();
            let len = v.len();

            let (index_buffer, index_format) = if len <= u8::MAX as usize {
                let v = v.into_iter().map(|i| i as u8).collect::<Vec<u8>>();
                (
                    cast_slice(&v).to_vec(),
                    IndexFormat::U8,
                )
            } else if len <= u16::MAX as usize {
                let v = v.into_iter().map(|i| i as u16).collect::<Vec<u16>>();
                (
                    cast_slice(&v).to_vec(),
                    IndexFormat::U16,
                )
            } else {
                (
                    cast_slice(&v).to_vec(),
                    IndexFormat::U32,
                )
            };
            Model {
                vertex_buffer: {
                    let v = m.vertices_iter()
                            .zip(m.texture_coords_iter(0))
                            .zip(m.normals_iter())
                            .zip(m.bones().map(|b| {}))
                            .map(|(((i1, i2), i3), i4)| Vertex {
                                position: Vec3::new(i1.x, i1.y, i1.z),
                                uv: Vec2::new(i2.x, i2.y),
                                normal: Vec3::new(i3.x, i3.y, i3.z),
                            })
                            .collect::<Vec<Vertex>>();
                    let v: &[u8] = cast_slice(
                        &v
                    );
                    v.to_vec()
                },
                index_buffer,
                index_format,
            }
        })
        .collect::<Vec<Model>>()
        .write_to_file(cli.dst)?;
    Ok(())
}

It cuts the iterator down to length of m.bones(), could that be the issue?

That seems to have been the cause. Thank you.