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: substring.rs
    path of file: ./repos/vim-clap/crates/matcher/src/algo
    
    the code of the file until where you have to start completion: use crate::Score;
use types::CaseMatching;

fn find_start_at(slice: &str, start_at: usize, pat: &str) -> Option<usize> {
    slice[start_at..].find(pat).map(|i| start_at + i)
}

fn _substr_indices_impl(haystack: &str, niddle: &str) -> Option<(f64, Vec<usize>)> {
    let niddle = niddle.to_lowercase();

    if let Some(idx) = find_start_at(haystack, 0, &niddle) {
        let mut positions = Vec::new();

        // For build without overflow checks this could be written as
        // `let mut pos = idx - 1;` with `|| { pos += 1; pos }` closure.
        let mut pos = idx;
        positions.resize_
    
fn _substr_indices_impl(haystack: &str, niddle: &str) -> Option<(f64, Vec<usize>)> {
    let niddle = niddle.to_lowercase();

    if let Some(idx) = find_start_at(haystack, 0, &niddle) {
        let mut positions = Vec::new();

        // For build without overflow checks this could be written as
        // `let mut pos = idx - 1;` with `|| { pos += 1; pos }` closure.
        let mut pos = idx;
        positions.resize_with(
            niddle.len(),
            // Simple endless iterator for `idx..` range. Even though it's endless,
            // it will iterate only `sub_niddle.len()` times.
            || {
                pos += 1;
                pos - 1
            },
        );

        if let Some(last_pos) = positions.last() {
            let match_len = (last_pos + 1 - positions[0]) as f64;

            let score =
                (2f64 / (positions[0] + 1) as f64) + 1f64 / (last_pos + 1) as f64 - match_len;

            return Some((score, positions));
        }
    }

    None
}