refactor: extract lib.rs, remove club module, add bounded concurrency
- 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
This commit is contained in:
parent
6a68469239
commit
89fa69e3c8
14 changed files with 874 additions and 2037 deletions
141
track_names.json
Normal file
141
track_names.json
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
{
|
||||
"airplaneHangars": "Airplane Hangars",
|
||||
"airplaneSlalom": "Airplane Slalom",
|
||||
"butte": "Butte",
|
||||
"canyonButte": "Canyon Butte",
|
||||
"canyonDtRoad": "Canyon Dirt Road",
|
||||
"canyonLookout": "Canyon Lookout",
|
||||
"carPark": "Car Park",
|
||||
"cross": "Cross-Country",
|
||||
"csMed": "City Streets Medium",
|
||||
"csSmall": "City Streets Small",
|
||||
"dealsGap": "Deals Gap",
|
||||
"dealsGap1": "Deals Gap Relay 1",
|
||||
"dealsGap2": "Deals Gap Relay 2",
|
||||
"dealsGap3": "Deals Gap Relay 3",
|
||||
"dealsGap4": "Deals Gap Relay 4",
|
||||
"dealsGap5": "Deals Gap Relay 5",
|
||||
"dealsGapBack": "Deals Gap Backroads",
|
||||
"desertBig": "Desert Rally Big",
|
||||
"desertHill": "Desert Rally Hill",
|
||||
"desertRallyDirt": "Desert Rally Dirt",
|
||||
"desertSmall": "Desert Rally Small",
|
||||
"dockAltCirc": "Dockyard Alternative Circuit",
|
||||
"dockCirc": "Dockyard Circuit",
|
||||
"dockCity": "Dockyard City Streets",
|
||||
"dockGforceDrag": "Dockyard G-Force Drag",
|
||||
"dockKart": "Dockyard Karting",
|
||||
"dockUdrag": "Dockyard U-Drag",
|
||||
"drag100": "0-100mph",
|
||||
"drag100150": "100-150mph",
|
||||
"drag100b": "0-100-0mph",
|
||||
"drag120": "0-120mph",
|
||||
"drag124": "0-124mph",
|
||||
"drag150": "0-150mph",
|
||||
"drag150b": "0-150-0mph",
|
||||
"drag170": "0-170mph",
|
||||
"drag200": "0-200mph",
|
||||
"drag30130": "30-130mph",
|
||||
"drag50150": "50-150mph",
|
||||
"drag60": "0-60mph",
|
||||
"drag60b": "0-60-0mph",
|
||||
"drag62": "0-62mph",
|
||||
"drag75125": "75-125mph",
|
||||
"draglshape": "L-Shape Drag",
|
||||
"dtRoad": "Dirt Road",
|
||||
"fast": "Fast Circuit",
|
||||
"fastr": "Fast Circuit R",
|
||||
"fieldSlalom": "Field Slalom",
|
||||
"figureEight": "Figure Of Eight",
|
||||
"forest": "Forest Road",
|
||||
"forestRiver": "Forest River Crossing",
|
||||
"forestSlalom": "Forest Slalom",
|
||||
"frozenLake": "Frozen Lake",
|
||||
"frozenRivSla": "Frozen River Slalom",
|
||||
"gForce": "G-Force Test",
|
||||
"gForcer": "G-Force Test R",
|
||||
"hairpin": "Hairpin Road",
|
||||
"hClimb": "Hill Climb",
|
||||
"hClimbr": "Hill Climb R",
|
||||
"indoorKart": "Indoor Karting",
|
||||
"kart": "Karting Circuit",
|
||||
"laguna": "Laguna Seca",
|
||||
"lookout": "Lookout",
|
||||
"lumberForest": "Lumber Mill Forest Rally",
|
||||
"lumberRiver": "Lumber Mill River Rally",
|
||||
"lumberTwisty": "Lumber Mill Twisty Circuit",
|
||||
"miBeachDrag": "Miami Beach Drag",
|
||||
"miBridge": "Miami Bridge",
|
||||
"miCause": "Miami Causeway",
|
||||
"miCauseDrag": "Miami Causeway Drag",
|
||||
"miCircuit": "Miami Circuit",
|
||||
"miFigure": "Miami Figure Of Eight",
|
||||
"miGforce": "Miami G-Force",
|
||||
"miSlalom": "Miami Slalom",
|
||||
"miStreets1": "Miami Streets 1",
|
||||
"miStreets2": "Miami Streets 2",
|
||||
"miUdrag": "Miami U-Drag",
|
||||
"mile1": "1 Mile Drag",
|
||||
"mile1r": "1 Mile Drag R",
|
||||
"mile2": "1/2 Mile Drag",
|
||||
"mile4": "1/4 Mile Drag",
|
||||
"mile4r": "1/4 Mile Drag R",
|
||||
"mnCity": "Monaco Streets",
|
||||
"mnCityLong": "Monaco Streets Long",
|
||||
"mnCityNarrow": "Monaco Narrow Streets",
|
||||
"mnGforce": "Monaco G-Force Test",
|
||||
"mnHairpin": "Monaco Hairpin",
|
||||
"moto": "Motocross Track",
|
||||
"mtHairpin": "Mountain Hairpin",
|
||||
"mtHill": "Mountain Hill Climb",
|
||||
"mtIncline": "Mountain Incline Road",
|
||||
"mtSlalom": "Mountain Slalom",
|
||||
"mtTour": "Mountain Tour",
|
||||
"mtTwisty": "Mountain Twisty Road",
|
||||
"northloop": "North Loop",
|
||||
"northloop1": "North Loop Relay 1",
|
||||
"northloop2": "North Loop Relay 2",
|
||||
"northloop3": "North Loop Relay 3",
|
||||
"northloop4": "North Loop Relay 4",
|
||||
"northloop5": "North Loop Relay 5",
|
||||
"nwCathedral": "New York Cathedral",
|
||||
"nwCircuit": "New York Circuit",
|
||||
"nwDrag": "New York Drag",
|
||||
"nwGforce": "New York G-Force",
|
||||
"nwLoop": "New York Times Square Loop",
|
||||
"nwSlalom": "New York Train Slalom",
|
||||
"nwTour": "New York Central Park Tour",
|
||||
"oceanCity": "Ocean City Streets",
|
||||
"oceanHighway": "Ocean Highway",
|
||||
"oceanLongDrag": "Ocean Long Drag",
|
||||
"oceanParking": "Ocean Parking Lot",
|
||||
"oceanShortDrag": "Ocean Short Drag",
|
||||
"oceanSlalom": "Ocean Beach Slalom",
|
||||
"rallyMed": "Rallycross Medium Circuit",
|
||||
"rallySmall": "Rallycross Small Circuit",
|
||||
"riverSprint": "River Sprint",
|
||||
"runwayDrag": "Runway Drag",
|
||||
"runwayDragSlalom": "Runway Drag & Slalom",
|
||||
"runwayLoop": "Runway Loop",
|
||||
"serviceRoads": "Service Roads",
|
||||
"slalom": "Slalom Test",
|
||||
"slalomr": "Slalom Test R",
|
||||
"smallRoad": "Back Road",
|
||||
"speedbump12km": "Speedbump 1 km",
|
||||
"speedbump1km": "Speedbump 1/2 km",
|
||||
"tCircuit": "Twisty Circuit",
|
||||
"tCircuitr": "Twisty Circuit R",
|
||||
"testBowl": "Test Bowl",
|
||||
"townSlalom": "City Slalom",
|
||||
"townSprint": "City Sprint",
|
||||
"townTour": "City Tour",
|
||||
"testBowlr": "Test Bowl R",
|
||||
"tokyoBridge": "Tokyo Bridge",
|
||||
"tokyoDrag": "Tokyo Drag",
|
||||
"tokyoGforce": "Tokyo G-Force Test",
|
||||
"tokyoLoop": "Tokyo Loop",
|
||||
"tokyoOffRamp": "Tokyo Off-Ramp",
|
||||
"tokyoOverpass": "Tokyo Overpass",
|
||||
"tRoad": "Twisty Road",
|
||||
"waterDrag": "Waterfront Drag"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue