client: drop duplicate Subscription re-export; consolidate prelude (#571)
* client: drop duplicate Subscription re-export; consolidate prelude on subscriptions
`ibapi::client::Subscription` was a duplicate of `ibapi::subscriptions::Subscription`
with zero in-crate consumers — only `prelude.rs:51` reached in via that path.
Drop the `client/mod.rs` re-exports (5 lines) and rewire prelude to source
from `crate::subscriptions` directly. The async path already did; the sync
path's `client::Subscription` indirection was the asymmetry called out in
v3-api-ergonomics.md §2.
Net public-API delta (v3.0):
- Removed: `ibapi::client::Subscription` (duplicate alias).
- Unchanged: `ibapi::subscriptions::Subscription` (canonical), `ibapi::prelude::Subscription`
(prelude convenience, now symmetric), `ibapi::client::blocking::Subscription`
(labelled sync-explicit path; needed when both features are enabled).
The `subscriptions::Subscription` re-export is itself feature-gated at the
source (`subscriptions/mod.rs:32,35` — sync when not-async, async otherwise),
so the prelude re-export collapses to a single unconditional line.
Migration note added at docs/migration-3.0.md §13.
Detailed plan: plans/subscription-canonical-import-path.md.
* /simplify pass: collapse prelude orders re-exports; trim plan drafts
Two findings applied from a code-reuse + quality review pass:
1. `pub use crate::orders::{...}` had two identical RHS lines gated by
mutually exclusive `cfg`s (sync-only vs async) — same anti-pattern
this PR just fixed for `Subscription`. Collapsed to a single
unconditional `pub use` since `lib.rs`'s `compile_error!` guarantees
at least one feature is on.
2. The plan file duplicated the migration-3.0 §13 draft and a concrete
change sketch. Now that the migration note shipped, the draft has
drift risk — replaced with a one-line redirect. Concrete-change
sketch left in place as historical context for the PR.
Also tracked in v3-api-ergonomics.md §2: a follow-up to consolidate
`SharesChannel`'s triple re-export — same shape, separate scope.
Skipped finding: prelude cfg ordering (rustfmt normalizes the order
itself, overriding the human-readable convention). W
Wil Boayue committed
ff3990846ac306cbab57ecafde81bfc7858e07a0
Parent: 6f9c86e
Committed by GitHub <noreply@github.com>
on 5/13/2026, 12:34:52 AM