city_time_zone_sqlite 0.1.0

City query search
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use city_time_zone_sqlite::{seed_db, AppError};
use std::panic;

const PATH: &str = "assets/citys.json";
const PATH_TZ: &str = "assets/tz_utc.json";

/// If the files are missing, you can download here :
///
/// https://raw.githubusercontent.com/stephaneworkspace/city_time_zone_sqlite/master/assets/citys.json
/// https://raw.githubusercontent.com/stephaneworkspace/city_time_zone_sqlite/master/assets/tz_utc.json
fn main() {
    match seed_db(PATH, PATH_TZ) {
        Ok(()) => {}
        Err(AppError { err_type, message }) => {
            panic!("{:?} {}", err_type, message)
        }
    }
}