fn make_menu_data(vers: &[String]) -> HashMap<String, Vec<HashMap<String, String>>> {
    let version_maps = vers.into_iter()
        .map(|ver| {
            let mut map = HashMap::new();
            map.insert("version".to_string(), ver.to_string());
            map
        })
        .collect();
    let mut menu_data = HashMap::new();
    menu_data.insert("versions".to_string(), version_maps);
    menu_data
}
/// Returns a map for mustache template.
/// e.g. {"versions", [{"version", "1.10"}, {"version", "1.9"}, {"version", "1.6"}]}
Returns a map for mustache template.
Returns a map for mustache template .
fn make_menu_data(vers: &[String]) -> HashMap<String, Vec<HashMap<String, String>>> {
    let version_maps = vers.into_iter()
        .map(|ver| {
            let mut map = HashMap::new();
            map.insert("version".to_string(), ver.to_string());
            map
        })
        .collect();
    let mut menu_data = HashMap::new();
    menu_data.insert("versions".to_string(), version_maps);
    menu_data
}
fn make_menu_data ( vers : & [ String ] ) -> HashMap < String , Vec < HashMap < String , String > > > { let version_maps = vers . into_iter ( ) . map ( | ver | { let mut map = HashMap :: new ( ) ; map . insert ( " " . to_string ( ) , ver . to_string ( ) ) ; map } ) . collect ( ) ; let mut menu_data = HashMap :: new ( ) ; menu_data . insert ( " " . to_string ( ) , version_maps ) ; menu_data }
Returns a map for mustache template.
Returns a map for mustache template .
vers
&[String]
vers
&[String]