Modernize dependencies, add wishlist features, improve error handling
- Remove once_cell and serde dependencies; use std::sync::LazyLock and manual serde_json::Value parsing instead - Add wishlist support: load wishlist from my_cars.json, prefix missing cars with '+' in missing mode, add 'wishlist' command to show stale wishlist entries (prefixed with '-') - Replace unwrap()/expect() with graceful eprintln warnings and early returns throughout (get_car_list, parse_car_times, etc.) - Scope all Mutex locks tightly to avoid holding during I/O (print_best_times, print_best_cars, print_trash, print_wishlist_stale) - Replace custom split_prefix_postfix with str::split_once - Pass owned-car set into parse_all_times/parse_car_times via Arc<HashSet> instead of reading file per task - Consolidate my_cars.json loading into single load_my_cars_data() returning both owned and wishlist sets - Add .gitignore and Cargo.lock to version control - Report task failures in parse_all_times join loop
This commit is contained in:
parent
32c4d3c10e
commit
6a68469239
4 changed files with 2374 additions and 168 deletions
|
|
@ -17,8 +17,6 @@ reqwest = "0.12.15"
|
|||
tokio = { version = "1.44.1", features = ["full"] }
|
||||
serde_json = "1.0.140"
|
||||
futures = "0.3.31"
|
||||
once_cell = "1.20.2"
|
||||
serde = { version = "1.0.210", features = ["derive"] }
|
||||
|
||||
[dev-dependencies]
|
||||
tempfile = "3.10.1"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue