Report the orders
A candle shop restocks lots, clears sold-out scents and reports orders.
What needs to change
Repair report so the count, the total and the rejected lines all come from the orders.
Reproduce
- The starter does not compile; read the diagnostic before changing the code.
Acceptance criteria
Your review marks · Saved in this browser. Test acceptance is tracked separately.
Notes
The file contains its imports, the physical-record reader, supplied decoder and complete main.
Input: an order file of LF/CRLF physical records, with an optional unterminated final record. Every physical row counts, including blank rows. ASCII space/tab/CR framing is trimmed. The supplied decode_quantity helper returns Ok only for nonempty ASCII decimal digits whose value fits u32, including zero and leading zeros; all other text returns Err. The accepted quantities must also total at most u32::MAX.