Skip to content

market_data: historical encoder takes WhatToShow, not Option - #962

Open
tradatious wants to merge 1 commit into
wboayue:mainfrom
tradatious:historical-what-to-show-required
Open

tradatious wants to merge 1 commit into
wboayue:mainfrom
tradatious:historical-what-to-show-required

Conversation

@tradatious

Copy link
Copy Markdown
Contributor

Description

encode_request_historical_data and validate_historical_data took Option<WhatToShow>, but
every caller has passed Some(..) since the public API made what_to_show required (#573). They
now take WhatToShow.

impl ToField for Option<WhatToShow> is removed with it; ToField is crate-private and nothing
else used the impl. The historical-data request builder used by the tests takes a plain
WhatToShow too, defaulting to Trades.

No wire change.

Testing

The existing request-byte tests for historical_data, historical_data_stream and
historical_schedule pass with only the Some(..) wrappers removed from their expected requests.
cargo fmt --check; clippy, rustdoc (-D warnings) and cargo test on all three feature
configurations; cargo build --examples both ways; integration crates built.

Breaking changes

No. Crate-internal.

encode_request_historical_data and validate_historical_data take a
WhatToShow; every caller passed Some since the public API made it
required (wboayue#573). The ToField impl for Option<WhatToShow> goes with it.
No wire change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant