[INFO] fetching crate crypto_trading 0.2.2... [INFO] testing crypto_trading-0.2.2 against try#b83b707f97d809763b7861afa7638871f3339a33 for pr-145838-1 [INFO] extracting crate crypto_trading 0.2.2 into /workspace/builds/worker-1-tc2/source [INFO] started tweaking crates.io crate crypto_trading 0.2.2 [INFO] finished tweaking crates.io crate crypto_trading 0.2.2 [INFO] tweaked toml for crates.io crate crypto_trading 0.2.2 written to /workspace/builds/worker-1-tc2/source/Cargo.toml [INFO] validating manifest of crates.io crate crypto_trading 0.2.2 on toolchain b83b707f97d809763b7861afa7638871f3339a33 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+b83b707f97d809763b7861afa7638871f3339a33" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate crypto_trading 0.2.2 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" "+b83b707f97d809763b7861afa7638871f3339a33" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+b83b707f97d809763b7861afa7638871f3339a33" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 5ec6256dfbaf8a0d91374d17df83547071ee2415b7c2f1247c2ec00a4ffa11a7 [INFO] running `Command { std: "docker" "start" "-a" "5ec6256dfbaf8a0d91374d17df83547071ee2415b7c2f1247c2ec00a4ffa11a7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "5ec6256dfbaf8a0d91374d17df83547071ee2415b7c2f1247c2ec00a4ffa11a7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5ec6256dfbaf8a0d91374d17df83547071ee2415b7c2f1247c2ec00a4ffa11a7", kill_on_drop: false }` [INFO] [stdout] 5ec6256dfbaf8a0d91374d17df83547071ee2415b7c2f1247c2ec00a4ffa11a7 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+b83b707f97d809763b7861afa7638871f3339a33" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 8ed406a85d18e889f60bd49b5bdc407efff5e65c7298c9f1b739a7642101d940 [INFO] running `Command { std: "docker" "start" "-a" "8ed406a85d18e889f60bd49b5bdc407efff5e65c7298c9f1b739a7642101d940", kill_on_drop: false }` [INFO] [stderr] Compiling smallvec v1.14.0 [INFO] [stderr] Compiling lock_api v0.4.12 [INFO] [stderr] Compiling parking_lot_core v0.9.10 [INFO] [stderr] Compiling syn v2.0.100 [INFO] [stderr] Compiling cc v1.2.17 [INFO] [stderr] Compiling generic-array v0.14.7 [INFO] [stderr] Compiling foreign-types-shared v0.1.1 [INFO] [stderr] Compiling hashbrown v0.15.2 [INFO] [stderr] Compiling openssl v0.10.71 [INFO] [stderr] Compiling foreign-types v0.3.2 [INFO] [stderr] Compiling tracing v0.1.41 [INFO] [stderr] Compiling native-tls v0.2.14 [INFO] [stderr] Compiling bitflags v2.9.0 [INFO] [stderr] Compiling atomic-waker v1.1.2 [INFO] [stderr] Compiling memchr v2.7.4 [INFO] [stderr] Compiling indexmap v2.8.0 [INFO] [stderr] Compiling parking_lot v0.12.3 [INFO] [stderr] Compiling encoding_rs v0.8.35 [INFO] [stderr] Compiling chrono v0.4.40 [INFO] [stderr] Compiling crypto-common v0.1.6 [INFO] [stderr] Compiling block-buffer v0.10.4 [INFO] [stderr] Compiling hex v0.4.3 [INFO] [stderr] Compiling digest v0.10.7 [INFO] [stderr] Compiling dotenv v0.15.0 [INFO] [stderr] Compiling hmac v0.12.1 [INFO] [stderr] Compiling sha2 v0.10.8 [INFO] [stderr] Compiling openssl-sys v0.9.106 [INFO] [stderr] Compiling synstructure v0.13.1 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.7.5 [INFO] [stderr] Compiling zerovec-derive v0.10.3 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling tokio-macros v2.5.0 [INFO] [stderr] Compiling icu_provider_macros v1.5.0 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling tokio v1.44.1 [INFO] [stderr] Compiling zerofrom v0.1.6 [INFO] [stderr] Compiling yoke v0.7.5 [INFO] [stderr] Compiling zerovec v0.10.4 [INFO] [stderr] Compiling tinystr v0.7.6 [INFO] [stderr] Compiling icu_collections v1.5.0 [INFO] [stderr] Compiling icu_locid v1.5.0 [INFO] [stderr] Compiling serde v1.0.219 [INFO] [stderr] Compiling icu_provider v1.5.0 [INFO] [stderr] Compiling icu_locid_transform v1.5.0 [INFO] [stderr] Compiling icu_properties v1.5.1 [INFO] [stderr] Compiling serde_json v1.0.140 [INFO] [stderr] Compiling serde_urlencoded v0.7.1 [INFO] [stderr] Compiling icu_normalizer v1.5.0 [INFO] [stderr] Compiling tokio-util v0.7.14 [INFO] [stderr] Compiling tokio-native-tls v0.3.1 [INFO] [stderr] Compiling tower v0.5.2 [INFO] [stderr] Compiling idna_adapter v1.2.0 [INFO] [stderr] Compiling idna v1.0.3 [INFO] [stderr] Compiling h2 v0.4.8 [INFO] [stderr] Compiling url v2.5.4 [INFO] [stderr] Compiling hyper v1.6.0 [INFO] [stderr] Compiling hyper-util v0.1.11 [INFO] [stderr] Compiling hyper-tls v0.6.0 [INFO] [stderr] Compiling reqwest v0.12.15 [INFO] [stderr] Compiling crypto_trading v0.2.2 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused imports: `Endpoint` and `Tickers` [INFO] [stdout] --> src/adapter/common.rs:3:67 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::{model::binance_model::{BinanceRequest, BinanceSymbol, Endpoint, Kline, Klines, Ticker, Tickers}, port::binance_port::CommonPo... [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: `Response` [INFO] [stdout] --> src/adapter/adapter_utils.rs:3:23 [INFO] [stdout] | [INFO] [stdout] 3 | use reqwest::{Client, Response}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Display`, `default`, and `write` [INFO] [stdout] --> src/model/binance_model.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | use std::{default, fmt::{write, Display}, time::{SystemTime, UNIX_EPOCH}}; [INFO] [stdout] | ^^^^^^^ ^^^^^ ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Context` [INFO] [stdout] --> src/model/binance_model.rs:4:14 [INFO] [stdout] | [INFO] [stdout] 4 | use anyhow::{Context, Ok}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `future` should have an upper camel case name [INFO] [stdout] --> src/model/binance_model.rs:172:5 [INFO] [stdout] | [INFO] [stdout] 172 | future, [INFO] [stdout] | ^^^^^^ help: convert the identifier to upper camel case (notice the capitalization): `Future` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `spot` should have an upper camel case name [INFO] [stdout] --> src/model/binance_model.rs:173:5 [INFO] [stdout] | [INFO] [stdout] 173 | spot, [INFO] [stdout] | ^^^^ help: convert the identifier to upper camel case (notice the capitalization): `Spot` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::future::Future` [INFO] [stdout] --> src/port/binance_port.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::future::Future; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `anyhow::Ok` [INFO] [stdout] --> src/algorithm/algorithm.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use anyhow::Ok; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Kline` [INFO] [stdout] --> src/algorithm/algorithm.rs:5:36 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::{model::binance_model::{Kline, Klines}, utils}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `symbol` [INFO] [stdout] --> src/model/binance_model.rs:202:38 [INFO] [stdout] | [INFO] [stdout] 202 | CommonEndpoint::Klines { symbol, interval, limit } => { [INFO] [stdout] | ^^^^^^ help: try ignoring the field: `symbol: _` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `interval` [INFO] [stdout] --> src/model/binance_model.rs:202:46 [INFO] [stdout] | [INFO] [stdout] 202 | CommonEndpoint::Klines { symbol, interval, limit } => { [INFO] [stdout] | ^^^^^^^^ help: try ignoring the field: `interval: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `limit_or_default` [INFO] [stdout] --> src/model/binance_model.rs:203:37 [INFO] [stdout] | [INFO] [stdout] 203 | ... let limit_or_default = limit.unwrap_or(500); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_limit_or_default` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/macros.rs:4:13 [INFO] [stdout] | [INFO] [stdout] 4 | let mut query = String::new(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] ::: src/model/binance_model.rs:238:45 [INFO] [stdout] | [INFO] [stdout] 238 | CommonEndpoint::ExchnageInfo => query!(), [INFO] [stdout] | -------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] = note: this warning originates in the macro `query` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/macros.rs:4:13 [INFO] [stdout] | [INFO] [stdout] 4 | let mut query = String::new(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] ::: src/model/binance_model.rs:239:39 [INFO] [stdout] | [INFO] [stdout] 239 | CommonEndpoint::Ticker => query!(), [INFO] [stdout] | -------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `query` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/macros.rs:4:13 [INFO] [stdout] | [INFO] [stdout] 4 | let mut query = String::new(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] ::: src/model/binance_model.rs:265:17 [INFO] [stdout] | [INFO] [stdout] 265 | query!() [INFO] [stdout] | -------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `query` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `symbol` [INFO] [stdout] --> src/model/binance_model.rs:381:39 [INFO] [stdout] | [INFO] [stdout] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stdout] | ^^^^^^ help: try ignoring the field: `symbol: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `side` [INFO] [stdout] --> src/model/binance_model.rs:381:47 [INFO] [stdout] | [INFO] [stdout] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stdout] | ^^^^ help: try ignoring the field: `side: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `type` [INFO] [stdout] --> src/model/binance_model.rs:381:53 [INFO] [stdout] | [INFO] [stdout] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stdout] | ^^^^^^ help: try ignoring the field: `type: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `time_in_force` [INFO] [stdout] --> src/model/binance_model.rs:381:61 [INFO] [stdout] | [INFO] [stdout] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try ignoring the field: `time_in_force: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `quantity` [INFO] [stdout] --> src/model/binance_model.rs:381:76 [INFO] [stdout] | [INFO] [stdout] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stdout] | ^^^^^^^^ help: try ignoring the field: `quantity: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `price` [INFO] [stdout] --> src/model/binance_model.rs:381:86 [INFO] [stdout] | [INFO] [stdout] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stdout] | ^^^^^ help: try ignoring the field: `price: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `stop_price` [INFO] [stdout] --> src/model/binance_model.rs:381:93 [INFO] [stdout] | [INFO] [stdout] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stdout] | ^^^^^^^^^^ help: try ignoring the field: `stop_price: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `callback_rate` [INFO] [stdout] --> src/model/binance_model.rs:381:105 [INFO] [stdout] | [INFO] [stdout] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try ignoring the field: `callback_rate: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/algorithm/algorithm.rs:59:83 [INFO] [stdout] | [INFO] [stdout] 59 | let open_time = utils::timestamp_to_local(self.open_time as i64).map_err(|e| std::fmt::Error)?; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/algorithm/algorithm.rs:60:85 [INFO] [stdout] | [INFO] [stdout] 60 | let close_time = utils::timestamp_to_local(self.close_time as i64).map_err(|e| std::fmt::Error)?; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Balance` is never constructed [INFO] [stdout] --> src/model/binance_model.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | struct Balance { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Order` is never constructed [INFO] [stdout] --> src/model/binance_model.rs:402:8 [INFO] [stdout] | [INFO] [stdout] 402 | struct Order { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/model/binance_model.rs:414:12 [INFO] [stdout] | [INFO] [stdout] 413 | impl Order { [INFO] [stdout] | ---------- associated function in this implementation [INFO] [stdout] 414 | pub fn new( [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `tickers` is never read [INFO] [stdout] --> src/model/binance_model.rs:451:5 [INFO] [stdout] | [INFO] [stdout] 450 | pub struct Tickers { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] 451 | tickers: Vec [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Tickers` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/adapter/adapter_utils.rs:56:40 [INFO] [stdout] | [INFO] [stdout] 56 | .header("X-MBX-APIKEY", api_key.clone()) [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:6:4 [INFO] [stdout] | [INFO] [stdout] 6 | async fn get_account_balance(&self) -> anyhow::Result; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] = note: `#[warn(async_fn_in_trait)]` on by default [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 6 - async fn get_account_balance(&self) -> anyhow::Result; [INFO] [stdout] 6 + fn get_account_balance(&self) -> impl std::future::Future> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:7:4 [INFO] [stdout] | [INFO] [stdout] 7 | async fn get_trade_fee(&self) -> anyhow::Result; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 7 - async fn get_trade_fee(&self) -> anyhow::Result; [INFO] [stdout] 7 + fn get_trade_fee(&self) -> impl std::future::Future> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:8:4 [INFO] [stdout] | [INFO] [stdout] 8 | async fn query_order(&self, symbol: &str) -> anyhow::Result; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 8 - async fn query_order(&self, symbol: &str) -> anyhow::Result; [INFO] [stdout] 8 + fn query_order(&self, symbol: &str) -> impl std::future::Future> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:9:4 [INFO] [stdout] | [INFO] [stdout] 9 | async fn all_orders(&self, symbol: &str) -> anyhow::Result; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 9 - async fn all_orders(&self, symbol: &str) -> anyhow::Result; [INFO] [stdout] 9 + fn all_orders(&self, symbol: &str) -> impl std::future::Future> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:14:4 [INFO] [stdout] | [INFO] [stdout] 14 | async fn get_kline(&self, symbol: String, interval: &str, limit: Option) -> anyhow::Result; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 14 - async fn get_kline(&self, symbol: String, interval: &str, limit: Option) -> anyhow::Result; [INFO] [stdout] 14 + fn get_kline(&self, symbol: String, interval: &str, limit: Option) -> impl std::future::Future> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:15:4 [INFO] [stdout] | [INFO] [stdout] 15 | async fn get_symbol_list(&self) -> anyhow::Result>; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 15 - async fn get_symbol_list(&self) -> anyhow::Result>; [INFO] [stdout] 15 + fn get_symbol_list(&self) -> impl std::future::Future>> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:16:4 [INFO] [stdout] | [INFO] [stdout] 16 | async fn get_symbol_with_volume(&self) -> anyhow::Result>; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 16 - async fn get_symbol_with_volume(&self) -> anyhow::Result>; [INFO] [stdout] 16 + fn get_symbol_with_volume(&self) -> impl std::future::Future>> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:22:4 [INFO] [stdout] | [INFO] [stdout] 22 | async fn order_position(&self) -> anyhow::Result<()>; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 22 - async fn order_position(&self) -> anyhow::Result<()>; [INFO] [stdout] 22 + fn order_position(&self) -> impl std::future::Future> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:23:4 [INFO] [stdout] | [INFO] [stdout] 23 | async fn change_leverage(&self, symbol: &str, leverage: i32) -> anyhow::Result; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 23 - async fn change_leverage(&self, symbol: &str, leverage: i32) -> anyhow::Result; [INFO] [stdout] 23 + fn change_leverage(&self, symbol: &str, leverage: i32) -> impl std::future::Future> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:24:4 [INFO] [stdout] | [INFO] [stdout] 24 | async fn all_open_orders(&self, symbol: &str) -> anyhow::Result; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 24 - async fn all_open_orders(&self, symbol: &str) -> anyhow::Result; [INFO] [stdout] 24 + fn all_open_orders(&self, symbol: &str) -> impl std::future::Future> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:25:4 [INFO] [stdout] | [INFO] [stdout] 25 | async fn new_order( [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 25 ~ fn new_order( [INFO] [stdout] 26 | &self, [INFO] [stdout] ... [INFO] [stdout] 34 | callback_rate: Option, [INFO] [stdout] 35 ~ ) -> impl std::future::Future> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 12s [INFO] running `Command { std: "docker" "inspect" "8ed406a85d18e889f60bd49b5bdc407efff5e65c7298c9f1b739a7642101d940", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8ed406a85d18e889f60bd49b5bdc407efff5e65c7298c9f1b739a7642101d940", kill_on_drop: false }` [INFO] [stdout] 8ed406a85d18e889f60bd49b5bdc407efff5e65c7298c9f1b739a7642101d940 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+b83b707f97d809763b7861afa7638871f3339a33" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] a0870253aa3de206ac46543e2c7327eb6b5c2937816bbdb1f33cccdac09a2524 [INFO] running `Command { std: "docker" "start" "-a" "a0870253aa3de206ac46543e2c7327eb6b5c2937816bbdb1f33cccdac09a2524", kill_on_drop: false }` [INFO] [stdout] warning: unused imports: `Endpoint` and `Tickers` [INFO] [stdout] --> src/adapter/common.rs:3:67 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::{model::binance_model::{BinanceRequest, BinanceSymbol, Endpoint, Kline, Klines, Ticker, Tickers}, port::binance_port::CommonPo... [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: `Response` [INFO] [stdout] --> src/adapter/adapter_utils.rs:3:23 [INFO] [stdout] | [INFO] [stdout] 3 | use reqwest::{Client, Response}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Display`, `default`, and `write` [INFO] [stdout] --> src/model/binance_model.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | use std::{default, fmt::{write, Display}, time::{SystemTime, UNIX_EPOCH}}; [INFO] [stdout] | ^^^^^^^ ^^^^^ ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Context` [INFO] [stdout] --> src/model/binance_model.rs:4:14 [INFO] [stdout] | [INFO] [stdout] 4 | use anyhow::{Context, Ok}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `future` should have an upper camel case name [INFO] [stdout] --> src/model/binance_model.rs:172:5 [INFO] [stdout] | [INFO] [stdout] 172 | future, [INFO] [stdout] | ^^^^^^ help: convert the identifier to upper camel case (notice the capitalization): `Future` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `spot` should have an upper camel case name [INFO] [stdout] --> src/model/binance_model.rs:173:5 [INFO] [stdout] | [INFO] [stdout] 173 | spot, [INFO] [stdout] | ^^^^ help: convert the identifier to upper camel case (notice the capitalization): `Spot` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::future::Future` [INFO] [stdout] --> src/port/binance_port.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::future::Future; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `anyhow::Ok` [INFO] [stdout] --> src/algorithm/algorithm.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use anyhow::Ok; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Kline` [INFO] [stdout] --> src/algorithm/algorithm.rs:5:36 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::{model::binance_model::{Kline, Klines}, utils}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `symbol` [INFO] [stdout] --> src/model/binance_model.rs:202:38 [INFO] [stdout] | [INFO] [stdout] 202 | CommonEndpoint::Klines { symbol, interval, limit } => { [INFO] [stdout] | ^^^^^^ help: try ignoring the field: `symbol: _` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `interval` [INFO] [stdout] --> src/model/binance_model.rs:202:46 [INFO] [stdout] | [INFO] [stdout] 202 | CommonEndpoint::Klines { symbol, interval, limit } => { [INFO] [stdout] | ^^^^^^^^ help: try ignoring the field: `interval: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `limit_or_default` [INFO] [stdout] --> src/model/binance_model.rs:203:37 [INFO] [stdout] | [INFO] [stdout] 203 | ... let limit_or_default = limit.unwrap_or(500); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_limit_or_default` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/macros.rs:4:13 [INFO] [stdout] | [INFO] [stdout] 4 | let mut query = String::new(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] ::: src/model/binance_model.rs:238:45 [INFO] [stdout] | [INFO] [stdout] 238 | CommonEndpoint::ExchnageInfo => query!(), [INFO] [stdout] | -------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] = note: this warning originates in the macro `query` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/macros.rs:4:13 [INFO] [stdout] | [INFO] [stdout] 4 | let mut query = String::new(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] ::: src/model/binance_model.rs:239:39 [INFO] [stdout] | [INFO] [stdout] 239 | CommonEndpoint::Ticker => query!(), [INFO] [stdout] | -------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `query` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/macros.rs:4:13 [INFO] [stdout] | [INFO] [stdout] 4 | let mut query = String::new(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] ::: src/model/binance_model.rs:265:17 [INFO] [stdout] | [INFO] [stdout] 265 | query!() [INFO] [stdout] | -------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `query` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `symbol` [INFO] [stdout] --> src/model/binance_model.rs:381:39 [INFO] [stdout] | [INFO] [stdout] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stdout] | ^^^^^^ help: try ignoring the field: `symbol: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `side` [INFO] [stdout] --> src/model/binance_model.rs:381:47 [INFO] [stdout] | [INFO] [stdout] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stdout] | ^^^^ help: try ignoring the field: `side: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `type` [INFO] [stdout] --> src/model/binance_model.rs:381:53 [INFO] [stdout] | [INFO] [stdout] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stdout] | ^^^^^^ help: try ignoring the field: `type: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `time_in_force` [INFO] [stdout] --> src/model/binance_model.rs:381:61 [INFO] [stdout] | [INFO] [stdout] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try ignoring the field: `time_in_force: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `quantity` [INFO] [stdout] --> src/model/binance_model.rs:381:76 [INFO] [stdout] | [INFO] [stdout] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stdout] | ^^^^^^^^ help: try ignoring the field: `quantity: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `price` [INFO] [stdout] --> src/model/binance_model.rs:381:86 [INFO] [stdout] | [INFO] [stdout] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stdout] | ^^^^^ help: try ignoring the field: `price: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `stop_price` [INFO] [stdout] --> src/model/binance_model.rs:381:93 [INFO] [stdout] | [INFO] [stdout] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stdout] | ^^^^^^^^^^ help: try ignoring the field: `stop_price: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `callback_rate` [INFO] [stdout] --> src/model/binance_model.rs:381:105 [INFO] [stdout] | [INFO] [stdout] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try ignoring the field: `callback_rate: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/algorithm/algorithm.rs:59:83 [INFO] [stdout] | [INFO] [stdout] 59 | let open_time = utils::timestamp_to_local(self.open_time as i64).map_err(|e| std::fmt::Error)?; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/algorithm/algorithm.rs:60:85 [INFO] [stdout] | [INFO] [stdout] 60 | let close_time = utils::timestamp_to_local(self.close_time as i64).map_err(|e| std::fmt::Error)?; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Balance` is never constructed [INFO] [stdout] --> src/model/binance_model.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | struct Balance { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Order` is never constructed [INFO] [stdout] --> src/model/binance_model.rs:402:8 [INFO] [stdout] | [INFO] [stdout] 402 | struct Order { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/model/binance_model.rs:414:12 [INFO] [stdout] | [INFO] [stdout] 413 | impl Order { [INFO] [stdout] | ---------- associated function in this implementation [INFO] [stdout] 414 | pub fn new( [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `tickers` is never read [INFO] [stdout] --> src/model/binance_model.rs:451:5 [INFO] [stdout] | [INFO] [stdout] 450 | pub struct Tickers { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] 451 | tickers: Vec [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Tickers` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling crypto_trading v0.2.2 (/opt/rustwide/workdir) [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/adapter/adapter_utils.rs:56:40 [INFO] [stdout] | [INFO] [stdout] 56 | .header("X-MBX-APIKEY", api_key.clone()) [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:6:4 [INFO] [stdout] | [INFO] [stdout] 6 | async fn get_account_balance(&self) -> anyhow::Result; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] = note: `#[warn(async_fn_in_trait)]` on by default [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 6 - async fn get_account_balance(&self) -> anyhow::Result; [INFO] [stdout] 6 + fn get_account_balance(&self) -> impl std::future::Future> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:7:4 [INFO] [stdout] | [INFO] [stdout] 7 | async fn get_trade_fee(&self) -> anyhow::Result; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 7 - async fn get_trade_fee(&self) -> anyhow::Result; [INFO] [stdout] 7 + fn get_trade_fee(&self) -> impl std::future::Future> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:8:4 [INFO] [stdout] | [INFO] [stdout] 8 | async fn query_order(&self, symbol: &str) -> anyhow::Result; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 8 - async fn query_order(&self, symbol: &str) -> anyhow::Result; [INFO] [stdout] 8 + fn query_order(&self, symbol: &str) -> impl std::future::Future> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:9:4 [INFO] [stdout] | [INFO] [stdout] 9 | async fn all_orders(&self, symbol: &str) -> anyhow::Result; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 9 - async fn all_orders(&self, symbol: &str) -> anyhow::Result; [INFO] [stdout] 9 + fn all_orders(&self, symbol: &str) -> impl std::future::Future> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:14:4 [INFO] [stdout] | [INFO] [stdout] 14 | async fn get_kline(&self, symbol: String, interval: &str, limit: Option) -> anyhow::Result; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 14 - async fn get_kline(&self, symbol: String, interval: &str, limit: Option) -> anyhow::Result; [INFO] [stdout] 14 + fn get_kline(&self, symbol: String, interval: &str, limit: Option) -> impl std::future::Future> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:15:4 [INFO] [stdout] | [INFO] [stdout] 15 | async fn get_symbol_list(&self) -> anyhow::Result>; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 15 - async fn get_symbol_list(&self) -> anyhow::Result>; [INFO] [stdout] 15 + fn get_symbol_list(&self) -> impl std::future::Future>> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:16:4 [INFO] [stdout] | [INFO] [stdout] 16 | async fn get_symbol_with_volume(&self) -> anyhow::Result>; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 16 - async fn get_symbol_with_volume(&self) -> anyhow::Result>; [INFO] [stdout] 16 + fn get_symbol_with_volume(&self) -> impl std::future::Future>> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:22:4 [INFO] [stdout] | [INFO] [stdout] 22 | async fn order_position(&self) -> anyhow::Result<()>; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 22 - async fn order_position(&self) -> anyhow::Result<()>; [INFO] [stdout] 22 + fn order_position(&self) -> impl std::future::Future> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:23:4 [INFO] [stdout] | [INFO] [stdout] 23 | async fn change_leverage(&self, symbol: &str, leverage: i32) -> anyhow::Result; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 23 - async fn change_leverage(&self, symbol: &str, leverage: i32) -> anyhow::Result; [INFO] [stdout] 23 + fn change_leverage(&self, symbol: &str, leverage: i32) -> impl std::future::Future> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:24:4 [INFO] [stdout] | [INFO] [stdout] 24 | async fn all_open_orders(&self, symbol: &str) -> anyhow::Result; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 24 - async fn all_open_orders(&self, symbol: &str) -> anyhow::Result; [INFO] [stdout] 24 + fn all_open_orders(&self, symbol: &str) -> impl std::future::Future> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:25:4 [INFO] [stdout] | [INFO] [stdout] 25 | async fn new_order( [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 25 ~ fn new_order( [INFO] [stdout] 26 | &self, [INFO] [stdout] ... [INFO] [stdout] 34 | callback_rate: Option, [INFO] [stdout] 35 ~ ) -> impl std::future::Future> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Endpoint` and `Tickers` [INFO] [stdout] --> src/adapter/common.rs:3:67 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::{model::binance_model::{BinanceRequest, BinanceSymbol, Endpoint, Kline, Klines, Ticker, Tickers}, port::binance_port::CommonPo... [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: `Response` [INFO] [stdout] --> src/adapter/adapter_utils.rs:3:23 [INFO] [stdout] | [INFO] [stdout] 3 | use reqwest::{Client, Response}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Display`, `default`, and `write` [INFO] [stdout] --> src/model/binance_model.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | use std::{default, fmt::{write, Display}, time::{SystemTime, UNIX_EPOCH}}; [INFO] [stdout] | ^^^^^^^ ^^^^^ ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Context` [INFO] [stdout] --> src/model/binance_model.rs:4:14 [INFO] [stdout] | [INFO] [stdout] 4 | use anyhow::{Context, Ok}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `future` should have an upper camel case name [INFO] [stdout] --> src/model/binance_model.rs:172:5 [INFO] [stdout] | [INFO] [stdout] 172 | future, [INFO] [stdout] | ^^^^^^ help: convert the identifier to upper camel case (notice the capitalization): `Future` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `spot` should have an upper camel case name [INFO] [stdout] --> src/model/binance_model.rs:173:5 [INFO] [stdout] | [INFO] [stdout] 173 | spot, [INFO] [stdout] | ^^^^ help: convert the identifier to upper camel case (notice the capitalization): `Spot` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::future::Future` [INFO] [stdout] --> src/port/binance_port.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::future::Future; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `anyhow::Ok` [INFO] [stdout] --> src/algorithm/algorithm.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use anyhow::Ok; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Kline` [INFO] [stdout] --> src/algorithm/algorithm.rs:5:36 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::{model::binance_model::{Kline, Klines}, utils}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `symbol` [INFO] [stdout] --> src/model/binance_model.rs:202:38 [INFO] [stdout] | [INFO] [stdout] 202 | CommonEndpoint::Klines { symbol, interval, limit } => { [INFO] [stdout] | ^^^^^^ help: try ignoring the field: `symbol: _` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `interval` [INFO] [stdout] --> src/model/binance_model.rs:202:46 [INFO] [stdout] | [INFO] [stdout] 202 | CommonEndpoint::Klines { symbol, interval, limit } => { [INFO] [stdout] | ^^^^^^^^ help: try ignoring the field: `interval: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `limit_or_default` [INFO] [stdout] --> src/model/binance_model.rs:203:37 [INFO] [stdout] | [INFO] [stdout] 203 | ... let limit_or_default = limit.unwrap_or(500); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_limit_or_default` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/macros.rs:4:13 [INFO] [stdout] | [INFO] [stdout] 4 | let mut query = String::new(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] ::: src/model/binance_model.rs:238:45 [INFO] [stdout] | [INFO] [stdout] 238 | CommonEndpoint::ExchnageInfo => query!(), [INFO] [stdout] | -------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] = note: this warning originates in the macro `query` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/macros.rs:4:13 [INFO] [stdout] | [INFO] [stdout] 4 | let mut query = String::new(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] ::: src/model/binance_model.rs:239:39 [INFO] [stdout] | [INFO] [stdout] 239 | CommonEndpoint::Ticker => query!(), [INFO] [stdout] | -------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `query` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/macros.rs:4:13 [INFO] [stdout] | [INFO] [stdout] 4 | let mut query = String::new(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] ::: src/model/binance_model.rs:265:17 [INFO] [stdout] | [INFO] [stdout] 265 | query!() [INFO] [stdout] | -------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `query` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `symbol` [INFO] [stdout] --> src/model/binance_model.rs:381:39 [INFO] [stdout] | [INFO] [stdout] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stdout] | ^^^^^^ help: try ignoring the field: `symbol: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `side` [INFO] [stdout] --> src/model/binance_model.rs:381:47 [INFO] [stdout] | [INFO] [stdout] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stdout] | ^^^^ help: try ignoring the field: `side: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `type` [INFO] [stdout] --> src/model/binance_model.rs:381:53 [INFO] [stdout] | [INFO] [stdout] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stdout] | ^^^^^^ help: try ignoring the field: `type: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `time_in_force` [INFO] [stdout] --> src/model/binance_model.rs:381:61 [INFO] [stdout] | [INFO] [stdout] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try ignoring the field: `time_in_force: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `quantity` [INFO] [stdout] --> src/model/binance_model.rs:381:76 [INFO] [stdout] | [INFO] [stdout] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stdout] | ^^^^^^^^ help: try ignoring the field: `quantity: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `price` [INFO] [stdout] --> src/model/binance_model.rs:381:86 [INFO] [stdout] | [INFO] [stdout] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stdout] | ^^^^^ help: try ignoring the field: `price: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `stop_price` [INFO] [stdout] --> src/model/binance_model.rs:381:93 [INFO] [stdout] | [INFO] [stdout] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stdout] | ^^^^^^^^^^ help: try ignoring the field: `stop_price: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `callback_rate` [INFO] [stdout] --> src/model/binance_model.rs:381:105 [INFO] [stdout] | [INFO] [stdout] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try ignoring the field: `callback_rate: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/algorithm/algorithm.rs:59:83 [INFO] [stdout] | [INFO] [stdout] 59 | let open_time = utils::timestamp_to_local(self.open_time as i64).map_err(|e| std::fmt::Error)?; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/algorithm/algorithm.rs:60:85 [INFO] [stdout] | [INFO] [stdout] 60 | let close_time = utils::timestamp_to_local(self.close_time as i64).map_err(|e| std::fmt::Error)?; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Balance` is never constructed [INFO] [stdout] --> src/model/binance_model.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | struct Balance { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Order` is never constructed [INFO] [stdout] --> src/model/binance_model.rs:402:8 [INFO] [stdout] | [INFO] [stdout] 402 | struct Order { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/model/binance_model.rs:414:12 [INFO] [stdout] | [INFO] [stdout] 413 | impl Order { [INFO] [stdout] | ---------- associated function in this implementation [INFO] [stdout] 414 | pub fn new( [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `tickers` is never read [INFO] [stdout] --> src/model/binance_model.rs:451:5 [INFO] [stdout] | [INFO] [stdout] 450 | pub struct Tickers { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] 451 | tickers: Vec [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Tickers` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/adapter/adapter_utils.rs:56:40 [INFO] [stdout] | [INFO] [stdout] 56 | .header("X-MBX-APIKEY", api_key.clone()) [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:6:4 [INFO] [stdout] | [INFO] [stdout] 6 | async fn get_account_balance(&self) -> anyhow::Result; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] = note: `#[warn(async_fn_in_trait)]` on by default [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 6 - async fn get_account_balance(&self) -> anyhow::Result; [INFO] [stdout] 6 + fn get_account_balance(&self) -> impl std::future::Future> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:7:4 [INFO] [stdout] | [INFO] [stdout] 7 | async fn get_trade_fee(&self) -> anyhow::Result; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 7 - async fn get_trade_fee(&self) -> anyhow::Result; [INFO] [stdout] 7 + fn get_trade_fee(&self) -> impl std::future::Future> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:8:4 [INFO] [stdout] | [INFO] [stdout] 8 | async fn query_order(&self, symbol: &str) -> anyhow::Result; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 8 - async fn query_order(&self, symbol: &str) -> anyhow::Result; [INFO] [stdout] 8 + fn query_order(&self, symbol: &str) -> impl std::future::Future> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:9:4 [INFO] [stdout] | [INFO] [stdout] 9 | async fn all_orders(&self, symbol: &str) -> anyhow::Result; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 9 - async fn all_orders(&self, symbol: &str) -> anyhow::Result; [INFO] [stdout] 9 + fn all_orders(&self, symbol: &str) -> impl std::future::Future> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:14:4 [INFO] [stdout] | [INFO] [stdout] 14 | async fn get_kline(&self, symbol: String, interval: &str, limit: Option) -> anyhow::Result; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 14 - async fn get_kline(&self, symbol: String, interval: &str, limit: Option) -> anyhow::Result; [INFO] [stdout] 14 + fn get_kline(&self, symbol: String, interval: &str, limit: Option) -> impl std::future::Future> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:15:4 [INFO] [stdout] | [INFO] [stdout] 15 | async fn get_symbol_list(&self) -> anyhow::Result>; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 15 - async fn get_symbol_list(&self) -> anyhow::Result>; [INFO] [stdout] 15 + fn get_symbol_list(&self) -> impl std::future::Future>> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:16:4 [INFO] [stdout] | [INFO] [stdout] 16 | async fn get_symbol_with_volume(&self) -> anyhow::Result>; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 16 - async fn get_symbol_with_volume(&self) -> anyhow::Result>; [INFO] [stdout] 16 + fn get_symbol_with_volume(&self) -> impl std::future::Future>> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:22:4 [INFO] [stdout] | [INFO] [stdout] 22 | async fn order_position(&self) -> anyhow::Result<()>; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 22 - async fn order_position(&self) -> anyhow::Result<()>; [INFO] [stdout] 22 + fn order_position(&self) -> impl std::future::Future> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:23:4 [INFO] [stdout] | [INFO] [stdout] 23 | async fn change_leverage(&self, symbol: &str, leverage: i32) -> anyhow::Result; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 23 - async fn change_leverage(&self, symbol: &str, leverage: i32) -> anyhow::Result; [INFO] [stdout] 23 + fn change_leverage(&self, symbol: &str, leverage: i32) -> impl std::future::Future> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:24:4 [INFO] [stdout] | [INFO] [stdout] 24 | async fn all_open_orders(&self, symbol: &str) -> anyhow::Result; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 24 - async fn all_open_orders(&self, symbol: &str) -> anyhow::Result; [INFO] [stdout] 24 + fn all_open_orders(&self, symbol: &str) -> impl std::future::Future> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/port/binance_port.rs:25:4 [INFO] [stdout] | [INFO] [stdout] 25 | async fn new_order( [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 25 ~ fn new_order( [INFO] [stdout] 26 | &self, [INFO] [stdout] ... [INFO] [stdout] 34 | callback_rate: Option, [INFO] [stdout] 35 ~ ) -> impl std::future::Future> + Send; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 1.21s [INFO] running `Command { std: "docker" "inspect" "a0870253aa3de206ac46543e2c7327eb6b5c2937816bbdb1f33cccdac09a2524", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a0870253aa3de206ac46543e2c7327eb6b5c2937816bbdb1f33cccdac09a2524", kill_on_drop: false }` [INFO] [stdout] a0870253aa3de206ac46543e2c7327eb6b5c2937816bbdb1f33cccdac09a2524 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+b83b707f97d809763b7861afa7638871f3339a33" "test" "--frozen", kill_on_drop: false }` [INFO] [stdout] 8aeb3bc6a849574b29071f009c0bbca7669b39702a645085e3e932d6b615011d [INFO] running `Command { std: "docker" "start" "-a" "8aeb3bc6a849574b29071f009c0bbca7669b39702a645085e3e932d6b615011d", kill_on_drop: false }` [INFO] [stderr] warning: unused imports: `Endpoint` and `Tickers` [INFO] [stderr] --> src/adapter/common.rs:3:67 [INFO] [stderr] | [INFO] [stderr] 3 | use crate::{model::binance_model::{BinanceRequest, BinanceSymbol, Endpoint, Kline, Klines, Ticker, Tickers}, port::binance_port::CommonPo... [INFO] [stderr] | ^^^^^^^^ ^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stderr] [INFO] [stderr] warning: unused import: `Response` [INFO] [stderr] --> src/adapter/adapter_utils.rs:3:23 [INFO] [stderr] | [INFO] [stderr] 3 | use reqwest::{Client, Response}; [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused imports: `Display`, `default`, and `write` [INFO] [stderr] --> src/model/binance_model.rs:2:11 [INFO] [stderr] | [INFO] [stderr] 2 | use std::{default, fmt::{write, Display}, time::{SystemTime, UNIX_EPOCH}}; [INFO] [stderr] | ^^^^^^^ ^^^^^ ^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused import: `Context` [INFO] [stderr] --> src/model/binance_model.rs:4:14 [INFO] [stderr] | [INFO] [stderr] 4 | use anyhow::{Context, Ok}; [INFO] [stderr] | ^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: variant `future` should have an upper camel case name [INFO] [stderr] --> src/model/binance_model.rs:172:5 [INFO] [stderr] | [INFO] [stderr] 172 | future, [INFO] [stderr] | ^^^^^^ help: convert the identifier to upper camel case (notice the capitalization): `Future` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stderr] [INFO] [stderr] warning: variant `spot` should have an upper camel case name [INFO] [stderr] --> src/model/binance_model.rs:173:5 [INFO] [stderr] | [INFO] [stderr] 173 | spot, [INFO] [stderr] | ^^^^ help: convert the identifier to upper camel case (notice the capitalization): `Spot` [INFO] [stderr] [INFO] [stderr] warning: unused import: `std::future::Future` [INFO] [stderr] --> src/port/binance_port.rs:1:5 [INFO] [stderr] | [INFO] [stderr] 1 | use std::future::Future; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused import: `anyhow::Ok` [INFO] [stderr] --> src/algorithm/algorithm.rs:3:5 [INFO] [stderr] | [INFO] [stderr] 3 | use anyhow::Ok; [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused import: `Kline` [INFO] [stderr] --> src/algorithm/algorithm.rs:5:36 [INFO] [stderr] | [INFO] [stderr] 5 | use crate::{model::binance_model::{Kline, Klines}, utils}; [INFO] [stderr] | ^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused variable: `symbol` [INFO] [stderr] --> src/model/binance_model.rs:202:38 [INFO] [stderr] | [INFO] [stderr] 202 | CommonEndpoint::Klines { symbol, interval, limit } => { [INFO] [stderr] | ^^^^^^ help: try ignoring the field: `symbol: _` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stderr] [INFO] [stderr] warning: unused variable: `interval` [INFO] [stderr] --> src/model/binance_model.rs:202:46 [INFO] [stderr] | [INFO] [stderr] 202 | CommonEndpoint::Klines { symbol, interval, limit } => { [INFO] [stderr] | ^^^^^^^^ help: try ignoring the field: `interval: _` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `limit_or_default` [INFO] [stderr] --> src/model/binance_model.rs:203:37 [INFO] [stderr] | [INFO] [stderr] 203 | ... let limit_or_default = limit.unwrap_or(500); [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_limit_or_default` [INFO] [stderr] [INFO] [stderr] warning: variable does not need to be mutable [INFO] [stderr] --> src/macros.rs:4:13 [INFO] [stderr] | [INFO] [stderr] 4 | let mut query = String::new(); [INFO] [stderr] | ----^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: remove this `mut` [INFO] [stderr] | [INFO] [stderr] ::: src/model/binance_model.rs:238:45 [INFO] [stderr] | [INFO] [stderr] 238 | CommonEndpoint::ExchnageInfo => query!(), [INFO] [stderr] | -------- in this macro invocation [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stderr] = note: this warning originates in the macro `query` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: variable does not need to be mutable [INFO] [stderr] --> src/macros.rs:4:13 [INFO] [stderr] | [INFO] [stderr] 4 | let mut query = String::new(); [INFO] [stderr] | ----^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: remove this `mut` [INFO] [stderr] | [INFO] [stderr] ::: src/model/binance_model.rs:239:39 [INFO] [stderr] | [INFO] [stderr] 239 | CommonEndpoint::Ticker => query!(), [INFO] [stderr] | -------- in this macro invocation [INFO] [stderr] | [INFO] [stderr] = note: this warning originates in the macro `query` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: variable does not need to be mutable [INFO] [stderr] --> src/macros.rs:4:13 [INFO] [stderr] | [INFO] [stderr] 4 | let mut query = String::new(); [INFO] [stderr] | ----^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: remove this `mut` [INFO] [stderr] | [INFO] [stderr] ::: src/model/binance_model.rs:265:17 [INFO] [stderr] | [INFO] [stderr] 265 | query!() [INFO] [stderr] | -------- in this macro invocation [INFO] [stderr] | [INFO] [stderr] = note: this warning originates in the macro `query` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: unused variable: `symbol` [INFO] [stderr] --> src/model/binance_model.rs:381:39 [INFO] [stderr] | [INFO] [stderr] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stderr] | ^^^^^^ help: try ignoring the field: `symbol: _` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `side` [INFO] [stderr] --> src/model/binance_model.rs:381:47 [INFO] [stderr] | [INFO] [stderr] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stderr] | ^^^^ help: try ignoring the field: `side: _` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `type` [INFO] [stderr] --> src/model/binance_model.rs:381:53 [INFO] [stderr] | [INFO] [stderr] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stderr] | ^^^^^^ help: try ignoring the field: `type: _` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `time_in_force` [INFO] [stderr] --> src/model/binance_model.rs:381:61 [INFO] [stderr] | [INFO] [stderr] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stderr] | ^^^^^^^^^^^^^ help: try ignoring the field: `time_in_force: _` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `quantity` [INFO] [stderr] --> src/model/binance_model.rs:381:76 [INFO] [stderr] | [INFO] [stderr] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stderr] | ^^^^^^^^ help: try ignoring the field: `quantity: _` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `price` [INFO] [stderr] --> src/model/binance_model.rs:381:86 [INFO] [stderr] | [INFO] [stderr] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stderr] | ^^^^^ help: try ignoring the field: `price: _` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `stop_price` [INFO] [stderr] --> src/model/binance_model.rs:381:93 [INFO] [stderr] | [INFO] [stderr] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stderr] | ^^^^^^^^^^ help: try ignoring the field: `stop_price: _` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `callback_rate` [INFO] [stderr] --> src/model/binance_model.rs:381:105 [INFO] [stderr] | [INFO] [stderr] 381 | TradeEndpoint::NewOrder { symbol, side, r#type, time_in_force, quantity, price, stop_price, callback_rate } => { [INFO] [stderr] | ^^^^^^^^^^^^^ help: try ignoring the field: `callback_rate: _` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `e` [INFO] [stderr] --> src/algorithm/algorithm.rs:59:83 [INFO] [stderr] | [INFO] [stderr] 59 | let open_time = utils::timestamp_to_local(self.open_time as i64).map_err(|e| std::fmt::Error)?; [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `e` [INFO] [stderr] --> src/algorithm/algorithm.rs:60:85 [INFO] [stderr] | [INFO] [stderr] 60 | let close_time = utils::timestamp_to_local(self.close_time as i64).map_err(|e| std::fmt::Error)?; [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stderr] [INFO] [stderr] warning: struct `Balance` is never constructed [INFO] [stderr] --> src/model/binance_model.rs:10:8 [INFO] [stderr] | [INFO] [stderr] 10 | struct Balance { [INFO] [stderr] | ^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stderr] [INFO] [stderr] warning: struct `Order` is never constructed [INFO] [stderr] --> src/model/binance_model.rs:402:8 [INFO] [stderr] | [INFO] [stderr] 402 | struct Order { [INFO] [stderr] | ^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function `new` is never used [INFO] [stderr] --> src/model/binance_model.rs:414:12 [INFO] [stderr] | [INFO] [stderr] 413 | impl Order { [INFO] [stderr] | ---------- associated function in this implementation [INFO] [stderr] 414 | pub fn new( [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: field `tickers` is never read [INFO] [stderr] --> src/model/binance_model.rs:451:5 [INFO] [stderr] | [INFO] [stderr] 450 | pub struct Tickers { [INFO] [stderr] | ------- field in this struct [INFO] [stderr] 451 | tickers: Vec [INFO] [stderr] | ^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `Tickers` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stderr] [INFO] [stderr] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stderr] --> src/adapter/adapter_utils.rs:56:40 [INFO] [stderr] | [INFO] [stderr] 56 | .header("X-MBX-APIKEY", api_key.clone()) [INFO] [stderr] | ^^^^^^^^ help: remove this redundant call [INFO] [stderr] | [INFO] [stderr] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stderr] = note: `#[warn(noop_method_call)]` on by default [INFO] [stderr] [INFO] [stderr] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stderr] --> src/port/binance_port.rs:6:4 [INFO] [stderr] | [INFO] [stderr] 6 | async fn get_account_balance(&self) -> anyhow::Result; [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stderr] = note: `#[warn(async_fn_in_trait)]` on by default [INFO] [stderr] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stderr] | [INFO] [stderr] 6 - async fn get_account_balance(&self) -> anyhow::Result; [INFO] [stderr] 6 + fn get_account_balance(&self) -> impl std::future::Future> + Send; [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stderr] --> src/port/binance_port.rs:7:4 [INFO] [stderr] | [INFO] [stderr] 7 | async fn get_trade_fee(&self) -> anyhow::Result; [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stderr] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stderr] | [INFO] [stderr] 7 - async fn get_trade_fee(&self) -> anyhow::Result; [INFO] [stderr] 7 + fn get_trade_fee(&self) -> impl std::future::Future> + Send; [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stderr] --> src/port/binance_port.rs:8:4 [INFO] [stderr] | [INFO] [stderr] 8 | async fn query_order(&self, symbol: &str) -> anyhow::Result; [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stderr] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stderr] | [INFO] [stderr] 8 - async fn query_order(&self, symbol: &str) -> anyhow::Result; [INFO] [stderr] 8 + fn query_order(&self, symbol: &str) -> impl std::future::Future> + Send; [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stderr] --> src/port/binance_port.rs:9:4 [INFO] [stderr] | [INFO] [stderr] 9 | async fn all_orders(&self, symbol: &str) -> anyhow::Result; [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stderr] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stderr] | [INFO] [stderr] 9 - async fn all_orders(&self, symbol: &str) -> anyhow::Result; [INFO] [stderr] 9 + fn all_orders(&self, symbol: &str) -> impl std::future::Future> + Send; [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stderr] --> src/port/binance_port.rs:14:4 [INFO] [stderr] | [INFO] [stderr] 14 | async fn get_kline(&self, symbol: String, interval: &str, limit: Option) -> anyhow::Result; [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stderr] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stderr] | [INFO] [stderr] 14 - async fn get_kline(&self, symbol: String, interval: &str, limit: Option) -> anyhow::Result; [INFO] [stderr] 14 + fn get_kline(&self, symbol: String, interval: &str, limit: Option) -> impl std::future::Future> + Send; [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stderr] --> src/port/binance_port.rs:15:4 [INFO] [stderr] | [INFO] [stderr] 15 | async fn get_symbol_list(&self) -> anyhow::Result>; [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stderr] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stderr] | [INFO] [stderr] 15 - async fn get_symbol_list(&self) -> anyhow::Result>; [INFO] [stderr] 15 + fn get_symbol_list(&self) -> impl std::future::Future>> + Send; [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stderr] --> src/port/binance_port.rs:16:4 [INFO] [stderr] | [INFO] [stderr] 16 | async fn get_symbol_with_volume(&self) -> anyhow::Result>; [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stderr] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stderr] | [INFO] [stderr] 16 - async fn get_symbol_with_volume(&self) -> anyhow::Result>; [INFO] [stderr] 16 + fn get_symbol_with_volume(&self) -> impl std::future::Future>> + Send; [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stderr] --> src/port/binance_port.rs:22:4 [INFO] [stderr] | [INFO] [stderr] 22 | async fn order_position(&self) -> anyhow::Result<()>; [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stderr] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stderr] | [INFO] [stderr] 22 - async fn order_position(&self) -> anyhow::Result<()>; [INFO] [stderr] 22 + fn order_position(&self) -> impl std::future::Future> + Send; [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stderr] --> src/port/binance_port.rs:23:4 [INFO] [stderr] | [INFO] [stderr] 23 | async fn change_leverage(&self, symbol: &str, leverage: i32) -> anyhow::Result; [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stderr] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stderr] | [INFO] [stderr] 23 - async fn change_leverage(&self, symbol: &str, leverage: i32) -> anyhow::Result; [INFO] [stderr] 23 + fn change_leverage(&self, symbol: &str, leverage: i32) -> impl std::future::Future> + Send; [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stderr] --> src/port/binance_port.rs:24:4 [INFO] [stderr] | [INFO] [stderr] 24 | async fn all_open_orders(&self, symbol: &str) -> anyhow::Result; [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stderr] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stderr] | [INFO] [stderr] 24 - async fn all_open_orders(&self, symbol: &str) -> anyhow::Result; [INFO] [stderr] 24 + fn all_open_orders(&self, symbol: &str) -> impl std::future::Future> + Send; [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stderr] --> src/port/binance_port.rs:25:4 [INFO] [stderr] | [INFO] [stderr] 25 | async fn new_order( [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stderr] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stderr] | [INFO] [stderr] 25 ~ fn new_order( [INFO] [stderr] 26 | &self, [INFO] [stderr] ... [INFO] [stderr] 34 | callback_rate: Option, [INFO] [stderr] 35 ~ ) -> impl std::future::Future> + Send; [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: `crypto_trading` (lib) generated 41 warnings (run `cargo fix --lib -p crypto_trading` to apply 11 suggestions) [INFO] [stderr] warning: `crypto_trading` (lib test) generated 41 warnings (41 duplicates) [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.27s [INFO] [stderr] Running unittests src/lib.rs (/opt/rustwide/target/debug/deps/crypto_trading-8981eff8f17d5164) [INFO] [stdout] [INFO] [stderr] Doc-tests crypto_trading [INFO] [stdout] running 0 tests [INFO] [stdout] [INFO] [stdout] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s [INFO] [stdout] [INFO] [stderr] warning: variant `future` should have an upper camel case name [INFO] [stderr] --> src/model/binance_model.rs:172:5 [INFO] [stderr] | [INFO] [stderr] 172 | future, [INFO] [stderr] | ^^^^^^ help: convert the identifier to upper camel case (notice the capitalization): `Future` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stderr] [INFO] [stderr] warning: variant `spot` should have an upper camel case name [INFO] [stderr] --> src/model/binance_model.rs:173:5 [INFO] [stderr] | [INFO] [stderr] 173 | spot, [INFO] [stderr] | ^^^^ help: convert the identifier to upper camel case (notice the capitalization): `Spot` [INFO] [stderr] [INFO] [stderr] warning: 2 warnings emitted [INFO] [stderr] [INFO] [stdout] [INFO] [stdout] running 0 tests [INFO] [stdout] [INFO] [stdout] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "8aeb3bc6a849574b29071f009c0bbca7669b39702a645085e3e932d6b615011d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8aeb3bc6a849574b29071f009c0bbca7669b39702a645085e3e932d6b615011d", kill_on_drop: false }` [INFO] [stdout] 8aeb3bc6a849574b29071f009c0bbca7669b39702a645085e3e932d6b615011d