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:
Jan-Peter von Hunnius 2026-05-06 00:30:56 +02:00
parent 32c4d3c10e
commit 6a68469239
4 changed files with 2374 additions and 168 deletions

6
.gitignore vendored Normal file
View file

@ -0,0 +1,6 @@
/target
.idea/
my_cars.json
cars_repo.json
tracks_repo.json
times/