[INFO] fetching crate yatws 0.1.7... [INFO] linting yatws-0.1.7 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate yatws 0.1.7 into /workspace/builds/worker-5-tc1/source [INFO] started tweaking crates.io crate yatws 0.1.7 [INFO] finished tweaking crates.io crate yatws 0.1.7 [INFO] tweaked toml for crates.io crate yatws 0.1.7 written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate yatws 0.1.7 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate yatws 0.1.7 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded rusqlite-macros v0.4.1 [INFO] [stderr] Downloaded mockall v0.14.0 [INFO] [stderr] Downloaded toml_datetime v0.7.1 [INFO] [stderr] Downloaded windows-core v0.62.0 [INFO] [stderr] Downloaded cc v1.2.37 [INFO] [stderr] Downloaded sqlite3-parser v0.15.0 [INFO] [stderr] Downloaded bitmask-enum v2.2.5 [INFO] [stderr] Downloaded mockall_derive v0.14.0 [INFO] [stderr] Downloaded suppaftp v7.0.7 [INFO] [stderr] Downloaded lazy-regex v3.4.1 [INFO] [stderr] Downloaded lazy-regex-proc_macros v3.4.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 1b8c342bc989e5537e0d380fa4af76a59c8b16f578635b0df57517b31d91e151 [INFO] running `Command { std: "docker" "start" "-a" "1b8c342bc989e5537e0d380fa4af76a59c8b16f578635b0df57517b31d91e151", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "1b8c342bc989e5537e0d380fa4af76a59c8b16f578635b0df57517b31d91e151", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1b8c342bc989e5537e0d380fa4af76a59c8b16f578635b0df57517b31d91e151", kill_on_drop: false }` [INFO] [stdout] 1b8c342bc989e5537e0d380fa4af76a59c8b16f578635b0df57517b31d91e151 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] c5361a3891c0e3a5a7dc05f7447d531b7500097d07c79013c6bbf404d5621d70 [INFO] running `Command { std: "docker" "start" "-a" "c5361a3891c0e3a5a7dc05f7447d531b7500097d07c79013c6bbf404d5621d70", kill_on_drop: false }` [INFO] [stderr] Compiling serde_core v1.0.228 [INFO] [stderr] Compiling uncased v0.9.10 [INFO] [stderr] Compiling syn v2.0.111 [INFO] [stderr] Compiling cc v1.2.37 [INFO] [stderr] Compiling rand_core v0.6.4 [INFO] [stderr] Compiling indexmap v2.11.3 [INFO] [stderr] Compiling crossbeam-utils v0.8.21 [INFO] [stderr] Checking getrandom v0.3.3 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Compiling phf_shared v0.11.3 [INFO] [stderr] Compiling rand v0.8.5 [INFO] [stderr] Compiling aho-corasick v1.1.3 [INFO] [stderr] Compiling regex-syntax v0.8.6 [INFO] [stderr] Checking futures-channel v0.3.31 [INFO] [stderr] Compiling phf_generator v0.11.3 [INFO] [stderr] Compiling toml_parser v1.0.2 [INFO] [stderr] Compiling phf_codegen v0.11.3 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Compiling toml_datetime v0.7.1 [INFO] [stderr] Checking anstream v0.6.20 [INFO] [stderr] Compiling phf v0.11.3 [INFO] [stderr] Checking socket2 v0.6.1 [INFO] [stderr] Compiling toml_edit v0.23.5 [INFO] [stderr] Compiling bitflags v2.9.4 [INFO] [stderr] Compiling fallible-iterator v0.3.0 [INFO] [stderr] Checking phf_shared v0.12.1 [INFO] [stderr] Checking crossbeam-epoch v0.9.18 [INFO] [stderr] Compiling sqlite3-parser v0.15.0 [INFO] [stderr] Compiling libsqlite3-sys v0.35.0 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Compiling chrono-tz v0.10.4 [INFO] [stderr] Compiling regex-automata v0.4.10 [INFO] [stderr] Compiling rust_decimal v1.39.0 [INFO] [stderr] Compiling proc-macro-crate v3.4.0 [INFO] [stderr] Compiling serde_json v1.0.145 [INFO] [stderr] Checking clap_builder v4.5.53 [INFO] [stderr] Checking futures-lite v2.6.1 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking crossbeam-deque v0.8.6 [INFO] [stderr] Checking phf v0.12.1 [INFO] [stderr] Checking hashlink v0.10.0 [INFO] [stderr] Checking env_filter v0.1.3 [INFO] [stderr] Checking crossbeam-channel v0.5.15 [INFO] [stderr] Checking crossbeam-queue v0.3.12 [INFO] [stderr] Checking csv-core v0.1.12 [INFO] [stderr] Compiling mockall_derive v0.14.0 [INFO] [stderr] Checking csv v1.4.0 [INFO] [stderr] Checking env_logger v0.11.8 [INFO] [stderr] Checking crossbeam v0.8.4 [INFO] [stderr] Checking bincode v2.0.1 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Checking uuid v1.19.0 [INFO] [stderr] Checking inventory v0.3.21 [INFO] [stderr] Checking sdd v3.0.10 [INFO] [stderr] Compiling mockall v0.14.0 [INFO] [stderr] Compiling rusqlite-macros v0.4.1 [INFO] [stderr] Checking predicates v3.1.3 [INFO] [stderr] Checking tempfile v3.23.0 [INFO] [stderr] Checking scc v2.4.0 [INFO] [stderr] Compiling regex v1.11.2 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Compiling tokio-macros v2.6.0 [INFO] [stderr] Compiling thiserror-impl v2.0.17 [INFO] [stderr] Compiling clap_derive v4.5.49 [INFO] [stderr] Compiling lazy-regex-proc_macros v3.4.1 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking tokio v1.48.0 [INFO] [stderr] Checking lazy-regex v3.4.1 [INFO] [stderr] Compiling num_enum_derive v0.7.5 [INFO] [stderr] Compiling bitmask-enum v2.2.5 [INFO] [stderr] Checking thiserror v2.0.17 [INFO] [stderr] Compiling async-trait v0.1.89 [INFO] [stderr] Compiling async-stream-impl v0.3.6 [INFO] [stderr] Checking num_enum v0.7.5 [INFO] [stderr] Checking async-stream v0.3.6 [INFO] [stderr] Compiling serial_test_derive v3.2.0 [INFO] [stderr] Checking clap v4.5.53 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking chrono v0.4.42 [INFO] [stderr] Checking deranged v0.5.3 [INFO] [stderr] Checking quick-xml v0.38.4 [INFO] [stderr] Checking futures-executor v0.3.31 [INFO] [stderr] Checking futures v0.3.31 [INFO] [stderr] Checking serial_test v3.2.0 [INFO] [stderr] Checking suppaftp v7.0.7 [INFO] [stderr] Checking time v0.3.44 [INFO] [stderr] Checking tokio-stream v0.1.17 [INFO] [stderr] Checking tokio-test v0.4.4 [INFO] [stderr] Checking rusqlite v0.37.0 [INFO] [stderr] Checking yatws v0.1.7 (/opt/rustwide/workdir) [INFO] [stdout] warning: unexpected `cfg` condition value: `generate_bindings` [INFO] [stdout] --> src/data_subscription.rs:11:11 [INFO] [stdout] | [INFO] [stdout] 11 | #[cfg(not(feature = "generate_bindings"))] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `shortinv` [INFO] [stdout] = help: consider adding `generate_bindings` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `generate_bindings` [INFO] [stdout] --> src/data_subscription.rs:13:7 [INFO] [stdout] | [INFO] [stdout] 13 | #[cfg(feature = "generate_bindings")] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `shortinv` [INFO] [stdout] = help: consider adding `generate_bindings` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like an `else {..}` but the `else` is missing [INFO] [stdout] --> src/data_subscription.rs:331:137 [INFO] [stdout] | [INFO] [stdout] 331 | ...ttrib: TickAttrib) { if req_id != self.state.req_id { return; } { let mut latest = self.latest_values.lock(); match tick_type { ... [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: to remove this lint, add the missing `else` or add a new line before the next block [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#possible_missing_else [INFO] [stdout] = note: `#[warn(clippy::possible_missing_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `generate_bindings` [INFO] [stdout] --> src/data_subscription.rs:11:11 [INFO] [stdout] | [INFO] [stdout] 11 | #[cfg(not(feature = "generate_bindings"))] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `shortinv` [INFO] [stdout] = help: consider adding `generate_bindings` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `generate_bindings` [INFO] [stdout] --> src/data_subscription.rs:13:7 [INFO] [stdout] | [INFO] [stdout] 13 | #[cfg(feature = "generate_bindings")] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `shortinv` [INFO] [stdout] = help: consider adding `generate_bindings` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like an `else {..}` but the `else` is missing [INFO] [stdout] --> src/data_subscription.rs:331:137 [INFO] [stdout] | [INFO] [stdout] 331 | ...ttrib: TickAttrib) { if req_id != self.state.req_id { return; } { let mut latest = self.latest_values.lock(); match tick_type { ... [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: to remove this lint, add the missing `else` or add a new line before the next block [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#possible_missing_else [INFO] [stdout] = note: `#[warn(clippy::possible_missing_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/client.rs:391:5 [INFO] [stdout] | [INFO] [stdout] 391 | config.enabled = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `rate_limiter::RateLimiterConfig { enabled: true, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/client.rs:390:5 [INFO] [stdout] | [INFO] [stdout] 390 | let mut config = RateLimiterConfig::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/client.rs:420:5 [INFO] [stdout] | [INFO] [stdout] 420 | config.enabled = false; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `rate_limiter::RateLimiterConfig { enabled: false, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/client.rs:419:5 [INFO] [stdout] | [INFO] [stdout] 419 | let mut config = RateLimiterConfig::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/client.rs:704:10 [INFO] [stdout] | [INFO] [stdout] 704 | if error_code_int >= 2000 && error_code_int < 3000 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(2000..3000).contains(&error_code_int)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/client.rs:721:9 [INFO] [stdout] | [INFO] [stdout] 721 | / ClientErrorCode::AlreadyConnected | [INFO] [stdout] 722 | | ClientErrorCode::ConnectFail | [INFO] [stdout] 723 | | ClientErrorCode::UpdateTws | [INFO] [stdout] 724 | | ClientErrorCode::NotConnected | [INFO] [stdout] ... | [INFO] [stdout] 729 | | _ => { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] = note: `#[warn(clippy::wildcard_in_or_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/conn.rs:55:5 [INFO] [stdout] | [INFO] [stdout] 55 | / if let Some(limiter) = &self.rate_limiter { [INFO] [stdout] 56 | | if !limiter.acquire(self.rate_limit_timeout) { [INFO] [stdout] 57 | | return Err(IBKRError::RateLimited("Message rate limit exceeded".to_string())); [INFO] [stdout] 58 | | } [INFO] [stdout] 59 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 55 ~ if let Some(limiter) = &self.rate_limiter [INFO] [stdout] 56 ~ && !limiter.acquire(self.rate_limit_timeout) { [INFO] [stdout] 57 | return Err(IBKRError::RateLimited("Message rate limit exceeded".to_string())); [INFO] [stdout] 58 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression always evaluates to true [INFO] [stdout] --> src/conn.rs:428:38 [INFO] [stdout] | [INFO] [stdout] 428 | let version_payload_full = if !connect_options.is_empty() { format!("{} {}", version_payload, connect_options) } else { versi... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_is_empty [INFO] [stdout] = note: `#[warn(clippy::const_is_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/conn.rs:544:9 [INFO] [stdout] | [INFO] [stdout] 544 | / if let Err(e) = stream.shutdown(std::net::Shutdown::Both) { [INFO] [stdout] 545 | | if e.kind() != std::io::ErrorKind::NotConnected && [INFO] [stdout] 546 | | e.kind() != std::io::ErrorKind::BrokenPipe { [INFO] [stdout] 547 | | warn!("Error shutting down socket: {}", e); [INFO] [stdout] 548 | | } [INFO] [stdout] 549 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 544 ~ if let Err(e) = stream.shutdown(std::net::Shutdown::Both) [INFO] [stdout] 545 ~ && e.kind() != std::io::ErrorKind::NotConnected && [INFO] [stdout] 546 | e.kind() != std::io::ErrorKind::BrokenPipe { [INFO] [stdout] 547 | warn!("Error shutting down socket: {}", e); [INFO] [stdout] 548 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `as_bytes` after slicing a string [INFO] [stdout] --> src/conn_mock.rs:27:29 [INFO] [stdout] | [INFO] [stdout] 27 | bytes.extend_from_slice(s[current_pos..actual_pos].as_bytes()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&s.as_bytes()[current_pos..actual_pos]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#sliced_string_as_bytes [INFO] [stdout] = note: `#[warn(clippy::sliced_string_as_bytes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `as_bytes` after slicing a string [INFO] [stdout] --> src/conn_mock.rs:31:27 [INFO] [stdout] | [INFO] [stdout] 31 | bytes.extend_from_slice(s[current_pos..].as_bytes()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&s.as_bytes()[current_pos..]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#sliced_string_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/financial_report_parser.rs:339:13 [INFO] [stdout] | [INFO] [stdout] 339 | / if let Some(issue) = current_issue.as_mut() { [INFO] [stdout] 340 | | if let Some(id_type) = get_attr_value(&e, b"Type")? { [INFO] [stdout] 341 | | let is_outer_tag_empty = e.is_empty(); // Capture state of the StartEvent itself [INFO] [stdout] ... | [INFO] [stdout] 373 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 339 ~ if let Some(issue) = current_issue.as_mut() [INFO] [stdout] 340 ~ && let Some(id_type) = get_attr_value(&e, b"Type")? { [INFO] [stdout] 341 | let is_outer_tag_empty = e.is_empty(); // Capture state of the StartEvent itself [INFO] [stdout] ... [INFO] [stdout] 371 | } // else: is_outer_tag_empty is true. Tag was . Attributes parsed. No content or separate end tag needed. [INFO] [stdout] 372 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/financial_report_parser.rs:389:13 [INFO] [stdout] | [INFO] [stdout] 389 | / if let Some(issue) = current_issue.as_mut() { [INFO] [stdout] 390 | | if !e.is_empty() { [INFO] [stdout] 391 | | if let Ok(Event::Text(text_e)) = reader.read_event_into(&mut buf) { [INFO] [stdout] 392 | | issue.global_listing_type = Some(text_e.decode().map_err(|e| IBKRError::ParseError(e.to_string()))?.into_owned()); [INFO] [stdout] ... | [INFO] [stdout] 397 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 389 ~ if let Some(issue) = current_issue.as_mut() [INFO] [stdout] 390 ~ && !e.is_empty() { [INFO] [stdout] 391 | if let Ok(Event::Text(text_e)) = reader.read_event_into(&mut buf) { [INFO] [stdout] ... [INFO] [stdout] 395 | } else { return Err(IBKRError::ParseError("Expected text for ".into())); } [INFO] [stdout] 396 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/financial_report_parser.rs:853:3 [INFO] [stdout] | [INFO] [stdout] 853 | / if let Some(contact) = &report.contact_info { [INFO] [stdout] 854 | | if final_company_info.country.is_none() { final_company_info.country = contact.country_name.clone(); } // Get country from co... [INFO] [stdout] 855 | | } [INFO] [stdout] | |___^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 853 ~ if let Some(contact) = &report.contact_info [INFO] [stdout] 854 ~ && final_company_info.country.is_none() { final_company_info.country = contact.country_name.clone(); } // Get country from contact info [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/financial_report_parser.rs:856:3 [INFO] [stdout] | [INFO] [stdout] 856 | / if let Some(web) = &report.web_links { [INFO] [stdout] 857 | | if final_company_info.web_url.is_none() { final_company_info.web_url = web.home_page.clone(); } [INFO] [stdout] 858 | | } [INFO] [stdout] | |___^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 856 ~ if let Some(web) = &report.web_links [INFO] [stdout] 857 ~ && final_company_info.web_url.is_none() { final_company_info.web_url = web.home_page.clone(); } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/financial_report_parser.rs:859:3 [INFO] [stdout] | [INFO] [stdout] 859 | / if let Some(text_item) = report.text_info.iter().find(|t| t.text_type.as_deref() == Some("Business Summary")) { [INFO] [stdout] 860 | | if final_company_info.business_description.is_none() { final_company_info.business_description = text_item.text.clone(); } [INFO] [stdout] 861 | | } [INFO] [stdout] | |___^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 859 ~ if let Some(text_item) = report.text_info.iter().find(|t| t.text_type.as_deref() == Some("Business Summary")) [INFO] [stdout] 860 ~ && final_company_info.business_description.is_none() { final_company_info.business_description = text_item.text.clone(); } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/handler.rs:45:3 [INFO] [stdout] | [INFO] [stdout] 45 | / fn order_status( [INFO] [stdout] 46 | | &self, [INFO] [stdout] 47 | | order_id: i32, [INFO] [stdout] 48 | | order_status: OrderStatus, [INFO] [stdout] ... | [INFO] [stdout] 57 | | mkt_cap_price: Option, // Market cap price for orders benefiting from price improvement [INFO] [stdout] 58 | | ); [INFO] [stdout] | |___^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/handler.rs:95:3 [INFO] [stdout] | [INFO] [stdout] 95 | fn portfolio_value(&self, contract: &Contract, position: f64, market_price: f64, market_value: f64, average_cost: f64, unrealized_pnl: f64, realized_pnl: f64, account_name: &str); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/handler.rs:149:3 [INFO] [stdout] | [INFO] [stdout] 149 | / fn security_definition_option_parameter( [INFO] [stdout] 150 | | &self, [INFO] [stdout] 151 | | req_id: i32, [INFO] [stdout] 152 | | exchange: &str, [INFO] [stdout] ... | [INFO] [stdout] 157 | | strikes: &[f64], // Using slice for borrowing [INFO] [stdout] 158 | | ); [INFO] [stdout] | |___^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/handler.rs:206:3 [INFO] [stdout] | [INFO] [stdout] 206 | / fn tick_efp(&self, req_id: i32, tick_type: TickType, basis_points: f64, formatted_basis_points: &str, [INFO] [stdout] 207 | | implied_futures_price: f64, hold_days: i32, future_last_trade_date: &str, [INFO] [stdout] 208 | | dividend_impact: f64, dividends_to_last_trade_date: f64); [INFO] [stdout] | |______________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/handler.rs:214:3 [INFO] [stdout] | [INFO] [stdout] 214 | / fn real_time_bar(&self, req_id: i32, time: i64, open: f64, high: f64, low: f64, close: f64, [INFO] [stdout] 215 | | volume: f64, wap: f64, count: i32); // Use f64 for Decimal volume/wap [INFO] [stdout] | |_____________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/handler.rs:226:3 [INFO] [stdout] | [INFO] [stdout] 226 | / fn tick_by_tick_all_last(&self, req_id: i32, tick_type: i32, time: i64, price: f64, size: f64, [INFO] [stdout] 227 | | tick_attrib_last: TickAttribLast, exchange: &str, special_conditions: &str); [INFO] [stdout] | |______________________________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/handler.rs:228:3 [INFO] [stdout] | [INFO] [stdout] 228 | / fn tick_by_tick_bid_ask(&self, req_id: i32, time: i64, bid_price: f64, ask_price: f64, bid_size: f64, [INFO] [stdout] 229 | | ask_size: f64, tick_attrib_bid_ask: TickAttribBidAsk); [INFO] [stdout] | |_______________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/handler.rs:234:3 [INFO] [stdout] | [INFO] [stdout] 234 | / fn update_mkt_depth_l2(&self, req_id: i32, position: i32, market_maker: &str, operation: i32, [INFO] [stdout] 235 | | side: i32, price: f64, size: f64, is_smart_depth: bool); [INFO] [stdout] | |________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/handler.rs:241:3 [INFO] [stdout] | [INFO] [stdout] 241 | / fn scanner_data(&self, req_id: i32, rank: i32, contract_details: &ContractDetails, distance: &str, [INFO] [stdout] 242 | | benchmark: &str, projection: &str, legs_str: Option<&str>); [INFO] [stdout] | |____________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/handler.rs:336:3 [INFO] [stdout] | [INFO] [stdout] 336 | / pub fn new(server_version: i32, [INFO] [stdout] 337 | | client: Arc, [INFO] [stdout] 338 | | account: Arc, [INFO] [stdout] 339 | | order: Arc, [INFO] [stdout] ... | [INFO] [stdout] 343 | | data_fin: Arc, [INFO] [stdout] 344 | | fin_adv: Arc) -> Self { // Add fin_adv parameter [INFO] [stdout] | |_______________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/min_server_ver.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | / pub mod min_server_ver { [INFO] [stdout] 7 | | pub const REAL_TIME_BARS: i32 = 34; [INFO] [stdout] 8 | | pub const SCALE_ORDERS: i32 = 35; [INFO] [stdout] 9 | | pub const SNAPSHOT_MKT_DATA: i32 = 35; [INFO] [stdout] ... | [INFO] [stdout] 200 | | pub const MAX_SUPPORTED_VERSION: i32 = 187; [INFO] [stdout] 201 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/parser_client.rs:38:10 [INFO] [stdout] | [INFO] [stdout] 38 | if error_code_int >= 1000 && error_code_int < 2000 { // Example range for TWS info/warnings [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1000..2000).contains(&error_code_int)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/parser_client.rs:49:6 [INFO] [stdout] | [INFO] [stdout] 49 | if error_code_int >= 2000 && error_code_int < 3000 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(2000..3000).contains(&error_code_int)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser_data_market.rs:69:3 [INFO] [stdout] | [INFO] [stdout] 69 | / if let Some(size_tick_type) = tick_type.get_corresponding_size_tick() { [INFO] [stdout] 70 | | if size >= 0.0 { // Only send size if valid [INFO] [stdout] 71 | | log::trace!("Implied Tick Size: ID={}, Type={:?}, Size={}", ticker_id, size_tick_type, size); [INFO] [stdout] ... | [INFO] [stdout] 75 | | } [INFO] [stdout] | |___^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 69 ~ if let Some(size_tick_type) = tick_type.get_corresponding_size_tick() [INFO] [stdout] 70 ~ && size >= 0.0 { // Only send size if valid [INFO] [stdout] 71 | log::trace!("Implied Tick Size: ID={}, Type={:?}, Size={}", ticker_id, size_tick_type, size); [INFO] [stdout] 72 | // Pass the implied TickType enum variant to the handler [INFO] [stdout] 73 | handler.tick_size(ticker_id, size_tick_type, size); [INFO] [stdout] 74 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser_data_ref.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | / if is_bond { [INFO] [stdout] 20 | | if contract_details.bond_details.is_none() { [INFO] [stdout] 21 | | contract_details.bond_details = Some(BondDetails::default()); [INFO] [stdout] 22 | | } [INFO] [stdout] 23 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 19 ~ if is_bond [INFO] [stdout] 20 ~ && contract_details.bond_details.is_none() { [INFO] [stdout] 21 | contract_details.bond_details = Some(BondDetails::default()); [INFO] [stdout] 22 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/parser_data_ref.rs:80:6 [INFO] [stdout] | [INFO] [stdout] 80 | if server_version >= min_server_ver::MD_SIZE_MULTIPLIER && server_version < min_server_ver::SIZE_RULES { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(min_server_ver::MD_SIZE_MULTIPLIER..min_server_ver::SIZE_RULES).contains(&server_version)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/parser_data_ref.rs:385:6 [INFO] [stdout] | [INFO] [stdout] 385 | if server_version >= min_server_ver::MD_SIZE_MULTIPLIER && server_version < min_server_ver::SIZE_RULES { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(min_server_ver::MD_SIZE_MULTIPLIER..min_server_ver::SIZE_RULES).contains(&server_version)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/parser_data_ref.rs:439:6 [INFO] [stdout] | [INFO] [stdout] 439 | if server_version >= min_server_ver::FRACTIONAL_SIZE_SUPPORT && server_version < min_server_ver::SIZE_RULES { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(min_server_ver::FRACTIONAL_SIZE_SUPPORT..min_server_ver::SIZE_RULES).contains(&server_version)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/parser_order.rs:120:55 [INFO] [stdout] | [INFO] [stdout] 120 | self.request.aux_price = if self.msg_version < 30 { [INFO] [stdout] | _______________________________________________________^ [INFO] [stdout] 121 | | self.parser.read_double_max(false)? [INFO] [stdout] 122 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/parser_order.rs:122:12 [INFO] [stdout] | [INFO] [stdout] 122 | } else { [INFO] [stdout] | ____________^ [INFO] [stdout] 123 | | self.parser.read_double_max(false)? [INFO] [stdout] 124 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/parser_order.rs:548:34 [INFO] [stdout] | [INFO] [stdout] 548 | if self.msg_version >= 28 && self.request.scale_price_increment.map_or(false, |p| p > 0.0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 548 - if self.msg_version >= 28 && self.request.scale_price_increment.map_or(false, |p| p > 0.0) { [INFO] [stdout] 548 + if self.msg_version >= 28 && self.request.scale_price_increment.is_some_and(|p| p > 0.0) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/parser_order.rs:573:10 [INFO] [stdout] | [INFO] [stdout] 573 | if self.request.hedge_type.as_deref().map_or(false, |s| !s.is_empty()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 573 - if self.request.hedge_type.as_deref().map_or(false, |s| !s.is_empty()) { [INFO] [stdout] 573 + if self.request.hedge_type.as_deref().is_some_and(|s| !s.is_empty()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/protocol_dec_parser.rs:146:20 [INFO] [stdout] | [INFO] [stdout] 146 | time_opt_str.map(|x| parse_tws_date_time(x)).transpose() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_tws_date_time` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/protocol_dec_parser.rs:379:20 [INFO] [stdout] | [INFO] [stdout] 379 | time_opt_str.map(|x| parse_tws_date_or_month(x)).transpose() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_tws_date_or_month` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/protocol_dec_parser.rs:395:20 [INFO] [stdout] | [INFO] [stdout] 395 | date_opt_str.map(|x| parse_tws_date(x)).transpose() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_tws_date` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/protocol_dec_parser.rs:420:18 [INFO] [stdout] | [INFO] [stdout] 420 | ym_opt_str.map(|x| parse_tws_month(x)).transpose() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_tws_month` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/protocol_dec_parser.rs:437:20 [INFO] [stdout] | [INFO] [stdout] 437 | time_opt_str.map(|x| parse_tws_time(x)).transpose() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_tws_time` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:355:5 [INFO] [stdout] | [INFO] [stdout] 355 | s.map_or(true, |val| val.is_empty()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 355 - s.map_or(true, |val| val.is_empty()) [INFO] [stdout] 355 + s.is_none_or(|val| val.is_empty()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:559:5 [INFO] [stdout] | [INFO] [stdout] 559 | / if self.server_version < min_server_ver::MANUAL_ORDER_TIME { [INFO] [stdout] 560 | | if order_cancel.manual_order_cancel_time.is_some() { [INFO] [stdout] 561 | | return Err(IBKRError::Unsupported("Server version does not support manual order cancel time attribute".to_string())); [INFO] [stdout] 562 | | } [INFO] [stdout] 563 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 559 ~ if self.server_version < min_server_ver::MANUAL_ORDER_TIME [INFO] [stdout] 560 ~ && order_cancel.manual_order_cancel_time.is_some() { [INFO] [stdout] 561 | return Err(IBKRError::Unsupported("Server version does not support manual order cancel time attribute".to_string())); [INFO] [stdout] 562 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:564:5 [INFO] [stdout] | [INFO] [stdout] 564 | / if self.server_version < min_server_ver::RFQ_FIELDS { [INFO] [stdout] 565 | | if order_cancel.ext_operator.is_some() || order_cancel.external_user_id.is_some() || order_cancel.manual_order_indicator.is... [INFO] [stdout] 566 | | return Err(IBKRError::Unsupported("Server version does not support ext operator, external user id and manual order indica... [INFO] [stdout] 567 | | } [INFO] [stdout] 568 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 564 ~ if self.server_version < min_server_ver::RFQ_FIELDS [INFO] [stdout] 565 ~ && (order_cancel.ext_operator.is_some() || order_cancel.external_user_id.is_some() || order_cancel.manual_order_indicator.is_some()) { [INFO] [stdout] 566 | return Err(IBKRError::Unsupported("Server version does not support ext operator, external user id and manual order indicator parameters".to_string())); [INFO] [stdout] 567 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:635:10 [INFO] [stdout] | [INFO] [stdout] 635 | if !request.algo_strategy.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.algo_strategy.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:649:10 [INFO] [stdout] | [INFO] [stdout] 649 | if !contract.sec_id_type.is_none() || !contract.sec_id.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `contract.sec_id_type.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:649:45 [INFO] [stdout] | [INFO] [stdout] 649 | if !contract.sec_id_type.is_none() || !contract.sec_id.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `contract.sec_id.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:684:10 [INFO] [stdout] | [INFO] [stdout] 684 | if !request.hedge_type.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.hedge_type.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:699:12 [INFO] [stdout] | [INFO] [stdout] 699 | || !request.delta_neutral_settling_firm.is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.delta_neutral_settling_firm.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:700:12 [INFO] [stdout] | [INFO] [stdout] 700 | || !request.delta_neutral_clearing_account.is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.delta_neutral_clearing_account.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:701:12 [INFO] [stdout] | [INFO] [stdout] 701 | || !request.delta_neutral_clearing_intent.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.delta_neutral_clearing_intent.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:708:10 [INFO] [stdout] | [INFO] [stdout] 708 | if !request.delta_neutral_open_close.is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.delta_neutral_open_close.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:711:12 [INFO] [stdout] | [INFO] [stdout] 711 | || !request.delta_neutral_designated_location.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.delta_neutral_designated_location.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:751:10 [INFO] [stdout] | [INFO] [stdout] 751 | if !contract.trading_class.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `contract.trading_class.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:757:57 [INFO] [stdout] | [INFO] [stdout] 757 | if self.server_version < min_server_ver::ALGO_ID && !request.algo_id.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.algo_id.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:761:10 [INFO] [stdout] | [INFO] [stdout] 761 | if !request.scale_table.is_none() || request.active_start_time.is_some() || request.active_stop_time.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.scale_table.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:775:10 [INFO] [stdout] | [INFO] [stdout] 775 | if !request.model_code.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.model_code.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:781:62 [INFO] [stdout] | [INFO] [stdout] 781 | if self.server_version < min_server_ver::EXT_OPERATOR && !request.ext_operator.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.ext_operator.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:795:11 [INFO] [stdout] | [INFO] [stdout] 795 | && (!request.mifid2_decision_maker.is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.mifid2_decision_maker.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:796:14 [INFO] [stdout] | [INFO] [stdout] 796 | || !request.mifid2_decision_algo.is_none()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.mifid2_decision_algo.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:802:11 [INFO] [stdout] | [INFO] [stdout] 802 | && (!request.mifid2_execution_trader.is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.mifid2_execution_trader.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:803:14 [INFO] [stdout] | [INFO] [stdout] 803 | || !request.mifid2_execution_algo.is_none()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.mifid2_execution_algo.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:843:10 [INFO] [stdout] | [INFO] [stdout] 843 | if !request.advanced_error_override.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.advanced_error_override.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:864:10 [INFO] [stdout] | [INFO] [stdout] 864 | if !request.customer_account.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.customer_account.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:874:8 [INFO] [stdout] | [INFO] [stdout] 874 | (!request.external_user_id.is_none() || request.manual_order_indicator.is_some()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.external_user_id.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:595:5 [INFO] [stdout] | [INFO] [stdout] 595 | / if self.server_version < min_server_ver::SCALE_ORDERS { [INFO] [stdout] 596 | | if request.scale_init_level_size.is_some() || request.scale_price_increment.is_some() { [INFO] [stdout] 597 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 598 | | "Server version does not support Scale orders (scaleInitLevelSize, scalePriceIncrement).".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 601 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 595 ~ if self.server_version < min_server_ver::SCALE_ORDERS [INFO] [stdout] 596 ~ && (request.scale_init_level_size.is_some() || request.scale_price_increment.is_some()) { [INFO] [stdout] 597 | return Err(IBKRError::Unsupported( [INFO] [stdout] 598 | "Server version does not support Scale orders (scaleInitLevelSize, scalePriceIncrement).".to_string(), [INFO] [stdout] 599 | )); [INFO] [stdout] 600 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:602:5 [INFO] [stdout] | [INFO] [stdout] 602 | / if self.server_version < min_server_ver::SSHORT_COMBO_LEGS { [INFO] [stdout] 603 | | if !contract.combo_legs.is_empty() { [INFO] [stdout] 604 | | for leg in &contract.combo_legs { [INFO] [stdout] 605 | | if leg.short_sale_slot != 0 || !leg.designated_location.is_empty() { [INFO] [stdout] ... | [INFO] [stdout] 612 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 602 ~ if self.server_version < min_server_ver::SSHORT_COMBO_LEGS [INFO] [stdout] 603 ~ && !contract.combo_legs.is_empty() { [INFO] [stdout] 604 | for leg in &contract.combo_legs { [INFO] [stdout] ... [INFO] [stdout] 610 | } [INFO] [stdout] 611 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:613:5 [INFO] [stdout] | [INFO] [stdout] 613 | / if self.server_version < min_server_ver::WHAT_IF_ORDERS { [INFO] [stdout] 614 | | if request.what_if { [INFO] [stdout] 615 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 616 | | "Server version does not support what-if orders.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 619 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 613 ~ if self.server_version < min_server_ver::WHAT_IF_ORDERS [INFO] [stdout] 614 ~ && request.what_if { [INFO] [stdout] 615 | return Err(IBKRError::Unsupported( [INFO] [stdout] 616 | "Server version does not support what-if orders.".to_string(), [INFO] [stdout] 617 | )); [INFO] [stdout] 618 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:620:5 [INFO] [stdout] | [INFO] [stdout] 620 | / if self.server_version < min_server_ver::DELTA_NEUTRAL { [INFO] [stdout] 621 | | if contract.delta_neutral_contract.is_some() { [INFO] [stdout] 622 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 623 | | "Server version does not support delta-neutral orders.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 626 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 620 ~ if self.server_version < min_server_ver::DELTA_NEUTRAL [INFO] [stdout] 621 ~ && contract.delta_neutral_contract.is_some() { [INFO] [stdout] 622 | return Err(IBKRError::Unsupported( [INFO] [stdout] 623 | "Server version does not support delta-neutral orders.".to_string(), [INFO] [stdout] 624 | )); [INFO] [stdout] 625 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:627:5 [INFO] [stdout] | [INFO] [stdout] 627 | / if self.server_version < min_server_ver::SCALE_ORDERS2 { [INFO] [stdout] 628 | | if request.scale_subs_level_size.is_some() { [INFO] [stdout] 629 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 630 | | "Server version does not support Subsequent Level Size for Scale orders.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 633 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 627 ~ if self.server_version < min_server_ver::SCALE_ORDERS2 [INFO] [stdout] 628 ~ && request.scale_subs_level_size.is_some() { [INFO] [stdout] 629 | return Err(IBKRError::Unsupported( [INFO] [stdout] 630 | "Server version does not support Subsequent Level Size for Scale orders.".to_string(), [INFO] [stdout] 631 | )); [INFO] [stdout] 632 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:634:5 [INFO] [stdout] | [INFO] [stdout] 634 | / if self.server_version < min_server_ver::ALGO_ORDERS { [INFO] [stdout] 635 | | if !request.algo_strategy.is_none() { [INFO] [stdout] 636 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 637 | | "Server version does not support algo orders.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 640 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 634 ~ if self.server_version < min_server_ver::ALGO_ORDERS [INFO] [stdout] 635 ~ && !request.algo_strategy.is_none() { [INFO] [stdout] 636 | return Err(IBKRError::Unsupported( [INFO] [stdout] 637 | "Server version does not support algo orders.".to_string(), [INFO] [stdout] 638 | )); [INFO] [stdout] 639 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:641:5 [INFO] [stdout] | [INFO] [stdout] 641 | / if self.server_version < min_server_ver::NOT_HELD { [INFO] [stdout] 642 | | if request.not_held { [INFO] [stdout] 643 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 644 | | "Server version does not support notHeld parameter.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 647 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 641 ~ if self.server_version < min_server_ver::NOT_HELD [INFO] [stdout] 642 ~ && request.not_held { [INFO] [stdout] 643 | return Err(IBKRError::Unsupported( [INFO] [stdout] 644 | "Server version does not support notHeld parameter.".to_string(), [INFO] [stdout] 645 | )); [INFO] [stdout] 646 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:648:5 [INFO] [stdout] | [INFO] [stdout] 648 | / if self.server_version < min_server_ver::SEC_ID_TYPE { [INFO] [stdout] 649 | | if !contract.sec_id_type.is_none() || !contract.sec_id.is_none() { [INFO] [stdout] 650 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 651 | | "Server version does not support secIdType and secId parameters.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 654 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 648 ~ if self.server_version < min_server_ver::SEC_ID_TYPE [INFO] [stdout] 649 ~ && (!contract.sec_id_type.is_none() || !contract.sec_id.is_none()) { [INFO] [stdout] 650 | return Err(IBKRError::Unsupported( [INFO] [stdout] 651 | "Server version does not support secIdType and secId parameters.".to_string(), [INFO] [stdout] 652 | )); [INFO] [stdout] 653 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:655:5 [INFO] [stdout] | [INFO] [stdout] 655 | / if self.server_version < min_server_ver::PLACE_ORDER_CONID { [INFO] [stdout] 656 | | if contract.con_id > 0 { [INFO] [stdout] 657 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 658 | | "Server version does not support conId parameter in placeOrder.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 661 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 655 ~ if self.server_version < min_server_ver::PLACE_ORDER_CONID [INFO] [stdout] 656 ~ && contract.con_id > 0 { [INFO] [stdout] 657 | return Err(IBKRError::Unsupported( [INFO] [stdout] 658 | "Server version does not support conId parameter in placeOrder.".to_string(), [INFO] [stdout] 659 | )); [INFO] [stdout] 660 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:672:5 [INFO] [stdout] | [INFO] [stdout] 672 | / if self.server_version < min_server_ver::SSHORTX { [INFO] [stdout] 673 | | if !contract.combo_legs.is_empty() { [INFO] [stdout] 674 | | for leg in &contract.combo_legs { [INFO] [stdout] 675 | | if leg.exempt_code != -1 { [INFO] [stdout] ... | [INFO] [stdout] 682 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 672 ~ if self.server_version < min_server_ver::SSHORTX [INFO] [stdout] 673 ~ && !contract.combo_legs.is_empty() { [INFO] [stdout] 674 | for leg in &contract.combo_legs { [INFO] [stdout] ... [INFO] [stdout] 680 | } [INFO] [stdout] 681 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:683:5 [INFO] [stdout] | [INFO] [stdout] 683 | / if self.server_version < min_server_ver::HEDGE_ORDERS { [INFO] [stdout] 684 | | if !request.hedge_type.is_none() { [INFO] [stdout] 685 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 686 | | "Server version does not support hedge orders.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 689 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 683 ~ if self.server_version < min_server_ver::HEDGE_ORDERS [INFO] [stdout] 684 ~ && !request.hedge_type.is_none() { [INFO] [stdout] 685 | return Err(IBKRError::Unsupported( [INFO] [stdout] 686 | "Server version does not support hedge orders.".to_string(), [INFO] [stdout] 687 | )); [INFO] [stdout] 688 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:690:5 [INFO] [stdout] | [INFO] [stdout] 690 | / if self.server_version < min_server_ver::OPT_OUT_SMART_ROUTING { [INFO] [stdout] 691 | | if request.opt_out_smart_routing { [INFO] [stdout] 692 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 693 | | "Server version does not support optOutSmartRouting parameter.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 696 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 690 ~ if self.server_version < min_server_ver::OPT_OUT_SMART_ROUTING [INFO] [stdout] 691 ~ && request.opt_out_smart_routing { [INFO] [stdout] 692 | return Err(IBKRError::Unsupported( [INFO] [stdout] 693 | "Server version does not support optOutSmartRouting parameter.".to_string(), [INFO] [stdout] 694 | )); [INFO] [stdout] 695 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:697:5 [INFO] [stdout] | [INFO] [stdout] 697 | / if self.server_version < min_server_ver::DELTA_NEUTRAL_CONID { [INFO] [stdout] 698 | | if request.delta_neutral_con_id.is_some() [INFO] [stdout] 699 | | || !request.delta_neutral_settling_firm.is_none() [INFO] [stdout] 700 | | || !request.delta_neutral_clearing_account.is_none() [INFO] [stdout] ... | [INFO] [stdout] 706 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 697 ~ if self.server_version < min_server_ver::DELTA_NEUTRAL_CONID [INFO] [stdout] 698 ~ && (request.delta_neutral_con_id.is_some() [INFO] [stdout] 699 | || !request.delta_neutral_settling_firm.is_none() [INFO] [stdout] 700 | || !request.delta_neutral_clearing_account.is_none() [INFO] [stdout] 701 ~ || !request.delta_neutral_clearing_intent.is_none()) { [INFO] [stdout] 702 | return Err(IBKRError::Unsupported( [INFO] [stdout] 703 | "Server version does not support deltaNeutral parameters: ConId, SettlingFirm, ClearingAccount, ClearingIntent".to_string(), [INFO] [stdout] 704 | )); [INFO] [stdout] 705 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:707:5 [INFO] [stdout] | [INFO] [stdout] 707 | / if self.server_version < min_server_ver::DELTA_NEUTRAL_OPEN_CLOSE { [INFO] [stdout] 708 | | if !request.delta_neutral_open_close.is_none() [INFO] [stdout] 709 | | || request.delta_neutral_short_sale [INFO] [stdout] 710 | | || request.delta_neutral_short_sale_slot.is_some() [INFO] [stdout] ... | [INFO] [stdout] 716 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 707 ~ if self.server_version < min_server_ver::DELTA_NEUTRAL_OPEN_CLOSE [INFO] [stdout] 708 ~ && (!request.delta_neutral_open_close.is_none() [INFO] [stdout] 709 | || request.delta_neutral_short_sale [INFO] [stdout] 710 | || request.delta_neutral_short_sale_slot.is_some() [INFO] [stdout] 711 ~ || !request.delta_neutral_designated_location.is_none()) { [INFO] [stdout] 712 | return Err(IBKRError::Unsupported( [INFO] [stdout] 713 | "Server version does not support deltaNeutral parameters: OpenClose, ShortSale, ShortSaleSlot, DesignatedLocation".to_string(), [INFO] [stdout] 714 | )); [INFO] [stdout] 715 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:717:5 [INFO] [stdout] | [INFO] [stdout] 717 | / if self.server_version < min_server_ver::SCALE_ORDERS3 { [INFO] [stdout] 718 | | if request.scale_price_increment.is_some() && request.scale_price_increment != Some(f64::MAX) { [INFO] [stdout] 719 | | if request.scale_price_adjust_value.is_some() [INFO] [stdout] 720 | | || request.scale_price_adjust_interval.is_some() [INFO] [stdout] ... | [INFO] [stdout] 731 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 717 ~ if self.server_version < min_server_ver::SCALE_ORDERS3 [INFO] [stdout] 718 ~ && request.scale_price_increment.is_some() && request.scale_price_increment != Some(f64::MAX) { [INFO] [stdout] 719 | if request.scale_price_adjust_value.is_some() [INFO] [stdout] ... [INFO] [stdout] 729 | } [INFO] [stdout] 730 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:718:7 [INFO] [stdout] | [INFO] [stdout] 718 | / if request.scale_price_increment.is_some() && request.scale_price_increment != Some(f64::MAX) { [INFO] [stdout] 719 | | if request.scale_price_adjust_value.is_some() [INFO] [stdout] 720 | | || request.scale_price_adjust_interval.is_some() [INFO] [stdout] 721 | | || request.scale_profit_offset.is_some() [INFO] [stdout] ... | [INFO] [stdout] 730 | | } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 718 ~ if request.scale_price_increment.is_some() && request.scale_price_increment != Some(f64::MAX) [INFO] [stdout] 719 ~ && (request.scale_price_adjust_value.is_some() [INFO] [stdout] 720 | || request.scale_price_adjust_interval.is_some() [INFO] [stdout] ... [INFO] [stdout] 724 | || request.scale_init_fill_qty.is_some() [INFO] [stdout] 725 ~ || request.scale_random_percent) { [INFO] [stdout] 726 | return Err(IBKRError::Unsupported( [INFO] [stdout] 727 | "Server version does not support Scale order parameters: PriceAdjustValue, PriceAdjustInterval, ProfitOffset, AutoReset, InitPosition, InitFillQty and RandomPercent".to_string(), [INFO] [stdout] 728 | )); [INFO] [stdout] 729 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:732:5 [INFO] [stdout] | [INFO] [stdout] 732 | / if self.server_version < min_server_ver::ORDER_COMBO_LEGS_PRICE && contract.sec_type == SecType::Combo { [INFO] [stdout] 733 | | if !request.order_combo_legs.is_empty() { [INFO] [stdout] 734 | | for leg_price in &request.order_combo_legs { [INFO] [stdout] 735 | | if leg_price.is_some() { [INFO] [stdout] ... | [INFO] [stdout] 742 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 732 ~ if self.server_version < min_server_ver::ORDER_COMBO_LEGS_PRICE && contract.sec_type == SecType::Combo [INFO] [stdout] 733 ~ && !request.order_combo_legs.is_empty() { [INFO] [stdout] 734 | for leg_price in &request.order_combo_legs { [INFO] [stdout] ... [INFO] [stdout] 740 | } [INFO] [stdout] 741 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:743:5 [INFO] [stdout] | [INFO] [stdout] 743 | / if self.server_version < min_server_ver::TRAILING_PERCENT { [INFO] [stdout] 744 | | if request.trailing_percent.is_some() { [INFO] [stdout] 745 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 746 | | "Server version does not support trailing percent parameter".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 749 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 743 ~ if self.server_version < min_server_ver::TRAILING_PERCENT [INFO] [stdout] 744 ~ && request.trailing_percent.is_some() { [INFO] [stdout] 745 | return Err(IBKRError::Unsupported( [INFO] [stdout] 746 | "Server version does not support trailing percent parameter".to_string(), [INFO] [stdout] 747 | )); [INFO] [stdout] 748 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:750:5 [INFO] [stdout] | [INFO] [stdout] 750 | / if self.server_version < min_server_ver::TRADING_CLASS { [INFO] [stdout] 751 | | if !contract.trading_class.is_none() { [INFO] [stdout] 752 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 753 | | "Server version does not support tradingClass parameter in placeOrder.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 756 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 750 ~ if self.server_version < min_server_ver::TRADING_CLASS [INFO] [stdout] 751 ~ && !contract.trading_class.is_none() { [INFO] [stdout] 752 | return Err(IBKRError::Unsupported( [INFO] [stdout] 753 | "Server version does not support tradingClass parameter in placeOrder.".to_string(), [INFO] [stdout] 754 | )); [INFO] [stdout] 755 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:760:5 [INFO] [stdout] | [INFO] [stdout] 760 | / if self.server_version < min_server_ver::SCALE_TABLE { [INFO] [stdout] 761 | | if !request.scale_table.is_none() || request.active_start_time.is_some() || request.active_stop_time.is_some() { [INFO] [stdout] 762 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 763 | | "Server version does not support scaleTable, activeStartTime and activeStopTime parameters.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 766 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 760 ~ if self.server_version < min_server_ver::SCALE_TABLE [INFO] [stdout] 761 ~ && (!request.scale_table.is_none() || request.active_start_time.is_some() || request.active_stop_time.is_some()) { [INFO] [stdout] 762 | return Err(IBKRError::Unsupported( [INFO] [stdout] 763 | "Server version does not support scaleTable, activeStartTime and activeStopTime parameters.".to_string(), [INFO] [stdout] 764 | )); [INFO] [stdout] 765 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:767:5 [INFO] [stdout] | [INFO] [stdout] 767 | / if self.server_version < min_server_ver::ORDER_SOLICITED { [INFO] [stdout] 768 | | if request.solicited { [INFO] [stdout] 769 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 770 | | "Server version does not support order solicited parameter.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 773 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 767 ~ if self.server_version < min_server_ver::ORDER_SOLICITED [INFO] [stdout] 768 ~ && request.solicited { [INFO] [stdout] 769 | return Err(IBKRError::Unsupported( [INFO] [stdout] 770 | "Server version does not support order solicited parameter.".to_string(), [INFO] [stdout] 771 | )); [INFO] [stdout] 772 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:774:5 [INFO] [stdout] | [INFO] [stdout] 774 | / if self.server_version < min_server_ver::MODELS_SUPPORT { [INFO] [stdout] 775 | | if !request.model_code.is_none() { [INFO] [stdout] 776 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 777 | | "Server version does not support model code parameter.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 780 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 774 ~ if self.server_version < min_server_ver::MODELS_SUPPORT [INFO] [stdout] 775 ~ && !request.model_code.is_none() { [INFO] [stdout] 776 | return Err(IBKRError::Unsupported( [INFO] [stdout] 777 | "Server version does not support model code parameter.".to_string(), [INFO] [stdout] 778 | )); [INFO] [stdout] 779 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:787:5 [INFO] [stdout] | [INFO] [stdout] 787 | / if self.server_version < min_server_ver::CASH_QTY { [INFO] [stdout] 788 | | if request.cash_qty.is_some() { [INFO] [stdout] 789 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 790 | | "Server version does not support cash quantity parameter".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 793 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 787 ~ if self.server_version < min_server_ver::CASH_QTY [INFO] [stdout] 788 ~ && request.cash_qty.is_some() { [INFO] [stdout] 789 | return Err(IBKRError::Unsupported( [INFO] [stdout] 790 | "Server version does not support cash quantity parameter".to_string(), [INFO] [stdout] 791 | )); [INFO] [stdout] 792 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:842:5 [INFO] [stdout] | [INFO] [stdout] 842 | / if self.server_version < min_server_ver::ADVANCED_ORDER_REJECT { [INFO] [stdout] 843 | | if !request.advanced_error_override.is_none() { [INFO] [stdout] 844 | | return Err(IBKRError::Unsupported("Server version does not support advanced error override attribute".to_string())); [INFO] [stdout] 845 | | } [INFO] [stdout] 846 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 842 ~ if self.server_version < min_server_ver::ADVANCED_ORDER_REJECT [INFO] [stdout] 843 ~ && !request.advanced_error_override.is_none() { [INFO] [stdout] 844 | return Err(IBKRError::Unsupported("Server version does not support advanced error override attribute".to_string())); [INFO] [stdout] 845 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:847:5 [INFO] [stdout] | [INFO] [stdout] 847 | / if self.server_version < min_server_ver::MANUAL_ORDER_TIME { [INFO] [stdout] 848 | | if request.manual_order_time.is_some() { [INFO] [stdout] 849 | | return Err(IBKRError::Unsupported("Server version does not support manual order time attribute".to_string())); [INFO] [stdout] 850 | | } [INFO] [stdout] 851 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 847 ~ if self.server_version < min_server_ver::MANUAL_ORDER_TIME [INFO] [stdout] 848 ~ && request.manual_order_time.is_some() { [INFO] [stdout] 849 | return Err(IBKRError::Unsupported("Server version does not support manual order time attribute".to_string())); [INFO] [stdout] 850 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:852:5 [INFO] [stdout] | [INFO] [stdout] 852 | / if self.server_version < min_server_ver::PEGBEST_PEGMID_OFFSETS { [INFO] [stdout] 853 | | if request.min_trade_qty.is_some() || [INFO] [stdout] 854 | | request.min_compete_size.is_some() || [INFO] [stdout] 855 | | request.compete_against_best_offset.is_some() || // Check includes INFINITY sentinel [INFO] [stdout] ... | [INFO] [stdout] 862 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 852 ~ if self.server_version < min_server_ver::PEGBEST_PEGMID_OFFSETS [INFO] [stdout] 853 ~ && (request.min_trade_qty.is_some() || [INFO] [stdout] 854 | request.min_compete_size.is_some() || [INFO] [stdout] 855 | request.compete_against_best_offset.is_some() || // Check includes INFINITY sentinel [INFO] [stdout] 856 | request.mid_offset_at_whole.is_some() || [INFO] [stdout] 857 ~ request.mid_offset_at_half.is_some()) { [INFO] [stdout] 858 | return Err(IBKRError::Unsupported( [INFO] [stdout] 859 | "Server version does not support PEG BEST / PEG MID order parameters: minTradeQty, minCompeteSize, competeAgainstBestOffset, midOffsetAtWhole and midOffsetAtHalf".to_string(), [INFO] [stdout] 860 | )); [INFO] [stdout] 861 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:863:5 [INFO] [stdout] | [INFO] [stdout] 863 | / if self.server_version < min_server_ver::CUSTOMER_ACCOUNT { [INFO] [stdout] 864 | | if !request.customer_account.is_none() { [INFO] [stdout] 865 | | return Err(IBKRError::Unsupported("Server version does not support customer account parameter".to_string())); [INFO] [stdout] 866 | | } [INFO] [stdout] 867 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 863 ~ if self.server_version < min_server_ver::CUSTOMER_ACCOUNT [INFO] [stdout] 864 ~ && !request.customer_account.is_none() { [INFO] [stdout] 865 | return Err(IBKRError::Unsupported("Server version does not support customer account parameter".to_string())); [INFO] [stdout] 866 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:868:5 [INFO] [stdout] | [INFO] [stdout] 868 | / if self.server_version < min_server_ver::PROFESSIONAL_CUSTOMER { [INFO] [stdout] 869 | | if request.professional_customer { [INFO] [stdout] 870 | | return Err(IBKRError::Unsupported("Server version does not support professional customer parameter".to_string())); [INFO] [stdout] 871 | | } [INFO] [stdout] 872 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 868 ~ if self.server_version < min_server_ver::PROFESSIONAL_CUSTOMER [INFO] [stdout] 869 ~ && request.professional_customer { [INFO] [stdout] 870 | return Err(IBKRError::Unsupported("Server version does not support professional customer parameter".to_string())); [INFO] [stdout] 871 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/protocol_encoder.rs:933:69 [INFO] [stdout] | [INFO] [stdout] 933 | if self.server_version < min_server_ver::ORDER_COMBO_LEGS_PRICE { [INFO] [stdout] | _____________________________________________________________________^ [INFO] [stdout] 934 | | self.write_optional_double_to_cursor(&mut cursor, request.limit_price)?; [INFO] [stdout] 935 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/protocol_encoder.rs:935:12 [INFO] [stdout] | [INFO] [stdout] 935 | } else { [INFO] [stdout] | ____________^ [INFO] [stdout] 936 | | self.write_optional_double_to_cursor(&mut cursor, request.limit_price)?; [INFO] [stdout] 937 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/protocol_encoder.rs:938:63 [INFO] [stdout] | [INFO] [stdout] 938 | if self.server_version < min_server_ver::TRAILING_PERCENT { [INFO] [stdout] | _______________________________________________________________^ [INFO] [stdout] 939 | | self.write_optional_double_to_cursor(&mut cursor, request.aux_price)?; [INFO] [stdout] 940 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/protocol_encoder.rs:940:12 [INFO] [stdout] | [INFO] [stdout] 940 | } else { [INFO] [stdout] | ____________^ [INFO] [stdout] 941 | | self.write_optional_double_to_cursor(&mut cursor, request.aux_price)?; [INFO] [stdout] 942 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:1073:36 [INFO] [stdout] | [INFO] [stdout] 1073 | let is_delta_neutral_mkt = request.delta_neutral_order_type.as_deref().map_or(false, |s| s.eq_ignore_ascii_case("MKT")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 1073 - let is_delta_neutral_mkt = request.delta_neutral_order_type.as_deref().map_or(false, |s| s.eq_ignore_ascii_case("MKT")); [INFO] [stdout] 1073 + let is_delta_neutral_mkt = request.delta_neutral_order_type.as_deref().is_some_and(|s| s.eq_ignore_ascii_case("MKT")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:1133:39 [INFO] [stdout] | [INFO] [stdout] 1133 | let scale_price_increment_valid = request.scale_price_increment.map_or(false, |p| p > 0.0 && p != f64::MAX); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 1133 - let scale_price_increment_valid = request.scale_price_increment.map_or(false, |p| p > 0.0 && p != f64::MAX); [INFO] [stdout] 1133 + let scale_price_increment_valid = request.scale_price_increment.is_some_and(|p| p > 0.0 && p != f64::MAX); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:1447:10 [INFO] [stdout] | [INFO] [stdout] 1447 | if !contract.trading_class.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `contract.trading_class.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:1432:5 [INFO] [stdout] | [INFO] [stdout] 1432 | / if self.server_version < min_server_ver::DELTA_NEUTRAL { [INFO] [stdout] 1433 | | if contract.delta_neutral_contract.is_some() { [INFO] [stdout] 1434 | | return Err(IBKRError::UpdateTws( [INFO] [stdout] 1435 | | "Server version does not support delta-neutral orders/contracts.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1438 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1432 ~ if self.server_version < min_server_ver::DELTA_NEUTRAL [INFO] [stdout] 1433 ~ && contract.delta_neutral_contract.is_some() { [INFO] [stdout] 1434 | return Err(IBKRError::UpdateTws( [INFO] [stdout] 1435 | "Server version does not support delta-neutral orders/contracts.".to_string(), [INFO] [stdout] 1436 | )); [INFO] [stdout] 1437 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:1439:5 [INFO] [stdout] | [INFO] [stdout] 1439 | / if self.server_version < min_server_ver::MKT_DATA_CONID { [INFO] [stdout] 1440 | | if contract.con_id > 0 { [INFO] [stdout] 1441 | | return Err(IBKRError::UpdateTws( [INFO] [stdout] 1442 | | "Server version does not support conId parameter in reqMarketData.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1445 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1439 ~ if self.server_version < min_server_ver::MKT_DATA_CONID [INFO] [stdout] 1440 ~ && contract.con_id > 0 { [INFO] [stdout] 1441 | return Err(IBKRError::UpdateTws( [INFO] [stdout] 1442 | "Server version does not support conId parameter in reqMarketData.".to_string(), [INFO] [stdout] 1443 | )); [INFO] [stdout] 1444 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:1446:5 [INFO] [stdout] | [INFO] [stdout] 1446 | / if self.server_version < min_server_ver::TRADING_CLASS { [INFO] [stdout] 1447 | | if !contract.trading_class.is_none() { [INFO] [stdout] 1448 | | return Err(IBKRError::UpdateTws( [INFO] [stdout] 1449 | | "Server version does not support tradingClass parameter in reqMarketData.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1452 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1446 ~ if self.server_version < min_server_ver::TRADING_CLASS [INFO] [stdout] 1447 ~ && !contract.trading_class.is_none() { [INFO] [stdout] 1448 | return Err(IBKRError::UpdateTws( [INFO] [stdout] 1449 | "Server version does not support tradingClass parameter in reqMarketData.".to_string(), [INFO] [stdout] 1450 | )); [INFO] [stdout] 1451 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:1592:64 [INFO] [stdout] | [INFO] [stdout] 1592 | if self.server_version < min_server_ver::TRADING_CLASS && (!contract.trading_class.is_none() || contract.con_id > 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `contract.trading_class.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:1669:62 [INFO] [stdout] | [INFO] [stdout] 1669 | if self.server_version < min_server_ver::SEC_ID_TYPE && (!contract.sec_id_type.is_none() || !contract.sec_id.is_none()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `contract.sec_id_type.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:1669:97 [INFO] [stdout] | [INFO] [stdout] 1669 | if self.server_version < min_server_ver::SEC_ID_TYPE && (!contract.sec_id_type.is_none() || !contract.sec_id.is_none()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `contract.sec_id.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:1672:63 [INFO] [stdout] | [INFO] [stdout] 1672 | if self.server_version < min_server_ver::TRADING_CLASS && !contract.trading_class.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `contract.trading_class.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:1675:57 [INFO] [stdout] | [INFO] [stdout] 1675 | if self.server_version < min_server_ver::LINKING && !contract.primary_exchange.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `contract.primary_exchange.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:1678:63 [INFO] [stdout] | [INFO] [stdout] 1678 | if self.server_version < min_server_ver::BOND_ISSUERID && !contract.issuer_id.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `contract.issuer_id.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:1747:64 [INFO] [stdout] | [INFO] [stdout] 1747 | if self.server_version < min_server_ver::TRADING_CLASS && (!contract.trading_class.is_none() || contract.con_id > 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `contract.trading_class.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/protocol_encoder.rs:1740:3 [INFO] [stdout] | [INFO] [stdout] 1740 | pub fn encode_request_historical_data... &[(String, String)]) -> Result, IBKRError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:2102:64 [INFO] [stdout] | [INFO] [stdout] 2102 | if self.server_version < min_server_ver::TRADING_CLASS && (!contract.trading_class.is_none() || contract.con_id > 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `contract.trading_class.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:2177:5 [INFO] [stdout] | [INFO] [stdout] 2177 | / if self.server_version < min_server_ver::TICK_BY_TICK_IGNORE_SIZE { [INFO] [stdout] 2178 | | if number_of_ticks != 0 || ignore_size { [INFO] [stdout] 2179 | | return Err(IBKRError::Unsupported("Server version does not support ignoreSize and numberOfTicks parameters in tick-by-ti... [INFO] [stdout] 2180 | | } [INFO] [stdout] 2181 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2177 ~ if self.server_version < min_server_ver::TICK_BY_TICK_IGNORE_SIZE [INFO] [stdout] 2178 ~ && (number_of_ticks != 0 || ignore_size) { [INFO] [stdout] 2179 | return Err(IBKRError::Unsupported("Server version does not support ignoreSize and numberOfTicks parameters in tick-by-tick data requests.".to_string())); [INFO] [stdout] 2180 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:2239:64 [INFO] [stdout] | [INFO] [stdout] 2239 | if self.server_version < min_server_ver::TRADING_CLASS && (!contract.trading_class.is_none() || contract.con_id > 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `contract.trading_class.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:2245:73 [INFO] [stdout] | [INFO] [stdout] 2245 | if self.server_version < min_server_ver::MKT_DEPTH_PRIM_EXCHANGE && !contract.primary_exchange.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `contract.primary_exchange.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/protocol_encoder.rs:2369:46 [INFO] [stdout] | [INFO] [stdout] 2369 | self.write_tag_value_list(&mut cursor, &news_article_options)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `news_article_options` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/protocol_encoder.rs:2376:3 [INFO] [stdout] | [INFO] [stdout] 2376 | / pub fn encode_request_historical_news( [INFO] [stdout] 2377 | | &self, [INFO] [stdout] 2378 | | req_id: i32, [INFO] [stdout] 2379 | | con_id: i32, [INFO] [stdout] ... | [INFO] [stdout] 2384 | | historical_news_options: &[(String, String)], // TagValue list [INFO] [stdout] 2385 | | ) -> Result, IBKRError> { [INFO] [stdout] | |_________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:2534:5 [INFO] [stdout] | [INFO] [stdout] 2534 | / if self.server_version < min_server_ver::WSH_EVENT_DATA_FILTERS { [INFO] [stdout] 2535 | | if wsh_event_data.filter.is_some() || wsh_event_data.fill_watchlist || wsh_event_data.fill_portfolio || wsh_event_data.fil... [INFO] [stdout] 2536 | | return Err(IBKRError::UpdateTws(format!( [INFO] [stdout] 2537 | | "Server version {} does not support WSH event data filters (requires {}).", // Adjusted message [INFO] [stdout] ... | [INFO] [stdout] 2541 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2534 ~ if self.server_version < min_server_ver::WSH_EVENT_DATA_FILTERS [INFO] [stdout] 2535 ~ && (wsh_event_data.filter.is_some() || wsh_event_data.fill_watchlist || wsh_event_data.fill_portfolio || wsh_event_data.fill_competitors) { [INFO] [stdout] 2536 | return Err(IBKRError::UpdateTws(format!( [INFO] [stdout] ... [INFO] [stdout] 2539 | ))); [INFO] [stdout] 2540 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:2542:5 [INFO] [stdout] | [INFO] [stdout] 2542 | / if self.server_version < min_server_ver::WSH_EVENT_DATA_FILTERS_DATE { [INFO] [stdout] 2543 | | if wsh_event_data.start_date.is_some() || wsh_event_data.end_date.is_some() || wsh_event_data.total_limit != Some(i32::MAX) { [INFO] [stdout] 2544 | | // Allow None total_limit, as it implies MAX_VALUE wasn't sent [INFO] [stdout] 2545 | | if wsh_event_data.start_date.is_some() || wsh_event_data.end_date.is_some() || (wsh_event_data.total_limit.is_some() && ... [INFO] [stdout] ... | [INFO] [stdout] 2552 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2542 ~ if self.server_version < min_server_ver::WSH_EVENT_DATA_FILTERS_DATE [INFO] [stdout] 2543 ~ && (wsh_event_data.start_date.is_some() || wsh_event_data.end_date.is_some() || wsh_event_data.total_limit != Some(i32::MAX)) { [INFO] [stdout] 2544 | // Allow None total_limit, as it implies MAX_VALUE wasn't sent [INFO] [stdout] ... [INFO] [stdout] 2550 | } [INFO] [stdout] 2551 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/protocol_encoder.rs:2782:3 [INFO] [stdout] | [INFO] [stdout] 2782 | / pub fn encode_request_historical_ticks( [INFO] [stdout] 2783 | | &self, [INFO] [stdout] 2784 | | req_id: i32, [INFO] [stdout] 2785 | | contract: &Contract, [INFO] [stdout] ... | [INFO] [stdout] 2792 | | misc_options: &[(String, String)], // TagValue list, semicolon-separated [INFO] [stdout] 2793 | | ) -> Result, IBKRError> { [INFO] [stdout] | |_________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/order_builder.rs:86:5 [INFO] [stdout] | [INFO] [stdout] 86 | order.side = action; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `order::OrderRequest { side: action, quantity: quantity, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/order_builder.rs:85:5 [INFO] [stdout] | [INFO] [stdout] 85 | let mut order = OrderRequest::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/order_builder.rs:741:33 [INFO] [stdout] | [INFO] [stdout] 741 | self.order.aux_price = Some(offset.abs() * -1.0); // Passive offset might be negative? Check docs. [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using: `-offset.abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/order_builder.rs:985:9 [INFO] [stdout] | [INFO] [stdout] 985 | / if self.order.limit_price.is_none() { [INFO] [stdout] 986 | | return Err(IBKRError::InvalidOrder(format!("Limit price is required for {} order.", self.order.order_type))); [INFO] [stdout] 987 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 984 ~ OrderType::Limit | OrderType::LimitOnClose | OrderType::LimitOnOpen [INFO] [stdout] 985 ~ if self.order.limit_price.is_none() => { [INFO] [stdout] 986 | return Err(IBKRError::InvalidOrder(format!("Limit price is required for {} order.", self.order.order_type))); [INFO] [stdout] 987 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/order_builder.rs:990:9 [INFO] [stdout] | [INFO] [stdout] 990 | / ... if self.order.aux_price.is_none() { [INFO] [stdout] 991 | | ... return Err(IBKRError::InvalidOrder(format!("Stop/trigger price (auxPrice) is required for {} order.", self.order.order_ty... [INFO] [stdout] 992 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 989 ~ OrderType::Stop | OrderType::MarketIfTouched [INFO] [stdout] 990 ~ if self.order.aux_price.is_none() => { [INFO] [stdout] 991 | return Err(IBKRError::InvalidOrder(format!("Stop/trigger price (auxPrice) is required for {} order.", self.order.order_type))); [INFO] [stdout] 992 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/order_builder.rs:995:9 [INFO] [stdout] | [INFO] [stdout] 995 | / ... if self.order.aux_price.is_none() || self.order.limit_price.is_none() { [INFO] [stdout] 996 | | ... return Err(IBKRError::InvalidOrder(format!("Stop/trigger price (auxPrice) and limit price are required for {} order.", se... [INFO] [stdout] 997 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 994 ~ OrderType::StopLimit | OrderType::LimitIfTouched [INFO] [stdout] 995 ~ if (self.order.aux_price.is_none() || self.order.limit_price.is_none()) => { [INFO] [stdout] 996 | return Err(IBKRError::InvalidOrder(format!("Stop/trigger price (auxPrice) and limit price are required for {} order.", self.order.order_type))); [INFO] [stdout] 997 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/order_builder.rs:1019:9 [INFO] [stdout] | [INFO] [stdout] 1019 | / if self.order.volatility.is_none() || self.order.volatility_type.is_none() { [INFO] [stdout] 1020 | | return Err(IBKRError::InvalidOrder("Volatility and volatility type are required for VOL order.".to_string())); [INFO] [stdout] 1021 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1018 ~ OrderType::Volatility [INFO] [stdout] 1019 ~ if (self.order.volatility.is_none() || self.order.volatility_type.is_none()) => { [INFO] [stdout] 1020 | return Err(IBKRError::InvalidOrder("Volatility and volatility type are required for VOL order.".to_string())); [INFO] [stdout] 1021 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/order_builder.rs:1029:9 [INFO] [stdout] | [INFO] [stdout] 1029 | / if self.contract.sec_type != SecType::Option || self.contract.exchange != "BOX" { [INFO] [stdout] 1030 | | return Err(IBKRError::InvalidOrder("Box Top order requires Option contract routed to BOX.".to_string())); [INFO] [stdout] 1031 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1028 ~ OrderType::BoxTop [INFO] [stdout] 1029 ~ if (self.contract.sec_type != SecType::Option || self.contract.exchange != "BOX") => { [INFO] [stdout] 1030 | return Err(IBKRError::InvalidOrder("Box Top order requires Option contract routed to BOX.".to_string())); [INFO] [stdout] 1031 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/order_builder.rs:1034:9 [INFO] [stdout] | [INFO] [stdout] 1034 | / if !(self.contract.sec_type == SecType::Option || self.contract.sec_type == SecType::FutureOption) { [INFO] [stdout] 1035 | | return Err(IBKRError::InvalidOrder("Volatility order requires Option or FOP contract.".to_string())); [INFO] [stdout] 1036 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1033 ~ OrderType::Volatility [INFO] [stdout] 1034 ~ if !(self.contract.sec_type == SecType::Option || self.contract.sec_type == SecType::FutureOption) => { [INFO] [stdout] 1035 | return Err(IBKRError::InvalidOrder("Volatility order requires Option or FOP contract.".to_string())); [INFO] [stdout] 1036 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/order_builder.rs:1085:7 [INFO] [stdout] | [INFO] [stdout] 1085 | / if !valid_combo_types.contains(&self.order.order_type) { [INFO] [stdout] 1086 | | if !(self.order.order_type == OrderType::Relative && self.order.limit_price.is_some()) { // Check for REL+LMT [INFO] [stdout] 1087 | | return Err(IBKRError::InvalidOrder(format!("Order type {} not valid for Combo orders.", self.order.order_type))); [INFO] [stdout] 1088 | | } [INFO] [stdout] 1089 | | } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1085 ~ if !valid_combo_types.contains(&self.order.order_type) [INFO] [stdout] 1086 ~ && !(self.order.order_type == OrderType::Relative && self.order.limit_price.is_some()) { // Check for REL+LMT [INFO] [stdout] 1087 | return Err(IBKRError::InvalidOrder(format!("Order type {} not valid for Combo orders.", self.order.order_type))); [INFO] [stdout] 1088 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/order_builder.rs:1116:11 [INFO] [stdout] | [INFO] [stdout] 1116 | / if self.order.algo_params.iter().find(|(k,_)| k == "adaptivePriority").is_none() { [INFO] [stdout] 1117 | | return Err(IBKRError::InvalidOrder("Adaptive algo requires 'adaptivePriority' parameter.".to_string())); [INFO] [stdout] 1118 | | } [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1115 ~ "Adaptive" [INFO] [stdout] 1116 ~ if self.order.algo_params.iter().find(|(k,_)| k == "adaptivePriority").is_none() => { [INFO] [stdout] 1117 | return Err(IBKRError::InvalidOrder("Adaptive algo requires 'adaptivePriority' parameter.".to_string())); [INFO] [stdout] 1118 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/order_builder.rs:1121:11 [INFO] [stdout] | [INFO] [stdout] 1121 | / if self.order.algo_params.iter().find(|(k,_)| k == "maxPctVol").is_none() { [INFO] [stdout] 1122 | | return Err(IBKRError::InvalidOrder("VWAP algo requires 'maxPctVol' parameter.".to_string())); [INFO] [stdout] 1123 | | } [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1120 ~ "Vwap" [INFO] [stdout] 1121 ~ if self.order.algo_params.iter().find(|(k,_)| k == "maxPctVol").is_none() => { [INFO] [stdout] 1122 | return Err(IBKRError::InvalidOrder("VWAP algo requires 'maxPctVol' parameter.".to_string())); [INFO] [stdout] 1123 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/order_builder.rs:1261:11 [INFO] [stdout] | [INFO] [stdout] 1261 | / let mut p = Vec::new(); [INFO] [stdout] 1262 | | p.push(("pctVol".to_string(), pct_vol.to_string())); [INFO] [stdout] 1263 | | p.push(("deltaPctVol".to_string(), delta_pct_vol.to_string())); [INFO] [stdout] 1264 | | p.push(("minPctVol4Px".to_string(), min_pct_vol_for_price.to_string())); [INFO] [stdout] 1265 | | p.push(("maxPctVol4Px".to_string(), max_pct_vol_for_price.to_string())); [INFO] [stdout] | |__________________________________________________________________________________^ help: consider using the `vec![]` macro: `let mut p = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/order_builder.rs:1340:13 [INFO] [stdout] | [INFO] [stdout] 1340 | / if final_order.algo_params.iter().find(|(k,_)| k == "maxPctVol").is_none() { [INFO] [stdout] 1341 | | return Err(IBKRError::InvalidOrder("Internal Error: VWAP algo missing 'maxPctVol' parameter.".to_string())); [INFO] [stdout] 1342 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1339 ~ "Vwap" [INFO] [stdout] 1340 ~ if final_order.algo_params.iter().find(|(k,_)| k == "maxPctVol").is_none() => { [INFO] [stdout] 1341 | return Err(IBKRError::InvalidOrder("Internal Error: VWAP algo missing 'maxPctVol' parameter.".to_string())); [INFO] [stdout] 1342 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/order_builder.rs:1345:13 [INFO] [stdout] | [INFO] [stdout] 1345 | / ... if final_order.algo_params.iter().find(|(k,_)| k == "componentSize").is_none() { [INFO] [stdout] 1346 | | ... return Err(IBKRError::InvalidOrder("Internal Error: Accumulate/Distribute algo missing 'componentSize' parameter.".to_st... [INFO] [stdout] 1347 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1344 ~ "AD" [INFO] [stdout] 1345 ~ if final_order.algo_params.iter().find(|(k,_)| k == "componentSize").is_none() => { [INFO] [stdout] 1346 | return Err(IBKRError::InvalidOrder("Internal Error: Accumulate/Distribute algo missing 'componentSize' parameter.".to_string())); [INFO] [stdout] 1347 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/data.rs:441:30 [INFO] [stdout] | [INFO] [stdout] 441 | let parts: Vec<&str> = s.trim().split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/data.rs:482:30 [INFO] [stdout] | [INFO] [stdout] 482 | let parts: Vec<&str> = s.trim().split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/data.rs:550:1 [INFO] [stdout] | [INFO] [stdout] 550 | / impl Default for TickType { [INFO] [stdout] 551 | | fn default() -> Self { [INFO] [stdout] 552 | | TickType::Unknown [INFO] [stdout] 553 | | } [INFO] [stdout] 554 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 181 + #[derive(Default)] [INFO] [stdout] 182 | pub enum TickType { [INFO] [stdout] 183 | BidSize = 0, [INFO] [stdout] ... [INFO] [stdout] 315 | // GenericTick623 = 623, // ETF NAV Frozen Last [INFO] [stdout] 316 ~ #[default] [INFO] [stdout] 317 ~ Unknown = -1, // For unhandled cases [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/data.rs:1172:1 [INFO] [stdout] | [INFO] [stdout] 1172 | / impl Default for FinancialStatementType { [INFO] [stdout] 1173 | | fn default() -> Self { [INFO] [stdout] 1174 | | FinancialStatementType::INC // Or a specific 'Unknown' variant if you add one [INFO] [stdout] 1175 | | } [INFO] [stdout] 1176 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 1166 + #[derive(Default)] [INFO] [stdout] 1167 | pub enum FinancialStatementType { [INFO] [stdout] 1168 ~ #[default] [INFO] [stdout] 1169 ~ INC, // IncomeStatement [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/data.rs:1198:1 [INFO] [stdout] | [INFO] [stdout] 1198 | / impl Default for PeriodType { [INFO] [stdout] 1199 | | fn default() -> Self { [INFO] [stdout] 1200 | | PeriodType::Annual // Or a specific 'Unknown' variant if you add one [INFO] [stdout] 1201 | | } [INFO] [stdout] 1202 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 1193 + #[derive(Default)] [INFO] [stdout] 1194 | pub enum PeriodType { [INFO] [stdout] 1195 ~ #[default] [INFO] [stdout] 1196 ~ Annual, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/data.rs:1234:1 [INFO] [stdout] | [INFO] [stdout] 1234 | / pub enum ParsedFundamentalData { [INFO] [stdout] 1235 | | Snapshot(ReportSnapshot), [INFO] [stdout] | | ------------------------ the largest variant contains at least 1280 bytes [INFO] [stdout] 1236 | | FinancialSummary(ReportsFinSummary), [INFO] [stdout] | | ----------------------------------- the second-largest variant contains at least 96 bytes [INFO] [stdout] ... | [INFO] [stdout] 1239 | | } [INFO] [stdout] | |_^ the entire enum is at least 1280 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 1235 - Snapshot(ReportSnapshot), [INFO] [stdout] 1235 + Snapshot(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/data.rs:1313:3 [INFO] [stdout] | [INFO] [stdout] 1313 | pub fn new(req_id: i32, contract: Con... bool, misc_options: Vec<(String, String)>) -> Self { ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `NaiveDate` which implements the `Copy` trait [INFO] [stdout] --> src/contract.rs:313:65 [INFO] [stdout] | [INFO] [stdout] 313 | last_trade_date_or_contract_month: Some(DateOrMonth::Date(expiry.clone())), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*expiry` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.primary_exchange` after checking its variant with `is_some` [INFO] [stdout] --> src/contract.rs:394:23 [INFO] [stdout] | [INFO] [stdout] 393 | if self.exchange == "SMART" && self.primary_exchange.is_some() { [INFO] [stdout] | ------------------------------- the check is happening here [INFO] [stdout] 394 | app(&mut sb, &self.primary_exchange.as_ref().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/contract.rs:384:11 [INFO] [stdout] | [INFO] [stdout] 384 | sb.push_str("/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `sb.push('/')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/contract.rs:394:22 [INFO] [stdout] | [INFO] [stdout] 394 | app(&mut sb, &self.primary_exchange.as_ref().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.primary_exchange.as_ref().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/contract.rs:826:1 [INFO] [stdout] | [INFO] [stdout] 826 | / impl Default for WhatToShow { [INFO] [stdout] 827 | | fn default() -> Self { [INFO] [stdout] 828 | | WhatToShow::Trades // A common default [INFO] [stdout] 829 | | } [INFO] [stdout] 830 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 799 + #[derive(Default)] [INFO] [stdout] 800 | pub enum WhatToShow { [INFO] [stdout] 801 ~ #[default] [INFO] [stdout] 802 ~ Trades, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/client.rs:391:5 [INFO] [stdout] | [INFO] [stdout] 391 | config.enabled = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `rate_limiter::RateLimiterConfig { enabled: true, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/client.rs:390:5 [INFO] [stdout] | [INFO] [stdout] 390 | let mut config = RateLimiterConfig::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/client.rs:420:5 [INFO] [stdout] | [INFO] [stdout] 420 | config.enabled = false; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `rate_limiter::RateLimiterConfig { enabled: false, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/client.rs:419:5 [INFO] [stdout] | [INFO] [stdout] 419 | let mut config = RateLimiterConfig::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/client.rs:704:10 [INFO] [stdout] | [INFO] [stdout] 704 | if error_code_int >= 2000 && error_code_int < 3000 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(2000..3000).contains(&error_code_int)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/client.rs:721:9 [INFO] [stdout] | [INFO] [stdout] 721 | / ClientErrorCode::AlreadyConnected | [INFO] [stdout] 722 | | ClientErrorCode::ConnectFail | [INFO] [stdout] 723 | | ClientErrorCode::UpdateTws | [INFO] [stdout] 724 | | ClientErrorCode::NotConnected | [INFO] [stdout] ... | [INFO] [stdout] 729 | | _ => { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] = note: `#[warn(clippy::wildcard_in_or_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/conn.rs:55:5 [INFO] [stdout] | [INFO] [stdout] 55 | / if let Some(limiter) = &self.rate_limiter { [INFO] [stdout] 56 | | if !limiter.acquire(self.rate_limit_timeout) { [INFO] [stdout] 57 | | return Err(IBKRError::RateLimited("Message rate limit exceeded".to_string())); [INFO] [stdout] 58 | | } [INFO] [stdout] 59 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 55 ~ if let Some(limiter) = &self.rate_limiter [INFO] [stdout] 56 ~ && !limiter.acquire(self.rate_limit_timeout) { [INFO] [stdout] 57 | return Err(IBKRError::RateLimited("Message rate limit exceeded".to_string())); [INFO] [stdout] 58 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression always evaluates to true [INFO] [stdout] --> src/conn.rs:428:38 [INFO] [stdout] | [INFO] [stdout] 428 | let version_payload_full = if !connect_options.is_empty() { format!("{} {}", version_payload, connect_options) } else { versi... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_is_empty [INFO] [stdout] = note: `#[warn(clippy::const_is_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/conn.rs:544:9 [INFO] [stdout] | [INFO] [stdout] 544 | / if let Err(e) = stream.shutdown(std::net::Shutdown::Both) { [INFO] [stdout] 545 | | if e.kind() != std::io::ErrorKind::NotConnected && [INFO] [stdout] 546 | | e.kind() != std::io::ErrorKind::BrokenPipe { [INFO] [stdout] 547 | | warn!("Error shutting down socket: {}", e); [INFO] [stdout] 548 | | } [INFO] [stdout] 549 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 544 ~ if let Err(e) = stream.shutdown(std::net::Shutdown::Both) [INFO] [stdout] 545 ~ && e.kind() != std::io::ErrorKind::NotConnected && [INFO] [stdout] 546 | e.kind() != std::io::ErrorKind::BrokenPipe { [INFO] [stdout] 547 | warn!("Error shutting down socket: {}", e); [INFO] [stdout] 548 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `as_bytes` after slicing a string [INFO] [stdout] --> src/conn_mock.rs:27:29 [INFO] [stdout] | [INFO] [stdout] 27 | bytes.extend_from_slice(s[current_pos..actual_pos].as_bytes()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&s.as_bytes()[current_pos..actual_pos]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#sliced_string_as_bytes [INFO] [stdout] = note: `#[warn(clippy::sliced_string_as_bytes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `as_bytes` after slicing a string [INFO] [stdout] --> src/conn_mock.rs:31:27 [INFO] [stdout] | [INFO] [stdout] 31 | bytes.extend_from_slice(s[current_pos..].as_bytes()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&s.as_bytes()[current_pos..]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#sliced_string_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/account_subscription.rs:19:1 [INFO] [stdout] | [INFO] [stdout] 19 | / pub enum AccountEvent { [INFO] [stdout] 20 | | /// Emitted when the overall account summary (equity, cash, margin, etc.) is updated. [INFO] [stdout] 21 | | SummaryUpdate { [INFO] [stdout] 22 | | info: AccountInfo, [INFO] [stdout] ... | [INFO] [stdout] 26 | | / PositionUpdate { [INFO] [stdout] 27 | | | position: Position, [INFO] [stdout] 28 | | | timestamp: DateTime, [INFO] [stdout] 29 | | | }, [INFO] [stdout] | | |___- the second-largest variant contains at least 492 bytes [INFO] [stdout] 30 | | /// Emitted when new execution details are received for the account. [INFO] [stdout] 31 | | / ExecutionUpdate { [INFO] [stdout] 32 | | | execution: Execution, [INFO] [stdout] 33 | | | timestamp: DateTime, [INFO] [stdout] 34 | | | }, [INFO] [stdout] | | |___- the largest variant contains at least 700 bytes [INFO] [stdout] ... | [INFO] [stdout] 44 | | }, [INFO] [stdout] 45 | | } [INFO] [stdout] | |___^ the entire enum is at least 704 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 32 - execution: Execution, [INFO] [stdout] 32 + execution: Box, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data_subscription.rs:306:59 [INFO] [stdout] | [INFO] [stdout] 306 | ... { if self.state.active.load(Ordering::SeqCst) { if let Err(e) = self.cancel() { error!("Drop: Error cancelling TickDataSubscription {}: {:?}", self.state.req_id, e); } } } } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 306 - impl Drop for TickDataSubscription { fn drop(&mut self) { if self.state.active.load(Ordering::SeqCst) { if let Err(e) = self.cancel() { error!("Drop: Error cancelling TickDataSubscription {}: {:?}", self.state.req_id, e); } } } } [INFO] [stdout] 306 + impl Drop for TickDataSubscription { fn drop(&mut self) { if self.state.active.load(Ordering::SeqCst) && let Err(e) = self.cancel() { error!("Drop: Error cancelling TickDataSubscription {}: {:?}", self.state.req_id, e); } } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data_subscription.rs:381:62 [INFO] [stdout] | [INFO] [stdout] 381 | ... { if self.state.active.load(Ordering::SeqCst) { if let Err(e) = self.cancel() { error!("Drop: Error cancelling RealTimeBarSubscription {}: {:?}", self.state.req_id, e); } } } } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 381 - impl Drop for RealTimeBarSubscription { fn drop(&mut self) { if self.state.active.load(Ordering::SeqCst) { if let Err(e) = self.cancel() { error!("Drop: Error cancelling RealTimeBarSubscription {}: {:?}", self.state.req_id, e); } } } } [INFO] [stdout] 381 + impl Drop for RealTimeBarSubscription { fn drop(&mut self) { if self.state.active.load(Ordering::SeqCst) && let Err(e) = self.cancel() { error!("Drop: Error cancelling RealTimeBarSubscription {}: {:?}", self.state.req_id, e); } } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data_subscription.rs:468:61 [INFO] [stdout] | [INFO] [stdout] 468 | ... { if self.state.active.load(Ordering::SeqCst) { if let Err(e) = self.cancel() { error!("Drop: Error cancelling TickByTickSubscription {}: {:?}", self.state.req_id, e); } } } } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 468 - impl Drop for TickByTickSubscription { fn drop(&mut self) { if self.state.active.load(Ordering::SeqCst) { if let Err(e) = self.cancel() { error!("Drop: Error cancelling TickByTickSubscription {}: {:?}", self.state.req_id, e); } } } } [INFO] [stdout] 468 + impl Drop for TickByTickSubscription { fn drop(&mut self) { if self.state.active.load(Ordering::SeqCst) && let Err(e) = self.cancel() { error!("Drop: Error cancelling TickByTickSubscription {}: {:?}", self.state.req_id, e); } } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/financial_report_parser.rs:339:13 [INFO] [stdout] | [INFO] [stdout] 339 | / if let Some(issue) = current_issue.as_mut() { [INFO] [stdout] 340 | | if let Some(id_type) = get_attr_value(&e, b"Type")? { [INFO] [stdout] 341 | | let is_outer_tag_empty = e.is_empty(); // Capture state of the StartEvent itself [INFO] [stdout] ... | [INFO] [stdout] 373 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 339 ~ if let Some(issue) = current_issue.as_mut() [INFO] [stdout] 340 ~ && let Some(id_type) = get_attr_value(&e, b"Type")? { [INFO] [stdout] 341 | let is_outer_tag_empty = e.is_empty(); // Capture state of the StartEvent itself [INFO] [stdout] ... [INFO] [stdout] 371 | } // else: is_outer_tag_empty is true. Tag was . Attributes parsed. No content or separate end tag needed. [INFO] [stdout] 372 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/financial_report_parser.rs:389:13 [INFO] [stdout] | [INFO] [stdout] 389 | / if let Some(issue) = current_issue.as_mut() { [INFO] [stdout] 390 | | if !e.is_empty() { [INFO] [stdout] 391 | | if let Ok(Event::Text(text_e)) = reader.read_event_into(&mut buf) { [INFO] [stdout] 392 | | issue.global_listing_type = Some(text_e.decode().map_err(|e| IBKRError::ParseError(e.to_string()))?.into_owned()); [INFO] [stdout] ... | [INFO] [stdout] 397 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 389 ~ if let Some(issue) = current_issue.as_mut() [INFO] [stdout] 390 ~ && !e.is_empty() { [INFO] [stdout] 391 | if let Ok(Event::Text(text_e)) = reader.read_event_into(&mut buf) { [INFO] [stdout] ... [INFO] [stdout] 395 | } else { return Err(IBKRError::ParseError("Expected text for ".into())); } [INFO] [stdout] 396 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data_subscription.rs:585:62 [INFO] [stdout] | [INFO] [stdout] 585 | ... { if self.state.active.load(Ordering::SeqCst) { if let Err(e) = self.cancel() { error!("Drop: Error cancelling MarketDepthSubscription {}: {:?}", self.state.req_id, e); } } } } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 585 - impl Drop for MarketDepthSubscription { fn drop(&mut self) { if self.state.active.load(Ordering::SeqCst) { if let Err(e) = self.cancel() { error!("Drop: Error cancelling MarketDepthSubscription {}: {:?}", self.state.req_id, e); } } } } [INFO] [stdout] 585 + impl Drop for MarketDepthSubscription { fn drop(&mut self) { if self.state.active.load(Ordering::SeqCst) && let Err(e) = self.cancel() { error!("Drop: Error cancelling MarketDepthSubscription {}: {:?}", self.state.req_id, e); } } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data_subscription.rs:655:65 [INFO] [stdout] | [INFO] [stdout] 655 | ... { if self.state.active.load(Ordering::SeqCst) { if let Err(e) = self.cancel() { error!("Drop: Error cancelling HistoricalDataSubscription {}: {:?}", self.state.req_id, e); } } } } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 655 - impl Drop for HistoricalDataSubscription { fn drop(&mut self) { if self.state.active.load(Ordering::SeqCst) { if let Err(e) = self.cancel() { error!("Drop: Error cancelling HistoricalDataSubscription {}: {:?}", self.state.req_id, e); } } } } [INFO] [stdout] 655 + impl Drop for HistoricalDataSubscription { fn drop(&mut self) { if self.state.active.load(Ordering::SeqCst) && let Err(e) = self.cancel() { error!("Drop: Error cancelling HistoricalDataSubscription {}: {:?}", self.state.req_id, e); } } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/financial_report_parser.rs:853:3 [INFO] [stdout] | [INFO] [stdout] 853 | / if let Some(contact) = &report.contact_info { [INFO] [stdout] 854 | | if final_company_info.country.is_none() { final_company_info.country = contact.country_name.clone(); } // Get country from co... [INFO] [stdout] 855 | | } [INFO] [stdout] | |___^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 853 ~ if let Some(contact) = &report.contact_info [INFO] [stdout] 854 ~ && final_company_info.country.is_none() { final_company_info.country = contact.country_name.clone(); } // Get country from contact info [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/financial_report_parser.rs:856:3 [INFO] [stdout] | [INFO] [stdout] 856 | / if let Some(web) = &report.web_links { [INFO] [stdout] 857 | | if final_company_info.web_url.is_none() { final_company_info.web_url = web.home_page.clone(); } [INFO] [stdout] 858 | | } [INFO] [stdout] | |___^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 856 ~ if let Some(web) = &report.web_links [INFO] [stdout] 857 ~ && final_company_info.web_url.is_none() { final_company_info.web_url = web.home_page.clone(); } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/financial_report_parser.rs:859:3 [INFO] [stdout] | [INFO] [stdout] 859 | / if let Some(text_item) = report.text_info.iter().find(|t| t.text_type.as_deref() == Some("Business Summary")) { [INFO] [stdout] 860 | | if final_company_info.business_description.is_none() { final_company_info.business_description = text_item.text.clone(); } [INFO] [stdout] 861 | | } [INFO] [stdout] | |___^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 859 ~ if let Some(text_item) = report.text_info.iter().find(|t| t.text_type.as_deref() == Some("Business Summary")) [INFO] [stdout] 860 ~ && final_company_info.business_description.is_none() { final_company_info.business_description = text_item.text.clone(); } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/handler.rs:45:3 [INFO] [stdout] | [INFO] [stdout] 45 | / fn order_status( [INFO] [stdout] 46 | | &self, [INFO] [stdout] 47 | | order_id: i32, [INFO] [stdout] 48 | | order_status: OrderStatus, [INFO] [stdout] ... | [INFO] [stdout] 57 | | mkt_cap_price: Option, // Market cap price for orders benefiting from price improvement [INFO] [stdout] 58 | | ); [INFO] [stdout] | |___^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/handler.rs:95:3 [INFO] [stdout] | [INFO] [stdout] 95 | fn portfolio_value(&self, contract: &Contract, position: f64, market_price: f64, market_value: f64, average_cost: f64, unrealized_pnl: f64, realized_pnl: f64, account_name: &str); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/handler.rs:149:3 [INFO] [stdout] | [INFO] [stdout] 149 | / fn security_definition_option_parameter( [INFO] [stdout] 150 | | &self, [INFO] [stdout] 151 | | req_id: i32, [INFO] [stdout] 152 | | exchange: &str, [INFO] [stdout] ... | [INFO] [stdout] 157 | | strikes: &[f64], // Using slice for borrowing [INFO] [stdout] 158 | | ); [INFO] [stdout] | |___^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/handler.rs:206:3 [INFO] [stdout] | [INFO] [stdout] 206 | / fn tick_efp(&self, req_id: i32, tick_type: TickType, basis_points: f64, formatted_basis_points: &str, [INFO] [stdout] 207 | | implied_futures_price: f64, hold_days: i32, future_last_trade_date: &str, [INFO] [stdout] 208 | | dividend_impact: f64, dividends_to_last_trade_date: f64); [INFO] [stdout] | |______________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/handler.rs:214:3 [INFO] [stdout] | [INFO] [stdout] 214 | / fn real_time_bar(&self, req_id: i32, time: i64, open: f64, high: f64, low: f64, close: f64, [INFO] [stdout] 215 | | volume: f64, wap: f64, count: i32); // Use f64 for Decimal volume/wap [INFO] [stdout] | |_____________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/handler.rs:226:3 [INFO] [stdout] | [INFO] [stdout] 226 | / fn tick_by_tick_all_last(&self, req_id: i32, tick_type: i32, time: i64, price: f64, size: f64, [INFO] [stdout] 227 | | tick_attrib_last: TickAttribLast, exchange: &str, special_conditions: &str); [INFO] [stdout] | |______________________________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/handler.rs:228:3 [INFO] [stdout] | [INFO] [stdout] 228 | / fn tick_by_tick_bid_ask(&self, req_id: i32, time: i64, bid_price: f64, ask_price: f64, bid_size: f64, [INFO] [stdout] 229 | | ask_size: f64, tick_attrib_bid_ask: TickAttribBidAsk); [INFO] [stdout] | |_______________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/handler.rs:234:3 [INFO] [stdout] | [INFO] [stdout] 234 | / fn update_mkt_depth_l2(&self, req_id: i32, position: i32, market_maker: &str, operation: i32, [INFO] [stdout] 235 | | side: i32, price: f64, size: f64, is_smart_depth: bool); [INFO] [stdout] | |________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/handler.rs:241:3 [INFO] [stdout] | [INFO] [stdout] 241 | / fn scanner_data(&self, req_id: i32, rank: i32, contract_details: &ContractDetails, distance: &str, [INFO] [stdout] 242 | | benchmark: &str, projection: &str, legs_str: Option<&str>); [INFO] [stdout] | |____________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/handler.rs:336:3 [INFO] [stdout] | [INFO] [stdout] 336 | / pub fn new(server_version: i32, [INFO] [stdout] 337 | | client: Arc, [INFO] [stdout] 338 | | account: Arc, [INFO] [stdout] 339 | | order: Arc, [INFO] [stdout] ... | [INFO] [stdout] 343 | | data_fin: Arc, [INFO] [stdout] 344 | | fin_adv: Arc) -> Self { // Add fin_adv parameter [INFO] [stdout] | |_______________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/news_subscription.rs:217:5 [INFO] [stdout] | [INFO] [stdout] 217 | / if self.state.active.load(std::sync::atomic::Ordering::SeqCst) { [INFO] [stdout] 218 | | if let Err(e) = self.cancel() { [INFO] [stdout] 219 | | error!( [INFO] [stdout] 220 | | "Drop: Error cancelling NewsSubscription (ObsID {}): {:?}", [INFO] [stdout] ... | [INFO] [stdout] 224 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 217 ~ if self.state.active.load(std::sync::atomic::Ordering::SeqCst) [INFO] [stdout] 218 ~ && let Err(e) = self.cancel() { [INFO] [stdout] 219 | error!( [INFO] [stdout] ... [INFO] [stdout] 222 | ); [INFO] [stdout] 223 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/min_server_ver.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | / pub mod min_server_ver { [INFO] [stdout] 7 | | pub const REAL_TIME_BARS: i32 = 34; [INFO] [stdout] 8 | | pub const SCALE_ORDERS: i32 = 35; [INFO] [stdout] 9 | | pub const SNAPSHOT_MKT_DATA: i32 = 35; [INFO] [stdout] ... | [INFO] [stdout] 200 | | pub const MAX_SUPPORTED_VERSION: i32 = 187; [INFO] [stdout] 201 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/news_subscription.rs:428:5 [INFO] [stdout] | [INFO] [stdout] 428 | / if self.state.active.load(std::sync::atomic::Ordering::SeqCst) { [INFO] [stdout] 429 | | if let Err(e) = self.cancel() { [INFO] [stdout] 430 | | error!( [INFO] [stdout] 431 | | "Drop: Error cancelling HistoricalNewsSubscription (ReqID {}): {:?}", [INFO] [stdout] ... | [INFO] [stdout] 435 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 428 ~ if self.state.active.load(std::sync::atomic::Ordering::SeqCst) [INFO] [stdout] 429 ~ && let Err(e) = self.cancel() { [INFO] [stdout] 430 | error!( [INFO] [stdout] ... [INFO] [stdout] 433 | ); [INFO] [stdout] 434 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/data_observer.rs:43:3 [INFO] [stdout] | [INFO] [stdout] 43 | / fn on_tick_by_tick_all_last( [INFO] [stdout] 44 | | &self, [INFO] [stdout] 45 | | req_id: i32, [INFO] [stdout] 46 | | tick_type: i32, // 1 for Last, 2 for AllLast [INFO] [stdout] ... | [INFO] [stdout] 52 | | special_conditions: &str, [INFO] [stdout] 53 | | ) {} [INFO] [stdout] | |___^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/data_observer.rs:56:3 [INFO] [stdout] | [INFO] [stdout] 56 | / fn on_tick_by_tick_bid_ask( [INFO] [stdout] 57 | | &self, [INFO] [stdout] 58 | | req_id: i32, [INFO] [stdout] 59 | | time: DateTime, [INFO] [stdout] ... | [INFO] [stdout] 64 | | tick_attrib_bid_ask: &TickAttribBidAsk, [INFO] [stdout] 65 | | ) {} [INFO] [stdout] | |___^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/data_observer.rs:78:12 [INFO] [stdout] | [INFO] [stdout] 78 | ticks: &[(DateTime, TickAttribBidAsk, f64, f64, f64, f64)], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/data_observer.rs:87:12 [INFO] [stdout] | [INFO] [stdout] 87 | ticks: &[(DateTime, TickAttribLast, f64, f64, String, String)], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/data_observer.rs:111:3 [INFO] [stdout] | [INFO] [stdout] 111 | / fn on_update_mkt_depth_l2( [INFO] [stdout] 112 | | &self, [INFO] [stdout] 113 | | req_id: i32, [INFO] [stdout] 114 | | position: i32, [INFO] [stdout] ... | [INFO] [stdout] 120 | | is_smart_depth: bool, [INFO] [stdout] 121 | | ) {} [INFO] [stdout] | |___^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/data_observer.rs:149:12 [INFO] [stdout] | [INFO] [stdout] 149 | ticks: &[(DateTime, TickAttribBidAsk, f64, f64, f64, f64)], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/data_observer.rs:158:12 [INFO] [stdout] | [INFO] [stdout] 158 | ticks: &[(DateTime, TickAttribLast, f64, f64, String, String)], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/account_manager.rs:615:32 [INFO] [stdout] | [INFO] [stdout] 615 | let is_active_position = self.account_state.read().portfolio.get(&con_id_str) [INFO] [stdout] | ________________________________^ [INFO] [stdout] 616 | | .map_or(false, |p| p.quantity != 0.0); [INFO] [stdout] | |_____________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 616 - .map_or(false, |p| p.quantity != 0.0); [INFO] [stdout] 616 + .is_some_and(|p| p.quantity != 0.0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/account_manager.rs:649:7 [INFO] [stdout] | [INFO] [stdout] 649 | / if !active_subscriptions.contains(&con_id) { [INFO] [stdout] 650 | | if let Err(e) = self._subscribe_pnl_for_position(con_id, &account_id) { [INFO] [stdout] 651 | | warn!("Error subscribing PnL for con_id {}: {:?}", con_id, e); [INFO] [stdout] 652 | | } [INFO] [stdout] 653 | | } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 649 ~ if !active_subscriptions.contains(&con_id) [INFO] [stdout] 650 ~ && let Err(e) = self._subscribe_pnl_for_position(con_id, &account_id) { [INFO] [stdout] 651 | warn!("Error subscribing PnL for con_id {}: {:?}", con_id, e); [INFO] [stdout] 652 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/account_manager.rs:762:65 [INFO] [stdout] | [INFO] [stdout] 762 | let request_msg = encoder.encode_request_executions(req_id, &filter)?; [INFO] [stdout] | ^^^^^^^ help: change this to: `filter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/account_manager.rs:785:13 [INFO] [stdout] | [INFO] [stdout] 785 | while exec_state.get(&req_id).map_or(false, |s| s.waiting && !s.end_received) && start_time.elapsed() < wait_timeout { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 785 - while exec_state.get(&req_id).map_or(false, |s| s.waiting && !s.end_received) && start_time.elapsed() < wait_timeout { [INFO] [stdout] 785 + while exec_state.get(&req_id).is_some_and(|s| s.waiting && !s.end_received) && start_time.elapsed() < wait_timeout { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/account_manager.rs:790:14 [INFO] [stdout] | [INFO] [stdout] 790 | if exec_state.get(&req_id).map_or(true, |s| s.waiting && !s.end_received) { // Still waiting after timeout [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 790 - if exec_state.get(&req_id).map_or(true, |s| s.waiting && !s.end_received) { // Still waiting after timeout [INFO] [stdout] 790 + if exec_state.get(&req_id).is_none_or(|s| s.waiting && !s.end_received) { // Still waiting after timeout [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/account_manager.rs:799:10 [INFO] [stdout] | [INFO] [stdout] 799 | if exec_state.get(&req_id).map_or(true, |s| !s.end_received) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 799 - if exec_state.get(&req_id).map_or(true, |s| !s.end_received) { [INFO] [stdout] 799 + if exec_state.get(&req_id).is_none_or(|s| !s.end_received) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/account_manager.rs:982:13 [INFO] [stdout] | [INFO] [stdout] 982 | / if let Some(id) = u_state.current_summary_req_id { [INFO] [stdout] 983 | | if let Ok(cancel_msg) = encoder.encode_cancel_account_summary(id) { [INFO] [stdout] 984 | | let _ = self.message_broker.send_message(&cancel_msg); [INFO] [stdout] 985 | | } [INFO] [stdout] 986 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 982 ~ if let Some(id) = u_state.current_summary_req_id [INFO] [stdout] 983 ~ && let Ok(cancel_msg) = encoder.encode_cancel_account_summary(id) { [INFO] [stdout] 984 | let _ = self.message_broker.send_message(&cancel_msg); [INFO] [stdout] 985 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/account_manager.rs:995:11 [INFO] [stdout] | [INFO] [stdout] 995 | / if let Some(id) = u_state.current_summary_req_id { [INFO] [stdout] 996 | | if let Ok(cancel_msg) = encoder.encode_cancel_account_summary(id) { [INFO] [stdout] 997 | | let _ = self.message_broker.send_message(&cancel_msg); [INFO] [stdout] 998 | | } [INFO] [stdout] 999 | | } [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 995 ~ if let Some(id) = u_state.current_summary_req_id [INFO] [stdout] 996 ~ && let Ok(cancel_msg) = encoder.encode_cancel_account_summary(id) { [INFO] [stdout] 997 | let _ = self.message_broker.send_message(&cancel_msg); [INFO] [stdout] 998 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/account_manager.rs:1545:12 [INFO] [stdout] | [INFO] [stdout] 1545 | } else if !should_be_subscribed_pnl && is_currently_subscribed_pnl { [INFO] [stdout] | ____________^ [INFO] [stdout] 1546 | | if let Err(e) = self._unsubscribe_pnl_for_position(con_id) { [INFO] [stdout] 1547 | | warn!("Auto-unsubscribe PnL (from position) failed for con_id {}: {:?}", con_id, e); [INFO] [stdout] 1548 | | } [INFO] [stdout] 1549 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1545 ~ } else if !should_be_subscribed_pnl && is_currently_subscribed_pnl [INFO] [stdout] 1546 ~ && let Err(e) = self._unsubscribe_pnl_for_position(con_id) { [INFO] [stdout] 1547 | warn!("Auto-unsubscribe PnL (from position) failed for con_id {}: {:?}", con_id, e); [INFO] [stdout] 1548 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/data_fin_manager.rs:592:68 [INFO] [stdout] | [INFO] [stdout] 592 | return Err(IBKRError::ParseError(std::format!("{}: {}", e.to_string(), json_str))); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data_fin_manager.rs:779:9 [INFO] [stdout] | [INFO] [stdout] 779 | / if let Some(expected_count) = state.wsh_event_expected_count { [INFO] [stdout] 780 | | if state.wsh_event_data_json_list.len() >= expected_count { [INFO] [stdout] 781 | | state.request_complete = true; [INFO] [stdout] 782 | | info!("All expected WSH events ({}) received for request {}. Notifying waiter.", expected_count, req_id); [INFO] [stdout] ... | [INFO] [stdout] 785 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 779 ~ if let Some(expected_count) = state.wsh_event_expected_count [INFO] [stdout] 780 ~ && state.wsh_event_data_json_list.len() >= expected_count { [INFO] [stdout] 781 | state.request_complete = true; [INFO] [stdout] 782 | info!("All expected WSH events ({}) received for request {}. Notifying waiter.", expected_count, req_id); [INFO] [stdout] 783 | self.request_cond.notify_all(); [INFO] [stdout] 784 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/data_market_manager.rs:271:1 [INFO] [stdout] | [INFO] [stdout] 271 | / enum MarketStream { [INFO] [stdout] 272 | | /// State for a standard tick-based market data subscription. [INFO] [stdout] 273 | | TickData(MarketDataInfo), [INFO] [stdout] | | ------------------------ the largest variant contains at least 1176 bytes [INFO] [stdout] 274 | | /// State for a real-time bars subscription. [INFO] [stdout] ... | [INFO] [stdout] 278 | | MarketDepth(MarketDepthInfo), [INFO] [stdout] | | ---------------------------- the second-largest variant contains at least 560 bytes [INFO] [stdout] ... | [INFO] [stdout] 283 | | HistoricalTicks(HistoricalTicksRequestState), [INFO] [stdout] 284 | | } [INFO] [stdout] | |_^ the entire enum is at least 1176 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 273 - TickData(MarketDataInfo), [INFO] [stdout] 273 + TickData(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_market_manager.rs:448:5 [INFO] [stdout] | [INFO] [stdout] 448 | return Ok(()); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 448 - return Ok(()); [INFO] [stdout] 448 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/data_market_manager.rs:649:7 [INFO] [stdout] | [INFO] [stdout] 649 | /// that implements `CompletableState` and `Clone`. [INFO] [stdout] | ^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] = note: `#[warn(clippy::doc_overindented_list_items)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/data_market_manager.rs:985:3 [INFO] [stdout] | [INFO] [stdout] 985 | / pub(crate) fn internal_request_market_data( [INFO] [stdout] 986 | | &self, [INFO] [stdout] 987 | | req_id: i32, [INFO] [stdout] 988 | | contract: &Contract, [INFO] [stdout] ... | [INFO] [stdout] 993 | | desired_mkt_data_type: MarketDataType, [INFO] [stdout] 994 | | ) -> Result<(), IBKRError> { [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/data_market_manager.rs:1083:3 [INFO] [stdout] | [INFO] [stdout] 1083 | / pub fn get_market_data( // F changed to Fn from FnMut [INFO] [stdout] 1084 | | &self, [INFO] [stdout] 1085 | | contract: &Contract, [INFO] [stdout] 1086 | | generic_tick_list: &[GenericTickType], [INFO] [stdout] ... | [INFO] [stdout] 1094 | | where [INFO] [stdout] 1095 | | F: Fn(&MarketDataInfo) -> bool, [INFO] [stdout] | |___________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/parser_client.rs:38:10 [INFO] [stdout] | [INFO] [stdout] 38 | if error_code_int >= 1000 && error_code_int < 2000 { // Example range for TWS info/warnings [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1000..2000).contains(&error_code_int)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/parser_client.rs:49:6 [INFO] [stdout] | [INFO] [stdout] 49 | if error_code_int >= 2000 && error_code_int < 3000 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(2000..3000).contains(&error_code_int)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/data_market_manager.rs:1975:3 [INFO] [stdout] | [INFO] [stdout] 1975 | / pub fn get_historical_data( [INFO] [stdout] 1976 | | &self, [INFO] [stdout] 1977 | | contract: &Contract, [INFO] [stdout] 1978 | | end_date_time: Option>, // Use chrono DateTime [INFO] [stdout] ... | [INFO] [stdout] 1986 | | chart_options: &[(String, String)], // TagValue list [INFO] [stdout] 1987 | | ) -> Result, IBKRError> { [INFO] [stdout] | |__________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/data_market_manager.rs:2007:3 [INFO] [stdout] | [INFO] [stdout] 2007 | / pub(crate) fn internal_request_historical_data( [INFO] [stdout] 2008 | | &self, req_id: i32, contract: &Contract, end_date_time: Option>, [INFO] [stdout] 2009 | | duration_str: &str, bar_size_str: &str, what_to_show_str: &str, use_rth: bool, [INFO] [stdout] 2010 | | format_date: i32, keep_up_to_date: bool, chart_options: &[(String, String)], [INFO] [stdout] 2011 | | desired_mkt_data_type: MarketDataType [INFO] [stdout] 2012 | | ) -> Result<(), IBKRError> { [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser_data_market.rs:69:3 [INFO] [stdout] | [INFO] [stdout] 69 | / if let Some(size_tick_type) = tick_type.get_corresponding_size_tick() { [INFO] [stdout] 70 | | if size >= 0.0 { // Only send size if valid [INFO] [stdout] 71 | | log::trace!("Implied Tick Size: ID={}, Type={:?}, Size={}", ticker_id, size_tick_type, size); [INFO] [stdout] ... | [INFO] [stdout] 75 | | } [INFO] [stdout] | |___^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 69 ~ if let Some(size_tick_type) = tick_type.get_corresponding_size_tick() [INFO] [stdout] 70 ~ && size >= 0.0 { // Only send size if valid [INFO] [stdout] 71 | log::trace!("Implied Tick Size: ID={}, Type={:?}, Size={}", ticker_id, size_tick_type, size); [INFO] [stdout] 72 | // Pass the implied TickType enum variant to the handler [INFO] [stdout] 73 | handler.tick_size(ticker_id, size_tick_type, size); [INFO] [stdout] 74 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/data_market_manager.rs:2091:5 [INFO] [stdout] | [INFO] [stdout] 2091 | / match code { [INFO] [stdout] 2092 | | ClientErrorCode::MarketDataNotSubscribedDisplayDelayed => { [INFO] [stdout] 2093 | | info!("API Info received for market data request {}: Code={:?}, Msg={}", req_id, code, msg); [INFO] [stdout] 2094 | | return; [INFO] [stdout] 2095 | | } [INFO] [stdout] 2096 | | _ => {}, [INFO] [stdout] 2097 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 2091 ~ if code == ClientErrorCode::MarketDataNotSubscribedDisplayDelayed { [INFO] [stdout] 2092 + info!("API Info received for market data request {}: Code={:?}, Msg={}", req_id, code, msg); [INFO] [stdout] 2093 + return; [INFO] [stdout] 2094 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data_market_manager.rs:2144:9 [INFO] [stdout] | [INFO] [stdout] 2144 | / if let MarketStream::TickData(s) = sub_state { [INFO] [stdout] 2145 | | if s.is_blocking_quote_request { [INFO] [stdout] 2146 | | s.quote_received = true; // Mark quote flag too [INFO] [stdout] 2147 | | } [INFO] [stdout] 2148 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2144 ~ if let MarketStream::TickData(s) = sub_state [INFO] [stdout] 2145 ~ && s.is_blocking_quote_request { [INFO] [stdout] 2146 | s.quote_received = true; // Mark quote flag too [INFO] [stdout] 2147 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/data_market_manager.rs:2261:30 [INFO] [stdout] | [INFO] [stdout] 2261 | return Err(Timeout(format!("Scanner parameters request timed out after wait", ))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Scanner parameters request timed out after wait".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/data_market_manager.rs:2700:3 [INFO] [stdout] | [INFO] [stdout] 2700 | / pub fn request_historical_ticks( [INFO] [stdout] 2701 | | &self, [INFO] [stdout] 2702 | | contract: &Contract, [INFO] [stdout] 2703 | | start_date_time: Option>, [INFO] [stdout] ... | [INFO] [stdout] 2709 | | misc_options: &[(String, String)], [INFO] [stdout] 2710 | | ) -> Result { [INFO] [stdout] | |_____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/data_market_manager.rs:2721:3 [INFO] [stdout] | [INFO] [stdout] 2721 | / pub fn internal_request_historical_ticks( [INFO] [stdout] 2722 | | &self, req_id: i32, contract: &Contract, start_date_time: Option>, [INFO] [stdout] 2723 | | end_date_time: Option>, number_of_ticks: i32, what_to_show: WhatToShow, [INFO] [stdout] 2724 | | use_rth: bool, ignore_size: bool, misc_options: &[(String, String)] [INFO] [stdout] 2725 | | ) -> Result<(), IBKRError> { [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/data_market_manager.rs:2769:3 [INFO] [stdout] | [INFO] [stdout] 2769 | / pub fn get_historical_ticks( [INFO] [stdout] 2770 | | &self, [INFO] [stdout] 2771 | | contract: &Contract, [INFO] [stdout] 2772 | | start_date_time: Option>, [INFO] [stdout] ... | [INFO] [stdout] 2779 | | timeout: Duration, [INFO] [stdout] 2780 | | ) -> Result, IBKRError> { [INFO] [stdout] | |_____________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/data_market_manager.rs:2991:3 [INFO] [stdout] | [INFO] [stdout] 2991 | / pub fn request_observe_market_data( [INFO] [stdout] 2992 | | &self, [INFO] [stdout] 2993 | | contract: &Contract, [INFO] [stdout] 2994 | | generic_tick_list: &[GenericTickType], [INFO] [stdout] ... | [INFO] [stdout] 2999 | | observer: T, [INFO] [stdout] 3000 | | ) -> Result<(i32, ObserverId), IBKRError> { [INFO] [stdout] | |___________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/data_market_manager.rs:3145:3 [INFO] [stdout] | [INFO] [stdout] 3145 | / pub fn request_observe_historical_data( [INFO] [stdout] 3146 | | &self, [INFO] [stdout] 3147 | | contract: &Contract, [INFO] [stdout] 3148 | | end_date_time: Option>, [INFO] [stdout] ... | [INFO] [stdout] 3157 | | observer: T, [INFO] [stdout] 3158 | | ) -> Result<(i32, ObserverId), IBKRError> { [INFO] [stdout] | |___________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/data_market_manager.rs:3185:3 [INFO] [stdout] | [INFO] [stdout] 3185 | / pub fn request_observe_historical_ticks( [INFO] [stdout] 3186 | | &self, [INFO] [stdout] 3187 | | contract: &Contract, [INFO] [stdout] 3188 | | start_date_time: Option>, [INFO] [stdout] ... | [INFO] [stdout] 3195 | | observer: T, [INFO] [stdout] 3196 | | ) -> Result<(i32, ObserverId), IBKRError> { [INFO] [stdout] | |___________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser_data_ref.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | / if is_bond { [INFO] [stdout] 20 | | if contract_details.bond_details.is_none() { [INFO] [stdout] 21 | | contract_details.bond_details = Some(BondDetails::default()); [INFO] [stdout] 22 | | } [INFO] [stdout] 23 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 19 ~ if is_bond [INFO] [stdout] 20 ~ && contract_details.bond_details.is_none() { [INFO] [stdout] 21 | contract_details.bond_details = Some(BondDetails::default()); [INFO] [stdout] 22 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data_market_manager.rs:3767:32 [INFO] [stdout] | [INFO] [stdout] 3767 | / ... if parts.len() >= 4 { [INFO] [stdout] 3768 | | ... if let Ok(ts) = parts[0].parse::() { [INFO] [stdout] 3769 | | ... state.latest_news_time = Some(ts); [INFO] [stdout] ... | [INFO] [stdout] 3772 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3767 ~ if parts.len() >= 4 [INFO] [stdout] 3768 ~ && let Ok(ts) = parts[0].parse::() { [INFO] [stdout] 3769 | state.latest_news_time = Some(ts); [INFO] [stdout] 3770 | // Could store full TickNewsData if needed [INFO] [stdout] 3771 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/parser_data_ref.rs:80:6 [INFO] [stdout] | [INFO] [stdout] 80 | if server_version >= min_server_ver::MD_SIZE_MULTIPLIER && server_version < min_server_ver::SIZE_RULES { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(min_server_ver::MD_SIZE_MULTIPLIER..min_server_ver::SIZE_RULES).contains(&server_version)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data_market_manager.rs:3932:7 [INFO] [stdout] | [INFO] [stdout] 3932 | / if let Some(target_count) = state.target_bar_count { [INFO] [stdout] 3933 | | if !state.completed && state.bars.len() >= target_count { [INFO] [stdout] 3934 | | debug!("Target bar count ({}) reached for blocking RealTimeBars ReqID {}. Notifying waiter.", target_count, req_id); [INFO] [stdout] 3935 | | state.completed = true; [INFO] [stdout] ... | [INFO] [stdout] 3938 | | } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3932 ~ if let Some(target_count) = state.target_bar_count [INFO] [stdout] 3933 ~ && !state.completed && state.bars.len() >= target_count { [INFO] [stdout] 3934 | debug!("Target bar count ({}) reached for blocking RealTimeBars ReqID {}. Notifying waiter.", target_count, req_id); [INFO] [stdout] 3935 | state.completed = true; [INFO] [stdout] 3936 | self.request_cond.notify_all(); [INFO] [stdout] 3937 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `clone` can be replaced with `std::slice::from_ref` [INFO] [stdout] --> src/data_market_manager.rs:4108:60 [INFO] [stdout] | [INFO] [stdout] 4108 | observer.on_historical_ticks_bid_ask(req_id, &[tick.clone()], done); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `std::slice::from_ref(&tick)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cloned_ref_to_slice_refs [INFO] [stdout] = note: `#[warn(clippy::cloned_ref_to_slice_refs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `clone` can be replaced with `std::slice::from_ref` [INFO] [stdout] --> src/data_market_manager.rs:4161:57 [INFO] [stdout] | [INFO] [stdout] 4161 | observer.on_historical_ticks_last(req_id, &[tick.clone()], done); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `std::slice::from_ref(&tick)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cloned_ref_to_slice_refs [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/parser_data_ref.rs:385:6 [INFO] [stdout] | [INFO] [stdout] 385 | if server_version >= min_server_ver::MD_SIZE_MULTIPLIER && server_version < min_server_ver::SIZE_RULES { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(min_server_ver::MD_SIZE_MULTIPLIER..min_server_ver::SIZE_RULES).contains(&server_version)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/parser_data_ref.rs:439:6 [INFO] [stdout] | [INFO] [stdout] 439 | if server_version >= min_server_ver::FRACTIONAL_SIZE_SUPPORT && server_version < min_server_ver::SIZE_RULES { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(min_server_ver::FRACTIONAL_SIZE_SUPPORT..min_server_ver::SIZE_RULES).contains(&server_version)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/parser_order.rs:120:55 [INFO] [stdout] | [INFO] [stdout] 120 | self.request.aux_price = if self.msg_version < 30 { [INFO] [stdout] | _______________________________________________________^ [INFO] [stdout] 121 | | self.parser.read_double_max(false)? [INFO] [stdout] 122 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/parser_order.rs:122:12 [INFO] [stdout] | [INFO] [stdout] 122 | } else { [INFO] [stdout] | ____________^ [INFO] [stdout] 123 | | self.parser.read_double_max(false)? [INFO] [stdout] 124 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/data_news_manager.rs:467:3 [INFO] [stdout] | [INFO] [stdout] 467 | / pub(crate) fn internal_request_historical_news_stream( [INFO] [stdout] 468 | | &self, [INFO] [stdout] 469 | | req_id: i32, [INFO] [stdout] 470 | | con_id: i32, [INFO] [stdout] ... | [INFO] [stdout] 476 | | state_weak: Weak>, [INFO] [stdout] 477 | | ) -> Result<(), IBKRError> { [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_news_manager.rs:594:9 [INFO] [stdout] | [INFO] [stdout] 594 | return; // Handled [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 593 - event_subs.remove(&req_id); // Remove on error [INFO] [stdout] 594 - return; // Handled [INFO] [stdout] 593 + event_subs.remove(&req_id); // Remove on error// Handled [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data_news_manager.rs:755:5 [INFO] [stdout] | [INFO] [stdout] 755 | / if let Some(state_weak) = event_subs.get(&req_id) { [INFO] [stdout] 756 | | if let Some(state_arc) = state_weak.upgrade() { [INFO] [stdout] 757 | | let item = HistoricalNews { [INFO] [stdout] 758 | | time: time.to_string(), [INFO] [stdout] ... | [INFO] [stdout] 765 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 755 ~ if let Some(state_weak) = event_subs.get(&req_id) [INFO] [stdout] 756 ~ && let Some(state_arc) = state_weak.upgrade() { [INFO] [stdout] 757 | let item = HistoricalNews { [INFO] [stdout] ... [INFO] [stdout] 763 | state_arc.push_event(HistoricalNewsEvent::Article(item)); [INFO] [stdout] 764 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/parser_order.rs:548:34 [INFO] [stdout] | [INFO] [stdout] 548 | if self.msg_version >= 28 && self.request.scale_price_increment.map_or(false, |p| p > 0.0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 548 - if self.msg_version >= 28 && self.request.scale_price_increment.map_or(false, |p| p > 0.0) { [INFO] [stdout] 548 + if self.msg_version >= 28 && self.request.scale_price_increment.is_some_and(|p| p > 0.0) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/parser_order.rs:573:10 [INFO] [stdout] | [INFO] [stdout] 573 | if self.request.hedge_type.as_deref().map_or(false, |s| !s.is_empty()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 573 - if self.request.hedge_type.as_deref().map_or(false, |s| !s.is_empty()) { [INFO] [stdout] 573 + if self.request.hedge_type.as_deref().is_some_and(|s| !s.is_empty()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/data_ref_manager.rs:143:7 [INFO] [stdout] | [INFO] [stdout] 143 | state.is_smart_components_workflow = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `data_ref_manager::DataRefRequestState { is_smart_components_workflow: true, market_data_req_id: Some(market_data_req_id), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/data_ref_manager.rs:142:7 [INFO] [stdout] | [INFO] [stdout] 142 | let mut state = DataRefRequestState::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data_ref_manager.rs:399:11 [INFO] [stdout] | [INFO] [stdout] 399 | / if state.is_smart_components_workflow { [INFO] [stdout] 400 | | if let Some(market_data_req_id) = state.market_data_req_id { [INFO] [stdout] 401 | | match enc.encode_cancel_market_data(market_data_req_id) { [INFO] [stdout] 402 | | Ok(cancel_msg) => { [INFO] [stdout] ... | [INFO] [stdout] 414 | | } [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 399 ~ if state.is_smart_components_workflow [INFO] [stdout] 400 ~ && let Some(market_data_req_id) = state.market_data_req_id { [INFO] [stdout] 401 | match enc.encode_cancel_market_data(market_data_req_id) { [INFO] [stdout] ... [INFO] [stdout] 412 | } [INFO] [stdout] 413 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/protocol_dec_parser.rs:146:20 [INFO] [stdout] | [INFO] [stdout] 146 | time_opt_str.map(|x| parse_tws_date_time(x)).transpose() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_tws_date_time` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/protocol_dec_parser.rs:379:20 [INFO] [stdout] | [INFO] [stdout] 379 | time_opt_str.map(|x| parse_tws_date_or_month(x)).transpose() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_tws_date_or_month` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/protocol_dec_parser.rs:395:20 [INFO] [stdout] | [INFO] [stdout] 395 | date_opt_str.map(|x| parse_tws_date(x)).transpose() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_tws_date` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/protocol_dec_parser.rs:420:18 [INFO] [stdout] | [INFO] [stdout] 420 | ym_opt_str.map(|x| parse_tws_month(x)).transpose() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_tws_month` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/protocol_dec_parser.rs:437:20 [INFO] [stdout] | [INFO] [stdout] 437 | time_opt_str.map(|x| parse_tws_time(x)).transpose() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_tws_time` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/order_manager.rs:87:1 [INFO] [stdout] | [INFO] [stdout] 87 | / pub enum OrderEvent { [INFO] [stdout] 88 | | /// Order state was updated (status change, fills, etc.) [INFO] [stdout] 89 | | Update(Order), [INFO] [stdout] | | ------------- the largest variant contains at least 2824 bytes [INFO] [stdout] 90 | | /// An error occurred with this order [INFO] [stdout] 91 | | Error(IBKRError), [INFO] [stdout] | | ---------------- the second-largest variant contains at least 32 bytes [INFO] [stdout] 92 | | } [INFO] [stdout] | |_^ the entire enum is at least 2824 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 89 - Update(Order), [INFO] [stdout] 89 + Update(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/order_manager.rs:275:26 [INFO] [stdout] | [INFO] [stdout] 275 | order_update_condvars: RwLock, Condvar)>>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/order_manager.rs:547:10 [INFO] [stdout] | [INFO] [stdout] 547 | .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/order_manager.rs:801:5 [INFO] [stdout] | [INFO] [stdout] 801 | / if let Some(delta_neutral_order_type) = &modified_request.delta_neutral_order_type { [INFO] [stdout] 802 | | if delta_neutral_order_type.as_bytes() == &[195, 142, 195, 158] /* ÎÞ */ { [INFO] [stdout] 803 | | modified_request.delta_neutral_order_type = None; [INFO] [stdout] 804 | | } [INFO] [stdout] 805 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 801 ~ if let Some(delta_neutral_order_type) = &modified_request.delta_neutral_order_type [INFO] [stdout] 802 ~ && delta_neutral_order_type.as_bytes() == &[195, 142, 195, 158] /* ÎÞ */ { [INFO] [stdout] 803 | modified_request.delta_neutral_order_type = None; [INFO] [stdout] 804 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/order_manager.rs:802:10 [INFO] [stdout] | [INFO] [stdout] 802 | if delta_neutral_order_type.as_bytes() == &[195, 142, 195, 158] /* ÎÞ */ { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^--------------------- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `[195, 142, 195, 158]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/order_manager.rs:809:5 [INFO] [stdout] | [INFO] [stdout] 809 | / if let Some(qty) = updates.quantity { [INFO] [stdout] 810 | | if modified_request.quantity != qty { [INFO] [stdout] 811 | | modified_request.quantity = qty; [INFO] [stdout] 812 | | changed = true; [INFO] [stdout] 813 | | } [INFO] [stdout] 814 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 809 ~ if let Some(qty) = updates.quantity [INFO] [stdout] 810 ~ && modified_request.quantity != qty { [INFO] [stdout] 811 | modified_request.quantity = qty; [INFO] [stdout] 812 | changed = true; [INFO] [stdout] 813 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/order_manager.rs:833:12 [INFO] [stdout] | [INFO] [stdout] 833 | } else if updates.aux_price.is_some() { [INFO] [stdout] | ____________^ [INFO] [stdout] 834 | | if modified_request.aux_price.is_some() { [INFO] [stdout] 835 | | modified_request.aux_price = None; [INFO] [stdout] 836 | | changed = true; [INFO] [stdout] 837 | | } [INFO] [stdout] 838 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 833 ~ } else if updates.aux_price.is_some() [INFO] [stdout] 834 ~ && modified_request.aux_price.is_some() { [INFO] [stdout] 835 | modified_request.aux_price = None; [INFO] [stdout] 836 | changed = true; [INFO] [stdout] 837 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/order_manager.rs:839:5 [INFO] [stdout] | [INFO] [stdout] 839 | / if let Some(tif) = updates.time_in_force { [INFO] [stdout] 840 | | if modified_request.time_in_force != tif { [INFO] [stdout] 841 | | modified_request.time_in_force = tif; [INFO] [stdout] 842 | | changed = true; [INFO] [stdout] 843 | | } [INFO] [stdout] 844 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 839 ~ if let Some(tif) = updates.time_in_force [INFO] [stdout] 840 ~ && modified_request.time_in_force != tif { [INFO] [stdout] 841 | modified_request.time_in_force = tif; [INFO] [stdout] 842 | changed = true; [INFO] [stdout] 843 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:355:5 [INFO] [stdout] | [INFO] [stdout] 355 | s.map_or(true, |val| val.is_empty()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 355 - s.map_or(true, |val| val.is_empty()) [INFO] [stdout] 355 + s.is_none_or(|val| val.is_empty()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:559:5 [INFO] [stdout] | [INFO] [stdout] 559 | / if self.server_version < min_server_ver::MANUAL_ORDER_TIME { [INFO] [stdout] 560 | | if order_cancel.manual_order_cancel_time.is_some() { [INFO] [stdout] 561 | | return Err(IBKRError::Unsupported("Server version does not support manual order cancel time attribute".to_string())); [INFO] [stdout] 562 | | } [INFO] [stdout] 563 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 559 ~ if self.server_version < min_server_ver::MANUAL_ORDER_TIME [INFO] [stdout] 560 ~ && order_cancel.manual_order_cancel_time.is_some() { [INFO] [stdout] 561 | return Err(IBKRError::Unsupported("Server version does not support manual order cancel time attribute".to_string())); [INFO] [stdout] 562 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:564:5 [INFO] [stdout] | [INFO] [stdout] 564 | / if self.server_version < min_server_ver::RFQ_FIELDS { [INFO] [stdout] 565 | | if order_cancel.ext_operator.is_some() || order_cancel.external_user_id.is_some() || order_cancel.manual_order_indicator.is... [INFO] [stdout] 566 | | return Err(IBKRError::Unsupported("Server version does not support ext operator, external user id and manual order indica... [INFO] [stdout] 567 | | } [INFO] [stdout] 568 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 564 ~ if self.server_version < min_server_ver::RFQ_FIELDS [INFO] [stdout] 565 ~ && (order_cancel.ext_operator.is_some() || order_cancel.external_user_id.is_some() || order_cancel.manual_order_indicator.is_some()) { [INFO] [stdout] 566 | return Err(IBKRError::Unsupported("Server version does not support ext operator, external user id and manual order indicator parameters".to_string())); [INFO] [stdout] 567 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:635:10 [INFO] [stdout] | [INFO] [stdout] 635 | if !request.algo_strategy.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.algo_strategy.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:649:10 [INFO] [stdout] | [INFO] [stdout] 649 | if !contract.sec_id_type.is_none() || !contract.sec_id.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `contract.sec_id_type.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:649:45 [INFO] [stdout] | [INFO] [stdout] 649 | if !contract.sec_id_type.is_none() || !contract.sec_id.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `contract.sec_id.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:684:10 [INFO] [stdout] | [INFO] [stdout] 684 | if !request.hedge_type.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.hedge_type.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:699:12 [INFO] [stdout] | [INFO] [stdout] 699 | || !request.delta_neutral_settling_firm.is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.delta_neutral_settling_firm.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:700:12 [INFO] [stdout] | [INFO] [stdout] 700 | || !request.delta_neutral_clearing_account.is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.delta_neutral_clearing_account.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:701:12 [INFO] [stdout] | [INFO] [stdout] 701 | || !request.delta_neutral_clearing_intent.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.delta_neutral_clearing_intent.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:708:10 [INFO] [stdout] | [INFO] [stdout] 708 | if !request.delta_neutral_open_close.is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.delta_neutral_open_close.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:711:12 [INFO] [stdout] | [INFO] [stdout] 711 | || !request.delta_neutral_designated_location.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.delta_neutral_designated_location.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:751:10 [INFO] [stdout] | [INFO] [stdout] 751 | if !contract.trading_class.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `contract.trading_class.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:757:57 [INFO] [stdout] | [INFO] [stdout] 757 | if self.server_version < min_server_ver::ALGO_ID && !request.algo_id.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.algo_id.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:761:10 [INFO] [stdout] | [INFO] [stdout] 761 | if !request.scale_table.is_none() || request.active_start_time.is_some() || request.active_stop_time.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.scale_table.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:775:10 [INFO] [stdout] | [INFO] [stdout] 775 | if !request.model_code.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.model_code.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:781:62 [INFO] [stdout] | [INFO] [stdout] 781 | if self.server_version < min_server_ver::EXT_OPERATOR && !request.ext_operator.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.ext_operator.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:795:11 [INFO] [stdout] | [INFO] [stdout] 795 | && (!request.mifid2_decision_maker.is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.mifid2_decision_maker.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:796:14 [INFO] [stdout] | [INFO] [stdout] 796 | || !request.mifid2_decision_algo.is_none()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.mifid2_decision_algo.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:802:11 [INFO] [stdout] | [INFO] [stdout] 802 | && (!request.mifid2_execution_trader.is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.mifid2_execution_trader.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:803:14 [INFO] [stdout] | [INFO] [stdout] 803 | || !request.mifid2_execution_algo.is_none()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.mifid2_execution_algo.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:843:10 [INFO] [stdout] | [INFO] [stdout] 843 | if !request.advanced_error_override.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.advanced_error_override.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:864:10 [INFO] [stdout] | [INFO] [stdout] 864 | if !request.customer_account.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.customer_account.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:874:8 [INFO] [stdout] | [INFO] [stdout] 874 | (!request.external_user_id.is_none() || request.manual_order_indicator.is_some()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.external_user_id.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:595:5 [INFO] [stdout] | [INFO] [stdout] 595 | / if self.server_version < min_server_ver::SCALE_ORDERS { [INFO] [stdout] 596 | | if request.scale_init_level_size.is_some() || request.scale_price_increment.is_some() { [INFO] [stdout] 597 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 598 | | "Server version does not support Scale orders (scaleInitLevelSize, scalePriceIncrement).".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 601 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 595 ~ if self.server_version < min_server_ver::SCALE_ORDERS [INFO] [stdout] 596 ~ && (request.scale_init_level_size.is_some() || request.scale_price_increment.is_some()) { [INFO] [stdout] 597 | return Err(IBKRError::Unsupported( [INFO] [stdout] 598 | "Server version does not support Scale orders (scaleInitLevelSize, scalePriceIncrement).".to_string(), [INFO] [stdout] 599 | )); [INFO] [stdout] 600 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:602:5 [INFO] [stdout] | [INFO] [stdout] 602 | / if self.server_version < min_server_ver::SSHORT_COMBO_LEGS { [INFO] [stdout] 603 | | if !contract.combo_legs.is_empty() { [INFO] [stdout] 604 | | for leg in &contract.combo_legs { [INFO] [stdout] 605 | | if leg.short_sale_slot != 0 || !leg.designated_location.is_empty() { [INFO] [stdout] ... | [INFO] [stdout] 612 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 602 ~ if self.server_version < min_server_ver::SSHORT_COMBO_LEGS [INFO] [stdout] 603 ~ && !contract.combo_legs.is_empty() { [INFO] [stdout] 604 | for leg in &contract.combo_legs { [INFO] [stdout] ... [INFO] [stdout] 610 | } [INFO] [stdout] 611 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:613:5 [INFO] [stdout] | [INFO] [stdout] 613 | / if self.server_version < min_server_ver::WHAT_IF_ORDERS { [INFO] [stdout] 614 | | if request.what_if { [INFO] [stdout] 615 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 616 | | "Server version does not support what-if orders.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 619 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 613 ~ if self.server_version < min_server_ver::WHAT_IF_ORDERS [INFO] [stdout] 614 ~ && request.what_if { [INFO] [stdout] 615 | return Err(IBKRError::Unsupported( [INFO] [stdout] 616 | "Server version does not support what-if orders.".to_string(), [INFO] [stdout] 617 | )); [INFO] [stdout] 618 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:620:5 [INFO] [stdout] | [INFO] [stdout] 620 | / if self.server_version < min_server_ver::DELTA_NEUTRAL { [INFO] [stdout] 621 | | if contract.delta_neutral_contract.is_some() { [INFO] [stdout] 622 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 623 | | "Server version does not support delta-neutral orders.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 626 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 620 ~ if self.server_version < min_server_ver::DELTA_NEUTRAL [INFO] [stdout] 621 ~ && contract.delta_neutral_contract.is_some() { [INFO] [stdout] 622 | return Err(IBKRError::Unsupported( [INFO] [stdout] 623 | "Server version does not support delta-neutral orders.".to_string(), [INFO] [stdout] 624 | )); [INFO] [stdout] 625 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:627:5 [INFO] [stdout] | [INFO] [stdout] 627 | / if self.server_version < min_server_ver::SCALE_ORDERS2 { [INFO] [stdout] 628 | | if request.scale_subs_level_size.is_some() { [INFO] [stdout] 629 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 630 | | "Server version does not support Subsequent Level Size for Scale orders.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 633 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 627 ~ if self.server_version < min_server_ver::SCALE_ORDERS2 [INFO] [stdout] 628 ~ && request.scale_subs_level_size.is_some() { [INFO] [stdout] 629 | return Err(IBKRError::Unsupported( [INFO] [stdout] 630 | "Server version does not support Subsequent Level Size for Scale orders.".to_string(), [INFO] [stdout] 631 | )); [INFO] [stdout] 632 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:634:5 [INFO] [stdout] | [INFO] [stdout] 634 | / if self.server_version < min_server_ver::ALGO_ORDERS { [INFO] [stdout] 635 | | if !request.algo_strategy.is_none() { [INFO] [stdout] 636 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 637 | | "Server version does not support algo orders.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 640 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 634 ~ if self.server_version < min_server_ver::ALGO_ORDERS [INFO] [stdout] 635 ~ && !request.algo_strategy.is_none() { [INFO] [stdout] 636 | return Err(IBKRError::Unsupported( [INFO] [stdout] 637 | "Server version does not support algo orders.".to_string(), [INFO] [stdout] 638 | )); [INFO] [stdout] 639 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:641:5 [INFO] [stdout] | [INFO] [stdout] 641 | / if self.server_version < min_server_ver::NOT_HELD { [INFO] [stdout] 642 | | if request.not_held { [INFO] [stdout] 643 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 644 | | "Server version does not support notHeld parameter.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 647 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 641 ~ if self.server_version < min_server_ver::NOT_HELD [INFO] [stdout] 642 ~ && request.not_held { [INFO] [stdout] 643 | return Err(IBKRError::Unsupported( [INFO] [stdout] 644 | "Server version does not support notHeld parameter.".to_string(), [INFO] [stdout] 645 | )); [INFO] [stdout] 646 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:648:5 [INFO] [stdout] | [INFO] [stdout] 648 | / if self.server_version < min_server_ver::SEC_ID_TYPE { [INFO] [stdout] 649 | | if !contract.sec_id_type.is_none() || !contract.sec_id.is_none() { [INFO] [stdout] 650 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 651 | | "Server version does not support secIdType and secId parameters.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 654 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 648 ~ if self.server_version < min_server_ver::SEC_ID_TYPE [INFO] [stdout] 649 ~ && (!contract.sec_id_type.is_none() || !contract.sec_id.is_none()) { [INFO] [stdout] 650 | return Err(IBKRError::Unsupported( [INFO] [stdout] 651 | "Server version does not support secIdType and secId parameters.".to_string(), [INFO] [stdout] 652 | )); [INFO] [stdout] 653 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:655:5 [INFO] [stdout] | [INFO] [stdout] 655 | / if self.server_version < min_server_ver::PLACE_ORDER_CONID { [INFO] [stdout] 656 | | if contract.con_id > 0 { [INFO] [stdout] 657 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 658 | | "Server version does not support conId parameter in placeOrder.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 661 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 655 ~ if self.server_version < min_server_ver::PLACE_ORDER_CONID [INFO] [stdout] 656 ~ && contract.con_id > 0 { [INFO] [stdout] 657 | return Err(IBKRError::Unsupported( [INFO] [stdout] 658 | "Server version does not support conId parameter in placeOrder.".to_string(), [INFO] [stdout] 659 | )); [INFO] [stdout] 660 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:672:5 [INFO] [stdout] | [INFO] [stdout] 672 | / if self.server_version < min_server_ver::SSHORTX { [INFO] [stdout] 673 | | if !contract.combo_legs.is_empty() { [INFO] [stdout] 674 | | for leg in &contract.combo_legs { [INFO] [stdout] 675 | | if leg.exempt_code != -1 { [INFO] [stdout] ... | [INFO] [stdout] 682 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 672 ~ if self.server_version < min_server_ver::SSHORTX [INFO] [stdout] 673 ~ && !contract.combo_legs.is_empty() { [INFO] [stdout] 674 | for leg in &contract.combo_legs { [INFO] [stdout] ... [INFO] [stdout] 680 | } [INFO] [stdout] 681 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:683:5 [INFO] [stdout] | [INFO] [stdout] 683 | / if self.server_version < min_server_ver::HEDGE_ORDERS { [INFO] [stdout] 684 | | if !request.hedge_type.is_none() { [INFO] [stdout] 685 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 686 | | "Server version does not support hedge orders.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 689 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 683 ~ if self.server_version < min_server_ver::HEDGE_ORDERS [INFO] [stdout] 684 ~ && !request.hedge_type.is_none() { [INFO] [stdout] 685 | return Err(IBKRError::Unsupported( [INFO] [stdout] 686 | "Server version does not support hedge orders.".to_string(), [INFO] [stdout] 687 | )); [INFO] [stdout] 688 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:690:5 [INFO] [stdout] | [INFO] [stdout] 690 | / if self.server_version < min_server_ver::OPT_OUT_SMART_ROUTING { [INFO] [stdout] 691 | | if request.opt_out_smart_routing { [INFO] [stdout] 692 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 693 | | "Server version does not support optOutSmartRouting parameter.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 696 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 690 ~ if self.server_version < min_server_ver::OPT_OUT_SMART_ROUTING [INFO] [stdout] 691 ~ && request.opt_out_smart_routing { [INFO] [stdout] 692 | return Err(IBKRError::Unsupported( [INFO] [stdout] 693 | "Server version does not support optOutSmartRouting parameter.".to_string(), [INFO] [stdout] 694 | )); [INFO] [stdout] 695 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:697:5 [INFO] [stdout] | [INFO] [stdout] 697 | / if self.server_version < min_server_ver::DELTA_NEUTRAL_CONID { [INFO] [stdout] 698 | | if request.delta_neutral_con_id.is_some() [INFO] [stdout] 699 | | || !request.delta_neutral_settling_firm.is_none() [INFO] [stdout] 700 | | || !request.delta_neutral_clearing_account.is_none() [INFO] [stdout] ... | [INFO] [stdout] 706 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 697 ~ if self.server_version < min_server_ver::DELTA_NEUTRAL_CONID [INFO] [stdout] 698 ~ && (request.delta_neutral_con_id.is_some() [INFO] [stdout] 699 | || !request.delta_neutral_settling_firm.is_none() [INFO] [stdout] 700 | || !request.delta_neutral_clearing_account.is_none() [INFO] [stdout] 701 ~ || !request.delta_neutral_clearing_intent.is_none()) { [INFO] [stdout] 702 | return Err(IBKRError::Unsupported( [INFO] [stdout] 703 | "Server version does not support deltaNeutral parameters: ConId, SettlingFirm, ClearingAccount, ClearingIntent".to_string(), [INFO] [stdout] 704 | )); [INFO] [stdout] 705 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:707:5 [INFO] [stdout] | [INFO] [stdout] 707 | / if self.server_version < min_server_ver::DELTA_NEUTRAL_OPEN_CLOSE { [INFO] [stdout] 708 | | if !request.delta_neutral_open_close.is_none() [INFO] [stdout] 709 | | || request.delta_neutral_short_sale [INFO] [stdout] 710 | | || request.delta_neutral_short_sale_slot.is_some() [INFO] [stdout] ... | [INFO] [stdout] 716 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 707 ~ if self.server_version < min_server_ver::DELTA_NEUTRAL_OPEN_CLOSE [INFO] [stdout] 708 ~ && (!request.delta_neutral_open_close.is_none() [INFO] [stdout] 709 | || request.delta_neutral_short_sale [INFO] [stdout] 710 | || request.delta_neutral_short_sale_slot.is_some() [INFO] [stdout] 711 ~ || !request.delta_neutral_designated_location.is_none()) { [INFO] [stdout] 712 | return Err(IBKRError::Unsupported( [INFO] [stdout] 713 | "Server version does not support deltaNeutral parameters: OpenClose, ShortSale, ShortSaleSlot, DesignatedLocation".to_string(), [INFO] [stdout] 714 | )); [INFO] [stdout] 715 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:717:5 [INFO] [stdout] | [INFO] [stdout] 717 | / if self.server_version < min_server_ver::SCALE_ORDERS3 { [INFO] [stdout] 718 | | if request.scale_price_increment.is_some() && request.scale_price_increment != Some(f64::MAX) { [INFO] [stdout] 719 | | if request.scale_price_adjust_value.is_some() [INFO] [stdout] 720 | | || request.scale_price_adjust_interval.is_some() [INFO] [stdout] ... | [INFO] [stdout] 731 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 717 ~ if self.server_version < min_server_ver::SCALE_ORDERS3 [INFO] [stdout] 718 ~ && request.scale_price_increment.is_some() && request.scale_price_increment != Some(f64::MAX) { [INFO] [stdout] 719 | if request.scale_price_adjust_value.is_some() [INFO] [stdout] ... [INFO] [stdout] 729 | } [INFO] [stdout] 730 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/order_manager.rs:1740:11 [INFO] [stdout] | [INFO] [stdout] 1740 | / if !p_map.contains_key(&perm_id) { [INFO] [stdout] 1741 | | p_map.insert(perm_id, order_id_str.clone()); [INFO] [stdout] 1742 | | debug!("Mapped PermID {} to OrderID {} from openOrder", perm_id, order_id_str); [INFO] [stdout] 1743 | | } [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1740 ~ if let std::collections::hash_map::Entry::Vacant(e) = p_map.entry(perm_id) { [INFO] [stdout] 1741 + e.insert(order_id_str.clone()); [INFO] [stdout] 1742 + debug!("Mapped PermID {} to OrderID {} from openOrder", perm_id, order_id_str); [INFO] [stdout] 1743 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:718:7 [INFO] [stdout] | [INFO] [stdout] 718 | / if request.scale_price_increment.is_some() && request.scale_price_increment != Some(f64::MAX) { [INFO] [stdout] 719 | | if request.scale_price_adjust_value.is_some() [INFO] [stdout] 720 | | || request.scale_price_adjust_interval.is_some() [INFO] [stdout] 721 | | || request.scale_profit_offset.is_some() [INFO] [stdout] ... | [INFO] [stdout] 730 | | } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 718 ~ if request.scale_price_increment.is_some() && request.scale_price_increment != Some(f64::MAX) [INFO] [stdout] 719 ~ && (request.scale_price_adjust_value.is_some() [INFO] [stdout] 720 | || request.scale_price_adjust_interval.is_some() [INFO] [stdout] ... [INFO] [stdout] 724 | || request.scale_init_fill_qty.is_some() [INFO] [stdout] 725 ~ || request.scale_random_percent) { [INFO] [stdout] 726 | return Err(IBKRError::Unsupported( [INFO] [stdout] 727 | "Server version does not support Scale order parameters: PriceAdjustValue, PriceAdjustInterval, ProfitOffset, AutoReset, InitPosition, InitFillQty and RandomPercent".to_string(), [INFO] [stdout] 728 | )); [INFO] [stdout] 729 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:732:5 [INFO] [stdout] | [INFO] [stdout] 732 | / if self.server_version < min_server_ver::ORDER_COMBO_LEGS_PRICE && contract.sec_type == SecType::Combo { [INFO] [stdout] 733 | | if !request.order_combo_legs.is_empty() { [INFO] [stdout] 734 | | for leg_price in &request.order_combo_legs { [INFO] [stdout] 735 | | if leg_price.is_some() { [INFO] [stdout] ... | [INFO] [stdout] 742 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 732 ~ if self.server_version < min_server_ver::ORDER_COMBO_LEGS_PRICE && contract.sec_type == SecType::Combo [INFO] [stdout] 733 ~ && !request.order_combo_legs.is_empty() { [INFO] [stdout] 734 | for leg_price in &request.order_combo_legs { [INFO] [stdout] ... [INFO] [stdout] 740 | } [INFO] [stdout] 741 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:743:5 [INFO] [stdout] | [INFO] [stdout] 743 | / if self.server_version < min_server_ver::TRAILING_PERCENT { [INFO] [stdout] 744 | | if request.trailing_percent.is_some() { [INFO] [stdout] 745 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 746 | | "Server version does not support trailing percent parameter".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 749 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 743 ~ if self.server_version < min_server_ver::TRAILING_PERCENT [INFO] [stdout] 744 ~ && request.trailing_percent.is_some() { [INFO] [stdout] 745 | return Err(IBKRError::Unsupported( [INFO] [stdout] 746 | "Server version does not support trailing percent parameter".to_string(), [INFO] [stdout] 747 | )); [INFO] [stdout] 748 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:750:5 [INFO] [stdout] | [INFO] [stdout] 750 | / if self.server_version < min_server_ver::TRADING_CLASS { [INFO] [stdout] 751 | | if !contract.trading_class.is_none() { [INFO] [stdout] 752 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 753 | | "Server version does not support tradingClass parameter in placeOrder.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 756 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 750 ~ if self.server_version < min_server_ver::TRADING_CLASS [INFO] [stdout] 751 ~ && !contract.trading_class.is_none() { [INFO] [stdout] 752 | return Err(IBKRError::Unsupported( [INFO] [stdout] 753 | "Server version does not support tradingClass parameter in placeOrder.".to_string(), [INFO] [stdout] 754 | )); [INFO] [stdout] 755 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:760:5 [INFO] [stdout] | [INFO] [stdout] 760 | / if self.server_version < min_server_ver::SCALE_TABLE { [INFO] [stdout] 761 | | if !request.scale_table.is_none() || request.active_start_time.is_some() || request.active_stop_time.is_some() { [INFO] [stdout] 762 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 763 | | "Server version does not support scaleTable, activeStartTime and activeStopTime parameters.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 766 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 760 ~ if self.server_version < min_server_ver::SCALE_TABLE [INFO] [stdout] 761 ~ && (!request.scale_table.is_none() || request.active_start_time.is_some() || request.active_stop_time.is_some()) { [INFO] [stdout] 762 | return Err(IBKRError::Unsupported( [INFO] [stdout] 763 | "Server version does not support scaleTable, activeStartTime and activeStopTime parameters.".to_string(), [INFO] [stdout] 764 | )); [INFO] [stdout] 765 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:767:5 [INFO] [stdout] | [INFO] [stdout] 767 | / if self.server_version < min_server_ver::ORDER_SOLICITED { [INFO] [stdout] 768 | | if request.solicited { [INFO] [stdout] 769 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 770 | | "Server version does not support order solicited parameter.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 773 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 767 ~ if self.server_version < min_server_ver::ORDER_SOLICITED [INFO] [stdout] 768 ~ && request.solicited { [INFO] [stdout] 769 | return Err(IBKRError::Unsupported( [INFO] [stdout] 770 | "Server version does not support order solicited parameter.".to_string(), [INFO] [stdout] 771 | )); [INFO] [stdout] 772 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:774:5 [INFO] [stdout] | [INFO] [stdout] 774 | / if self.server_version < min_server_ver::MODELS_SUPPORT { [INFO] [stdout] 775 | | if !request.model_code.is_none() { [INFO] [stdout] 776 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 777 | | "Server version does not support model code parameter.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 780 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 774 ~ if self.server_version < min_server_ver::MODELS_SUPPORT [INFO] [stdout] 775 ~ && !request.model_code.is_none() { [INFO] [stdout] 776 | return Err(IBKRError::Unsupported( [INFO] [stdout] 777 | "Server version does not support model code parameter.".to_string(), [INFO] [stdout] 778 | )); [INFO] [stdout] 779 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:787:5 [INFO] [stdout] | [INFO] [stdout] 787 | / if self.server_version < min_server_ver::CASH_QTY { [INFO] [stdout] 788 | | if request.cash_qty.is_some() { [INFO] [stdout] 789 | | return Err(IBKRError::Unsupported( [INFO] [stdout] 790 | | "Server version does not support cash quantity parameter".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 793 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 787 ~ if self.server_version < min_server_ver::CASH_QTY [INFO] [stdout] 788 ~ && request.cash_qty.is_some() { [INFO] [stdout] 789 | return Err(IBKRError::Unsupported( [INFO] [stdout] 790 | "Server version does not support cash quantity parameter".to_string(), [INFO] [stdout] 791 | )); [INFO] [stdout] 792 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:842:5 [INFO] [stdout] | [INFO] [stdout] 842 | / if self.server_version < min_server_ver::ADVANCED_ORDER_REJECT { [INFO] [stdout] 843 | | if !request.advanced_error_override.is_none() { [INFO] [stdout] 844 | | return Err(IBKRError::Unsupported("Server version does not support advanced error override attribute".to_string())); [INFO] [stdout] 845 | | } [INFO] [stdout] 846 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 842 ~ if self.server_version < min_server_ver::ADVANCED_ORDER_REJECT [INFO] [stdout] 843 ~ && !request.advanced_error_override.is_none() { [INFO] [stdout] 844 | return Err(IBKRError::Unsupported("Server version does not support advanced error override attribute".to_string())); [INFO] [stdout] 845 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:847:5 [INFO] [stdout] | [INFO] [stdout] 847 | / if self.server_version < min_server_ver::MANUAL_ORDER_TIME { [INFO] [stdout] 848 | | if request.manual_order_time.is_some() { [INFO] [stdout] 849 | | return Err(IBKRError::Unsupported("Server version does not support manual order time attribute".to_string())); [INFO] [stdout] 850 | | } [INFO] [stdout] 851 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 847 ~ if self.server_version < min_server_ver::MANUAL_ORDER_TIME [INFO] [stdout] 848 ~ && request.manual_order_time.is_some() { [INFO] [stdout] 849 | return Err(IBKRError::Unsupported("Server version does not support manual order time attribute".to_string())); [INFO] [stdout] 850 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:852:5 [INFO] [stdout] | [INFO] [stdout] 852 | / if self.server_version < min_server_ver::PEGBEST_PEGMID_OFFSETS { [INFO] [stdout] 853 | | if request.min_trade_qty.is_some() || [INFO] [stdout] 854 | | request.min_compete_size.is_some() || [INFO] [stdout] 855 | | request.compete_against_best_offset.is_some() || // Check includes INFINITY sentinel [INFO] [stdout] ... | [INFO] [stdout] 862 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 852 ~ if self.server_version < min_server_ver::PEGBEST_PEGMID_OFFSETS [INFO] [stdout] 853 ~ && (request.min_trade_qty.is_some() || [INFO] [stdout] 854 | request.min_compete_size.is_some() || [INFO] [stdout] 855 | request.compete_against_best_offset.is_some() || // Check includes INFINITY sentinel [INFO] [stdout] 856 | request.mid_offset_at_whole.is_some() || [INFO] [stdout] 857 ~ request.mid_offset_at_half.is_some()) { [INFO] [stdout] 858 | return Err(IBKRError::Unsupported( [INFO] [stdout] 859 | "Server version does not support PEG BEST / PEG MID order parameters: minTradeQty, minCompeteSize, competeAgainstBestOffset, midOffsetAtWhole and midOffsetAtHalf".to_string(), [INFO] [stdout] 860 | )); [INFO] [stdout] 861 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:863:5 [INFO] [stdout] | [INFO] [stdout] 863 | / if self.server_version < min_server_ver::CUSTOMER_ACCOUNT { [INFO] [stdout] 864 | | if !request.customer_account.is_none() { [INFO] [stdout] 865 | | return Err(IBKRError::Unsupported("Server version does not support customer account parameter".to_string())); [INFO] [stdout] 866 | | } [INFO] [stdout] 867 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 863 ~ if self.server_version < min_server_ver::CUSTOMER_ACCOUNT [INFO] [stdout] 864 ~ && !request.customer_account.is_none() { [INFO] [stdout] 865 | return Err(IBKRError::Unsupported("Server version does not support customer account parameter".to_string())); [INFO] [stdout] 866 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:868:5 [INFO] [stdout] | [INFO] [stdout] 868 | / if self.server_version < min_server_ver::PROFESSIONAL_CUSTOMER { [INFO] [stdout] 869 | | if request.professional_customer { [INFO] [stdout] 870 | | return Err(IBKRError::Unsupported("Server version does not support professional customer parameter".to_string())); [INFO] [stdout] 871 | | } [INFO] [stdout] 872 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 868 ~ if self.server_version < min_server_ver::PROFESSIONAL_CUSTOMER [INFO] [stdout] 869 ~ && request.professional_customer { [INFO] [stdout] 870 | return Err(IBKRError::Unsupported("Server version does not support professional customer parameter".to_string())); [INFO] [stdout] 871 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/protocol_encoder.rs:933:69 [INFO] [stdout] | [INFO] [stdout] 933 | if self.server_version < min_server_ver::ORDER_COMBO_LEGS_PRICE { [INFO] [stdout] | _____________________________________________________________________^ [INFO] [stdout] 934 | | self.write_optional_double_to_cursor(&mut cursor, request.limit_price)?; [INFO] [stdout] 935 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/protocol_encoder.rs:935:12 [INFO] [stdout] | [INFO] [stdout] 935 | } else { [INFO] [stdout] | ____________^ [INFO] [stdout] 936 | | self.write_optional_double_to_cursor(&mut cursor, request.limit_price)?; [INFO] [stdout] 937 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/protocol_encoder.rs:938:63 [INFO] [stdout] | [INFO] [stdout] 938 | if self.server_version < min_server_ver::TRAILING_PERCENT { [INFO] [stdout] | _______________________________________________________________^ [INFO] [stdout] 939 | | self.write_optional_double_to_cursor(&mut cursor, request.aux_price)?; [INFO] [stdout] 940 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/protocol_encoder.rs:940:12 [INFO] [stdout] | [INFO] [stdout] 940 | } else { [INFO] [stdout] | ____________^ [INFO] [stdout] 941 | | self.write_optional_double_to_cursor(&mut cursor, request.aux_price)?; [INFO] [stdout] 942 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:1073:36 [INFO] [stdout] | [INFO] [stdout] 1073 | let is_delta_neutral_mkt = request.delta_neutral_order_type.as_deref().map_or(false, |s| s.eq_ignore_ascii_case("MKT")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 1073 - let is_delta_neutral_mkt = request.delta_neutral_order_type.as_deref().map_or(false, |s| s.eq_ignore_ascii_case("MKT")); [INFO] [stdout] 1073 + let is_delta_neutral_mkt = request.delta_neutral_order_type.as_deref().is_some_and(|s| s.eq_ignore_ascii_case("MKT")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:1133:39 [INFO] [stdout] | [INFO] [stdout] 1133 | let scale_price_increment_valid = request.scale_price_increment.map_or(false, |p| p > 0.0 && p != f64::MAX); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 1133 - let scale_price_increment_valid = request.scale_price_increment.map_or(false, |p| p > 0.0 && p != f64::MAX); [INFO] [stdout] 1133 + let scale_price_increment_valid = request.scale_price_increment.is_some_and(|p| p > 0.0 && p != f64::MAX); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:1447:10 [INFO] [stdout] | [INFO] [stdout] 1447 | if !contract.trading_class.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `contract.trading_class.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:1432:5 [INFO] [stdout] | [INFO] [stdout] 1432 | / if self.server_version < min_server_ver::DELTA_NEUTRAL { [INFO] [stdout] 1433 | | if contract.delta_neutral_contract.is_some() { [INFO] [stdout] 1434 | | return Err(IBKRError::UpdateTws( [INFO] [stdout] 1435 | | "Server version does not support delta-neutral orders/contracts.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1438 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1432 ~ if self.server_version < min_server_ver::DELTA_NEUTRAL [INFO] [stdout] 1433 ~ && contract.delta_neutral_contract.is_some() { [INFO] [stdout] 1434 | return Err(IBKRError::UpdateTws( [INFO] [stdout] 1435 | "Server version does not support delta-neutral orders/contracts.".to_string(), [INFO] [stdout] 1436 | )); [INFO] [stdout] 1437 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:1439:5 [INFO] [stdout] | [INFO] [stdout] 1439 | / if self.server_version < min_server_ver::MKT_DATA_CONID { [INFO] [stdout] 1440 | | if contract.con_id > 0 { [INFO] [stdout] 1441 | | return Err(IBKRError::UpdateTws( [INFO] [stdout] 1442 | | "Server version does not support conId parameter in reqMarketData.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1445 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1439 ~ if self.server_version < min_server_ver::MKT_DATA_CONID [INFO] [stdout] 1440 ~ && contract.con_id > 0 { [INFO] [stdout] 1441 | return Err(IBKRError::UpdateTws( [INFO] [stdout] 1442 | "Server version does not support conId parameter in reqMarketData.".to_string(), [INFO] [stdout] 1443 | )); [INFO] [stdout] 1444 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:1446:5 [INFO] [stdout] | [INFO] [stdout] 1446 | / if self.server_version < min_server_ver::TRADING_CLASS { [INFO] [stdout] 1447 | | if !contract.trading_class.is_none() { [INFO] [stdout] 1448 | | return Err(IBKRError::UpdateTws( [INFO] [stdout] 1449 | | "Server version does not support tradingClass parameter in reqMarketData.".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1452 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1446 ~ if self.server_version < min_server_ver::TRADING_CLASS [INFO] [stdout] 1447 ~ && !contract.trading_class.is_none() { [INFO] [stdout] 1448 | return Err(IBKRError::UpdateTws( [INFO] [stdout] 1449 | "Server version does not support tradingClass parameter in reqMarketData.".to_string(), [INFO] [stdout] 1450 | )); [INFO] [stdout] 1451 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:1592:64 [INFO] [stdout] | [INFO] [stdout] 1592 | if self.server_version < min_server_ver::TRADING_CLASS && (!contract.trading_class.is_none() || contract.con_id > 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `contract.trading_class.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:1669:62 [INFO] [stdout] | [INFO] [stdout] 1669 | if self.server_version < min_server_ver::SEC_ID_TYPE && (!contract.sec_id_type.is_none() || !contract.sec_id.is_none()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `contract.sec_id_type.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:1669:97 [INFO] [stdout] | [INFO] [stdout] 1669 | if self.server_version < min_server_ver::SEC_ID_TYPE && (!contract.sec_id_type.is_none() || !contract.sec_id.is_none()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `contract.sec_id.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:1672:63 [INFO] [stdout] | [INFO] [stdout] 1672 | if self.server_version < min_server_ver::TRADING_CLASS && !contract.trading_class.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `contract.trading_class.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:1675:57 [INFO] [stdout] | [INFO] [stdout] 1675 | if self.server_version < min_server_ver::LINKING && !contract.primary_exchange.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `contract.primary_exchange.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:1678:63 [INFO] [stdout] | [INFO] [stdout] 1678 | if self.server_version < min_server_ver::BOND_ISSUERID && !contract.issuer_id.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `contract.issuer_id.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:1747:64 [INFO] [stdout] | [INFO] [stdout] 1747 | if self.server_version < min_server_ver::TRADING_CLASS && (!contract.trading_class.is_none() || contract.con_id > 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `contract.trading_class.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/protocol_encoder.rs:1740:3 [INFO] [stdout] | [INFO] [stdout] 1740 | pub fn encode_request_historical_data... &[(String, String)]) -> Result, IBKRError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:2102:64 [INFO] [stdout] | [INFO] [stdout] 2102 | if self.server_version < min_server_ver::TRADING_CLASS && (!contract.trading_class.is_none() || contract.con_id > 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `contract.trading_class.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:2177:5 [INFO] [stdout] | [INFO] [stdout] 2177 | / if self.server_version < min_server_ver::TICK_BY_TICK_IGNORE_SIZE { [INFO] [stdout] 2178 | | if number_of_ticks != 0 || ignore_size { [INFO] [stdout] 2179 | | return Err(IBKRError::Unsupported("Server version does not support ignoreSize and numberOfTicks parameters in tick-by-ti... [INFO] [stdout] 2180 | | } [INFO] [stdout] 2181 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2177 ~ if self.server_version < min_server_ver::TICK_BY_TICK_IGNORE_SIZE [INFO] [stdout] 2178 ~ && (number_of_ticks != 0 || ignore_size) { [INFO] [stdout] 2179 | return Err(IBKRError::Unsupported("Server version does not support ignoreSize and numberOfTicks parameters in tick-by-tick data requests.".to_string())); [INFO] [stdout] 2180 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:2239:64 [INFO] [stdout] | [INFO] [stdout] 2239 | if self.server_version < min_server_ver::TRADING_CLASS && (!contract.trading_class.is_none() || contract.con_id > 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `contract.trading_class.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocol_encoder.rs:2245:73 [INFO] [stdout] | [INFO] [stdout] 2245 | if self.server_version < min_server_ver::MKT_DEPTH_PRIM_EXCHANGE && !contract.primary_exchange.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `contract.primary_exchange.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/protocol_encoder.rs:2369:46 [INFO] [stdout] | [INFO] [stdout] 2369 | self.write_tag_value_list(&mut cursor, &news_article_options)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `news_article_options` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/protocol_encoder.rs:2376:3 [INFO] [stdout] | [INFO] [stdout] 2376 | / pub fn encode_request_historical_news( [INFO] [stdout] 2377 | | &self, [INFO] [stdout] 2378 | | req_id: i32, [INFO] [stdout] 2379 | | con_id: i32, [INFO] [stdout] ... | [INFO] [stdout] 2384 | | historical_news_options: &[(String, String)], // TagValue list [INFO] [stdout] 2385 | | ) -> Result, IBKRError> { [INFO] [stdout] | |_________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:2534:5 [INFO] [stdout] | [INFO] [stdout] 2534 | / if self.server_version < min_server_ver::WSH_EVENT_DATA_FILTERS { [INFO] [stdout] 2535 | | if wsh_event_data.filter.is_some() || wsh_event_data.fill_watchlist || wsh_event_data.fill_portfolio || wsh_event_data.fil... [INFO] [stdout] 2536 | | return Err(IBKRError::UpdateTws(format!( [INFO] [stdout] 2537 | | "Server version {} does not support WSH event data filters (requires {}).", // Adjusted message [INFO] [stdout] ... | [INFO] [stdout] 2541 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2534 ~ if self.server_version < min_server_ver::WSH_EVENT_DATA_FILTERS [INFO] [stdout] 2535 ~ && (wsh_event_data.filter.is_some() || wsh_event_data.fill_watchlist || wsh_event_data.fill_portfolio || wsh_event_data.fill_competitors) { [INFO] [stdout] 2536 | return Err(IBKRError::UpdateTws(format!( [INFO] [stdout] ... [INFO] [stdout] 2539 | ))); [INFO] [stdout] 2540 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol_encoder.rs:2542:5 [INFO] [stdout] | [INFO] [stdout] 2542 | / if self.server_version < min_server_ver::WSH_EVENT_DATA_FILTERS_DATE { [INFO] [stdout] 2543 | | if wsh_event_data.start_date.is_some() || wsh_event_data.end_date.is_some() || wsh_event_data.total_limit != Some(i32::MAX) { [INFO] [stdout] 2544 | | // Allow None total_limit, as it implies MAX_VALUE wasn't sent [INFO] [stdout] 2545 | | if wsh_event_data.start_date.is_some() || wsh_event_data.end_date.is_some() || (wsh_event_data.total_limit.is_some() && ... [INFO] [stdout] ... | [INFO] [stdout] 2552 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2542 ~ if self.server_version < min_server_ver::WSH_EVENT_DATA_FILTERS_DATE [INFO] [stdout] 2543 ~ && (wsh_event_data.start_date.is_some() || wsh_event_data.end_date.is_some() || wsh_event_data.total_limit != Some(i32::MAX)) { [INFO] [stdout] 2544 | // Allow None total_limit, as it implies MAX_VALUE wasn't sent [INFO] [stdout] ... [INFO] [stdout] 2550 | } [INFO] [stdout] 2551 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/protocol_encoder.rs:2782:3 [INFO] [stdout] | [INFO] [stdout] 2782 | / pub fn encode_request_historical_ticks( [INFO] [stdout] 2783 | | &self, [INFO] [stdout] 2784 | | req_id: i32, [INFO] [stdout] 2785 | | contract: &Contract, [INFO] [stdout] ... | [INFO] [stdout] 2792 | | misc_options: &[(String, String)], // TagValue list, semicolon-separated [INFO] [stdout] 2793 | | ) -> Result, IBKRError> { [INFO] [stdout] | |_________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/order_builder.rs:86:5 [INFO] [stdout] | [INFO] [stdout] 86 | order.side = action; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `order::OrderRequest { side: action, quantity: quantity, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/order_builder.rs:85:5 [INFO] [stdout] | [INFO] [stdout] 85 | let mut order = OrderRequest::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/order_builder.rs:741:33 [INFO] [stdout] | [INFO] [stdout] 741 | self.order.aux_price = Some(offset.abs() * -1.0); // Passive offset might be negative? Check docs. [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using: `-offset.abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/order_builder.rs:985:9 [INFO] [stdout] | [INFO] [stdout] 985 | / if self.order.limit_price.is_none() { [INFO] [stdout] 986 | | return Err(IBKRError::InvalidOrder(format!("Limit price is required for {} order.", self.order.order_type))); [INFO] [stdout] 987 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 984 ~ OrderType::Limit | OrderType::LimitOnClose | OrderType::LimitOnOpen [INFO] [stdout] 985 ~ if self.order.limit_price.is_none() => { [INFO] [stdout] 986 | return Err(IBKRError::InvalidOrder(format!("Limit price is required for {} order.", self.order.order_type))); [INFO] [stdout] 987 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/order_builder.rs:990:9 [INFO] [stdout] | [INFO] [stdout] 990 | / ... if self.order.aux_price.is_none() { [INFO] [stdout] 991 | | ... return Err(IBKRError::InvalidOrder(format!("Stop/trigger price (auxPrice) is required for {} order.", self.order.order_ty... [INFO] [stdout] 992 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 989 ~ OrderType::Stop | OrderType::MarketIfTouched [INFO] [stdout] 990 ~ if self.order.aux_price.is_none() => { [INFO] [stdout] 991 | return Err(IBKRError::InvalidOrder(format!("Stop/trigger price (auxPrice) is required for {} order.", self.order.order_type))); [INFO] [stdout] 992 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/order_builder.rs:995:9 [INFO] [stdout] | [INFO] [stdout] 995 | / ... if self.order.aux_price.is_none() || self.order.limit_price.is_none() { [INFO] [stdout] 996 | | ... return Err(IBKRError::InvalidOrder(format!("Stop/trigger price (auxPrice) and limit price are required for {} order.", se... [INFO] [stdout] 997 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 994 ~ OrderType::StopLimit | OrderType::LimitIfTouched [INFO] [stdout] 995 ~ if (self.order.aux_price.is_none() || self.order.limit_price.is_none()) => { [INFO] [stdout] 996 | return Err(IBKRError::InvalidOrder(format!("Stop/trigger price (auxPrice) and limit price are required for {} order.", self.order.order_type))); [INFO] [stdout] 997 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/order_builder.rs:1019:9 [INFO] [stdout] | [INFO] [stdout] 1019 | / if self.order.volatility.is_none() || self.order.volatility_type.is_none() { [INFO] [stdout] 1020 | | return Err(IBKRError::InvalidOrder("Volatility and volatility type are required for VOL order.".to_string())); [INFO] [stdout] 1021 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1018 ~ OrderType::Volatility [INFO] [stdout] 1019 ~ if (self.order.volatility.is_none() || self.order.volatility_type.is_none()) => { [INFO] [stdout] 1020 | return Err(IBKRError::InvalidOrder("Volatility and volatility type are required for VOL order.".to_string())); [INFO] [stdout] 1021 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/order_builder.rs:1029:9 [INFO] [stdout] | [INFO] [stdout] 1029 | / if self.contract.sec_type != SecType::Option || self.contract.exchange != "BOX" { [INFO] [stdout] 1030 | | return Err(IBKRError::InvalidOrder("Box Top order requires Option contract routed to BOX.".to_string())); [INFO] [stdout] 1031 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1028 ~ OrderType::BoxTop [INFO] [stdout] 1029 ~ if (self.contract.sec_type != SecType::Option || self.contract.exchange != "BOX") => { [INFO] [stdout] 1030 | return Err(IBKRError::InvalidOrder("Box Top order requires Option contract routed to BOX.".to_string())); [INFO] [stdout] 1031 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/order_builder.rs:1034:9 [INFO] [stdout] | [INFO] [stdout] 1034 | / if !(self.contract.sec_type == SecType::Option || self.contract.sec_type == SecType::FutureOption) { [INFO] [stdout] 1035 | | return Err(IBKRError::InvalidOrder("Volatility order requires Option or FOP contract.".to_string())); [INFO] [stdout] 1036 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1033 ~ OrderType::Volatility [INFO] [stdout] 1034 ~ if !(self.contract.sec_type == SecType::Option || self.contract.sec_type == SecType::FutureOption) => { [INFO] [stdout] 1035 | return Err(IBKRError::InvalidOrder("Volatility order requires Option or FOP contract.".to_string())); [INFO] [stdout] 1036 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/order_builder.rs:1085:7 [INFO] [stdout] | [INFO] [stdout] 1085 | / if !valid_combo_types.contains(&self.order.order_type) { [INFO] [stdout] 1086 | | if !(self.order.order_type == OrderType::Relative && self.order.limit_price.is_some()) { // Check for REL+LMT [INFO] [stdout] 1087 | | return Err(IBKRError::InvalidOrder(format!("Order type {} not valid for Combo orders.", self.order.order_type))); [INFO] [stdout] 1088 | | } [INFO] [stdout] 1089 | | } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1085 ~ if !valid_combo_types.contains(&self.order.order_type) [INFO] [stdout] 1086 ~ && !(self.order.order_type == OrderType::Relative && self.order.limit_price.is_some()) { // Check for REL+LMT [INFO] [stdout] 1087 | return Err(IBKRError::InvalidOrder(format!("Order type {} not valid for Combo orders.", self.order.order_type))); [INFO] [stdout] 1088 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/order_builder.rs:1116:11 [INFO] [stdout] | [INFO] [stdout] 1116 | / if self.order.algo_params.iter().find(|(k,_)| k == "adaptivePriority").is_none() { [INFO] [stdout] 1117 | | return Err(IBKRError::InvalidOrder("Adaptive algo requires 'adaptivePriority' parameter.".to_string())); [INFO] [stdout] 1118 | | } [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1115 ~ "Adaptive" [INFO] [stdout] 1116 ~ if self.order.algo_params.iter().find(|(k,_)| k == "adaptivePriority").is_none() => { [INFO] [stdout] 1117 | return Err(IBKRError::InvalidOrder("Adaptive algo requires 'adaptivePriority' parameter.".to_string())); [INFO] [stdout] 1118 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/order_builder.rs:1121:11 [INFO] [stdout] | [INFO] [stdout] 1121 | / if self.order.algo_params.iter().find(|(k,_)| k == "maxPctVol").is_none() { [INFO] [stdout] 1122 | | return Err(IBKRError::InvalidOrder("VWAP algo requires 'maxPctVol' parameter.".to_string())); [INFO] [stdout] 1123 | | } [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1120 ~ "Vwap" [INFO] [stdout] 1121 ~ if self.order.algo_params.iter().find(|(k,_)| k == "maxPctVol").is_none() => { [INFO] [stdout] 1122 | return Err(IBKRError::InvalidOrder("VWAP algo requires 'maxPctVol' parameter.".to_string())); [INFO] [stdout] 1123 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/order_builder.rs:1261:11 [INFO] [stdout] | [INFO] [stdout] 1261 | / let mut p = Vec::new(); [INFO] [stdout] 1262 | | p.push(("pctVol".to_string(), pct_vol.to_string())); [INFO] [stdout] 1263 | | p.push(("deltaPctVol".to_string(), delta_pct_vol.to_string())); [INFO] [stdout] 1264 | | p.push(("minPctVol4Px".to_string(), min_pct_vol_for_price.to_string())); [INFO] [stdout] 1265 | | p.push(("maxPctVol4Px".to_string(), max_pct_vol_for_price.to_string())); [INFO] [stdout] | |__________________________________________________________________________________^ help: consider using the `vec![]` macro: `let mut p = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/order_builder.rs:1340:13 [INFO] [stdout] | [INFO] [stdout] 1340 | / if final_order.algo_params.iter().find(|(k,_)| k == "maxPctVol").is_none() { [INFO] [stdout] 1341 | | return Err(IBKRError::InvalidOrder("Internal Error: VWAP algo missing 'maxPctVol' parameter.".to_string())); [INFO] [stdout] 1342 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1339 ~ "Vwap" [INFO] [stdout] 1340 ~ if final_order.algo_params.iter().find(|(k,_)| k == "maxPctVol").is_none() => { [INFO] [stdout] 1341 | return Err(IBKRError::InvalidOrder("Internal Error: VWAP algo missing 'maxPctVol' parameter.".to_string())); [INFO] [stdout] 1342 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/order_builder.rs:1345:13 [INFO] [stdout] | [INFO] [stdout] 1345 | / ... if final_order.algo_params.iter().find(|(k,_)| k == "componentSize").is_none() { [INFO] [stdout] 1346 | | ... return Err(IBKRError::InvalidOrder("Internal Error: Accumulate/Distribute algo missing 'componentSize' parameter.".to_st... [INFO] [stdout] 1347 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1344 ~ "AD" [INFO] [stdout] 1345 ~ if final_order.algo_params.iter().find(|(k,_)| k == "componentSize").is_none() => { [INFO] [stdout] 1346 | return Err(IBKRError::InvalidOrder("Internal Error: Accumulate/Distribute algo missing 'componentSize' parameter.".to_string())); [INFO] [stdout] 1347 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/data.rs:441:30 [INFO] [stdout] | [INFO] [stdout] 441 | let parts: Vec<&str> = s.trim().split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/data.rs:482:30 [INFO] [stdout] | [INFO] [stdout] 482 | let parts: Vec<&str> = s.trim().split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/data.rs:550:1 [INFO] [stdout] | [INFO] [stdout] 550 | / impl Default for TickType { [INFO] [stdout] 551 | | fn default() -> Self { [INFO] [stdout] 552 | | TickType::Unknown [INFO] [stdout] 553 | | } [INFO] [stdout] 554 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 181 + #[derive(Default)] [INFO] [stdout] 182 | pub enum TickType { [INFO] [stdout] 183 | BidSize = 0, [INFO] [stdout] ... [INFO] [stdout] 315 | // GenericTick623 = 623, // ETF NAV Frozen Last [INFO] [stdout] 316 ~ #[default] [INFO] [stdout] 317 ~ Unknown = -1, // For unhandled cases [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/scan_parameters.rs:707:1 [INFO] [stdout] | [INFO] [stdout] 707 | / enum RangeFilterItem { [INFO] [stdout] 708 | | #[serde(rename = "id")] [INFO] [stdout] 709 | | Id(String), [INFO] [stdout] 710 | | #[serde(rename = "category")] [INFO] [stdout] ... | [INFO] [stdout] 731 | | Columns(Columns), // Uses the existing Columns struct [INFO] [stdout] | | ---------------- the second-largest variant contains at least 96 bytes [INFO] [stdout] 732 | | #[serde(rename = "AbstractField")] [INFO] [stdout] 733 | | AbstractField(AbstractField), [INFO] [stdout] | | ---------------------------- the largest variant contains at least 704 bytes [INFO] [stdout] 734 | | #[serde(rename = "skipValidation")] [INFO] [stdout] 735 | | SkipValidation(String), [INFO] [stdout] 736 | | } [INFO] [stdout] | |_^ the entire enum is at least 704 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 733 - AbstractField(AbstractField), [INFO] [stdout] 733 + AbstractField(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/scan_parameters.rs:841:1 [INFO] [stdout] | [INFO] [stdout] 841 | / enum SimpleFilterItem { [INFO] [stdout] 842 | | #[serde(rename = "id")] [INFO] [stdout] 843 | | Id(String), [INFO] [stdout] 844 | | #[serde(rename = "category")] [INFO] [stdout] ... | [INFO] [stdout] 857 | | Columns(Columns), [INFO] [stdout] | | ---------------- the second-largest variant contains at least 96 bytes [INFO] [stdout] 858 | | #[serde(rename = "AbstractField")] [INFO] [stdout] 859 | | AbstractField(AbstractField), [INFO] [stdout] | | ---------------------------- the largest variant contains at least 704 bytes [INFO] [stdout] 860 | | #[serde(rename = "skipValidation")] [INFO] [stdout] 861 | | SkipValidation(String), // skip_validation is Option in SimpleFilter [INFO] [stdout] 862 | | } [INFO] [stdout] | |_^ the entire enum is at least 704 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 859 - AbstractField(AbstractField), [INFO] [stdout] 859 + AbstractField(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same postfix: `Filter` [INFO] [stdout] --> src/scan_parameters.rs:1004:1 [INFO] [stdout] | [INFO] [stdout] 1004 | / enum FilterListItem { [INFO] [stdout] 1005 | | #[serde(rename = "RangeFilter")] [INFO] [stdout] 1006 | | RangeFilter(RangeFilter), // These will use their own custom Deserialize [INFO] [stdout] 1007 | | #[serde(rename = "SimpleFilter")] [INFO] [stdout] ... | [INFO] [stdout] 1012 | | VirtualFilter(VirtualFilter), [INFO] [stdout] 1013 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/scan_parameters.rs:1103:1 [INFO] [stdout] | [INFO] [stdout] 1103 | / enum TripleComboFilterItem { [INFO] [stdout] 1104 | | #[serde(rename = "id")] [INFO] [stdout] 1105 | | Id(String), [INFO] [stdout] 1106 | | #[serde(rename = "category")] [INFO] [stdout] ... | [INFO] [stdout] 1113 | | TripleComboField(TripleComboField), [INFO] [stdout] | | ---------------------------------- the second-largest variant contains at least 144 bytes [INFO] [stdout] 1114 | | #[serde(rename = "AbstractField")] [INFO] [stdout] 1115 | | AbstractField(AbstractField), [INFO] [stdout] | | ---------------------------- the largest variant contains at least 704 bytes [INFO] [stdout] 1116 | | } [INFO] [stdout] | |_^ the entire enum is at least 704 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 1115 - AbstractField(AbstractField), [INFO] [stdout] 1115 + AbstractField(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/scan_parameters.rs:1310:5 [INFO] [stdout] | [INFO] [stdout] 1310 | abstract_field_instance.type_ = helper.type_; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `scan_parameters::AbstractField { type_: helper.type_, attr_var_name: helper.attr_var_name, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/scan_parameters.rs:1307:5 [INFO] [stdout] | [INFO] [stdout] 1307 | let mut abstract_field_instance = AbstractField::default(); // Initialize with default values [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/data.rs:1172:1 [INFO] [stdout] | [INFO] [stdout] 1172 | / impl Default for FinancialStatementType { [INFO] [stdout] 1173 | | fn default() -> Self { [INFO] [stdout] 1174 | | FinancialStatementType::INC // Or a specific 'Unknown' variant if you add one [INFO] [stdout] 1175 | | } [INFO] [stdout] 1176 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 1166 + #[derive(Default)] [INFO] [stdout] 1167 | pub enum FinancialStatementType { [INFO] [stdout] 1168 ~ #[default] [INFO] [stdout] 1169 ~ INC, // IncomeStatement [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/data.rs:1198:1 [INFO] [stdout] | [INFO] [stdout] 1198 | / impl Default for PeriodType { [INFO] [stdout] 1199 | | fn default() -> Self { [INFO] [stdout] 1200 | | PeriodType::Annual // Or a specific 'Unknown' variant if you add one [INFO] [stdout] 1201 | | } [INFO] [stdout] 1202 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 1193 + #[derive(Default)] [INFO] [stdout] 1194 | pub enum PeriodType { [INFO] [stdout] 1195 ~ #[default] [INFO] [stdout] 1196 ~ Annual, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/data.rs:1234:1 [INFO] [stdout] | [INFO] [stdout] 1234 | / pub enum ParsedFundamentalData { [INFO] [stdout] 1235 | | Snapshot(ReportSnapshot), [INFO] [stdout] | | ------------------------ the largest variant contains at least 1280 bytes [INFO] [stdout] 1236 | | FinancialSummary(ReportsFinSummary), [INFO] [stdout] | | ----------------------------------- the second-largest variant contains at least 96 bytes [INFO] [stdout] ... | [INFO] [stdout] 1239 | | } [INFO] [stdout] | |_^ the entire enum is at least 1280 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 1235 - Snapshot(ReportSnapshot), [INFO] [stdout] 1235 + Snapshot(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/data.rs:1313:3 [INFO] [stdout] | [INFO] [stdout] 1313 | pub fn new(req_id: i32, contract: Con... bool, misc_options: Vec<(String, String)>) -> Self { ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `NaiveDate` which implements the `Copy` trait [INFO] [stdout] --> src/contract.rs:313:65 [INFO] [stdout] | [INFO] [stdout] 313 | last_trade_date_or_contract_month: Some(DateOrMonth::Date(expiry.clone())), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*expiry` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.primary_exchange` after checking its variant with `is_some` [INFO] [stdout] --> src/contract.rs:394:23 [INFO] [stdout] | [INFO] [stdout] 393 | if self.exchange == "SMART" && self.primary_exchange.is_some() { [INFO] [stdout] | ------------------------------- the check is happening here [INFO] [stdout] 394 | app(&mut sb, &self.primary_exchange.as_ref().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/contract.rs:384:11 [INFO] [stdout] | [INFO] [stdout] 384 | sb.push_str("/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `sb.push('/')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/contract.rs:394:22 [INFO] [stdout] | [INFO] [stdout] 394 | app(&mut sb, &self.primary_exchange.as_ref().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.primary_exchange.as_ref().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/contract.rs:826:1 [INFO] [stdout] | [INFO] [stdout] 826 | / impl Default for WhatToShow { [INFO] [stdout] 827 | | fn default() -> Self { [INFO] [stdout] 828 | | WhatToShow::Trades // A common default [INFO] [stdout] 829 | | } [INFO] [stdout] 830 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 799 + #[derive(Default)] [INFO] [stdout] 800 | pub enum WhatToShow { [INFO] [stdout] 801 ~ #[default] [INFO] [stdout] 802 ~ Trades, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/financial_advisor_manager.rs:102:7 [INFO] [stdout] | [INFO] [stdout] 102 | / if timeout_result.timed_out() { [INFO] [stdout] 103 | | if req_state_guard.waiting_for_data && req_state_guard.error_occurred.is_none() { [INFO] [stdout] 104 | | warn!("FA data request timed out waiting for receiveFA for type {:?}", fa_data_type); [INFO] [stdout] 105 | | req_state_guard.waiting_for_data = false; [INFO] [stdout] ... | [INFO] [stdout] 109 | | } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 102 ~ if timeout_result.timed_out() [INFO] [stdout] 103 ~ && req_state_guard.waiting_for_data && req_state_guard.error_occurred.is_none() { [INFO] [stdout] 104 | warn!("FA data request timed out waiting for receiveFA for type {:?}", fa_data_type); [INFO] [stdout] ... [INFO] [stdout] 107 | return Err(IBKRError::Timeout(format!("FA data request timed out for {:?}", fa_data_type))); [INFO] [stdout] 108 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/financial_advisor_manager.rs:168:7 [INFO] [stdout] | [INFO] [stdout] 168 | / if timeout_result.timed_out() { [INFO] [stdout] 169 | | if req_state_guard.waiting_for_replace_end && req_state_guard.error_occurred.is_none() { [INFO] [stdout] 170 | | warn!("FA data replacement timed out waiting for replaceFAEnd for type {:?}", fa_data_type); [INFO] [stdout] 171 | | req_state_guard.waiting_for_replace_end = false; [INFO] [stdout] ... | [INFO] [stdout] 174 | | } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 168 ~ if timeout_result.timed_out() [INFO] [stdout] 169 ~ && req_state_guard.waiting_for_replace_end && req_state_guard.error_occurred.is_none() { [INFO] [stdout] 170 | warn!("FA data replacement timed out waiting for replaceFAEnd for type {:?}", fa_data_type); [INFO] [stdout] 171 | req_state_guard.waiting_for_replace_end = false; [INFO] [stdout] 172 | return Err(IBKRError::Timeout(format!("FA data replacement timed out for {:?}", fa_data_type))); [INFO] [stdout] 173 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/financial_advisor_manager.rs:300:15 [INFO] [stdout] | [INFO] [stdout] 300 | / if let Some(alloc) = current_allocation.take() { [INFO] [stdout] 301 | | if let Some(profile) = current_profile.as_mut() { [INFO] [stdout] 302 | | profile.allocations.push(alloc); [INFO] [stdout] 303 | | } [INFO] [stdout] 304 | | } [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 300 ~ if let Some(alloc) = current_allocation.take() [INFO] [stdout] 301 ~ && let Some(profile) = current_profile.as_mut() { [INFO] [stdout] 302 | profile.allocations.push(alloc); [INFO] [stdout] 303 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/financial_advisor_manager.rs:344:11 [INFO] [stdout] | [INFO] [stdout] 344 | / match e.name().as_ref() { [INFO] [stdout] 345 | | b"Alias" => { [INFO] [stdout] 346 | | if let Some(alias_obj) = current_alias.take() { [INFO] [stdout] 347 | | aliases.insert(alias_obj.alias.clone(), alias_obj); [INFO] [stdout] ... | [INFO] [stdout] 350 | | _ => (), [INFO] [stdout] 351 | | } [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 344 ~ if e.name().as_ref() == b"Alias" { [INFO] [stdout] 345 + if let Some(alias_obj) = current_alias.take() { [INFO] [stdout] 346 + aliases.insert(alias_obj.alias.clone(), alias_obj); [INFO] [stdout] 347 + } [INFO] [stdout] 348 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/account_subscription.rs:19:1 [INFO] [stdout] | [INFO] [stdout] 19 | / pub enum AccountEvent { [INFO] [stdout] 20 | | /// Emitted when the overall account summary (equity, cash, margin, etc.) is updated. [INFO] [stdout] 21 | | SummaryUpdate { [INFO] [stdout] 22 | | info: AccountInfo, [INFO] [stdout] ... | [INFO] [stdout] 26 | | / PositionUpdate { [INFO] [stdout] 27 | | | position: Position, [INFO] [stdout] 28 | | | timestamp: DateTime, [INFO] [stdout] 29 | | | }, [INFO] [stdout] | | |___- the second-largest variant contains at least 492 bytes [INFO] [stdout] 30 | | /// Emitted when new execution details are received for the account. [INFO] [stdout] 31 | | / ExecutionUpdate { [INFO] [stdout] 32 | | | execution: Execution, [INFO] [stdout] 33 | | | timestamp: DateTime, [INFO] [stdout] 34 | | | }, [INFO] [stdout] | | |___- the largest variant contains at least 700 bytes [INFO] [stdout] ... | [INFO] [stdout] 44 | | }, [INFO] [stdout] 45 | | } [INFO] [stdout] | |___^ the entire enum is at least 704 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 32 - execution: Execution, [INFO] [stdout] 32 + execution: Box, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data_subscription.rs:306:59 [INFO] [stdout] | [INFO] [stdout] 306 | ... { if self.state.active.load(Ordering::SeqCst) { if let Err(e) = self.cancel() { error!("Drop: Error cancelling TickDataSubscription {}: {:?}", self.state.req_id, e); } } } } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 306 - impl Drop for TickDataSubscription { fn drop(&mut self) { if self.state.active.load(Ordering::SeqCst) { if let Err(e) = self.cancel() { error!("Drop: Error cancelling TickDataSubscription {}: {:?}", self.state.req_id, e); } } } } [INFO] [stdout] 306 + impl Drop for TickDataSubscription { fn drop(&mut self) { if self.state.active.load(Ordering::SeqCst) && let Err(e) = self.cancel() { error!("Drop: Error cancelling TickDataSubscription {}: {:?}", self.state.req_id, e); } } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data_subscription.rs:381:62 [INFO] [stdout] | [INFO] [stdout] 381 | ... { if self.state.active.load(Ordering::SeqCst) { if let Err(e) = self.cancel() { error!("Drop: Error cancelling RealTimeBarSubscription {}: {:?}", self.state.req_id, e); } } } } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 381 - impl Drop for RealTimeBarSubscription { fn drop(&mut self) { if self.state.active.load(Ordering::SeqCst) { if let Err(e) = self.cancel() { error!("Drop: Error cancelling RealTimeBarSubscription {}: {:?}", self.state.req_id, e); } } } } [INFO] [stdout] 381 + impl Drop for RealTimeBarSubscription { fn drop(&mut self) { if self.state.active.load(Ordering::SeqCst) && let Err(e) = self.cancel() { error!("Drop: Error cancelling RealTimeBarSubscription {}: {:?}", self.state.req_id, e); } } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data_subscription.rs:468:61 [INFO] [stdout] | [INFO] [stdout] 468 | ... { if self.state.active.load(Ordering::SeqCst) { if let Err(e) = self.cancel() { error!("Drop: Error cancelling TickByTickSubscription {}: {:?}", self.state.req_id, e); } } } } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 468 - impl Drop for TickByTickSubscription { fn drop(&mut self) { if self.state.active.load(Ordering::SeqCst) { if let Err(e) = self.cancel() { error!("Drop: Error cancelling TickByTickSubscription {}: {:?}", self.state.req_id, e); } } } } [INFO] [stdout] 468 + impl Drop for TickByTickSubscription { fn drop(&mut self) { if self.state.active.load(Ordering::SeqCst) && let Err(e) = self.cancel() { error!("Drop: Error cancelling TickByTickSubscription {}: {:?}", self.state.req_id, e); } } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data_subscription.rs:585:62 [INFO] [stdout] | [INFO] [stdout] 585 | ... { if self.state.active.load(Ordering::SeqCst) { if let Err(e) = self.cancel() { error!("Drop: Error cancelling MarketDepthSubscription {}: {:?}", self.state.req_id, e); } } } } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 585 - impl Drop for MarketDepthSubscription { fn drop(&mut self) { if self.state.active.load(Ordering::SeqCst) { if let Err(e) = self.cancel() { error!("Drop: Error cancelling MarketDepthSubscription {}: {:?}", self.state.req_id, e); } } } } [INFO] [stdout] 585 + impl Drop for MarketDepthSubscription { fn drop(&mut self) { if self.state.active.load(Ordering::SeqCst) && let Err(e) = self.cancel() { error!("Drop: Error cancelling MarketDepthSubscription {}: {:?}", self.state.req_id, e); } } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data_subscription.rs:655:65 [INFO] [stdout] | [INFO] [stdout] 655 | ... { if self.state.active.load(Ordering::SeqCst) { if let Err(e) = self.cancel() { error!("Drop: Error cancelling HistoricalDataSubscription {}: {:?}", self.state.req_id, e); } } } } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 655 - impl Drop for HistoricalDataSubscription { fn drop(&mut self) { if self.state.active.load(Ordering::SeqCst) { if let Err(e) = self.cancel() { error!("Drop: Error cancelling HistoricalDataSubscription {}: {:?}", self.state.req_id, e); } } } } [INFO] [stdout] 655 + impl Drop for HistoricalDataSubscription { fn drop(&mut self) { if self.state.active.load(Ordering::SeqCst) && let Err(e) = self.cancel() { error!("Drop: Error cancelling HistoricalDataSubscription {}: {:?}", self.state.req_id, e); } } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/news_subscription.rs:217:5 [INFO] [stdout] | [INFO] [stdout] 217 | / if self.state.active.load(std::sync::atomic::Ordering::SeqCst) { [INFO] [stdout] 218 | | if let Err(e) = self.cancel() { [INFO] [stdout] 219 | | error!( [INFO] [stdout] 220 | | "Drop: Error cancelling NewsSubscription (ObsID {}): {:?}", [INFO] [stdout] ... | [INFO] [stdout] 224 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 217 ~ if self.state.active.load(std::sync::atomic::Ordering::SeqCst) [INFO] [stdout] 218 ~ && let Err(e) = self.cancel() { [INFO] [stdout] 219 | error!( [INFO] [stdout] ... [INFO] [stdout] 222 | ); [INFO] [stdout] 223 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/news_subscription.rs:428:5 [INFO] [stdout] | [INFO] [stdout] 428 | / if self.state.active.load(std::sync::atomic::Ordering::SeqCst) { [INFO] [stdout] 429 | | if let Err(e) = self.cancel() { [INFO] [stdout] 430 | | error!( [INFO] [stdout] 431 | | "Drop: Error cancelling HistoricalNewsSubscription (ReqID {}): {:?}", [INFO] [stdout] ... | [INFO] [stdout] 435 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 428 ~ if self.state.active.load(std::sync::atomic::Ordering::SeqCst) [INFO] [stdout] 429 ~ && let Err(e) = self.cancel() { [INFO] [stdout] 430 | error!( [INFO] [stdout] ... [INFO] [stdout] 433 | ); [INFO] [stdout] 434 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/data_observer.rs:43:3 [INFO] [stdout] | [INFO] [stdout] 43 | / fn on_tick_by_tick_all_last( [INFO] [stdout] 44 | | &self, [INFO] [stdout] 45 | | req_id: i32, [INFO] [stdout] 46 | | tick_type: i32, // 1 for Last, 2 for AllLast [INFO] [stdout] ... | [INFO] [stdout] 52 | | special_conditions: &str, [INFO] [stdout] 53 | | ) {} [INFO] [stdout] | |___^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/data_observer.rs:56:3 [INFO] [stdout] | [INFO] [stdout] 56 | / fn on_tick_by_tick_bid_ask( [INFO] [stdout] 57 | | &self, [INFO] [stdout] 58 | | req_id: i32, [INFO] [stdout] 59 | | time: DateTime, [INFO] [stdout] ... | [INFO] [stdout] 64 | | tick_attrib_bid_ask: &TickAttribBidAsk, [INFO] [stdout] 65 | | ) {} [INFO] [stdout] | |___^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/data_observer.rs:78:12 [INFO] [stdout] | [INFO] [stdout] 78 | ticks: &[(DateTime, TickAttribBidAsk, f64, f64, f64, f64)], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/data_observer.rs:87:12 [INFO] [stdout] | [INFO] [stdout] 87 | ticks: &[(DateTime, TickAttribLast, f64, f64, String, String)], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/data_observer.rs:111:3 [INFO] [stdout] | [INFO] [stdout] 111 | / fn on_update_mkt_depth_l2( [INFO] [stdout] 112 | | &self, [INFO] [stdout] 113 | | req_id: i32, [INFO] [stdout] 114 | | position: i32, [INFO] [stdout] ... | [INFO] [stdout] 120 | | is_smart_depth: bool, [INFO] [stdout] 121 | | ) {} [INFO] [stdout] | |___^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/data_observer.rs:149:12 [INFO] [stdout] | [INFO] [stdout] 149 | ticks: &[(DateTime, TickAttribBidAsk, f64, f64, f64, f64)], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/data_observer.rs:158:12 [INFO] [stdout] | [INFO] [stdout] 158 | ticks: &[(DateTime, TickAttribLast, f64, f64, String, String)], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/account_manager.rs:615:32 [INFO] [stdout] | [INFO] [stdout] 615 | let is_active_position = self.account_state.read().portfolio.get(&con_id_str) [INFO] [stdout] | ________________________________^ [INFO] [stdout] 616 | | .map_or(false, |p| p.quantity != 0.0); [INFO] [stdout] | |_____________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 616 - .map_or(false, |p| p.quantity != 0.0); [INFO] [stdout] 616 + .is_some_and(|p| p.quantity != 0.0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/account_manager.rs:649:7 [INFO] [stdout] | [INFO] [stdout] 649 | / if !active_subscriptions.contains(&con_id) { [INFO] [stdout] 650 | | if let Err(e) = self._subscribe_pnl_for_position(con_id, &account_id) { [INFO] [stdout] 651 | | warn!("Error subscribing PnL for con_id {}: {:?}", con_id, e); [INFO] [stdout] 652 | | } [INFO] [stdout] 653 | | } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 649 ~ if !active_subscriptions.contains(&con_id) [INFO] [stdout] 650 ~ && let Err(e) = self._subscribe_pnl_for_position(con_id, &account_id) { [INFO] [stdout] 651 | warn!("Error subscribing PnL for con_id {}: {:?}", con_id, e); [INFO] [stdout] 652 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/account_manager.rs:762:65 [INFO] [stdout] | [INFO] [stdout] 762 | let request_msg = encoder.encode_request_executions(req_id, &filter)?; [INFO] [stdout] | ^^^^^^^ help: change this to: `filter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/account_manager.rs:785:13 [INFO] [stdout] | [INFO] [stdout] 785 | while exec_state.get(&req_id).map_or(false, |s| s.waiting && !s.end_received) && start_time.elapsed() < wait_timeout { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 785 - while exec_state.get(&req_id).map_or(false, |s| s.waiting && !s.end_received) && start_time.elapsed() < wait_timeout { [INFO] [stdout] 785 + while exec_state.get(&req_id).is_some_and(|s| s.waiting && !s.end_received) && start_time.elapsed() < wait_timeout { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/account_manager.rs:790:14 [INFO] [stdout] | [INFO] [stdout] 790 | if exec_state.get(&req_id).map_or(true, |s| s.waiting && !s.end_received) { // Still waiting after timeout [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 790 - if exec_state.get(&req_id).map_or(true, |s| s.waiting && !s.end_received) { // Still waiting after timeout [INFO] [stdout] 790 + if exec_state.get(&req_id).is_none_or(|s| s.waiting && !s.end_received) { // Still waiting after timeout [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/account_manager.rs:799:10 [INFO] [stdout] | [INFO] [stdout] 799 | if exec_state.get(&req_id).map_or(true, |s| !s.end_received) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 799 - if exec_state.get(&req_id).map_or(true, |s| !s.end_received) { [INFO] [stdout] 799 + if exec_state.get(&req_id).is_none_or(|s| !s.end_received) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/account_manager.rs:982:13 [INFO] [stdout] | [INFO] [stdout] 982 | / if let Some(id) = u_state.current_summary_req_id { [INFO] [stdout] 983 | | if let Ok(cancel_msg) = encoder.encode_cancel_account_summary(id) { [INFO] [stdout] 984 | | let _ = self.message_broker.send_message(&cancel_msg); [INFO] [stdout] 985 | | } [INFO] [stdout] 986 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 982 ~ if let Some(id) = u_state.current_summary_req_id [INFO] [stdout] 983 ~ && let Ok(cancel_msg) = encoder.encode_cancel_account_summary(id) { [INFO] [stdout] 984 | let _ = self.message_broker.send_message(&cancel_msg); [INFO] [stdout] 985 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/account_manager.rs:995:11 [INFO] [stdout] | [INFO] [stdout] 995 | / if let Some(id) = u_state.current_summary_req_id { [INFO] [stdout] 996 | | if let Ok(cancel_msg) = encoder.encode_cancel_account_summary(id) { [INFO] [stdout] 997 | | let _ = self.message_broker.send_message(&cancel_msg); [INFO] [stdout] 998 | | } [INFO] [stdout] 999 | | } [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 995 ~ if let Some(id) = u_state.current_summary_req_id [INFO] [stdout] 996 ~ && let Ok(cancel_msg) = encoder.encode_cancel_account_summary(id) { [INFO] [stdout] 997 | let _ = self.message_broker.send_message(&cancel_msg); [INFO] [stdout] 998 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/account_manager.rs:1545:12 [INFO] [stdout] | [INFO] [stdout] 1545 | } else if !should_be_subscribed_pnl && is_currently_subscribed_pnl { [INFO] [stdout] | ____________^ [INFO] [stdout] 1546 | | if let Err(e) = self._unsubscribe_pnl_for_position(con_id) { [INFO] [stdout] 1547 | | warn!("Auto-unsubscribe PnL (from position) failed for con_id {}: {:?}", con_id, e); [INFO] [stdout] 1548 | | } [INFO] [stdout] 1549 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1545 ~ } else if !should_be_subscribed_pnl && is_currently_subscribed_pnl [INFO] [stdout] 1546 ~ && let Err(e) = self._unsubscribe_pnl_for_position(con_id) { [INFO] [stdout] 1547 | warn!("Auto-unsubscribe PnL (from position) failed for con_id {}: {:?}", con_id, e); [INFO] [stdout] 1548 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/data_fin_manager.rs:592:68 [INFO] [stdout] | [INFO] [stdout] 592 | return Err(IBKRError::ParseError(std::format!("{}: {}", e.to_string(), json_str))); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data_fin_manager.rs:779:9 [INFO] [stdout] | [INFO] [stdout] 779 | / if let Some(expected_count) = state.wsh_event_expected_count { [INFO] [stdout] 780 | | if state.wsh_event_data_json_list.len() >= expected_count { [INFO] [stdout] 781 | | state.request_complete = true; [INFO] [stdout] 782 | | info!("All expected WSH events ({}) received for request {}. Notifying waiter.", expected_count, req_id); [INFO] [stdout] ... | [INFO] [stdout] 785 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 779 ~ if let Some(expected_count) = state.wsh_event_expected_count [INFO] [stdout] 780 ~ && state.wsh_event_data_json_list.len() >= expected_count { [INFO] [stdout] 781 | state.request_complete = true; [INFO] [stdout] 782 | info!("All expected WSH events ({}) received for request {}. Notifying waiter.", expected_count, req_id); [INFO] [stdout] 783 | self.request_cond.notify_all(); [INFO] [stdout] 784 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/data_market_manager.rs:271:1 [INFO] [stdout] | [INFO] [stdout] 271 | / enum MarketStream { [INFO] [stdout] 272 | | /// State for a standard tick-based market data subscription. [INFO] [stdout] 273 | | TickData(MarketDataInfo), [INFO] [stdout] | | ------------------------ the largest variant contains at least 1176 bytes [INFO] [stdout] 274 | | /// State for a real-time bars subscription. [INFO] [stdout] ... | [INFO] [stdout] 278 | | MarketDepth(MarketDepthInfo), [INFO] [stdout] | | ---------------------------- the second-largest variant contains at least 560 bytes [INFO] [stdout] ... | [INFO] [stdout] 283 | | HistoricalTicks(HistoricalTicksRequestState), [INFO] [stdout] 284 | | } [INFO] [stdout] | |_^ the entire enum is at least 1176 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 273 - TickData(MarketDataInfo), [INFO] [stdout] 273 + TickData(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_market_manager.rs:448:5 [INFO] [stdout] | [INFO] [stdout] 448 | return Ok(()); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 448 - return Ok(()); [INFO] [stdout] 448 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/data_market_manager.rs:649:7 [INFO] [stdout] | [INFO] [stdout] 649 | /// that implements `CompletableState` and `Clone`. [INFO] [stdout] | ^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] = note: `#[warn(clippy::doc_overindented_list_items)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/data_market_manager.rs:985:3 [INFO] [stdout] | [INFO] [stdout] 985 | / pub(crate) fn internal_request_market_data( [INFO] [stdout] 986 | | &self, [INFO] [stdout] 987 | | req_id: i32, [INFO] [stdout] 988 | | contract: &Contract, [INFO] [stdout] ... | [INFO] [stdout] 993 | | desired_mkt_data_type: MarketDataType, [INFO] [stdout] 994 | | ) -> Result<(), IBKRError> { [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/data_market_manager.rs:1083:3 [INFO] [stdout] | [INFO] [stdout] 1083 | / pub fn get_market_data( // F changed to Fn from FnMut [INFO] [stdout] 1084 | | &self, [INFO] [stdout] 1085 | | contract: &Contract, [INFO] [stdout] 1086 | | generic_tick_list: &[GenericTickType], [INFO] [stdout] ... | [INFO] [stdout] 1094 | | where [INFO] [stdout] 1095 | | F: Fn(&MarketDataInfo) -> bool, [INFO] [stdout] | |___________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/data_market_manager.rs:1975:3 [INFO] [stdout] | [INFO] [stdout] 1975 | / pub fn get_historical_data( [INFO] [stdout] 1976 | | &self, [INFO] [stdout] 1977 | | contract: &Contract, [INFO] [stdout] 1978 | | end_date_time: Option>, // Use chrono DateTime [INFO] [stdout] ... | [INFO] [stdout] 1986 | | chart_options: &[(String, String)], // TagValue list [INFO] [stdout] 1987 | | ) -> Result, IBKRError> { [INFO] [stdout] | |__________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/data_market_manager.rs:2007:3 [INFO] [stdout] | [INFO] [stdout] 2007 | / pub(crate) fn internal_request_historical_data( [INFO] [stdout] 2008 | | &self, req_id: i32, contract: &Contract, end_date_time: Option>, [INFO] [stdout] 2009 | | duration_str: &str, bar_size_str: &str, what_to_show_str: &str, use_rth: bool, [INFO] [stdout] 2010 | | format_date: i32, keep_up_to_date: bool, chart_options: &[(String, String)], [INFO] [stdout] 2011 | | desired_mkt_data_type: MarketDataType [INFO] [stdout] 2012 | | ) -> Result<(), IBKRError> { [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/data_market_manager.rs:2091:5 [INFO] [stdout] | [INFO] [stdout] 2091 | / match code { [INFO] [stdout] 2092 | | ClientErrorCode::MarketDataNotSubscribedDisplayDelayed => { [INFO] [stdout] 2093 | | info!("API Info received for market data request {}: Code={:?}, Msg={}", req_id, code, msg); [INFO] [stdout] 2094 | | return; [INFO] [stdout] 2095 | | } [INFO] [stdout] 2096 | | _ => {}, [INFO] [stdout] 2097 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 2091 ~ if code == ClientErrorCode::MarketDataNotSubscribedDisplayDelayed { [INFO] [stdout] 2092 + info!("API Info received for market data request {}: Code={:?}, Msg={}", req_id, code, msg); [INFO] [stdout] 2093 + return; [INFO] [stdout] 2094 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data_market_manager.rs:2144:9 [INFO] [stdout] | [INFO] [stdout] 2144 | / if let MarketStream::TickData(s) = sub_state { [INFO] [stdout] 2145 | | if s.is_blocking_quote_request { [INFO] [stdout] 2146 | | s.quote_received = true; // Mark quote flag too [INFO] [stdout] 2147 | | } [INFO] [stdout] 2148 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2144 ~ if let MarketStream::TickData(s) = sub_state [INFO] [stdout] 2145 ~ && s.is_blocking_quote_request { [INFO] [stdout] 2146 | s.quote_received = true; // Mark quote flag too [INFO] [stdout] 2147 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/data_market_manager.rs:2261:30 [INFO] [stdout] | [INFO] [stdout] 2261 | return Err(Timeout(format!("Scanner parameters request timed out after wait", ))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Scanner parameters request timed out after wait".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/data_market_manager.rs:2700:3 [INFO] [stdout] | [INFO] [stdout] 2700 | / pub fn request_historical_ticks( [INFO] [stdout] 2701 | | &self, [INFO] [stdout] 2702 | | contract: &Contract, [INFO] [stdout] 2703 | | start_date_time: Option>, [INFO] [stdout] ... | [INFO] [stdout] 2709 | | misc_options: &[(String, String)], [INFO] [stdout] 2710 | | ) -> Result { [INFO] [stdout] | |_____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/data_market_manager.rs:2721:3 [INFO] [stdout] | [INFO] [stdout] 2721 | / pub fn internal_request_historical_ticks( [INFO] [stdout] 2722 | | &self, req_id: i32, contract: &Contract, start_date_time: Option>, [INFO] [stdout] 2723 | | end_date_time: Option>, number_of_ticks: i32, what_to_show: WhatToShow, [INFO] [stdout] 2724 | | use_rth: bool, ignore_size: bool, misc_options: &[(String, String)] [INFO] [stdout] 2725 | | ) -> Result<(), IBKRError> { [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/data_market_manager.rs:2769:3 [INFO] [stdout] | [INFO] [stdout] 2769 | / pub fn get_historical_ticks( [INFO] [stdout] 2770 | | &self, [INFO] [stdout] 2771 | | contract: &Contract, [INFO] [stdout] 2772 | | start_date_time: Option>, [INFO] [stdout] ... | [INFO] [stdout] 2779 | | timeout: Duration, [INFO] [stdout] 2780 | | ) -> Result, IBKRError> { [INFO] [stdout] | |_____________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/data_market_manager.rs:2991:3 [INFO] [stdout] | [INFO] [stdout] 2991 | / pub fn request_observe_market_data( [INFO] [stdout] 2992 | | &self, [INFO] [stdout] 2993 | | contract: &Contract, [INFO] [stdout] 2994 | | generic_tick_list: &[GenericTickType], [INFO] [stdout] ... | [INFO] [stdout] 2999 | | observer: T, [INFO] [stdout] 3000 | | ) -> Result<(i32, ObserverId), IBKRError> { [INFO] [stdout] | |___________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/data_market_manager.rs:3145:3 [INFO] [stdout] | [INFO] [stdout] 3145 | / pub fn request_observe_historical_data( [INFO] [stdout] 3146 | | &self, [INFO] [stdout] 3147 | | contract: &Contract, [INFO] [stdout] 3148 | | end_date_time: Option>, [INFO] [stdout] ... | [INFO] [stdout] 3157 | | observer: T, [INFO] [stdout] 3158 | | ) -> Result<(i32, ObserverId), IBKRError> { [INFO] [stdout] | |___________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/data_market_manager.rs:3185:3 [INFO] [stdout] | [INFO] [stdout] 3185 | / pub fn request_observe_historical_ticks( [INFO] [stdout] 3186 | | &self, [INFO] [stdout] 3187 | | contract: &Contract, [INFO] [stdout] 3188 | | start_date_time: Option>, [INFO] [stdout] ... | [INFO] [stdout] 3195 | | observer: T, [INFO] [stdout] 3196 | | ) -> Result<(i32, ObserverId), IBKRError> { [INFO] [stdout] | |___________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data_market_manager.rs:3767:32 [INFO] [stdout] | [INFO] [stdout] 3767 | / ... if parts.len() >= 4 { [INFO] [stdout] 3768 | | ... if let Ok(ts) = parts[0].parse::() { [INFO] [stdout] 3769 | | ... state.latest_news_time = Some(ts); [INFO] [stdout] ... | [INFO] [stdout] 3772 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3767 ~ if parts.len() >= 4 [INFO] [stdout] 3768 ~ && let Ok(ts) = parts[0].parse::() { [INFO] [stdout] 3769 | state.latest_news_time = Some(ts); [INFO] [stdout] 3770 | // Could store full TickNewsData if needed [INFO] [stdout] 3771 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data_market_manager.rs:3932:7 [INFO] [stdout] | [INFO] [stdout] 3932 | / if let Some(target_count) = state.target_bar_count { [INFO] [stdout] 3933 | | if !state.completed && state.bars.len() >= target_count { [INFO] [stdout] 3934 | | debug!("Target bar count ({}) reached for blocking RealTimeBars ReqID {}. Notifying waiter.", target_count, req_id); [INFO] [stdout] 3935 | | state.completed = true; [INFO] [stdout] ... | [INFO] [stdout] 3938 | | } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3932 ~ if let Some(target_count) = state.target_bar_count [INFO] [stdout] 3933 ~ && !state.completed && state.bars.len() >= target_count { [INFO] [stdout] 3934 | debug!("Target bar count ({}) reached for blocking RealTimeBars ReqID {}. Notifying waiter.", target_count, req_id); [INFO] [stdout] 3935 | state.completed = true; [INFO] [stdout] 3936 | self.request_cond.notify_all(); [INFO] [stdout] 3937 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `clone` can be replaced with `std::slice::from_ref` [INFO] [stdout] --> src/data_market_manager.rs:4108:60 [INFO] [stdout] | [INFO] [stdout] 4108 | observer.on_historical_ticks_bid_ask(req_id, &[tick.clone()], done); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `std::slice::from_ref(&tick)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cloned_ref_to_slice_refs [INFO] [stdout] = note: `#[warn(clippy::cloned_ref_to_slice_refs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `clone` can be replaced with `std::slice::from_ref` [INFO] [stdout] --> src/data_market_manager.rs:4161:57 [INFO] [stdout] | [INFO] [stdout] 4161 | observer.on_historical_ticks_last(req_id, &[tick.clone()], done); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `std::slice::from_ref(&tick)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cloned_ref_to_slice_refs [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/data_news_manager.rs:467:3 [INFO] [stdout] | [INFO] [stdout] 467 | / pub(crate) fn internal_request_historical_news_stream( [INFO] [stdout] 468 | | &self, [INFO] [stdout] 469 | | req_id: i32, [INFO] [stdout] 470 | | con_id: i32, [INFO] [stdout] ... | [INFO] [stdout] 476 | | state_weak: Weak>, [INFO] [stdout] 477 | | ) -> Result<(), IBKRError> { [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_news_manager.rs:594:9 [INFO] [stdout] | [INFO] [stdout] 594 | return; // Handled [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 593 - event_subs.remove(&req_id); // Remove on error [INFO] [stdout] 594 - return; // Handled [INFO] [stdout] 593 + event_subs.remove(&req_id); // Remove on error// Handled [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data_news_manager.rs:755:5 [INFO] [stdout] | [INFO] [stdout] 755 | / if let Some(state_weak) = event_subs.get(&req_id) { [INFO] [stdout] 756 | | if let Some(state_arc) = state_weak.upgrade() { [INFO] [stdout] 757 | | let item = HistoricalNews { [INFO] [stdout] 758 | | time: time.to_string(), [INFO] [stdout] ... | [INFO] [stdout] 765 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 755 ~ if let Some(state_weak) = event_subs.get(&req_id) [INFO] [stdout] 756 ~ && let Some(state_arc) = state_weak.upgrade() { [INFO] [stdout] 757 | let item = HistoricalNews { [INFO] [stdout] ... [INFO] [stdout] 763 | state_arc.push_event(HistoricalNewsEvent::Article(item)); [INFO] [stdout] 764 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/data_ref_manager.rs:143:7 [INFO] [stdout] | [INFO] [stdout] 143 | state.is_smart_components_workflow = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `data_ref_manager::DataRefRequestState { is_smart_components_workflow: true, market_data_req_id: Some(market_data_req_id), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/data_ref_manager.rs:142:7 [INFO] [stdout] | [INFO] [stdout] 142 | let mut state = DataRefRequestState::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/data_ref_manager.rs:399:11 [INFO] [stdout] | [INFO] [stdout] 399 | / if state.is_smart_components_workflow { [INFO] [stdout] 400 | | if let Some(market_data_req_id) = state.market_data_req_id { [INFO] [stdout] 401 | | match enc.encode_cancel_market_data(market_data_req_id) { [INFO] [stdout] 402 | | Ok(cancel_msg) => { [INFO] [stdout] ... | [INFO] [stdout] 414 | | } [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 399 ~ if state.is_smart_components_workflow [INFO] [stdout] 400 ~ && let Some(market_data_req_id) = state.market_data_req_id { [INFO] [stdout] 401 | match enc.encode_cancel_market_data(market_data_req_id) { [INFO] [stdout] ... [INFO] [stdout] 412 | } [INFO] [stdout] 413 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/order_manager.rs:87:1 [INFO] [stdout] | [INFO] [stdout] 87 | / pub enum OrderEvent { [INFO] [stdout] 88 | | /// Order state was updated (status change, fills, etc.) [INFO] [stdout] 89 | | Update(Order), [INFO] [stdout] | | ------------- the largest variant contains at least 2824 bytes [INFO] [stdout] 90 | | /// An error occurred with this order [INFO] [stdout] 91 | | Error(IBKRError), [INFO] [stdout] | | ---------------- the second-largest variant contains at least 32 bytes [INFO] [stdout] 92 | | } [INFO] [stdout] | |_^ the entire enum is at least 2824 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 89 - Update(Order), [INFO] [stdout] 89 + Update(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/order_manager.rs:275:26 [INFO] [stdout] | [INFO] [stdout] 275 | order_update_condvars: RwLock, Condvar)>>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/order_manager.rs:547:10 [INFO] [stdout] | [INFO] [stdout] 547 | .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/order_manager.rs:801:5 [INFO] [stdout] | [INFO] [stdout] 801 | / if let Some(delta_neutral_order_type) = &modified_request.delta_neutral_order_type { [INFO] [stdout] 802 | | if delta_neutral_order_type.as_bytes() == &[195, 142, 195, 158] /* ÎÞ */ { [INFO] [stdout] 803 | | modified_request.delta_neutral_order_type = None; [INFO] [stdout] 804 | | } [INFO] [stdout] 805 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 801 ~ if let Some(delta_neutral_order_type) = &modified_request.delta_neutral_order_type [INFO] [stdout] 802 ~ && delta_neutral_order_type.as_bytes() == &[195, 142, 195, 158] /* ÎÞ */ { [INFO] [stdout] 803 | modified_request.delta_neutral_order_type = None; [INFO] [stdout] 804 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/order_manager.rs:802:10 [INFO] [stdout] | [INFO] [stdout] 802 | if delta_neutral_order_type.as_bytes() == &[195, 142, 195, 158] /* ÎÞ */ { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^--------------------- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `[195, 142, 195, 158]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/order_manager.rs:809:5 [INFO] [stdout] | [INFO] [stdout] 809 | / if let Some(qty) = updates.quantity { [INFO] [stdout] 810 | | if modified_request.quantity != qty { [INFO] [stdout] 811 | | modified_request.quantity = qty; [INFO] [stdout] 812 | | changed = true; [INFO] [stdout] 813 | | } [INFO] [stdout] 814 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 809 ~ if let Some(qty) = updates.quantity [INFO] [stdout] 810 ~ && modified_request.quantity != qty { [INFO] [stdout] 811 | modified_request.quantity = qty; [INFO] [stdout] 812 | changed = true; [INFO] [stdout] 813 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/order_manager.rs:833:12 [INFO] [stdout] | [INFO] [stdout] 833 | } else if updates.aux_price.is_some() { [INFO] [stdout] | ____________^ [INFO] [stdout] 834 | | if modified_request.aux_price.is_some() { [INFO] [stdout] 835 | | modified_request.aux_price = None; [INFO] [stdout] 836 | | changed = true; [INFO] [stdout] 837 | | } [INFO] [stdout] 838 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 833 ~ } else if updates.aux_price.is_some() [INFO] [stdout] 834 ~ && modified_request.aux_price.is_some() { [INFO] [stdout] 835 | modified_request.aux_price = None; [INFO] [stdout] 836 | changed = true; [INFO] [stdout] 837 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/order_manager.rs:839:5 [INFO] [stdout] | [INFO] [stdout] 839 | / if let Some(tif) = updates.time_in_force { [INFO] [stdout] 840 | | if modified_request.time_in_force != tif { [INFO] [stdout] 841 | | modified_request.time_in_force = tif; [INFO] [stdout] 842 | | changed = true; [INFO] [stdout] 843 | | } [INFO] [stdout] 844 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 839 ~ if let Some(tif) = updates.time_in_force [INFO] [stdout] 840 ~ && modified_request.time_in_force != tif { [INFO] [stdout] 841 | modified_request.time_in_force = tif; [INFO] [stdout] 842 | changed = true; [INFO] [stdout] 843 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/order_manager.rs:1740:11 [INFO] [stdout] | [INFO] [stdout] 1740 | / if !p_map.contains_key(&perm_id) { [INFO] [stdout] 1741 | | p_map.insert(perm_id, order_id_str.clone()); [INFO] [stdout] 1742 | | debug!("Mapped PermID {} to OrderID {} from openOrder", perm_id, order_id_str); [INFO] [stdout] 1743 | | } [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1740 ~ if let std::collections::hash_map::Entry::Vacant(e) = p_map.entry(perm_id) { [INFO] [stdout] 1741 + e.insert(order_id_str.clone()); [INFO] [stdout] 1742 + debug!("Mapped PermID {} to OrderID {} from openOrder", perm_id, order_id_str); [INFO] [stdout] 1743 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/scan_parameters.rs:707:1 [INFO] [stdout] | [INFO] [stdout] 707 | / enum RangeFilterItem { [INFO] [stdout] 708 | | #[serde(rename = "id")] [INFO] [stdout] 709 | | Id(String), [INFO] [stdout] 710 | | #[serde(rename = "category")] [INFO] [stdout] ... | [INFO] [stdout] 731 | | Columns(Columns), // Uses the existing Columns struct [INFO] [stdout] | | ---------------- the second-largest variant contains at least 96 bytes [INFO] [stdout] 732 | | #[serde(rename = "AbstractField")] [INFO] [stdout] 733 | | AbstractField(AbstractField), [INFO] [stdout] | | ---------------------------- the largest variant contains at least 704 bytes [INFO] [stdout] 734 | | #[serde(rename = "skipValidation")] [INFO] [stdout] 735 | | SkipValidation(String), [INFO] [stdout] 736 | | } [INFO] [stdout] | |_^ the entire enum is at least 704 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 733 - AbstractField(AbstractField), [INFO] [stdout] 733 + AbstractField(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/scan_parameters.rs:841:1 [INFO] [stdout] | [INFO] [stdout] 841 | / enum SimpleFilterItem { [INFO] [stdout] 842 | | #[serde(rename = "id")] [INFO] [stdout] 843 | | Id(String), [INFO] [stdout] 844 | | #[serde(rename = "category")] [INFO] [stdout] ... | [INFO] [stdout] 857 | | Columns(Columns), [INFO] [stdout] | | ---------------- the second-largest variant contains at least 96 bytes [INFO] [stdout] 858 | | #[serde(rename = "AbstractField")] [INFO] [stdout] 859 | | AbstractField(AbstractField), [INFO] [stdout] | | ---------------------------- the largest variant contains at least 704 bytes [INFO] [stdout] 860 | | #[serde(rename = "skipValidation")] [INFO] [stdout] 861 | | SkipValidation(String), // skip_validation is Option in SimpleFilter [INFO] [stdout] 862 | | } [INFO] [stdout] | |_^ the entire enum is at least 704 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 859 - AbstractField(AbstractField), [INFO] [stdout] 859 + AbstractField(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same postfix: `Filter` [INFO] [stdout] --> src/scan_parameters.rs:1004:1 [INFO] [stdout] | [INFO] [stdout] 1004 | / enum FilterListItem { [INFO] [stdout] 1005 | | #[serde(rename = "RangeFilter")] [INFO] [stdout] 1006 | | RangeFilter(RangeFilter), // These will use their own custom Deserialize [INFO] [stdout] 1007 | | #[serde(rename = "SimpleFilter")] [INFO] [stdout] ... | [INFO] [stdout] 1012 | | VirtualFilter(VirtualFilter), [INFO] [stdout] 1013 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/scan_parameters.rs:1103:1 [INFO] [stdout] | [INFO] [stdout] 1103 | / enum TripleComboFilterItem { [INFO] [stdout] 1104 | | #[serde(rename = "id")] [INFO] [stdout] 1105 | | Id(String), [INFO] [stdout] 1106 | | #[serde(rename = "category")] [INFO] [stdout] ... | [INFO] [stdout] 1113 | | TripleComboField(TripleComboField), [INFO] [stdout] | | ---------------------------------- the second-largest variant contains at least 144 bytes [INFO] [stdout] 1114 | | #[serde(rename = "AbstractField")] [INFO] [stdout] 1115 | | AbstractField(AbstractField), [INFO] [stdout] | | ---------------------------- the largest variant contains at least 704 bytes [INFO] [stdout] 1116 | | } [INFO] [stdout] | |_^ the entire enum is at least 704 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 1115 - AbstractField(AbstractField), [INFO] [stdout] 1115 + AbstractField(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/scan_parameters.rs:1310:5 [INFO] [stdout] | [INFO] [stdout] 1310 | abstract_field_instance.type_ = helper.type_; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `scan_parameters::AbstractField { type_: helper.type_, attr_var_name: helper.attr_var_name, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/scan_parameters.rs:1307:5 [INFO] [stdout] | [INFO] [stdout] 1307 | let mut abstract_field_instance = AbstractField::default(); // Initialize with default values [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/financial_advisor_manager.rs:102:7 [INFO] [stdout] | [INFO] [stdout] 102 | / if timeout_result.timed_out() { [INFO] [stdout] 103 | | if req_state_guard.waiting_for_data && req_state_guard.error_occurred.is_none() { [INFO] [stdout] 104 | | warn!("FA data request timed out waiting for receiveFA for type {:?}", fa_data_type); [INFO] [stdout] 105 | | req_state_guard.waiting_for_data = false; [INFO] [stdout] ... | [INFO] [stdout] 109 | | } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 102 ~ if timeout_result.timed_out() [INFO] [stdout] 103 ~ && req_state_guard.waiting_for_data && req_state_guard.error_occurred.is_none() { [INFO] [stdout] 104 | warn!("FA data request timed out waiting for receiveFA for type {:?}", fa_data_type); [INFO] [stdout] ... [INFO] [stdout] 107 | return Err(IBKRError::Timeout(format!("FA data request timed out for {:?}", fa_data_type))); [INFO] [stdout] 108 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/financial_advisor_manager.rs:168:7 [INFO] [stdout] | [INFO] [stdout] 168 | / if timeout_result.timed_out() { [INFO] [stdout] 169 | | if req_state_guard.waiting_for_replace_end && req_state_guard.error_occurred.is_none() { [INFO] [stdout] 170 | | warn!("FA data replacement timed out waiting for replaceFAEnd for type {:?}", fa_data_type); [INFO] [stdout] 171 | | req_state_guard.waiting_for_replace_end = false; [INFO] [stdout] ... | [INFO] [stdout] 174 | | } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 168 ~ if timeout_result.timed_out() [INFO] [stdout] 169 ~ && req_state_guard.waiting_for_replace_end && req_state_guard.error_occurred.is_none() { [INFO] [stdout] 170 | warn!("FA data replacement timed out waiting for replaceFAEnd for type {:?}", fa_data_type); [INFO] [stdout] 171 | req_state_guard.waiting_for_replace_end = false; [INFO] [stdout] 172 | return Err(IBKRError::Timeout(format!("FA data replacement timed out for {:?}", fa_data_type))); [INFO] [stdout] 173 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/financial_advisor_manager.rs:300:15 [INFO] [stdout] | [INFO] [stdout] 300 | / if let Some(alloc) = current_allocation.take() { [INFO] [stdout] 301 | | if let Some(profile) = current_profile.as_mut() { [INFO] [stdout] 302 | | profile.allocations.push(alloc); [INFO] [stdout] 303 | | } [INFO] [stdout] 304 | | } [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 300 ~ if let Some(alloc) = current_allocation.take() [INFO] [stdout] 301 ~ && let Some(profile) = current_profile.as_mut() { [INFO] [stdout] 302 | profile.allocations.push(alloc); [INFO] [stdout] 303 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/financial_advisor_manager.rs:344:11 [INFO] [stdout] | [INFO] [stdout] 344 | / match e.name().as_ref() { [INFO] [stdout] 345 | | b"Alias" => { [INFO] [stdout] 346 | | if let Some(alias_obj) = current_alias.take() { [INFO] [stdout] 347 | | aliases.insert(alias_obj.alias.clone(), alias_obj); [INFO] [stdout] ... | [INFO] [stdout] 350 | | _ => (), [INFO] [stdout] 351 | | } [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 344 ~ if e.name().as_ref() == b"Alias" { [INFO] [stdout] 345 + if let Some(alias_obj) = current_alias.take() { [INFO] [stdout] 346 + aliases.insert(alias_obj.alias.clone(), alias_obj); [INFO] [stdout] 347 + } [INFO] [stdout] 348 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> tws_snoop.rs:352:3 [INFO] [stdout] | [INFO] [stdout] 352 | if let Err(e) = dest.shutdown(Shutdown::Write) { if e.kind() != ErrorKind::NotConnected && e.kind() != ErrorKind::BrokenPipe { warn!("{} Error shutting down destination write stream: {}", log_prefix, e); } } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 352 - if let Err(e) = dest.shutdown(Shutdown::Write) { if e.kind() != ErrorKind::NotConnected && e.kind() != ErrorKind::BrokenPipe { warn!("{} Error shutting down destination write stream: {}", log_prefix, e); } } [INFO] [stdout] 352 + if let Err(e) = dest.shutdown(Shutdown::Write) && e.kind() != ErrorKind::NotConnected && e.kind() != ErrorKind::BrokenPipe { warn!("{} Error shutting down destination write stream: {}", log_prefix, e); } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> tws_snoop.rs:352:3 [INFO] [stdout] | [INFO] [stdout] 352 | if let Err(e) = dest.shutdown(Shutdown::Write) { if e.kind() != ErrorKind::NotConnected && e.kind() != ErrorKind::BrokenPipe { warn!("{} Error shutting down destination write stream: {}", log_prefix, e); } } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 352 - if let Err(e) = dest.shutdown(Shutdown::Write) { if e.kind() != ErrorKind::NotConnected && e.kind() != ErrorKind::BrokenPipe { warn!("{} Error shutting down destination write stream: {}", log_prefix, e); } } [INFO] [stdout] 352 + if let Err(e) = dest.shutdown(Shutdown::Write) && e.kind() != ErrorKind::NotConnected && e.kind() != ErrorKind::BrokenPipe { warn!("{} Error shutting down destination write stream: {}", log_prefix, e); } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 42s [INFO] running `Command { std: "docker" "inspect" "c5361a3891c0e3a5a7dc05f7447d531b7500097d07c79013c6bbf404d5621d70", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c5361a3891c0e3a5a7dc05f7447d531b7500097d07c79013c6bbf404d5621d70", kill_on_drop: false }` [INFO] [stdout] c5361a3891c0e3a5a7dc05f7447d531b7500097d07c79013c6bbf404d5621d70