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: encoder.rs
    path of file: ./repos/actix-web/actix-http/src/h1
    
    the code of the file until where you have to start completion: use std::{
    cmp,
    io::{self, Write as _},
    marker::PhantomData,
    ptr::copy_nonoverlapping,
    slice::from_raw_parts_m
    
unsafe fn write_camel_case(value: &[u8], buf: *mut u8, len: usize) {
    // first copy entire (potentially wrong) slice to output
    write_data(value, buf, len);

    // SAFETY: We just initialized the buffer with `value`
    let buffer = from_raw_parts_mut(buf, len);

    let mut iter = value.iter();

    // first character should be uppercase
    if let Some(c @ b'a'..=b'z') = iter.next() {
        buffer[0] = c & 0b1101_1111;
    }

    // track 1 ahead of the current position since that's the location being assigned to
    let mut index = 2;

    // remaining characters after hyphens should also be uppercase
    while let Some(&c) = iter.next() {
        if c == b'-' {
            // advance iter by one and uppercase if needed
            if let Some(c @ b'a'..=b'z') = iter.next() {
                buffer[index] = c & 0b1101_1111;
            }
            index += 1;
        }

        index += 1;
    }
}