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: utf8_char_indices.rs
    path of file: ./repos/vim-clap/crates/tree_sitter/src
    
    the code of the file until where you have to start completion: /// Efficient version of `String::from_utf8_lossy(input).char_indices()` without allocation.
pub struct UncheckedUtf8CharIndices<'a> {
    input: &'a [u8],
    byte_index: usize,
}

impl<'a> UncheckedUtf8CharIndices<'a> {
    pub fn new(input: &'a [u8]) -> Self {
        Self {
            input,
            byte_index: 0,
        }
    }
}

impl<'a> Iterator for UncheckedUtf8CharIndices<'a> {
    type Item = (usize, char);

    fn next(&mut self) -> Option<Self::Item> {
        if self.byte_index >= self.input.len() {
            return No
    
    fn next(&mut self) -> Option<Self::Item> {
        if self.byte_index >= self.input.len() {
            return None;
        }

        let start_index = self.byte_index;
        match std::str::from_utf8(&self.input[start_index..]) {
            Ok(s) => {
                if let Some(ch) = s.chars().next() {
                    let char_width = ch.len_utf8();
                    self.byte_index += char_width;
                    Some((start_index, ch))
                } else {
                    // Empty string case, handle as needed
                    None
                }
            }
            Err(_) => {
                // Handle the error case (invalid UTF-8) as needed
                None
            }
        }
    }