[INFO] cloning repository https://github.com/ZangaiFamily/matching [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/ZangaiFamily/matching" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FZangaiFamily%2Fmatching", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FZangaiFamily%2Fmatching'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 3a29e668dd3a058a482cf0193b1156ea6f6c2787 [INFO] linting ZangaiFamily/matching against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FZangaiFamily%2Fmatching" "/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/ZangaiFamily/matching [INFO] finished tweaking git repo https://github.com/ZangaiFamily/matching [INFO] tweaked toml for git repo https://github.com/ZangaiFamily/matching written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/ZangaiFamily/matching 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/ZangaiFamily/matching 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] warning: `package.edition` is unspecified, defaulting to `2015` while the latest is `2024` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded num v0.2.0 [INFO] [stderr] Downloaded itoa v0.4.2 [INFO] [stderr] Downloaded ryu v0.2.5 [INFO] [stderr] Downloaded version_check v0.1.4 [INFO] [stderr] Downloaded num-integer v0.1.39 [INFO] [stderr] Downloaded byteorder v1.2.4 [INFO] [stderr] Downloaded num-complex v0.2.0 [INFO] [stderr] Downloaded num-bigint v0.2.0 [INFO] [stderr] Downloaded num-traits v0.2.5 [INFO] [stderr] Downloaded serde_json v1.0.26 [INFO] [stderr] Downloaded rust_decimal v0.10.1 [INFO] [stderr] Downloaded num-rational v0.2.1 [INFO] [stderr] Downloaded serde v1.0.71 [INFO] [stderr] Downloaded lazy_static v1.1.0 [INFO] [stderr] Downloaded num-iter v0.1.37 [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] 06cbfaef560e21be3655ac80d7b9ef19557e2477954e66c956ecc1bd0728167c [INFO] running `Command { std: "docker" "start" "-a" "06cbfaef560e21be3655ac80d7b9ef19557e2477954e66c956ecc1bd0728167c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "06cbfaef560e21be3655ac80d7b9ef19557e2477954e66c956ecc1bd0728167c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "06cbfaef560e21be3655ac80d7b9ef19557e2477954e66c956ecc1bd0728167c", kill_on_drop: false }` [INFO] [stdout] 06cbfaef560e21be3655ac80d7b9ef19557e2477954e66c956ecc1bd0728167c [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] b5be3b40eb57e7fa905b54ef06ee239ce585a56494f20cb45dbf4c3322580e4b [INFO] running `Command { std: "docker" "start" "-a" "b5be3b40eb57e7fa905b54ef06ee239ce585a56494f20cb45dbf4c3322580e4b", kill_on_drop: false }` [INFO] [stderr] warning: `package.edition` is unspecified, defaulting to `2015` while the latest is `2024` [INFO] [stderr] Compiling num-traits v0.2.5 [INFO] [stderr] Compiling num-integer v0.1.39 [INFO] [stderr] Compiling num-bigint v0.2.0 [INFO] [stderr] Compiling serde v1.0.71 [INFO] [stderr] Compiling num-iter v0.1.37 [INFO] [stderr] Compiling num-rational v0.2.1 [INFO] [stderr] Compiling num-complex v0.2.0 [INFO] [stderr] Compiling version_check v0.1.4 [INFO] [stderr] Compiling lazy_static v1.1.0 [INFO] [stderr] Compiling ryu v0.2.5 [INFO] [stderr] Checking itoa v0.4.2 [INFO] [stderr] Checking byteorder v1.2.4 [INFO] [stderr] Checking num v0.2.0 [INFO] [stderr] Checking rust_decimal v0.10.1 [INFO] [stderr] Checking serde_json v1.0.26 [INFO] [stderr] Checking matching v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `Error` [INFO] [stdout] --> src/main.rs:5:25 [INFO] [stdout] | [INFO] [stdout] 5 | use serde_json::{Value, Error}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::read_to_string` [INFO] [stdout] --> src/main.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use std::fs::read_to_string; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::BufReader` [INFO] [stdout] --> src/main.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use std::io::BufReader; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/structs/order.rs:31:4 [INFO] [stdout] | [INFO] [stdout] 31 | id: id, [INFO] [stdout] | ^^^^^^ help: replace it with: `id` [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/structs/order.rs:35:4 [INFO] [stdout] | [INFO] [stdout] 35 | kind: kind, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `kind` [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/structs/order.rs:36:4 [INFO] [stdout] | [INFO] [stdout] 36 | side: side [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `side` [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 import: `std::collections::LinkedList` [INFO] [stdout] --> src/structs/order_book.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::LinkedList; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp::Ord` [INFO] [stdout] --> src/structs/order_book.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::cmp::Ord; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp` [INFO] [stdout] --> src/structs/order_book.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::cmp; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/structs/order_book.rs:24:4 [INFO] [stdout] | [INFO] [stdout] 24 | side: side, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `side` [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/structs/order_book.rs:25:4 [INFO] [stdout] | [INFO] [stdout] 25 | price_requirement: price_requirement, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `price_requirement` [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/structs/market.rs:13:4 [INFO] [stdout] | [INFO] [stdout] 13 | id: id, [INFO] [stdout] | ^^^^^^ help: replace it with: `id` [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 import: `rust_decimal::Decimal` [INFO] [stdout] --> src/main.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use rust_decimal::Decimal; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Error` and `Value` [INFO] [stdout] --> src/main.rs:5:18 [INFO] [stdout] | [INFO] [stdout] 5 | use serde_json::{Value, Error}; [INFO] [stdout] | ^^^^^ ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::read_to_string` [INFO] [stdout] --> src/main.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use std::fs::read_to_string; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::prelude::*` [INFO] [stdout] --> src/main.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use std::io::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::BufReader` [INFO] [stdout] --> src/main.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use std::io::BufReader; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/structs/order.rs:31:4 [INFO] [stdout] | [INFO] [stdout] 31 | id: id, [INFO] [stdout] | ^^^^^^ help: replace it with: `id` [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/structs/order.rs:35:4 [INFO] [stdout] | [INFO] [stdout] 35 | kind: kind, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `kind` [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/structs/order.rs:36:4 [INFO] [stdout] | [INFO] [stdout] 36 | side: side [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `side` [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 import: `std::collections::LinkedList` [INFO] [stdout] --> src/structs/order_book.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::LinkedList; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp::Ord` [INFO] [stdout] --> src/structs/order_book.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::cmp::Ord; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp` [INFO] [stdout] --> src/structs/order_book.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::cmp; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rust_decimal::Decimal` [INFO] [stdout] --> src/structs/order_book.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use rust_decimal::Decimal; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/structs/order_book.rs:24:4 [INFO] [stdout] | [INFO] [stdout] 24 | side: side, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `side` [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/structs/order_book.rs:25:4 [INFO] [stdout] | [INFO] [stdout] 25 | price_requirement: price_requirement, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `price_requirement` [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/structs/market.rs:13:4 [INFO] [stdout] | [INFO] [stdout] 13 | id: id, [INFO] [stdout] | ^^^^^^ help: replace it with: `id` [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 import: `std::cmp::Ord` [INFO] [stdout] --> src/ds/list.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::cmp::Ord; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp::Ordering` [INFO] [stdout] --> src/ds/list.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::cmp::Ordering; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `test::Bencher` [INFO] [stdout] --> src/main.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | use test::Bencher; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp::Ord` [INFO] [stdout] --> src/ds/list.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::cmp::Ord; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp::Ordering` [INFO] [stdout] --> src/ds/list.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::cmp::Ordering; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `start` [INFO] [stdout] --> src/ds/heap.rs:37:7 [INFO] [stdout] | [INFO] [stdout] 37 | let start = 0; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_start` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `OrderKind` is never used [INFO] [stdout] --> src/structs/order.rs:7:10 [INFO] [stdout] | [INFO] [stdout] 7 | pub enum OrderKind { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `OrderSide` is never used [INFO] [stdout] --> src/structs/order.rs:13:10 [INFO] [stdout] | [INFO] [stdout] 13 | pub enum OrderSide { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Order` is never constructed [INFO] [stdout] --> src/structs/order.rs:19:12 [INFO] [stdout] | [INFO] [stdout] 19 | pub struct Order { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `is_fulfilled`, and `volume_remained` are never used [INFO] [stdout] --> src/structs/order.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 28 | impl Order { [INFO] [stdout] | ---------- associated items in this implementation [INFO] [stdout] 29 | pub fn new(id: u64, price: &str, volume: &str, kind: OrderKind, side: OrderSide) -> Order { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 40 | pub fn is_fulfilled(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 44 | pub fn volume_remained(&self) -> Decimal { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `OrderBook` is never constructed [INFO] [stdout] --> src/structs/order_book.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 10 | pub struct OrderBook { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `add_order`, and `cancel_order` are never used [INFO] [stdout] --> src/structs/order_book.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 17 | impl OrderBook where { [INFO] [stdout] | -------------------- associated items in this implementation [INFO] [stdout] 18 | pub fn new(side: OrderSide) -> OrderBook { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 31 | pub fn add_order(&mut self, order: Order) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 39 | pub fn cancel_order(&mut self, order: Order) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Market` is never constructed [INFO] [stdout] --> src/structs/market.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Market { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `add_order`, and `cancel_order` are never used [INFO] [stdout] --> src/structs/market.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 10 | impl Market { [INFO] [stdout] | ----------- associated items in this implementation [INFO] [stdout] 11 | pub fn new(id: u64) -> Market { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 19 | pub fn add_order(&mut self, order: Order) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 26 | pub fn cancel_order(&mut self, order: Order) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `consume_limit_orders` is never used [INFO] [stdout] --> src/matching/mod.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn consume_limit_orders (order: &mut Order, order_book: &mut OrderBook) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `consume_market_orders` is never used [INFO] [stdout] --> src/matching/mod.rs:32:8 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn consume_market_orders (order: &mut Order, order_book: &mut OrderBook) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `start_match` is never used [INFO] [stdout] --> src/matching/mod.rs:46:8 [INFO] [stdout] | [INFO] [stdout] 46 | pub fn start_match (mut order: Order, market: &mut Market) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `subtract_volume` is never used [INFO] [stdout] --> src/matching/mod.rs:67:8 [INFO] [stdout] | [INFO] [stdout] 67 | pub fn subtract_volume(order_a: &mut Order, order_b: &mut Order) -> (bool, bool) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `WithId` is never used [INFO] [stdout] --> src/ds/mod.rs:8:11 [INFO] [stdout] | [INFO] [stdout] 8 | pub trait WithId { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Heap` is never constructed [INFO] [stdout] --> src/ds/heap.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Heap { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/ds/heap.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 12 | impl Heap { [INFO] [stdout] | ----------------------------- associated items in this implementation [INFO] [stdout] 13 | pub fn new() -> Heap { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 21 | pub fn parent(&self, idx: usize) -> usize { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 26 | pub fn left(&self, idx: usize) -> usize { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 31 | pub fn right(&self, idx: usize) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 36 | pub fn sift_up(&mut self, from: usize) -> usize { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 52 | pub fn sift_down(&mut self, from: usize) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 73 | pub fn push(&mut self, elem: T) { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 81 | pub fn swap(&mut self, idx_a: usize, idx_b: usize) { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 88 | pub fn remove(&mut self, id: u64) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 114 | pub fn peek(&self) -> Option<&T> { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 119 | pub fn peek_mut(&mut self) -> Option<&mut T> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 124 | pub fn pop(&mut self) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 130 | pub fn len(&self) -> usize { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Order` is never constructed [INFO] [stdout] --> src/ds/heap.rs:136:8 [INFO] [stdout] | [INFO] [stdout] 136 | struct Order { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `List` is never constructed [INFO] [stdout] --> src/ds/list.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct List { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Node` is never constructed [INFO] [stdout] --> src/ds/list.rs:15:12 [INFO] [stdout] | [INFO] [stdout] 15 | pub struct Node { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/ds/list.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 21 | impl List { [INFO] [stdout] | ----------------------- associated items in this implementation [INFO] [stdout] 22 | pub fn new() -> List { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 32 | pub fn len(&self) -> usize { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 37 | pub fn front(&self) -> Option<&T> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 42 | pub fn front_mut(&mut self) -> Option<&mut T> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 47 | pub fn push_back(&mut self, elem: T) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 71 | pub fn remove(&mut self, id: u64) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 99 | pub fn pop_front(&mut self) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Order` is never constructed [INFO] [stdout] --> src/ds/list.rs:106:8 [INFO] [stdout] | [INFO] [stdout] 106 | struct Order { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/structs/order.rs:58:1 [INFO] [stdout] | [INFO] [stdout] 58 | / impl PartialOrd for Order { [INFO] [stdout] 59 | | fn partial_cmp(&self, other: &Order) -> Option { [INFO] [stdout] 60 | | match self.side { [INFO] [stdout] 61 | | OrderSide::Ask => other.price.partial_cmp(&self.price), [INFO] [stdout] ... | [INFO] [stdout] 65 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 59 - fn partial_cmp(&self, other: &Order) -> Option { [INFO] [stdout] 60 - match self.side { [INFO] [stdout] 61 - OrderSide::Ask => other.price.partial_cmp(&self.price), [INFO] [stdout] 62 - OrderSide::Bid => self.price.partial_cmp(&other.price) [INFO] [stdout] 63 - } [INFO] [stdout] 64 - } [INFO] [stdout] 59 + fn partial_cmp(&self, other: &Order) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/matching/mod.rs:12:29 [INFO] [stdout] | [INFO] [stdout] 12 | subtract_volume(order, &mut top_order); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `top_order` [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 `map_or` can be simplified [INFO] [stdout] --> src/matching/mod.rs:26:6 [INFO] [stdout] | [INFO] [stdout] 26 | if order_book.limit_orders.peek().map_or(false, |top| top.is_fulfilled()) { [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] 26 - if order_book.limit_orders.peek().map_or(false, |top| top.is_fulfilled()) { [INFO] [stdout] 26 + if order_book.limit_orders.peek().is_some_and(|top| top.is_fulfilled()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/matching/mod.rs:36:28 [INFO] [stdout] | [INFO] [stdout] 36 | subtract_volume(order, &mut top_order); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `top_order` [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/matching/mod.rs:40:6 [INFO] [stdout] | [INFO] [stdout] 40 | if order_book.market_orders.front().map_or(false, |top| top.is_fulfilled()) { [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] 40 - if order_book.market_orders.front().map_or(false, |top| top.is_fulfilled()) { [INFO] [stdout] 40 + if order_book.market_orders.front().is_some_and(|top| top.is_fulfilled()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/ds/heap.rs:59:22 [INFO] [stdout] | [INFO] [stdout] 59 | if right < end && !(self.vec[child] > self.vec[right]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.vec[child] <= self.vec[right])` [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: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/ds/heap.rs:115:16 [INFO] [stdout] | [INFO] [stdout] 115 | self.vec.get(0 as usize) [INFO] [stdout] | ^^^^^^^^^^ help: try: `0_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/ds/heap.rs:120:20 [INFO] [stdout] | [INFO] [stdout] 120 | self.vec.get_mut(0 as usize) [INFO] [stdout] | ^^^^^^^^^^ help: try: `0_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/ds/heap.rs:153:1 [INFO] [stdout] | [INFO] [stdout] 153 | / impl PartialOrd for Order { [INFO] [stdout] 154 | | fn partial_cmp(&self, other: &Order) -> Option { [INFO] [stdout] 155 | | self.price.partial_cmp(&other.price) [INFO] [stdout] 156 | | } [INFO] [stdout] 157 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 154 - fn partial_cmp(&self, other: &Order) -> Option { [INFO] [stdout] 155 - self.price.partial_cmp(&other.price) [INFO] [stdout] 156 - } [INFO] [stdout] 154 + fn partial_cmp(&self, other: &Order) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ds/list.rs:59:4 [INFO] [stdout] | [INFO] [stdout] 59 | self.map.get_mut(&tail_id).map(|x| x.next = Some(id)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] = note: `#[warn(clippy::option_map_unit_fn)]` on by default [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 59 - self.map.get_mut(&tail_id).map(|x| x.next = Some(id)); [INFO] [stdout] 59 + if let Some(x) = self.map.get_mut(&tail_id) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ds/list.rs:83:5 [INFO] [stdout] | [INFO] [stdout] 83 | self.map.get_mut(&next_id).map(|x| x.prev = None); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 83 - self.map.get_mut(&next_id).map(|x| x.prev = None); [INFO] [stdout] 83 + if let Some(x) = self.map.get_mut(&next_id) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ds/list.rs:87:5 [INFO] [stdout] | [INFO] [stdout] 87 | self.map.get_mut(&prev_id).map(|x| x.next = None); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 87 - self.map.get_mut(&prev_id).map(|x| x.next = None); [INFO] [stdout] 87 + if let Some(x) = self.map.get_mut(&prev_id) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ds/list.rs:90:5 [INFO] [stdout] | [INFO] [stdout] 90 | self.map.get_mut(&prev_id).map(|x| x.next = Some(next_id)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 90 - self.map.get_mut(&prev_id).map(|x| x.next = Some(next_id)); [INFO] [stdout] 90 + if let Some(x) = self.map.get_mut(&prev_id) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ds/list.rs:91:5 [INFO] [stdout] | [INFO] [stdout] 91 | self.map.get_mut(&next_id).map(|x| x.prev = Some(prev_id)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 91 - self.map.get_mut(&next_id).map(|x| x.prev = Some(prev_id)); [INFO] [stdout] 91 + if let Some(x) = self.map.get_mut(&next_id) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::prelude` [INFO] [stdout] --> src/main.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use std::io::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `market` [INFO] [stdout] --> src/structs/market.rs:48:6 [INFO] [stdout] | [INFO] [stdout] 48 | let market = Market::new(1); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_market` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b_fulfilled` [INFO] [stdout] --> src/matching/mod.rs:81:20 [INFO] [stdout] | [INFO] [stdout] 81 | let (a_fulfilled, b_fulfilled) = subtract_volume(&mut order_a, &mut order_b); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_b_fulfilled` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `start` [INFO] [stdout] --> src/ds/heap.rs:37:7 [INFO] [stdout] | [INFO] [stdout] 37 | let start = 0; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_start` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `id` is never read [INFO] [stdout] --> src/structs/market.rs:5:6 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Market { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] 5 | pub id: u64, [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `left` and `right` are never used [INFO] [stdout] --> src/ds/heap.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 12 | impl Heap { [INFO] [stdout] | ----------------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 26 | pub fn left(&self, idx: usize) -> usize { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 31 | pub fn right(&self, idx: usize) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/structs/order.rs:58:1 [INFO] [stdout] | [INFO] [stdout] 58 | / impl PartialOrd for Order { [INFO] [stdout] 59 | | fn partial_cmp(&self, other: &Order) -> Option { [INFO] [stdout] 60 | | match self.side { [INFO] [stdout] 61 | | OrderSide::Ask => other.price.partial_cmp(&self.price), [INFO] [stdout] ... | [INFO] [stdout] 65 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 59 - fn partial_cmp(&self, other: &Order) -> Option { [INFO] [stdout] 60 - match self.side { [INFO] [stdout] 61 - OrderSide::Ask => other.price.partial_cmp(&self.price), [INFO] [stdout] 62 - OrderSide::Bid => self.price.partial_cmp(&other.price) [INFO] [stdout] 63 - } [INFO] [stdout] 64 - } [INFO] [stdout] 59 + fn partial_cmp(&self, other: &Order) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> src/structs/market.rs:49:2 [INFO] [stdout] | [INFO] [stdout] 49 | assert!(true); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] = note: `#[warn(clippy::assertions_on_constants)]` 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/matching/mod.rs:12:29 [INFO] [stdout] | [INFO] [stdout] 12 | subtract_volume(order, &mut top_order); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `top_order` [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 `map_or` can be simplified [INFO] [stdout] --> src/matching/mod.rs:26:6 [INFO] [stdout] | [INFO] [stdout] 26 | if order_book.limit_orders.peek().map_or(false, |top| top.is_fulfilled()) { [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] 26 - if order_book.limit_orders.peek().map_or(false, |top| top.is_fulfilled()) { [INFO] [stdout] 26 + if order_book.limit_orders.peek().is_some_and(|top| top.is_fulfilled()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/matching/mod.rs:36:28 [INFO] [stdout] | [INFO] [stdout] 36 | subtract_volume(order, &mut top_order); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `top_order` [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/matching/mod.rs:40:6 [INFO] [stdout] | [INFO] [stdout] 40 | if order_book.market_orders.front().map_or(false, |top| top.is_fulfilled()) { [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] 40 - if order_book.market_orders.front().map_or(false, |top| top.is_fulfilled()) { [INFO] [stdout] 40 + if order_book.market_orders.front().is_some_and(|top| top.is_fulfilled()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/ds/heap.rs:59:22 [INFO] [stdout] | [INFO] [stdout] 59 | if right < end && !(self.vec[child] > self.vec[right]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.vec[child] <= self.vec[right])` [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: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/ds/heap.rs:115:16 [INFO] [stdout] | [INFO] [stdout] 115 | self.vec.get(0 as usize) [INFO] [stdout] | ^^^^^^^^^^ help: try: `0_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/ds/heap.rs:120:20 [INFO] [stdout] | [INFO] [stdout] 120 | self.vec.get_mut(0 as usize) [INFO] [stdout] | ^^^^^^^^^^ help: try: `0_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/ds/heap.rs:153:1 [INFO] [stdout] | [INFO] [stdout] 153 | / impl PartialOrd for Order { [INFO] [stdout] 154 | | fn partial_cmp(&self, other: &Order) -> Option { [INFO] [stdout] 155 | | self.price.partial_cmp(&other.price) [INFO] [stdout] 156 | | } [INFO] [stdout] 157 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 154 - fn partial_cmp(&self, other: &Order) -> Option { [INFO] [stdout] 155 - self.price.partial_cmp(&other.price) [INFO] [stdout] 156 - } [INFO] [stdout] 154 + fn partial_cmp(&self, other: &Order) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ds/list.rs:59:4 [INFO] [stdout] | [INFO] [stdout] 59 | self.map.get_mut(&tail_id).map(|x| x.next = Some(id)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] = note: `#[warn(clippy::option_map_unit_fn)]` on by default [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 59 - self.map.get_mut(&tail_id).map(|x| x.next = Some(id)); [INFO] [stdout] 59 + if let Some(x) = self.map.get_mut(&tail_id) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ds/list.rs:83:5 [INFO] [stdout] | [INFO] [stdout] 83 | self.map.get_mut(&next_id).map(|x| x.prev = None); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 83 - self.map.get_mut(&next_id).map(|x| x.prev = None); [INFO] [stdout] 83 + if let Some(x) = self.map.get_mut(&next_id) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ds/list.rs:87:5 [INFO] [stdout] | [INFO] [stdout] 87 | self.map.get_mut(&prev_id).map(|x| x.next = None); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 87 - self.map.get_mut(&prev_id).map(|x| x.next = None); [INFO] [stdout] 87 + if let Some(x) = self.map.get_mut(&prev_id) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ds/list.rs:90:5 [INFO] [stdout] | [INFO] [stdout] 90 | self.map.get_mut(&prev_id).map(|x| x.next = Some(next_id)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 90 - self.map.get_mut(&prev_id).map(|x| x.next = Some(next_id)); [INFO] [stdout] 90 + if let Some(x) = self.map.get_mut(&prev_id) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ds/list.rs:91:5 [INFO] [stdout] | [INFO] [stdout] 91 | self.map.get_mut(&next_id).map(|x| x.prev = Some(prev_id)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 91 - self.map.get_mut(&next_id).map(|x| x.prev = Some(prev_id)); [INFO] [stdout] 91 + if let Some(x) = self.map.get_mut(&next_id) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ds/list.rs:123:2 [INFO] [stdout] | [INFO] [stdout] 123 | list.map.get(&list.head.unwrap()).map(|x| assert!(x.prev.is_none())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 123 - list.map.get(&list.head.unwrap()).map(|x| assert!(x.prev.is_none())); [INFO] [stdout] 123 + if let Some(x) = list.map.get(&list.head.unwrap()) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ds/list.rs:124:2 [INFO] [stdout] | [INFO] [stdout] 124 | list.map.get(&list.head.unwrap()).map(|x| assert!(x.next.is_none())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 124 - list.map.get(&list.head.unwrap()).map(|x| assert!(x.next.is_none())); [INFO] [stdout] 124 + if let Some(x) = list.map.get(&list.head.unwrap()) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ds/list.rs:129:2 [INFO] [stdout] | [INFO] [stdout] 129 | list.map.get(&list.head.unwrap()).map(|x| assert!(x.prev.is_none())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 129 - list.map.get(&list.head.unwrap()).map(|x| assert!(x.prev.is_none())); [INFO] [stdout] 129 + if let Some(x) = list.map.get(&list.head.unwrap()) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ds/list.rs:130:2 [INFO] [stdout] | [INFO] [stdout] 130 | list.map.get(&list.head.unwrap()).map(|x| assert!(x.next.is_some())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 130 - list.map.get(&list.head.unwrap()).map(|x| assert!(x.next.is_some())); [INFO] [stdout] 130 + if let Some(x) = list.map.get(&list.head.unwrap()) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ds/list.rs:131:2 [INFO] [stdout] | [INFO] [stdout] 131 | list.map.get(&list.tail.unwrap()).map(|x| assert!(x.prev.is_some())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 131 - list.map.get(&list.tail.unwrap()).map(|x| assert!(x.prev.is_some())); [INFO] [stdout] 131 + if let Some(x) = list.map.get(&list.tail.unwrap()) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ds/list.rs:132:2 [INFO] [stdout] | [INFO] [stdout] 132 | list.map.get(&list.tail.unwrap()).map(|x| assert!(x.next.is_none())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 132 - list.map.get(&list.tail.unwrap()).map(|x| assert!(x.next.is_none())); [INFO] [stdout] 132 + if let Some(x) = list.map.get(&list.tail.unwrap()) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ds/list.rs:170:2 [INFO] [stdout] | [INFO] [stdout] 170 | list.map.get(&list.head.unwrap()).map(|x| assert!(x.prev.is_none())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 170 - list.map.get(&list.head.unwrap()).map(|x| assert!(x.prev.is_none())); [INFO] [stdout] 170 + if let Some(x) = list.map.get(&list.head.unwrap()) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ds/list.rs:171:2 [INFO] [stdout] | [INFO] [stdout] 171 | list.map.get(&list.head.unwrap()).map(|x| assert!(x.next.is_some())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 171 - list.map.get(&list.head.unwrap()).map(|x| assert!(x.next.is_some())); [INFO] [stdout] 171 + if let Some(x) = list.map.get(&list.head.unwrap()) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ds/list.rs:172:2 [INFO] [stdout] | [INFO] [stdout] 172 | list.map.get(&list.head.unwrap()).and_then(|x| x.next).map(|x| assert_eq!(x, 3)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 172 - list.map.get(&list.head.unwrap()).and_then(|x| x.next).map(|x| assert_eq!(x, 3)); [INFO] [stdout] 172 + if let Some(x) = list.map.get(&list.head.unwrap()).and_then(|x| x.next) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ds/list.rs:173:2 [INFO] [stdout] | [INFO] [stdout] 173 | list.map.get(&list.tail.unwrap()).map(|x| assert!(x.next.is_none())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 173 - list.map.get(&list.tail.unwrap()).map(|x| assert!(x.next.is_none())); [INFO] [stdout] 173 + if let Some(x) = list.map.get(&list.tail.unwrap()) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ds/list.rs:174:2 [INFO] [stdout] | [INFO] [stdout] 174 | list.map.get(&list.tail.unwrap()).map(|x| assert!(x.prev.is_some())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 174 - list.map.get(&list.tail.unwrap()).map(|x| assert!(x.prev.is_some())); [INFO] [stdout] 174 + if let Some(x) = list.map.get(&list.tail.unwrap()) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ds/list.rs:175:2 [INFO] [stdout] | [INFO] [stdout] 175 | list.map.get(&list.tail.unwrap()).and_then(|x| x.prev).map(|x| assert_eq!(x, 1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 175 - list.map.get(&list.tail.unwrap()).and_then(|x| x.prev).map(|x| assert_eq!(x, 1)); [INFO] [stdout] 175 + if let Some(x) = list.map.get(&list.tail.unwrap()).and_then(|x| x.prev) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ds/list.rs:188:2 [INFO] [stdout] | [INFO] [stdout] 188 | list.map.get(&list.head.unwrap()).map(|x| assert!(x.prev.is_none())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 188 - list.map.get(&list.head.unwrap()).map(|x| assert!(x.prev.is_none())); [INFO] [stdout] 188 + if let Some(x) = list.map.get(&list.head.unwrap()) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ds/list.rs:189:2 [INFO] [stdout] | [INFO] [stdout] 189 | list.map.get(&list.head.unwrap()).map(|x| assert!(x.next.is_some())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 189 - list.map.get(&list.head.unwrap()).map(|x| assert!(x.next.is_some())); [INFO] [stdout] 189 + if let Some(x) = list.map.get(&list.head.unwrap()) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ds/list.rs:190:2 [INFO] [stdout] | [INFO] [stdout] 190 | list.map.get(&list.head.unwrap()).and_then(|x| x.next).map(|x| assert_eq!(x, 2)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 190 - list.map.get(&list.head.unwrap()).and_then(|x| x.next).map(|x| assert_eq!(x, 2)); [INFO] [stdout] 190 + if let Some(x) = list.map.get(&list.head.unwrap()).and_then(|x| x.next) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ds/list.rs:191:2 [INFO] [stdout] | [INFO] [stdout] 191 | list.map.get(&list.tail.unwrap()).map(|x| assert!(x.next.is_none())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 191 - list.map.get(&list.tail.unwrap()).map(|x| assert!(x.next.is_none())); [INFO] [stdout] 191 + if let Some(x) = list.map.get(&list.tail.unwrap()) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ds/list.rs:192:2 [INFO] [stdout] | [INFO] [stdout] 192 | list.map.get(&list.tail.unwrap()).map(|x| assert!(x.prev.is_some())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 192 - list.map.get(&list.tail.unwrap()).map(|x| assert!(x.prev.is_some())); [INFO] [stdout] 192 + if let Some(x) = list.map.get(&list.tail.unwrap()) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ds/list.rs:193:2 [INFO] [stdout] | [INFO] [stdout] 193 | list.map.get(&list.tail.unwrap()).and_then(|x| x.prev).map(|x| assert_eq!(x, 1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 193 - list.map.get(&list.tail.unwrap()).and_then(|x| x.prev).map(|x| assert_eq!(x, 1)); [INFO] [stdout] 193 + if let Some(x) = list.map.get(&list.tail.unwrap()).and_then(|x| x.prev) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/main.rs:33:3 [INFO] [stdout] | [INFO] [stdout] 33 | while let Some(line) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for line in lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 7.33s [INFO] running `Command { std: "docker" "inspect" "b5be3b40eb57e7fa905b54ef06ee239ce585a56494f20cb45dbf4c3322580e4b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b5be3b40eb57e7fa905b54ef06ee239ce585a56494f20cb45dbf4c3322580e4b", kill_on_drop: false }` [INFO] [stdout] b5be3b40eb57e7fa905b54ef06ee239ce585a56494f20cb45dbf4c3322580e4b