pub fn check_best_segment(timer: &Timer, segment_index: usize, method: TimingMethod) -> bool {
    if timer.run().segment(segment_index).split_time()[method].is_none() {
        return false;
    }

    let delta = previous_segment_delta(timer, segment_index, best_segments::NAME, method);
    let current_segment = previous_segment_time(timer, segment_index, method);
    let best_segment = timer.run().segment(segment_index).best_segment_time()[method];
    best_segment.map_or(true, |b| {
        current_segment.map_or(false, |c| c < b) || delta.map_or(false, |d| d < TimeSpan::zero())
    })
}
/// Calculates whether or not the Split Times for the indicated split qualify as
/// a Best Segment.
///
/// - `timer`: The current timer.
/// - `segment_index`: The split to check.
/// - `method`: The timing method to use.
///
/// Returns whether or not the indicated split is a Best Segment.
Calculates whether or not the Split Times for the indicated split qualify as
a Best Segment.

`timer`: The current timer.
`segment_index`: The split to check.
`method`: The timing method to use.

Returns whether or not the indicated split is a Best Segment.
Calculates whether or not the Split Times for the indicated split qualify as a Best Segment . ` timer ` : The current timer . ` segment_index ` : The split to check . ` method ` : The timing method to use . Returns whether or not the indicated split is a Best Segment .
pub fn check_best_segment(timer: &Timer, segment_index: usize, method: TimingMethod) -> bool {
    if timer.run().segment(segment_index).split_time()[method].is_none() {
        return false;
    }
    let delta = previous_segment_delta(timer, segment_index, best_segments::NAME, method);
    let current_segment = previous_segment_time(timer, segment_index, method);
    let best_segment = timer.run().segment(segment_index).best_segment_time()[method];
    best_segment.map_or(true, |b| {
        current_segment.map_or(false, |c| c < b) || delta.map_or(false, |d| d < TimeSpan::zero())
    })
}
pub fn check_best_segment ( timer : & Timer , segment_index : usize , method : TimingMethod ) -> bool { if timer . run ( ) . segment ( segment_index ) . split_time ( ) [ method ] . is_none ( ) { return false ; } let delta = previous_segment_delta ( timer , segment_index , best_segments :: NAME , method ) ; let current_segment = previous_segment_time ( timer , segment_index , method ) ; let best_segment = timer . run ( ) . segment ( segment_index ) . best_segment_time ( ) [ method ] ; best_segment . map_or ( true , | b | { current_segment . map_or ( false , | c | c < b ) || delta . map_or ( false , | d | d < TimeSpan :: zero ( ) ) } ) }
Calculates whether or not the Split Times for the indicated split qualify as
a Best Segment.
Calculates whether or not the Split Times for the indicated split qualify as a Best Segment .
timer
&Timer
segment_index
usize
method
TimingMethod
timer
&Timer
segment_index
usize
method
TimingMethod