[INFO] cloning repository https://github.com/Zikkamen/StockDatastore [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Zikkamen/StockDatastore" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FZikkamen%2FStockDatastore", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FZikkamen%2FStockDatastore'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] df13b95efe4e08cba0a394fe65235e29634f36e0 [INFO] linting Zikkamen/StockDatastore against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FZikkamen%2FStockDatastore" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Zikkamen/StockDatastore [INFO] finished tweaking git repo https://github.com/Zikkamen/StockDatastore [INFO] tweaked toml for git repo https://github.com/Zikkamen/StockDatastore written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Zikkamen/StockDatastore 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 git repo https://github.com/Zikkamen/StockDatastore 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] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 8c50d159dab95b51c95ed7c8915266a33f4dd10021e8f798d3e7fe911e14f914 [INFO] running `Command { std: "docker" "start" "-a" "8c50d159dab95b51c95ed7c8915266a33f4dd10021e8f798d3e7fe911e14f914", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "8c50d159dab95b51c95ed7c8915266a33f4dd10021e8f798d3e7fe911e14f914", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8c50d159dab95b51c95ed7c8915266a33f4dd10021e8f798d3e7fe911e14f914", kill_on_drop: false }` [INFO] [stdout] 8c50d159dab95b51c95ed7c8915266a33f4dd10021e8f798d3e7fe911e14f914 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 7a7a76454a0aed2760eb75a379d917595583db11cc643f7459391c61df66bd8e [INFO] running `Command { std: "docker" "start" "-a" "7a7a76454a0aed2760eb75a379d917595583db11cc643f7459391c61df66bd8e", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.86 [INFO] [stderr] Compiling libc v0.2.155 [INFO] [stderr] Compiling httparse v1.9.4 [INFO] [stderr] Checking cpufeatures v0.2.12 [INFO] [stderr] Checking bytes v1.7.1 [INFO] [stderr] Checking generic-array v0.14.7 [INFO] [stderr] Checking data-encoding v2.6.0 [INFO] [stderr] Checking log v0.4.22 [INFO] [stderr] Checking http v1.1.0 [INFO] [stderr] Checking crypto-common v0.1.6 [INFO] [stderr] Checking block-buffer v0.10.4 [INFO] [stderr] Compiling quote v1.0.36 [INFO] [stderr] Checking getrandom v0.2.15 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking sha1 v0.10.6 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Compiling syn v2.0.72 [INFO] [stderr] Compiling zerocopy-derive v0.7.35 [INFO] [stderr] Compiling thiserror-impl v1.0.64 [INFO] [stderr] Checking zerocopy v0.7.35 [INFO] [stderr] Checking thiserror v1.0.64 [INFO] [stderr] Checking ppv-lite86 v0.2.20 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking tungstenite v0.24.0 [INFO] [stderr] Checking StockDatastore v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/websockets/notification_server_in.rs:25:13 [INFO] [stdout] | [INFO] [stdout] 25 | ip_server: ip_server, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `ip_server` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/websockets/notification_server_in.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | connection_queue: connection_queue, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `connection_queue` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/websockets/notification_server_in.rs:27:13 [INFO] [stdout] | [INFO] [stdout] 27 | subscriber_map: subscriber_map, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `subscriber_map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/websockets/notification_server_in.rs:28:13 [INFO] [stdout] | [INFO] [stdout] 28 | stock_information_cache: stock_information_cache, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `stock_information_cache` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/websockets/notification_server_out.rs:28:13 [INFO] [stdout] | [INFO] [stdout] 28 | ip_server: ip_server, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `ip_server` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/websockets/notification_server_out.rs:29:13 [INFO] [stdout] | [INFO] [stdout] 29 | connection_queue: connection_queue, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `connection_queue` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/websockets/notification_server_out.rs:30:13 [INFO] [stdout] | [INFO] [stdout] 30 | subscriber_map: subscriber_map, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `subscriber_map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/websockets/notification_server_out.rs:31:13 [INFO] [stdout] | [INFO] [stdout] 31 | stock_information_cache: stock_information_cache, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `stock_information_cache` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/websockets/notification_server_in.rs:25:13 [INFO] [stdout] | [INFO] [stdout] 25 | ip_server: ip_server, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `ip_server` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/websockets/notification_server_in.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | connection_queue: connection_queue, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `connection_queue` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/websockets/websocket_server.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | stock_list: stock_list, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `stock_list` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/websockets/notification_server_in.rs:27:13 [INFO] [stdout] | [INFO] [stdout] 27 | subscriber_map: subscriber_map, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `subscriber_map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/websockets/notification_server_in.rs:28:13 [INFO] [stdout] | [INFO] [stdout] 28 | stock_information_cache: stock_information_cache, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `stock_information_cache` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/websockets/notification_server_out.rs:28:13 [INFO] [stdout] | [INFO] [stdout] 28 | ip_server: ip_server, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `ip_server` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/websockets/notification_server_out.rs:29:13 [INFO] [stdout] | [INFO] [stdout] 29 | connection_queue: connection_queue, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `connection_queue` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/websockets/notification_server_out.rs:30:13 [INFO] [stdout] | [INFO] [stdout] 30 | subscriber_map: subscriber_map, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `subscriber_map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/websockets/notification_server_out.rs:31:13 [INFO] [stdout] | [INFO] [stdout] 31 | stock_information_cache: stock_information_cache, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `stock_information_cache` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/websockets/websocket_server.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | stock_list: stock_list, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `stock_list` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `interval` [INFO] [stdout] --> src/value_store/stock_information_cache.rs:100:32 [INFO] [stdout] | [INFO] [stdout] 100 | .map(|(stock_name, interval)| stock_name) [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_interval` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `stock_name` [INFO] [stdout] --> src/value_store/stock_information_cache.rs:99:23 [INFO] [stdout] | [INFO] [stdout] 99 | .filter(|(stock_name, interval)| *interval == 0) [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_stock_name` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/websockets/notification_server_out.rs:57:29 [INFO] [stdout] | [INFO] [stdout] 57 | Err(e) => return, [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `clone` is never used [INFO] [stdout] --> src/value_store/stock_information_cache.rs:33:12 [INFO] [stdout] | [INFO] [stdout] 18 | impl StockInformation { [INFO] [stdout] | --------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 33 | pub fn clone(&self) -> Self { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `interval` [INFO] [stdout] --> src/value_store/stock_information_cache.rs:100:32 [INFO] [stdout] | [INFO] [stdout] 100 | .map(|(stock_name, interval)| stock_name) [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_interval` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `stock_name` [INFO] [stdout] --> src/value_store/stock_information_cache.rs:99:23 [INFO] [stdout] | [INFO] [stdout] 99 | .filter(|(stock_name, interval)| *interval == 0) [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_stock_name` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::iter::Map, {closure@src/value_store/stock_information_cache.rs:111:59: 111:62}>` [INFO] [stdout] --> src/value_store/stock_information_cache.rs:111:26 [INFO] [stdout] | [INFO] [stdout] 111 | for json_data in self.stock_info_map.values().map(|a| a.to_string()).into_iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `self.stock_info_map.values().map(|a| a.to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::collections::hash_map::Values<'_, (std::string::String, usize), std::collections::VecDeque>` [INFO] [stdout] --> src/value_store/stock_information_cache.rs:115:28 [INFO] [stdout] | [INFO] [stdout] 115 | for stock_queue in self.stock_history_map.values().into_iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `self.stock_history_map.values()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/websockets/notification_server_out.rs:57:29 [INFO] [stdout] | [INFO] [stdout] 57 | Err(e) => return, [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/file_reader/stock_config_reader.rs:24:16 [INFO] [stdout] | [INFO] [stdout] 24 | if c == ' ' || c == '\r' || c == '\t' || c == ' ' { continue; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 24 - if c == ' ' || c == '\r' || c == '\t' || c == ' ' { continue; } [INFO] [stdout] 24 + if !(c != ' ' && c != '\r' && c != '\t') { continue; } [INFO] [stdout] | [INFO] [stdout] 24 - if c == ' ' || c == '\r' || c == '\t' || c == ' ' { continue; } [INFO] [stdout] 24 + if c == ' ' || c == '\r' || c == '\t' { continue; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/file_reader/stock_config_reader.rs:27:20 [INFO] [stdout] | [INFO] [stdout] 27 | if tmp.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!tmp.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/file_reader/stock_config_reader.rs:38:12 [INFO] [stdout] | [INFO] [stdout] 38 | if tmp.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!tmp.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/websockets/notification_server_in.rs:58:17 [INFO] [stdout] | [INFO] [stdout] 58 | / match message { [INFO] [stdout] 59 | | msg @ Message::Text(_) => { [INFO] [stdout] 60 | | let text: String = match msg.into_text() { [INFO] [stdout] 61 | | Ok(v) => v, [INFO] [stdout] ... | [INFO] [stdout] 96 | | _ => (), [INFO] [stdout] 97 | | } [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] 58 ~ if let msg @ Message::Text(_) = message { [INFO] [stdout] 59 + let text: String = match msg.into_text() { [INFO] [stdout] 60 + Ok(v) => v, [INFO] [stdout] 61 + Err(_) => continue, [INFO] [stdout] 62 + }; [INFO] [stdout] 63 + [INFO] [stdout] 64 + let name = self.stock_information_cache.write().unwrap().add_json(&text); [INFO] [stdout] 65 + [INFO] [stdout] 66 + let mut ids_to_update:HashSet = HashSet::new(); [INFO] [stdout] 67 + [INFO] [stdout] 68 + match self.subscriber_map.read().unwrap().get(&name){ [INFO] [stdout] 69 + Some(list_of_ids) => { [INFO] [stdout] 70 + for id in list_of_ids.iter() { [INFO] [stdout] 71 + ids_to_update.insert(*id); [INFO] [stdout] 72 + } [INFO] [stdout] 73 + }, [INFO] [stdout] 74 + None => (), [INFO] [stdout] 75 + } [INFO] [stdout] 76 + [INFO] [stdout] 77 + match self.subscriber_map.read().unwrap().get("*") { [INFO] [stdout] 78 + Some(list_of_ids) => { [INFO] [stdout] 79 + for id in list_of_ids.iter() { [INFO] [stdout] 80 + ids_to_update.insert(*id); [INFO] [stdout] 81 + } [INFO] [stdout] 82 + }, [INFO] [stdout] 83 + None => (), [INFO] [stdout] 84 + } [INFO] [stdout] 85 + [INFO] [stdout] 86 + let mut connection_vec = self.connection_queue.write().unwrap(); [INFO] [stdout] 87 + [INFO] [stdout] 88 + for id in ids_to_update.iter() { [INFO] [stdout] 89 + match connection_vec.get_mut(id) { [INFO] [stdout] 90 + Some(v) => v.push(text.clone()), [INFO] [stdout] 91 + None => continue, [INFO] [stdout] 92 + }; [INFO] [stdout] 93 + } [INFO] [stdout] 94 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/websockets/notification_server_in.rs:69:25 [INFO] [stdout] | [INFO] [stdout] 69 | / match self.subscriber_map.read().unwrap().get(&name){ [INFO] [stdout] 70 | | Some(list_of_ids) => { [INFO] [stdout] 71 | | for id in list_of_ids.iter() { [INFO] [stdout] 72 | | ids_to_update.insert(*id); [INFO] [stdout] ... | [INFO] [stdout] 75 | | None => (), [INFO] [stdout] 76 | | } [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] 69 ~ if let Some(list_of_ids) = self.subscriber_map.read().unwrap().get(&name) { [INFO] [stdout] 70 + for id in list_of_ids.iter() { [INFO] [stdout] 71 + ids_to_update.insert(*id); [INFO] [stdout] 72 + } [INFO] [stdout] 73 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/websockets/notification_server_in.rs:78:25 [INFO] [stdout] | [INFO] [stdout] 78 | / match self.subscriber_map.read().unwrap().get("*") { [INFO] [stdout] 79 | | Some(list_of_ids) => { [INFO] [stdout] 80 | | for id in list_of_ids.iter() { [INFO] [stdout] 81 | | ids_to_update.insert(*id); [INFO] [stdout] ... | [INFO] [stdout] 84 | | None => (), [INFO] [stdout] 85 | | } [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] 78 ~ if let Some(list_of_ids) = self.subscriber_map.read().unwrap().get("*") { [INFO] [stdout] 79 + for id in list_of_ids.iter() { [INFO] [stdout] 80 + ids_to_update.insert(*id); [INFO] [stdout] 81 + } [INFO] [stdout] 82 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `clone` is never used [INFO] [stdout] --> src/value_store/stock_information_cache.rs:33:12 [INFO] [stdout] | [INFO] [stdout] 18 | impl StockInformation { [INFO] [stdout] | --------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 33 | pub fn clone(&self) -> Self { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `id` is used as a loop counter [INFO] [stdout] --> src/websockets/notification_server_out.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | for stream in server.incoming() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (id, stream) in server.incoming().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/websockets/notification_server_out.rs:146:9 [INFO] [stdout] | [INFO] [stdout] 146 | / match subscriber_map.write().unwrap().get_mut(&old_stock) { [INFO] [stdout] 147 | | Some(v) => { v.remove(&id); }, [INFO] [stdout] 148 | | None => (), [INFO] [stdout] 149 | | }; [INFO] [stdout] | |_________^ help: try: `if let Some(v) = subscriber_map.write().unwrap().get_mut(&old_stock) { v.remove(&id); }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/websockets/notification_server_out.rs:169:16 [INFO] [stdout] | [INFO] [stdout] 169 | if connection_vec.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `connection_vec.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/websockets/notification_server_out.rs:241:8 [INFO] [stdout] | [INFO] [stdout] 241 | if key.len() > 0 && tmp.len() > 0 { parsed_json.insert(key, tmp); } [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!key.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/websockets/notification_server_out.rs:241:25 [INFO] [stdout] | [INFO] [stdout] 241 | if key.len() > 0 && tmp.len() > 0 { parsed_json.insert(key, tmp); } [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!tmp.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::iter::Map, {closure@src/value_store/stock_information_cache.rs:111:59: 111:62}>` [INFO] [stdout] --> src/value_store/stock_information_cache.rs:111:26 [INFO] [stdout] | [INFO] [stdout] 111 | for json_data in self.stock_info_map.values().map(|a| a.to_string()).into_iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `self.stock_info_map.values().map(|a| a.to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::collections::hash_map::Values<'_, (std::string::String, usize), std::collections::VecDeque>` [INFO] [stdout] --> src/value_store/stock_information_cache.rs:115:28 [INFO] [stdout] | [INFO] [stdout] 115 | for stock_queue in self.stock_history_map.values().into_iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `self.stock_history_map.values()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/file_reader/stock_config_reader.rs:24:16 [INFO] [stdout] | [INFO] [stdout] 24 | if c == ' ' || c == '\r' || c == '\t' || c == ' ' { continue; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 24 - if c == ' ' || c == '\r' || c == '\t' || c == ' ' { continue; } [INFO] [stdout] 24 + if !(c != ' ' && c != '\r' && c != '\t') { continue; } [INFO] [stdout] | [INFO] [stdout] 24 - if c == ' ' || c == '\r' || c == '\t' || c == ' ' { continue; } [INFO] [stdout] 24 + if c == ' ' || c == '\r' || c == '\t' { continue; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/file_reader/stock_config_reader.rs:27:20 [INFO] [stdout] | [INFO] [stdout] 27 | if tmp.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!tmp.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/file_reader/stock_config_reader.rs:38:12 [INFO] [stdout] | [INFO] [stdout] 38 | if tmp.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!tmp.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/websockets/notification_server_in.rs:58:17 [INFO] [stdout] | [INFO] [stdout] 58 | / match message { [INFO] [stdout] 59 | | msg @ Message::Text(_) => { [INFO] [stdout] 60 | | let text: String = match msg.into_text() { [INFO] [stdout] 61 | | Ok(v) => v, [INFO] [stdout] ... | [INFO] [stdout] 96 | | _ => (), [INFO] [stdout] 97 | | } [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] 58 ~ if let msg @ Message::Text(_) = message { [INFO] [stdout] 59 + let text: String = match msg.into_text() { [INFO] [stdout] 60 + Ok(v) => v, [INFO] [stdout] 61 + Err(_) => continue, [INFO] [stdout] 62 + }; [INFO] [stdout] 63 + [INFO] [stdout] 64 + let name = self.stock_information_cache.write().unwrap().add_json(&text); [INFO] [stdout] 65 + [INFO] [stdout] 66 + let mut ids_to_update:HashSet = HashSet::new(); [INFO] [stdout] 67 + [INFO] [stdout] 68 + match self.subscriber_map.read().unwrap().get(&name){ [INFO] [stdout] 69 + Some(list_of_ids) => { [INFO] [stdout] 70 + for id in list_of_ids.iter() { [INFO] [stdout] 71 + ids_to_update.insert(*id); [INFO] [stdout] 72 + } [INFO] [stdout] 73 + }, [INFO] [stdout] 74 + None => (), [INFO] [stdout] 75 + } [INFO] [stdout] 76 + [INFO] [stdout] 77 + match self.subscriber_map.read().unwrap().get("*") { [INFO] [stdout] 78 + Some(list_of_ids) => { [INFO] [stdout] 79 + for id in list_of_ids.iter() { [INFO] [stdout] 80 + ids_to_update.insert(*id); [INFO] [stdout] 81 + } [INFO] [stdout] 82 + }, [INFO] [stdout] 83 + None => (), [INFO] [stdout] 84 + } [INFO] [stdout] 85 + [INFO] [stdout] 86 + let mut connection_vec = self.connection_queue.write().unwrap(); [INFO] [stdout] 87 + [INFO] [stdout] 88 + for id in ids_to_update.iter() { [INFO] [stdout] 89 + match connection_vec.get_mut(id) { [INFO] [stdout] 90 + Some(v) => v.push(text.clone()), [INFO] [stdout] 91 + None => continue, [INFO] [stdout] 92 + }; [INFO] [stdout] 93 + } [INFO] [stdout] 94 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/websockets/notification_server_in.rs:69:25 [INFO] [stdout] | [INFO] [stdout] 69 | / match self.subscriber_map.read().unwrap().get(&name){ [INFO] [stdout] 70 | | Some(list_of_ids) => { [INFO] [stdout] 71 | | for id in list_of_ids.iter() { [INFO] [stdout] 72 | | ids_to_update.insert(*id); [INFO] [stdout] ... | [INFO] [stdout] 75 | | None => (), [INFO] [stdout] 76 | | } [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] 69 ~ if let Some(list_of_ids) = self.subscriber_map.read().unwrap().get(&name) { [INFO] [stdout] 70 + for id in list_of_ids.iter() { [INFO] [stdout] 71 + ids_to_update.insert(*id); [INFO] [stdout] 72 + } [INFO] [stdout] 73 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/websockets/notification_server_in.rs:78:25 [INFO] [stdout] | [INFO] [stdout] 78 | / match self.subscriber_map.read().unwrap().get("*") { [INFO] [stdout] 79 | | Some(list_of_ids) => { [INFO] [stdout] 80 | | for id in list_of_ids.iter() { [INFO] [stdout] 81 | | ids_to_update.insert(*id); [INFO] [stdout] ... | [INFO] [stdout] 84 | | None => (), [INFO] [stdout] 85 | | } [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] 78 ~ if let Some(list_of_ids) = self.subscriber_map.read().unwrap().get("*") { [INFO] [stdout] 79 + for id in list_of_ids.iter() { [INFO] [stdout] 80 + ids_to_update.insert(*id); [INFO] [stdout] 81 + } [INFO] [stdout] 82 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `id` is used as a loop counter [INFO] [stdout] --> src/websockets/notification_server_out.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | for stream in server.incoming() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (id, stream) in server.incoming().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/websockets/notification_server_out.rs:146:9 [INFO] [stdout] | [INFO] [stdout] 146 | / match subscriber_map.write().unwrap().get_mut(&old_stock) { [INFO] [stdout] 147 | | Some(v) => { v.remove(&id); }, [INFO] [stdout] 148 | | None => (), [INFO] [stdout] 149 | | }; [INFO] [stdout] | |_________^ help: try: `if let Some(v) = subscriber_map.write().unwrap().get_mut(&old_stock) { v.remove(&id); }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/websockets/notification_server_out.rs:169:16 [INFO] [stdout] | [INFO] [stdout] 169 | if connection_vec.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `connection_vec.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/websockets/notification_server_out.rs:241:8 [INFO] [stdout] | [INFO] [stdout] 241 | if key.len() > 0 && tmp.len() > 0 { parsed_json.insert(key, tmp); } [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!key.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/websockets/notification_server_out.rs:241:25 [INFO] [stdout] | [INFO] [stdout] 241 | if key.len() > 0 && tmp.len() > 0 { parsed_json.insert(key, tmp); } [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!tmp.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 13.01s [INFO] running `Command { std: "docker" "inspect" "7a7a76454a0aed2760eb75a379d917595583db11cc643f7459391c61df66bd8e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "7a7a76454a0aed2760eb75a379d917595583db11cc643f7459391c61df66bd8e", kill_on_drop: false }` [INFO] [stdout] 7a7a76454a0aed2760eb75a379d917595583db11cc643f7459391c61df66bd8e