4 个版本
0.1.8 | 2020 年 8 月 22 日 |
---|---|
0.1.7 | 2020 年 8 月 1 日 |
0.1.6 | 2020 年 5 月 24 日 |
0.1.5 | 2019 年 12 月 1 日 |
#172 在 值格式化
每月 24 次下载
13MB
107 行
filter-city
__ _ _ _ _ _
/ _(_) | |_ ___ _ __ ___(_) |_ _ _
| |_| | | __/ _ \ '__|____ / __| | __| | | |
| _| | | || __/ | |_____| (__| | |_| |_| |
|_| |_|_|\__\___|_| \___|_|\__|\__, |
|___/
By Stéphane Bressani
____ _ _
/ ___|| |_ ___ _ __ | |__ __ _ _ __ ___
\___ \| __/ _ \ '_ \| '_ \ / _` | '_ \ / _ \
___) | || __/ |_) | | | | (_| | | | | __/
|____/ \__\___| .__/|_| |_|\__,_|_| |_|\___|
| |stephane-bressani.ch
|_|github.com/stephaneworkspace
简介
此程序允许在 JSON 文件中搜索全球所有地区的 ASCII 城市名称。最初我用 Python 编写了一个脚本,但速度非常慢。
此代码非常慢
为了更好的性能,我推荐以下代码: https://github.com/stephaneworkspace/city_time_zone_sqlite (不在 crate 上)
准备
您需要在我的 github 上下载 assets 文件夹,并将其放在与 ./src/main.rs 和 ./Cargo.toml 同一级别的目录中。
- ./assets/city.json
使用
extern crate filter_city;
let search: Vec<filter_city::City> = filter_city::filter_city("Search...");
版本
- 0.1.7 添加多线程代码
- 0.1.6 优化
- 0.1.5 此程序允许在 JSON 文件中搜索全球所有地区的 ASCII 城市名称。
- 旧版本 已撤回