pub fn top<T>(pairs: T) -> TopVersions
    where
        T: Clone + IntoIterator<Item = (NaiveDateTime, semver::Version)>,
    {
        TopVersions {
            newest: pairs
                .clone()
                .into_iter()
                .max()
                .unwrap_or((
                    NaiveDateTime::from_timestamp(0, 0),
                    default_semver_version(),
                ))
                .1,
            highest: pairs
                .into_iter()
                .map(|(_, v)| v)
                .max()
                .unwrap_or_else(default_semver_version),
        }
    }
/// Return both the newest (most recently updated) and the
/// highest version (in semver order) for a collection of date/version pairs.
Return both the newest (most recently updated) and the
highest version (in semver order) for a collection of date/version pairs.
Return both the newest ( most recently updated ) and the highest version ( in semver order ) for a collection of date / version pairs .
pub fn top<T>(pairs: T) -> TopVersions
    where
        T: Clone + IntoIterator<Item = (NaiveDateTime, semver::Version)>,
    {
        TopVersions {
            newest: pairs
                .clone()
                .into_iter()
                .max()
                .unwrap_or((
                    NaiveDateTime::from_timestamp(0, 0),
                    default_semver_version(),
                ))
                .1,
            highest: pairs
                .into_iter()
                .map(|(_, v)| v)
                .max()
                .unwrap_or_else(default_semver_version),
        }
    }
pub fn top < T > ( pairs : T ) -> TopVersions where T : Clone + IntoIterator < Item = ( NaiveDateTime , semver :: Version ) > , { TopVersions { newest : pairs . clone ( ) . into_iter ( ) . max ( ) . unwrap_or ( ( NaiveDateTime :: from_timestamp ( 0 , 0 ) , default_semver_version ( ) , ) ) . 1 , highest : pairs . into_iter ( ) . map ( | ( _ , v ) | v ) . max ( ) . unwrap_or_else ( default_semver_version ) , } }
Return both the newest (most recently updated) and the
highest version (in semver order) for a collection of date/version pairs.
Return both the newest ( most recently updated ) and the highest version ( in semver order ) for a collection of date / version pairs .
pairs
T