pub fn try_shorten(comparison: &str) -> Option<&'static str> {
    Some(match comparison {
        personal_best::NAME => personal_best::SHORT_NAME,
        world_record::NAME => world_record::SHORT_NAME,
        average_segments::NAME => average_segments::SHORT_NAME,
        median_segments::NAME => median_segments::SHORT_NAME,
        balanced_pb::NAME => balanced_pb::SHORT_NAME,
        best_segments::NAME => best_segments::SHORT_NAME,
        best_split_times::NAME => best_split_times::SHORT_NAME,
        latest_run::NAME => latest_run::SHORT_NAME,
        none::NAME => none::SHORT_NAME,
        worst_segments::NAME => worst_segments::SHORT_NAME,
        _ => return Option::None,
    })
}
/// Tries to shorten a comparison name. If the name of the comparison matches one
/// of the comparison generators, the short name of that comparison generator is
/// returned.
Tries to shorten a comparison name. If the name of the comparison matches one
of the comparison generators, the short name of that comparison generator is
returned.
Tries to shorten a comparison name . If the name of the comparison matches one of the comparison generators the short name of that comparison generator is returned .
pub fn try_shorten(comparison: &str) -> Option<&'static str> {
    Some(match comparison {
        personal_best::NAME => personal_best::SHORT_NAME,
        world_record::NAME => world_record::SHORT_NAME,
        average_segments::NAME => average_segments::SHORT_NAME,
        median_segments::NAME => median_segments::SHORT_NAME,
        balanced_pb::NAME => balanced_pb::SHORT_NAME,
        best_segments::NAME => best_segments::SHORT_NAME,
        best_split_times::NAME => best_split_times::SHORT_NAME,
        latest_run::NAME => latest_run::SHORT_NAME,
        none::NAME => none::SHORT_NAME,
        worst_segments::NAME => worst_segments::SHORT_NAME,
        _ => return Option::None,
    })
}
pub fn try_shorten ( comparison : & str ) -> Option < & ' static str > { Some ( match comparison { personal_best :: NAME => personal_best :: SHORT_NAME , world_record :: NAME => world_record :: SHORT_NAME , average_segments :: NAME => average_segments :: SHORT_NAME , median_segments :: NAME => median_segments :: SHORT_NAME , balanced_pb :: NAME => balanced_pb :: SHORT_NAME , best_segments :: NAME => best_segments :: SHORT_NAME , best_split_times :: NAME => best_split_times :: SHORT_NAME , latest_run :: NAME => latest_run :: SHORT_NAME , none :: NAME => none :: SHORT_NAME , worst_segments :: NAME => worst_segments :: SHORT_NAME , _ => return Option :: None , } ) }
Tries to shorten a comparison name.
Tries to shorten a comparison name .
comparison
&str
comparison
&str