display_groups/sync: cover Deref + IntoIterator impls (#562)
* display_groups/sync: cover Deref + IntoIterator impls Adds three tests exercising the previously-uncovered trait impls on DisplayGroupSubscription: - Subscription<T>::next reached via Deref::deref - (&sub).into_iter (the borrowed IntoIterator impl) - sub.into_iter (the owned, consuming IntoIterator impl) Extracts a stubbed_subscription helper + display_group_update_response encoder so the four tests share fixture construction. Coverage 76% → 96% lines, 82% → 96% regions, 50% → 100% functions. The 3 remaining lines are panic! arms inside let-else patterns, unreachable when tests pass. * /simplify pass: named constants, MessageBusStub::with_responses, dedupe - stubbed_subscription: replace inline MessageBusStub literal with MessageBusStub::with_responses (existing constructor) - display_group_update_response: derive from IncomingMessages::DisplayGroupUpdated and TEST_REQ_ID_FIRST instead of magic 68 / 9000 - Client::stubbed: server_versions::LINKING (the actual gate per C# EClient.cs:3449) instead of magic 176 - Drop the now-redundant WHAT comment on display_group_update_response - Collapse 3 near-identical test bodies via assert_first_data_eq helper - Hoist top-of-mod use for SubscriptionItem (was triplicated per test) Side-effect: coverage 96% → 98.6% lines because helper consolidation reduced instrumented sites. Async sibling display_groups/async.rs has the same 176/9000/68 warts but is out of scope; can be aligned in a separate sweep.
W
Wil Boayue committed
f7549231dec5dfce2f58ba9e8d658cc730fb0ed5
Parent: 48554f2
Committed by GitHub <noreply@github.com>
on 5/12/2026, 4:36:12 AM