Show a persistent single-line progress counter ("Downloading track times
for car 1234/7589") while fetch_times downloads timing data. A ProgressBar
from indicatif 0.17 is sized to the car list, cloned into each spawned
download task, and incremented after fetch_car completes so it tracks
completions rather than starts; Arc internals make this safe under the
concurrent semaphore. The bar is cleared via finish_and_clear() before
the error/warning logging loop so retry messages don't garble the line,
and indicatif renders nothing when stderr is not a TTY.
Also apply pending rustfmt reformatting to src/capture/windows.rs
(formatting only, no logic changes).
Library no longer prints to stderr:
- Replace every eprintln! with log::warn! (lib: user_data, http; bin:
parsing, output, commands); initialize env_logger in main with a
warn-level default so output is unchanged unless RUST_LOG is set
- Warn on missing/non-numeric "t" time fields instead of silently
coercing them to 0.0; suppress the per-car NotFound warning (most
cars legitimately have no timing file), keep warnings for real I/O
errors
Ownership and clone cleanup:
- CarCounts no longer duplicates the car database: drop the car_list
field and build car_map by consuming car_list (each Car stored once);
iterate car_map.values() where the list was previously used
- run_analysis takes MyCarsData by value: owned moves into the parse
Arc, owned_configs/copy_count move into CarCounts; only the three
commands that need owned/wishlist afterwards retain their own copy
- is_final_build checks the digits directly (no per-call String
allocation) and treats malformed configs as non-final so they
surface in improve.csv; owned_final_configs becomes a borrowed
rid-to-configs map so the target-exclusion check allocates nothing
- Normalize sum arithmetic to u8 in normalize_to_final_build
Docs and structure:
- Document the first-seen-wins tie-breaking in compute_ideal_wishlist
and the non-final/non-best coverage gap in write_trash_csv
- Extract compare_by_rq_config_brand_name shared by compare_records
and the remove.csv sort; drop the unused _output_dir parameter from
run_track; add a retry_delay helper de-duplicating the three HTTP
backoff sites; rename the shadowed `entry` binding to config_data
- Replace stdout output with structured CSV file generation
- Add wishlist, all commands with --min-count and --max-wishlist flags
- Introduce CarCounts struct for shared analysis computation
- Improve error handling: return Result instead of unwrap/panic
- Add prize field to BestCarRecord
- Remove TODO.md
- Add clap dependency with derive feature for structured CLI argument parsing
- Replace env::args() manual matching with clap subcommands (fetch, best, missing, wishlist, trash, details, track)
- Change print_best_car() signature from (&String, &String, &String) to (&str, &str, u8) for idiomatic Rust
- Add TODO.md tracking known tech debt and planned features
- Update CHANGELOG.md with clap migration details and set v0.2.0 release date
- Extract shared types (Car, BestCarRecord, AnalysisContext) into src/lib.rs
- Replace global static BEST_CARS with injected AnalysisContext for testability
- Add semaphore-bounded concurrency (limit 20) in parse_all_times()
- Replace hardcoded track name match with track_names.json loaded via include_str!
- Replace magic number 115 with const MAX_RQ: u8 = 113
- Improve floating-point tie comparison with TIME_TOLERANCE (5ms) constant
- Remove src/club.rs binary (topdrives.club no longer maintained)
- Remove scraper dependency from Cargo.toml
- Remove tracks.txt (replaced by track_names.json)
- Remove empty/placeholder test bodies
- Improve error handling in get_file() for response body read
- Add load_my_cars_data() combining owned + wishlist extraction in one I/O
- Update CHANGELOG, README, and all docs to reflect changes
- 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