[INFO] cloning repository https://github.com/ag-wnl/orderbook [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/ag-wnl/orderbook" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fag-wnl%2Forderbook", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fag-wnl%2Forderbook'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] ddec660500e8dc58d7f375dc33bc54c933f0deed [INFO] checking ag-wnl/orderbook against try#29194e8f603400afdb2f86c9418e9fccb1628ea0 for pr-135331-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fag-wnl%2Forderbook" "/workspace/builds/worker-3-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/ag-wnl/orderbook [INFO] finished tweaking git repo https://github.com/ag-wnl/orderbook [INFO] tweaked toml for git repo https://github.com/ag-wnl/orderbook written to /workspace/builds/worker-3-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/ag-wnl/orderbook on toolchain 29194e8f603400afdb2f86c9418e9fccb1628ea0 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+29194e8f603400afdb2f86c9418e9fccb1628ea0" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/ag-wnl/orderbook 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" "+29194e8f603400afdb2f86c9418e9fccb1628ea0" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/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:cf8efcab8866f2cf4285301c7418e2f4f2a9b088c91ba69c40d5b659f81557f7" "/opt/rustwide/cargo-home/bin/cargo" "+29194e8f603400afdb2f86c9418e9fccb1628ea0" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] eb89a590a557e514389c7d1f90818bfb558fac1d7e2a4af819791daa9ada2d1c [INFO] running `Command { std: "docker" "start" "-a" "eb89a590a557e514389c7d1f90818bfb558fac1d7e2a4af819791daa9ada2d1c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "eb89a590a557e514389c7d1f90818bfb558fac1d7e2a4af819791daa9ada2d1c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "eb89a590a557e514389c7d1f90818bfb558fac1d7e2a4af819791daa9ada2d1c", kill_on_drop: false }` [INFO] [stdout] eb89a590a557e514389c7d1f90818bfb558fac1d7e2a4af819791daa9ada2d1c [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/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:cf8efcab8866f2cf4285301c7418e2f4f2a9b088c91ba69c40d5b659f81557f7" "/opt/rustwide/cargo-home/bin/cargo" "+29194e8f603400afdb2f86c9418e9fccb1628ea0" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] c9a5acb2891ddf29cf8ac3aa7790c198a78d5702ea09d4db0b101af40e656672 [INFO] running `Command { std: "docker" "start" "-a" "c9a5acb2891ddf29cf8ac3aa7790c198a78d5702ea09d4db0b101af40e656672", kill_on_drop: false }` [INFO] [stderr] Compiling autocfg v1.4.0 [INFO] [stderr] Compiling proc-macro2 v1.0.95 [INFO] [stderr] Compiling unicode-ident v1.0.18 [INFO] [stderr] Compiling libc v0.2.172 [INFO] [stderr] Compiling serde v1.0.219 [INFO] [stderr] Checking cfg-if v1.0.0 [INFO] [stderr] Compiling parking_lot_core v0.9.10 [INFO] [stderr] Checking scopeguard v1.2.0 [INFO] [stderr] Checking smallvec v1.15.0 [INFO] [stderr] Compiling getrandom v0.3.2 [INFO] [stderr] Compiling libm v0.2.13 [INFO] [stderr] Compiling serde_json v1.0.140 [INFO] [stderr] Compiling thiserror v1.0.69 [INFO] [stderr] Checking bytes v1.10.1 [INFO] [stderr] Checking iana-time-zone v0.1.63 [INFO] [stderr] Checking ryu v1.0.20 [INFO] [stderr] Checking pin-project-lite v0.2.16 [INFO] [stderr] Checking itoa v1.0.15 [INFO] [stderr] Checking memchr v2.7.4 [INFO] [stderr] Checking log v0.4.27 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling lock_api v0.4.12 [INFO] [stderr] Compiling bigdecimal v0.4.8 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Compiling syn v2.0.101 [INFO] [stderr] Checking signal-hook-registry v1.4.5 [INFO] [stderr] Checking socket2 v0.5.9 [INFO] [stderr] Checking mio v1.0.3 [INFO] [stderr] Checking parking_lot v0.12.3 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Checking num-bigint v0.4.6 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling tokio-macros v2.5.0 [INFO] [stderr] Checking tokio v1.44.2 [INFO] [stderr] Checking chrono v0.4.41 [INFO] [stderr] Checking uuid v1.16.0 [INFO] [stderr] Checking order-book v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::cmp::Ordering` [INFO] [stdout] --> src/orderbook.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::cmp::Ordering; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::str::FromStr` [INFO] [stdout] --> src/account.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::str::FromStr; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp::Ordering` [INFO] [stdout] --> src/orderbook.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::cmp::Ordering; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/account.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | / /** [INFO] [stdout] 85 | | * update margin-related fields if it's a margin position [INFO] [stdout] 86 | | */ [INFO] [stdout] | |___________^ [INFO] [stdout] 87 | / if position_type == PositionType::Margin { [INFO] [stdout] 88 | | if let (Some(leverage), Some(margin_type)) = (&leverage, &margin_type) { [INFO] [stdout] 89 | | position.leverage = Some(leverage.clone()); [INFO] [stdout] 90 | | position.margin_type = Some(*margin_type); [INFO] [stdout] ... | [INFO] [stdout] 101 | | } [INFO] [stdout] | |_________- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `PositionType` [INFO] [stdout] --> src/margin.rs:1:39 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::models::{MarginType, Side, PositionType}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::str::FromStr` [INFO] [stdout] --> src/account.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::str::FromStr; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/account.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | / /** [INFO] [stdout] 85 | | * update margin-related fields if it's a margin position [INFO] [stdout] 86 | | */ [INFO] [stdout] | |___________^ [INFO] [stdout] 87 | / if position_type == PositionType::Margin { [INFO] [stdout] 88 | | if let (Some(leverage), Some(margin_type)) = (&leverage, &margin_type) { [INFO] [stdout] 89 | | position.leverage = Some(leverage.clone()); [INFO] [stdout] 90 | | position.margin_type = Some(*margin_type); [INFO] [stdout] ... | [INFO] [stdout] 101 | | } [INFO] [stdout] | |_________- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `PositionType` [INFO] [stdout] --> src/margin.rs:1:39 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::models::{MarginType, Side, PositionType}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `new_quantity` [INFO] [stdout] --> src/account.rs:136:21 [INFO] [stdout] | [INFO] [stdout] 136 | let new_quantity = if position.side == order.side { [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_new_quantity` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Side` is never used [INFO] [stdout] --> src/models.rs:10:10 [INFO] [stdout] | [INFO] [stdout] 10 | pub enum Side { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `PositionSide` is never used [INFO] [stdout] --> src/models.rs:16:10 [INFO] [stdout] | [INFO] [stdout] 16 | pub enum PositionSide { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `PositionType` is never used [INFO] [stdout] --> src/models.rs:22:10 [INFO] [stdout] | [INFO] [stdout] 22 | pub enum PositionType { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `MarginType` is never used [INFO] [stdout] --> src/models.rs:28:10 [INFO] [stdout] | [INFO] [stdout] 28 | pub enum MarginType { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `OrderType` is never used [INFO] [stdout] --> src/models.rs:34:10 [INFO] [stdout] | [INFO] [stdout] 34 | pub enum OrderType { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `TimeInForce` is never used [INFO] [stdout] --> src/models.rs:47:10 [INFO] [stdout] | [INFO] [stdout] 47 | pub enum TimeInForce { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Order` is never constructed [INFO] [stdout] --> src/models.rs:57:12 [INFO] [stdout] | [INFO] [stdout] 57 | pub struct Order { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Trade` is never constructed [INFO] [stdout] --> src/models.rs:76:12 [INFO] [stdout] | [INFO] [stdout] 76 | pub struct Trade { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Position` is never constructed [INFO] [stdout] --> src/models.rs:90:12 [INFO] [stdout] | [INFO] [stdout] 90 | pub struct Position { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Account` is never constructed [INFO] [stdout] --> src/models.rs:108:12 [INFO] [stdout] | [INFO] [stdout] 108 | pub struct Account { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `OrderBook` is never constructed [INFO] [stdout] --> src/models.rs:120:12 [INFO] [stdout] | [INFO] [stdout] 120 | pub struct OrderBook { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `FundingRate` is never constructed [INFO] [stdout] --> src/models.rs:131:12 [INFO] [stdout] | [INFO] [stdout] 131 | pub struct FundingRate { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `OrderError` is never used [INFO] [stdout] --> src/models.rs:141:10 [INFO] [stdout] | [INFO] [stdout] 141 | pub enum OrderError { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `add_order`, `match_buy_order`, `match_sell_order`, `cancel_order`, and `get_depth` are never used [INFO] [stdout] --> src/orderbook.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 6 | impl OrderBook{ [INFO] [stdout] | -------------- associated items in this implementation [INFO] [stdout] 7 | pub fn new (symbol: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 15 | pub fn add_order(&mut self, order: Order) -> Result, OrderError> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 22 | fn match_buy_order(&mut self, mut order: Order) -> Result, OrderError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 74 | fn match_sell_order(&mut self, mut order: Order) -> Result, OrderError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 125 | pub fn cancel_order(&mut self, order_id: Uuid, side: Side) -> Result<(), OrderError> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 149 | pub fn get_depth(&self, depth: usize) -> (Vec<(BigDecimal, BigDecimal)>, Vec<(BigDecimal, BigDecimal)>) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `deposit`, `withdraw`, `get_balance`, `update_position`, and `check_margin_requirements` are never used [INFO] [stdout] --> src/account.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl Account { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] 9 | pub fn new(user_id: Uuid) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 17 | pub fn deposit(&mut self, asset: String, amount: BigDecimal) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 21 | pub fn withdraw(&mut self, asset: String) -> BigDecimal { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 25 | pub fn get_balance(&self, asset: &str) -> BigDecimal { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 29 | pub fn update_position( [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 106 | pub fn check_margin_requirements( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MarginCalculator` is never constructed [INFO] [stdout] --> src/margin.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct MarginCalculator; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `calculate_required_margin`, `calculate_liquidation_price`, and `is_position_liquidated` are never used [INFO] [stdout] --> src/margin.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 7 | impl MarginCalculator { [INFO] [stdout] | --------------------- associated functions in this implementation [INFO] [stdout] 8 | pub fn calculate_required_margin( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 22 | pub fn calculate_liquidation_price( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 50 | pub fn is_position_liquidated( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `FundingPayment` is never constructed [INFO] [stdout] --> src/funding.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct FundingPayment { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `FundingCalculator` is never constructed [INFO] [stdout] --> src/funding.rs:15:12 [INFO] [stdout] | [INFO] [stdout] 15 | pub struct FundingCalculator { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `calculate_funding_rate`, `apply_funding`, `get_funding_history`, and `get_funding_payments` are never used [INFO] [stdout] --> src/funding.rs:26:12 [INFO] [stdout] | [INFO] [stdout] 22 | impl FundingCalculator { [INFO] [stdout] | ---------------------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 26 | pub fn new(funding_interval: Duration) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 40 | pub fn calculate_funding_rate( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 77 | pub fn apply_funding( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 127 | pub fn get_funding_history(&self) -> &[FundingRate] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 134 | pub fn get_funding_payments(&self) -> &[FundingPayment] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MarketData` is never constructed [INFO] [stdout] --> src/exchange.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | pub struct MarketData { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Exchange` is never constructed [INFO] [stdout] --> src/exchange.rs:25:12 [INFO] [stdout] | [INFO] [stdout] 25 | pub struct Exchange { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/exchange.rs:36:12 [INFO] [stdout] | [INFO] [stdout] 35 | impl Exchange { [INFO] [stdout] | ------------- associated items in this implementation [INFO] [stdout] 36 | pub fn new(symbols: Vec, funding_interval: Duration, quote_asset: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 65 | pub fn create_account(&mut self, user_id: Uuid) -> &mut Account { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 70 | pub fn get_account(&mut self, user_id: Uuid) -> Result<&mut Account, OrderError> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 75 | pub fn update_market_data( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 92 | pub fn place_order(&mut self, order: Order) -> Result, OrderError> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 138 | fn process_trade(&mut self, trade: &Trade) -> Result<(), OrderError> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 194 | pub fn cancel_order( [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 227 | pub fn run_funding(&mut self) -> Result, OrderError> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 256 | pub fn get_market_data(&self, symbol: &str) -> Option<&MarketData> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 260 | pub fn get_last_trade_price(&self, symbol: &str) -> Option<&BigDecimal> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `new_quantity` [INFO] [stdout] --> src/account.rs:136:21 [INFO] [stdout] | [INFO] [stdout] 136 | let new_quantity = if position.side == order.side { [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_new_quantity` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Side` is never used [INFO] [stdout] --> src/models.rs:10:10 [INFO] [stdout] | [INFO] [stdout] 10 | pub enum Side { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `PositionSide` is never used [INFO] [stdout] --> src/models.rs:16:10 [INFO] [stdout] | [INFO] [stdout] 16 | pub enum PositionSide { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `PositionType` is never used [INFO] [stdout] --> src/models.rs:22:10 [INFO] [stdout] | [INFO] [stdout] 22 | pub enum PositionType { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `MarginType` is never used [INFO] [stdout] --> src/models.rs:28:10 [INFO] [stdout] | [INFO] [stdout] 28 | pub enum MarginType { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `OrderType` is never used [INFO] [stdout] --> src/models.rs:34:10 [INFO] [stdout] | [INFO] [stdout] 34 | pub enum OrderType { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `TimeInForce` is never used [INFO] [stdout] --> src/models.rs:47:10 [INFO] [stdout] | [INFO] [stdout] 47 | pub enum TimeInForce { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Order` is never constructed [INFO] [stdout] --> src/models.rs:57:12 [INFO] [stdout] | [INFO] [stdout] 57 | pub struct Order { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Trade` is never constructed [INFO] [stdout] --> src/models.rs:76:12 [INFO] [stdout] | [INFO] [stdout] 76 | pub struct Trade { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Position` is never constructed [INFO] [stdout] --> src/models.rs:90:12 [INFO] [stdout] | [INFO] [stdout] 90 | pub struct Position { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Account` is never constructed [INFO] [stdout] --> src/models.rs:108:12 [INFO] [stdout] | [INFO] [stdout] 108 | pub struct Account { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `OrderBook` is never constructed [INFO] [stdout] --> src/models.rs:120:12 [INFO] [stdout] | [INFO] [stdout] 120 | pub struct OrderBook { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `FundingRate` is never constructed [INFO] [stdout] --> src/models.rs:131:12 [INFO] [stdout] | [INFO] [stdout] 131 | pub struct FundingRate { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `OrderError` is never used [INFO] [stdout] --> src/models.rs:141:10 [INFO] [stdout] | [INFO] [stdout] 141 | pub enum OrderError { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `add_order`, `match_buy_order`, `match_sell_order`, `cancel_order`, and `get_depth` are never used [INFO] [stdout] --> src/orderbook.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 6 | impl OrderBook{ [INFO] [stdout] | -------------- associated items in this implementation [INFO] [stdout] 7 | pub fn new (symbol: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 15 | pub fn add_order(&mut self, order: Order) -> Result, OrderError> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 22 | fn match_buy_order(&mut self, mut order: Order) -> Result, OrderError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 74 | fn match_sell_order(&mut self, mut order: Order) -> Result, OrderError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 125 | pub fn cancel_order(&mut self, order_id: Uuid, side: Side) -> Result<(), OrderError> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 149 | pub fn get_depth(&self, depth: usize) -> (Vec<(BigDecimal, BigDecimal)>, Vec<(BigDecimal, BigDecimal)>) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `deposit`, `withdraw`, `get_balance`, `update_position`, and `check_margin_requirements` are never used [INFO] [stdout] --> src/account.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl Account { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] 9 | pub fn new(user_id: Uuid) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 17 | pub fn deposit(&mut self, asset: String, amount: BigDecimal) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 21 | pub fn withdraw(&mut self, asset: String) -> BigDecimal { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 25 | pub fn get_balance(&self, asset: &str) -> BigDecimal { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 29 | pub fn update_position( [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 106 | pub fn check_margin_requirements( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MarginCalculator` is never constructed [INFO] [stdout] --> src/margin.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct MarginCalculator; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `calculate_required_margin`, `calculate_liquidation_price`, and `is_position_liquidated` are never used [INFO] [stdout] --> src/margin.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 7 | impl MarginCalculator { [INFO] [stdout] | --------------------- associated functions in this implementation [INFO] [stdout] 8 | pub fn calculate_required_margin( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 22 | pub fn calculate_liquidation_price( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 50 | pub fn is_position_liquidated( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `FundingPayment` is never constructed [INFO] [stdout] --> src/funding.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct FundingPayment { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `FundingCalculator` is never constructed [INFO] [stdout] --> src/funding.rs:15:12 [INFO] [stdout] | [INFO] [stdout] 15 | pub struct FundingCalculator { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `calculate_funding_rate`, `apply_funding`, `get_funding_history`, and `get_funding_payments` are never used [INFO] [stdout] --> src/funding.rs:26:12 [INFO] [stdout] | [INFO] [stdout] 22 | impl FundingCalculator { [INFO] [stdout] | ---------------------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 26 | pub fn new(funding_interval: Duration) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 40 | pub fn calculate_funding_rate( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 77 | pub fn apply_funding( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 127 | pub fn get_funding_history(&self) -> &[FundingRate] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 134 | pub fn get_funding_payments(&self) -> &[FundingPayment] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MarketData` is never constructed [INFO] [stdout] --> src/exchange.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | pub struct MarketData { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Exchange` is never constructed [INFO] [stdout] --> src/exchange.rs:25:12 [INFO] [stdout] | [INFO] [stdout] 25 | pub struct Exchange { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/exchange.rs:36:12 [INFO] [stdout] | [INFO] [stdout] 35 | impl Exchange { [INFO] [stdout] | ------------- associated items in this implementation [INFO] [stdout] 36 | pub fn new(symbols: Vec, funding_interval: Duration, quote_asset: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 65 | pub fn create_account(&mut self, user_id: Uuid) -> &mut Account { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 70 | pub fn get_account(&mut self, user_id: Uuid) -> Result<&mut Account, OrderError> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 75 | pub fn update_market_data( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 92 | pub fn place_order(&mut self, order: Order) -> Result, OrderError> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 138 | fn process_trade(&mut self, trade: &Trade) -> Result<(), OrderError> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 194 | pub fn cancel_order( [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 227 | pub fn run_funding(&mut self) -> Result, OrderError> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 256 | pub fn get_market_data(&self, symbol: &str) -> Option<&MarketData> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 260 | pub fn get_last_trade_price(&self, symbol: &str) -> Option<&BigDecimal> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 14.85s [INFO] running `Command { std: "docker" "inspect" "c9a5acb2891ddf29cf8ac3aa7790c198a78d5702ea09d4db0b101af40e656672", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c9a5acb2891ddf29cf8ac3aa7790c198a78d5702ea09d4db0b101af40e656672", kill_on_drop: false }` [INFO] [stdout] c9a5acb2891ddf29cf8ac3aa7790c198a78d5702ea09d4db0b101af40e656672