diff --git a/Cargo.toml b/Cargo.toml index 8f90fd58..a7df99b2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ibapi" -version = "0.4.3" +version = "0.5.0" edition = "2021" authors = ["Wil Boayue "] description = "A synchronous implementation of the Interactive Brokers TWS API." diff --git a/contributors/README.md b/contributors/README.md index 0230f05b..6429f253 100644 --- a/contributors/README.md +++ b/contributors/README.md @@ -13,3 +13,29 @@ RUST_LOG=debug cargo run --bin find_contract_details `RUST_LOG=debug` `IBAPI_RECORDING_DIR=/tmp` + +## Creating and publishing releases. + +1. Make sure build is clean and tests are passing. + +```bash +cargo build --all-targets +cargo test +``` + +2. Update version number in [Cargo.toml](https://github.com/wboayue/rust-ibapi/blob/76033d170f2b87d55ed2cd96fef17bf124161d5f/Cargo.toml#L3) using [semantic versioning](https://semver.org/). Commit and push. + +3. Create tag with new version number and push. + +```bash +git tag v0.4.0 main +git push origin tag v0.4.0 +``` + +4. [Create release](https://github.com/wboayue/rust-ibapi/releases/new) pointing to new tag. Describe changes in release. + +5. Publish to crates.io + +```bash +cargo publish +``` \ No newline at end of file diff --git a/examples/tick_by_tick.rs b/examples/tick_by_tick.rs index 68793578..97f775dc 100644 --- a/examples/tick_by_tick.rs +++ b/examples/tick_by_tick.rs @@ -42,7 +42,7 @@ fn main() { thread::sleep(Duration::from_secs(5)); } -fn stream_last(client: &mut Client, symbol: &str) -> anyhow::Result<()> { +fn stream_last(client: &mut Client, _symbol: &str) -> anyhow::Result<()> { let contract = contract_gc(); let ticks = client.tick_by_tick_last(&contract, 0, false)?; @@ -87,7 +87,7 @@ fn stream_all_last(client: &Client, symbol: &str) -> anyhow::Result<()> { Ok(()) } -fn stream_bid_ask(client: &mut Client, symbol: &str) -> anyhow::Result<()> { +fn stream_bid_ask(client: &mut Client, _symbol: &str) -> anyhow::Result<()> { let contract = contract_es(); let ticks = client.tick_by_tick_bid_ask(&contract, 0, false)?; @@ -98,7 +98,7 @@ fn stream_bid_ask(client: &mut Client, symbol: &str) -> anyhow::Result<()> { Ok(()) } -fn stream_mid_point(client: &mut Client, symbol: &str) -> anyhow::Result<()> { +fn stream_mid_point(client: &mut Client, _symbol: &str) -> anyhow::Result<()> { let contract = contract_es(); let ticks = client.tick_by_tick_midpoint(&contract, 0, false)?; diff --git a/src/contracts/encoders.rs b/src/contracts/encoders.rs index 8ceed697..f51c4c74 100644 --- a/src/contracts/encoders.rs +++ b/src/contracts/encoders.rs @@ -81,7 +81,6 @@ pub(crate) fn request_market_rule(market_rule_id: i32) -> Result