Horje
rust create hashmap from delimited data in string Code Example
[Solved] - rust create hashmap from delimited data in string Code Example
Try following codes
rust create hashmap from delimited data in string
use std::collections::HashMap;

let states: HashMap<_, _> = "AZ CA ID IN MA OK PA VA"
    .split(' ')
    .zip(
        "Arizona California Idaho Indiana Massachusetts Oklahoma Pennsylvania Virginia"
            .split(' '),
    )
    .collect();    
Date: 2022-05-21 05:02:10
Category: rust
More for You