pub fn depth_measurement(path: &str) -> i32 {
    let measurements = parse(path);
    let measurement_cap = measurements.len() - 1;
    let mut depth_increase = 0;

    for (i, measurement) in measurements.iter().enumerate() {
        if i == measurement_cap {
            return depth_increase
        }
        else if &measurements[i+1] > measurement { 
            depth_increase += 1 
        }
    }

    return depth_increase;
}
// Part one: counts no. of measurement's larger than the previous measurement
Part one: counts no. of measurement's larger than the previous measurement
Part one : counts no . of measurement ' s larger than the previous measurement
pub fn depth_measurement(path: &str) -> i32 {
    let measurements = parse(path);
    let measurement_cap = measurements.len() - 1;
    let mut depth_increase = 0;
    for (i, measurement) in measurements.iter().enumerate() {
        if i == measurement_cap {
            return depth_increase
        }
        else if &measurements[i+1] > measurement { 
            depth_increase += 1 
        }
    }
    return depth_increase;
}
pub fn depth_measurement ( path : & str ) -> i32 { let measurements = parse ( path ) ; let measurement_cap = measurements . len ( ) - 1 ; let mut depth_increase = 0 ; for ( i , measurement ) in measurements . iter ( ) . enumerate ( ) { if i == measurement_cap { return depth_increase } else if & measurements [ i + 1 ] > measurement { depth_increase += 1 } } return depth_increase ; }
Part one: counts no.
Part one : counts no .
path
&str