pub fn life_support_rating(path: &str) -> u32 {
    let diagnostic_report = parse(path);

    let oxygen_generator_rating = find_rating(0, diagnostic_report.clone(), "oxygen");
    let co2_scrubber_rating = find_rating(0, diagnostic_report.clone(), "co2");

    return to_decimal(&oxygen_generator_rating) * to_decimal(&co2_scrubber_rating)
}
// Part two: Find the life support rating
// yes yes this is a terrible terrible solution. Believe me I know.
// I have been stuck on this for several days. I suck so bad @ rust.
//  ----------------/// -----------
//  * I tried scan, reduce(rust has fold) no luck.
//  * I tried mutating the Vector while iterating. The compiler got mad.
//    reasonable, but annoying nonetheless.
//  * When I have a better grasp on rust perhaps I can better express this problem
//   in some idomatic manner rather than copy pasta my elixir solution with bad modifications.
//  * I know, recursion on unbounded inputs is a terrible idea in rust... I just don't know what to do.
Part two: Find the life support rating
yes yes this is a terrible terrible solution. Believe me I know.
I have been stuck on this for several days. I suck so bad @ rust.

I tried scan, reduce(rust has fold) no luck.
I tried mutating the Vector while iterating. The compiler got mad.
reasonable, but annoying nonetheless.
When I have a better grasp on rust perhaps I can better express this problem
in some idomatic manner rather than copy pasta my elixir solution with bad modifications.
I know, recursion on unbounded inputs is a terrible idea in rust... I just don't know what to do.
Part two : Find the life support rating yes yes this is a terrible terrible solution . Believe me I know . I have been stuck on this for several days . I suck so bad @ rust . I tried scan reduce ( rust has fold ) no luck . I tried mutating the Vector while iterating . The compiler got mad . reasonable but annoying nonetheless . When I have a better grasp on rust perhaps I can better express this problem in some idomatic manner rather than copy pasta my elixir solution with bad modifications . I know recursion on unbounded inputs is a terrible idea in rust ... I just don ' t know what to do .
pub fn life_support_rating(path: &str) -> u32 {
    let diagnostic_report = parse(path);
    let oxygen_generator_rating = find_rating(0, diagnostic_report.clone(), "oxygen");
    let co2_scrubber_rating = find_rating(0, diagnostic_report.clone(), "co2");
    return to_decimal(&oxygen_generator_rating) * to_decimal(&co2_scrubber_rating)
}
pub fn life_support_rating ( path : & str ) -> u32 { let diagnostic_report = parse ( path ) ; let oxygen_generator_rating = find_rating ( 0 , diagnostic_report . clone ( ) , " " ) ; let co2_scrubber_rating = find_rating ( 0 , diagnostic_report . clone ( ) , " " ) ; return to_decimal ( & oxygen_generator_rating ) * to_decimal ( & co2_scrubber_rating ) }
Part two: Find the life support rating
yes yes this is a terrible terrible solution.
Part two : Find the life support rating yes yes this is a terrible terrible solution .
path
&str