pub fn from_csv<P>(path: P) -> Result<Vec<City>, Error>
    where
        P: AsRef<Path>,
    {
        let mut csv_reader = Reader::from_path(path)?;
        let mut cities: Vec<City> = vec![];
        for record in csv_reader.deserialize() {
            cities.push(record?);
        }

        Ok(cities)
    }
/// Read a CSV file and populate a Vector of Cities.
Read a CSV file and populate a Vector of Cities.
Read a CSV file and populate a Vector of Cities .
pub fn from_csv<P>(path: P) -> Result<Vec<City>, Error>
    where
        P: AsRef<Path>,
    {
        let mut csv_reader = Reader::from_path(path)?;
        let mut cities: Vec<City> = vec![];
        for record in csv_reader.deserialize() {
            cities.push(record?);
        }
        Ok(cities)
    }
pub fn from_csv < P > ( path : P ) -> Result < Vec < City > , Error > where P : AsRef < Path > , { let mut csv_reader = Reader :: from_path ( path ) ? ; let mut cities : Vec < City > = vec ! [ ] ; for record in csv_reader . deserialize ( ) { cities . push ( record ? ) ; } Ok ( cities ) }
Read a CSV file and populate a Vector of Cities.
Read a CSV file and populate a Vector of Cities .
path
P
path
P