A small service builds a summary from incoming items and records successful synchronization in shared state. Right now, the behavior at the boundary between reading and state update is broken in the implementation.
build_summary takes a list of strings and returns a summary string with items in input order, separated by , .Rust 1.85, edition 2021.build_summary for input where the second item produces a read error.build_summary for input where all items are read successfully and there is at least one empty item.Err(...), and the counter does not change.1.parking_lot = 0.12.3cargo test --lockedUse line comments to explain the problem, its impact, the fix and how to test it.