Skip to content

orders: rename good_till_cancel to good_till_canceled - #826

Merged
wboayue merged 2 commits into
mainfrom
good-till-canceled-setter
Sep 20, 2026
Merged

wboayue merged 2 commits into
mainfrom
good-till-canceled-setter

Conversation

@wboayue

@wboayue wboayue commented Sep 20, 2026

Copy link
Copy Markdown
Owner

Review follow-up from #822 (finding #6).

OrderBuilder::good_till_cancel() sets TimeInForce::GoodTillCanceled and sits next to day_till_canceled(). It was the only time-in-force setter whose name matched neither the variant it sets nor its neighbour. #822 spent the breaking change on the "till"/"canceled" spelling everywhere else; doing this now means not paying for it again after 4.0 ships.

Hard rename, no deprecated alias — consistent with how §13 handles the rest of the enum.

  • Setter renamed; doc comments on it and day_till_canceled() now say "canceled", matching the variant.
  • Four in-tree call sites updated (sync_tests.rs, async_tests.rs, two in the builder tests).
  • README.md and docs/order-types.md snippets updated — nothing compiles those fenced blocks, so they were checked by reading.
  • Migration §13 now lists the rename instead of claiming the setter is unchanged; checklist item 13 tells callers to rename.

Gate: cargo fmt --check, three clippy legs, just test (6 legs), rustdoc -D warnings, examples on both feature configs, both integration crates, just rules-check.

The setter sets TimeInForce::GoodTillCanceled and sits next to
day_till_canceled(); it was the one TIF setter whose name matched neither.
#822 spent the breaking change on this spelling everywhere else, so finish it
in the same release rather than pay for it again after 4.0 ships.

Updates the four in-tree call sites, the README and docs/order-types.md
snippets (which nothing compiles), and migration §13.
@wboayue
wboayue merged commit 7f53575 into main Sep 20, 2026
4 checks passed
@wboayue
wboayue deleted the good-till-canceled-setter branch September 20, 2026 23:55
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