pub fn lookup_version(api_key: AdminPublicApiKey, versions: &[ApiVersionKey]) -> Option<i16> {
    for version in versions {
        if version.api_key == api_key as i16 {
            return Some(version.max_version);
        }
    }
    None
}
/// Given an API key, it returns max_version. None if not found
Given an API key, it returns max_version. None if not found
Given an API key it returns max_version . None if not found
pub fn lookup_version(api_key: AdminPublicApiKey, versions: &[ApiVersionKey]) -> Option<i16> {
    for version in versions {
        if version.api_key == api_key as i16 {
            return Some(version.max_version);
        }
    }
    None
}
pub fn lookup_version ( api_key : AdminPublicApiKey , versions : & [ ApiVersionKey ] ) -> Option < i16 > { for version in versions { if version . api_key == api_key as i16 { return Some ( version . max_version ) ; } } None }
Given an API key, it returns max_version.
Given an API key it returns max_version .
api_key
AdminPublicApiKey
versions
&[ApiVersionKey]
api_key
AdminPublicApiKey
versions
&[ApiVersionKey]