pub fn finished_trip_time(&self, trip: TripID) -> Option<Duration> {
        // TODO This is so inefficient!
        for (_, id, maybe_mode, dt) in &self.finished_trips {
            if *id == trip {
                if maybe_mode.is_some() {
                    return Some(*dt);
                } else {
                    return None;
                }
            }
        }
        None
    }
// Ignores the current time. Returns None for aborted trips.
Ignores the current time. Returns None for aborted trips.
Ignores the current time . Returns None for aborted trips .
pub fn finished_trip_time(&self, trip: TripID) -> Option<Duration> {
        // TODO This is so inefficient!
        for (_, id, maybe_mode, dt) in &self.finished_trips {
            if *id == trip {
                if maybe_mode.is_some() {
                    return Some(*dt);
                } else {
                    return None;
                }
            }
        }
        None
    }
pub fn finished_trip_time ( & self , trip : TripID ) -> Option < Duration > { // TODO This is so inefficient! for ( _ , id , maybe_mode , dt ) in & self . finished_trips { if * id == trip { if maybe_mode . is_some ( ) { return Some ( * dt ) ; } else { return None ; } } } None }
Ignores the current time.
Ignores the current time .
&self
trip
TripID