[INFO] cloning repository https://github.com/coleleavitt/blacktorrent [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/coleleavitt/blacktorrent" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcoleleavitt%2Fblacktorrent", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcoleleavitt%2Fblacktorrent'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] aa6d637cf3a012aa64fde2813ff7c745813945c8 [INFO] checking coleleavitt/blacktorrent against master#8a65ee08296b36342bf7c3cdc15312ccbc357227 for pr-142704 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcoleleavitt%2Fblacktorrent" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/coleleavitt/blacktorrent on toolchain 8a65ee08296b36342bf7c3cdc15312ccbc357227 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+8a65ee08296b36342bf7c3cdc15312ccbc357227" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/coleleavitt/blacktorrent [INFO] finished tweaking git repo https://github.com/coleleavitt/blacktorrent [INFO] tweaked toml for git repo https://github.com/coleleavitt/blacktorrent written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/coleleavitt/blacktorrent 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" "+8a65ee08296b36342bf7c3cdc15312ccbc357227" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded tracker v0.2.2 [INFO] [stderr] Downloaded tracker-macros v0.2.2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+8a65ee08296b36342bf7c3cdc15312ccbc357227" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 194a0830ec0031804bd5a6fc98013d6a920c6a4ed4fd25e901107e2439d7d652 [INFO] running `Command { std: "docker" "start" "-a" "194a0830ec0031804bd5a6fc98013d6a920c6a4ed4fd25e901107e2439d7d652", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "194a0830ec0031804bd5a6fc98013d6a920c6a4ed4fd25e901107e2439d7d652", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "194a0830ec0031804bd5a6fc98013d6a920c6a4ed4fd25e901107e2439d7d652", kill_on_drop: false }` [INFO] [stdout] 194a0830ec0031804bd5a6fc98013d6a920c6a4ed4fd25e901107e2439d7d652 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+8a65ee08296b36342bf7c3cdc15312ccbc357227" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 0f3e3aa6a15abda3768a54e5f014a84f679be367837f1f6e9c87bd91ffed6f79 [INFO] running `Command { std: "docker" "start" "-a" "0f3e3aa6a15abda3768a54e5f014a84f679be367837f1f6e9c87bd91ffed6f79", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.95 [INFO] [stderr] Compiling libc v0.2.172 [INFO] [stderr] Compiling unicode-ident v1.0.18 [INFO] [stderr] Checking cfg-if v1.0.0 [INFO] [stderr] Compiling autocfg v1.4.0 [INFO] [stderr] Compiling zerocopy v0.8.25 [INFO] [stderr] Compiling getrandom v0.3.3 [INFO] [stderr] Compiling parking_lot_core v0.9.10 [INFO] [stderr] Checking predicates-core v1.0.9 [INFO] [stderr] Checking smallvec v1.15.0 [INFO] [stderr] Checking scopeguard v1.2.0 [INFO] [stderr] Compiling mockall_derive v0.13.1 [INFO] [stderr] Checking anstyle v1.0.10 [INFO] [stderr] Checking termtree v0.5.1 [INFO] [stderr] Compiling thiserror v2.0.12 [INFO] [stderr] Checking pin-project-lite v0.2.16 [INFO] [stderr] Checking downcast v0.11.0 [INFO] [stderr] Checking bytes v1.10.1 [INFO] [stderr] Checking fragile v2.0.1 [INFO] [stderr] Checking lazy_static v1.5.0 [INFO] [stderr] Checking predicates-tree v1.0.12 [INFO] [stderr] Checking predicates v3.1.3 [INFO] [stderr] Compiling lock_api v0.4.12 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Compiling syn v2.0.101 [INFO] [stderr] Checking mio v1.0.3 [INFO] [stderr] Checking socket2 v0.5.9 [INFO] [stderr] Checking signal-hook-registry v1.4.5 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking parking_lot v0.12.3 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking rand v0.9.1 [INFO] [stderr] Compiling tracker-macros v0.2.2 [INFO] [stderr] Compiling thiserror-impl v2.0.12 [INFO] [stderr] Compiling tokio-macros v2.5.0 [INFO] [stderr] Checking tracker v0.2.2 [INFO] [stderr] Checking tokio v1.45.0 [INFO] [stderr] Checking mockall v0.13.1 [INFO] [stderr] Checking blacktorrent v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `rand::Rng` [INFO] [stdout] --> src/utp/common.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use rand::Rng; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `IpAddr`, `Ipv4Addr`, and `SocketAddr` [INFO] [stdout] --> src/utp/reliability.rs:6:16 [INFO] [stdout] | [INFO] [stdout] 6 | use std::net::{SocketAddr, IpAddr, Ipv4Addr}; // For dummy_socket_addr in tests [INFO] [stdout] | ^^^^^^^^^^ ^^^^^^ ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `IpAddr` and `Ipv4Addr` [INFO] [stdout] --> src/utp/stream.rs:5:16 [INFO] [stdout] | [INFO] [stdout] 5 | use std::net::{IpAddr, Ipv4Addr, SocketAddr}; [INFO] [stdout] | ^^^^^^ ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `logging` [INFO] [stdout] --> src/utp/socket_manager.rs:185:11 [INFO] [stdout] | [INFO] [stdout] 185 | #[cfg(feature = "logging")] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove the condition [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = help: consider adding `logging` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `socket::UtpSocket` [INFO] [stdout] --> src/utp/mod.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | pub use socket::UtpSocket; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `stream::UtpStream` [INFO] [stdout] --> src/utp/mod.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | pub use stream::UtpStream; // If you implement a UtpStream similar to rust-utp[2] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `common::UtpError` [INFO] [stdout] --> src/utp/mod.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | pub use common::UtpError; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/utp/stream.rs:49:25 [INFO] [stdout] | [INFO] [stdout] 49 | let mut socket_guard = stream.socket.lock().unwrap(); [INFO] [stdout] | ----^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/utp/stream.rs:83:25 [INFO] [stdout] | [INFO] [stdout] 83 | let mut socket_guard = self.socket.lock().unwrap(); [INFO] [stdout] | ----^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::Rng` [INFO] [stdout] --> src/utp/common.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use rand::Rng; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `AsyncReadExt` and `AsyncWriteExt` [INFO] [stdout] --> src/utp/stream.rs:289:21 [INFO] [stdout] | [INFO] [stdout] 289 | use tokio::io::{AsyncReadExt, AsyncWriteExt}; [INFO] [stdout] | ^^^^^^^^^^^^ ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::task::Poll` [INFO] [stdout] --> src/utp/stream.rs:318:13 [INFO] [stdout] | [INFO] [stdout] 318 | use std::task::Poll; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `logging` [INFO] [stdout] --> src/utp/socket_manager.rs:185:11 [INFO] [stdout] | [INFO] [stdout] 185 | #[cfg(feature = "logging")] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove the condition [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = help: consider adding `logging` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::utp::dispatcher::UtpDispatcher` [INFO] [stdout] --> src/utp/socket_manager.rs:194:9 [INFO] [stdout] | [INFO] [stdout] 194 | use crate::utp::dispatcher::UtpDispatcher; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `socket::UtpSocket` [INFO] [stdout] --> src/utp/mod.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | pub use socket::UtpSocket; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `stream::UtpStream` [INFO] [stdout] --> src/utp/mod.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | pub use stream::UtpStream; // If you implement a UtpStream similar to rust-utp[2] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `common::UtpError` [INFO] [stdout] --> src/utp/mod.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | pub use common::UtpError; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/utp/stream.rs:49:25 [INFO] [stdout] | [INFO] [stdout] 49 | let mut socket_guard = stream.socket.lock().unwrap(); [INFO] [stdout] | ----^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/utp/stream.rs:83:25 [INFO] [stdout] | [INFO] [stdout] 83 | let mut socket_guard = self.socket.lock().unwrap(); [INFO] [stdout] | ----^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `rm` [INFO] [stdout] --> src/utp/connection.rs:97:9 [INFO] [stdout] | [INFO] [stdout] 97 | rm: &ReliabilityManager, // rm is now used for get_sack_data [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_rm` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `rm` [INFO] [stdout] --> src/utp/connection.rs:136:65 [INFO] [stdout] | [INFO] [stdout] 136 | pub fn create_syn_packet(&mut self, cc: &CongestionControl, rm: &ReliabilityManager) -> UtpPacket { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_rm` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `timestamp_micros` [INFO] [stdout] --> src/utp/congestion.rs:160:9 [INFO] [stdout] | [INFO] [stdout] 160 | timestamp_micros: u32, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_timestamp_micros` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/utp/stream.rs:113:21 [INFO] [stdout] | [INFO] [stdout] 113 | let mut socket_guard = socket.lock().unwrap(); [INFO] [stdout] | ----^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `data` [INFO] [stdout] --> src/main.rs:46:45 [INFO] [stdout] | [INFO] [stdout] 46 | pub fn verify_piece(piece_index: usize, data: &[u8]) -> bool { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_data` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ST_NUM_STATES` is never used [INFO] [stdout] --> src/utp/common.rs:15:11 [INFO] [stdout] | [INFO] [stdout] 15 | pub const ST_NUM_STATES: u8 = 5; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MIN_RTO_MICROS` is never used [INFO] [stdout] --> src/utp/common.rs:22:11 [INFO] [stdout] | [INFO] [stdout] 22 | pub const MIN_RTO_MICROS: u32 = 500_000; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `UDP_IPV4_OVERHEAD` is never used [INFO] [stdout] --> src/utp/common.rs:26:11 [INFO] [stdout] | [INFO] [stdout] 26 | pub const UDP_IPV4_OVERHEAD: usize = 20 + 8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `UDP_IPV6_OVERHEAD` is never used [INFO] [stdout] --> src/utp/common.rs:27:11 [INFO] [stdout] | [INFO] [stdout] 27 | pub const UDP_IPV6_OVERHEAD: usize = 40 + 8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SEQ_NR_MASK` is never used [INFO] [stdout] --> src/utp/common.rs:31:11 [INFO] [stdout] | [INFO] [stdout] 31 | pub const SEQ_NR_MASK: u16 = 0xFFFF; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ACK_NR_MASK` is never used [INFO] [stdout] --> src/utp/common.rs:32:11 [INFO] [stdout] | [INFO] [stdout] 32 | pub const ACK_NR_MASK: u16 = 0xFFFF; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `TIMESTAMP_MASK` is never used [INFO] [stdout] --> src/utp/common.rs:33:11 [INFO] [stdout] | [INFO] [stdout] 33 | pub const TIMESTAMP_MASK: u32 = 0xFFFFFFFF; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DUPLICATE_ACKS_BEFORE_RESEND` is never used [INFO] [stdout] --> src/utp/common.rs:36:11 [INFO] [stdout] | [INFO] [stdout] 36 | pub const DUPLICATE_ACKS_BEFORE_RESEND: u32 = 3; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ACK_NR_ALLOWED_WINDOW` is never used [INFO] [stdout] --> src/utp/common.rs:37:11 [INFO] [stdout] | [INFO] [stdout] 37 | pub const ACK_NR_ALLOWED_WINDOW: u32 = DUPLICATE_ACKS_BEFORE_RESEND; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MAX_WINDOW_DECAY` is never used [INFO] [stdout] --> src/utp/common.rs:38:11 [INFO] [stdout] | [INFO] [stdout] 38 | pub const MAX_WINDOW_DECAY: i64 = 100; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `TIMEOUT_CHECK_INTERVAL` is never used [INFO] [stdout] --> src/utp/common.rs:41:11 [INFO] [stdout] | [INFO] [stdout] 41 | pub const TIMEOUT_CHECK_INTERVAL: u64 = 500; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `KEEPALIVE_INTERVAL` is never used [INFO] [stdout] --> src/utp/common.rs:42:11 [INFO] [stdout] | [INFO] [stdout] 42 | pub const KEEPALIVE_INTERVAL: u64 = 29000; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `CONNECT_TIMEOUT` is never used [INFO] [stdout] --> src/utp/common.rs:43:11 [INFO] [stdout] | [INFO] [stdout] 43 | pub const CONNECT_TIMEOUT: u64 = 6000; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DELAYED_ACK_TIME` is never used [INFO] [stdout] --> src/utp/common.rs:44:11 [INFO] [stdout] | [INFO] [stdout] 44 | pub const DELAYED_ACK_TIME: u64 = 20; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `REORDER_BUFFER_SIZE` is never used [INFO] [stdout] --> src/utp/common.rs:47:11 [INFO] [stdout] | [INFO] [stdout] 47 | pub const REORDER_BUFFER_SIZE: usize = 32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `REORDER_BUFFER_MAX_SIZE` is never used [INFO] [stdout] --> src/utp/common.rs:48:11 [INFO] [stdout] | [INFO] [stdout] 48 | pub const REORDER_BUFFER_MAX_SIZE: usize = 1024; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `OUTGOING_BUFFER_MAX_SIZE` is never used [INFO] [stdout] --> src/utp/common.rs:49:11 [INFO] [stdout] | [INFO] [stdout] 49 | pub const OUTGOING_BUFFER_MAX_SIZE: usize = 1024; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `to_string` is never used [INFO] [stdout] --> src/utp/common.rs:68:12 [INFO] [stdout] | [INFO] [stdout] 67 | impl ConnectionState { [INFO] [stdout] | -------------------- method in this implementation [INFO] [stdout] 68 | pub fn to_string(&self) -> &'static str { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Timeout`, `ConnectionRefused`, `InvalidPacket`, `MaxRetransmit`, and `WindowTooSmall` are never constructed [INFO] [stdout] --> src/utp/common.rs:88:5 [INFO] [stdout] | [INFO] [stdout] 86 | pub enum UtpError { [INFO] [stdout] | -------- variants in this enum [INFO] [stdout] 87 | #[error("Connection timed out")] [INFO] [stdout] 88 | Timeout, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 89 | #[error("Connection refused")] [INFO] [stdout] 90 | ConnectionRefused, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 96 | InvalidPacket, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 104 | MaxRetransmit, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 105 | #[error("Window size too small")] [INFO] [stdout] 106 | WindowTooSmall, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `UtpError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `BandwidthType` is never used [INFO] [stdout] --> src/utp/common.rs:111:10 [INFO] [stdout] | [INFO] [stdout] 111 | pub enum BandwidthType { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `BandwidthType` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Timestamp` is never constructed [INFO] [stdout] --> src/utp/common.rs:121:12 [INFO] [stdout] | [INFO] [stdout] 121 | pub struct Timestamp(pub u64); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Timestamp` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `now`, `wrapping_sub`, and `as_millis` are never used [INFO] [stdout] --> src/utp/common.rs:124:12 [INFO] [stdout] | [INFO] [stdout] 123 | impl Timestamp { [INFO] [stdout] | -------------- associated items in this implementation [INFO] [stdout] 124 | pub fn now() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 127 | pub fn wrapping_sub(self, other: Self) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 130 | pub fn as_millis(&self) -> u64 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `current_millis` is never used [INFO] [stdout] --> src/utp/common.rs:168:8 [INFO] [stdout] | [INFO] [stdout] 168 | pub fn current_millis() -> u64 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `random_u16` is never used [INFO] [stdout] --> src/utp/common.rs:173:8 [INFO] [stdout] | [INFO] [stdout] 173 | pub fn random_u16() -> u16 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `random_u32` is never used [INFO] [stdout] --> src/utp/common.rs:178:8 [INFO] [stdout] | [INFO] [stdout] 178 | pub fn random_u32() -> u32 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `duplicate_acks_received`, `rtt_samples`, `min_rtt`, `max_rtt`, and `sum_rtt` are never read [INFO] [stdout] --> src/utp/common.rs:192:9 [INFO] [stdout] | [INFO] [stdout] 184 | pub struct UtpSocketStats { [INFO] [stdout] | -------------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 192 | pub duplicate_acks_received: u64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 193 | pub rtt_samples: u64, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 194 | pub min_rtt: u32, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 195 | pub max_rtt: u32, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 196 | pub sum_rtt: u64, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `UtpSocketStats` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `avg_rtt` is never used [INFO] [stdout] --> src/utp/common.rs:200:12 [INFO] [stdout] | [INFO] [stdout] 199 | impl UtpSocketStats { [INFO] [stdout] | ------------------- method in this implementation [INFO] [stdout] 200 | pub fn avg_rtt(&self) -> u32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SackExtensionHeader` is never constructed [INFO] [stdout] --> src/utp/packet.rs:26:12 [INFO] [stdout] | [INFO] [stdout] 26 | pub struct SackExtensionHeader { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `remote_addr` is never read [INFO] [stdout] --> src/utp/packet.rs:141:9 [INFO] [stdout] | [INFO] [stdout] 137 | pub struct UtpPacket { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 141 | pub remote_addr: SocketAddr, // Source/destination address [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `UtpPacket` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `new`, `create_syn`, `create_data`, `create_ack`, `create_fin`, and `create_reset` are never used [INFO] [stdout] --> src/utp/packet.rs:225:12 [INFO] [stdout] | [INFO] [stdout] 144 | impl UtpPacket { [INFO] [stdout] | -------------- associated functions in this implementation [INFO] [stdout] ... [INFO] [stdout] 225 | pub fn new( [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 259 | pub fn create_syn( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 281 | pub fn create_data( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 307 | pub fn create_ack( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 332 | pub fn create_fin( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 356 | pub fn create_reset( [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `local_addr` is never read [INFO] [stdout] --> src/utp/socket.rs:30:16 [INFO] [stdout] | [INFO] [stdout] 29 | pub struct UtpSocketInternal { [INFO] [stdout] | ----------------- field in this struct [INFO] [stdout] 30 | pub(crate) local_addr: SocketAddr, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/utp/socket.rs:306:12 [INFO] [stdout] | [INFO] [stdout] 278 | impl UtpSocket { [INFO] [stdout] | -------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 306 | pub fn connect(&self) -> Result<(), UtpError> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 526 | pub fn get_rtt(&self) -> u32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 530 | pub fn get_mtu_payload_size(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 534 | pub fn is_send_buffer_empty(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 538 | pub fn connection_id(&self) -> u16 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 542 | pub fn get_stats(&self) -> UtpSocketStats { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 546 | pub fn accept_initialize(&self, remote_addr: SocketAddr, syn_packet_ref: &UtpPacket) -> Result<(), UtpError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 574 | pub async fn initialize_from_connection(&self, conn_id: u16) -> Result<(), UtpError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new_for_listener`, `initiate_connection`, `get_seq_nr`, `get_ack_nr`, `get_sent_packets`, and `get_timestamp_values` are never used [INFO] [stdout] --> src/utp/connection.rs:68:12 [INFO] [stdout] | [INFO] [stdout] 45 | impl Connection { [INFO] [stdout] | --------------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 68 | pub fn new_for_listener(remote_addr: SocketAddr, syn_packet: &UtpPacket) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 86 | pub fn initiate_connection(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 398 | pub fn get_seq_nr(&self) -> u16 { self.seq_nr } [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 399 | pub fn get_ack_nr(&self) -> u16 { self.ack_nr } [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 400 | pub fn get_sent_packets(&self) -> &HashMap { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 405 | pub fn get_timestamp_values(&self) -> (u32, u64) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/utp/congestion.rs:130:12 [INFO] [stdout] | [INFO] [stdout] 73 | impl CongestionControl { [INFO] [stdout] | ---------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 130 | pub fn can_send(&self, packet_size: usize) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 323 | pub fn on_congestion_event(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 334 | pub fn reset(&mut self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 351 | pub fn set_target_delay(&mut self, target_micros: u32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 356 | pub fn set_receive_window(&mut self, window_bytes: usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 361 | pub fn get_base_delay_micros(&self) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 366 | pub fn get_current_queuing_delay(&self) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 376 | pub fn is_in_slow_start(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 381 | pub fn get_slow_start_threshold(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `seq_nr` and `is_syn` are never read [INFO] [stdout] --> src/utp/reliability.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 18 | pub struct SentPacketInfo { [INFO] [stdout] | -------------- fields in this struct [INFO] [stdout] 19 | pub seq_nr: u16, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 24 | pub is_syn: bool, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `SentPacketInfo` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_cumulative_ack_nr` and `set_needs_retransmit` are never used [INFO] [stdout] --> src/utp/reliability.rs:97:8 [INFO] [stdout] | [INFO] [stdout] 78 | impl ReliabilityManager { [INFO] [stdout] | ----------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 97 | fn get_cumulative_ack_nr(&self) -> u16 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 219 | pub fn set_needs_retransmit(&mut self, seq_nr: u16) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `CONNECT_TIMEOUT_SECS` is never used [INFO] [stdout] --> src/utp/stream.rs:15:7 [INFO] [stdout] | [INFO] [stdout] 15 | const CONNECT_TIMEOUT_SECS: u64 = 10; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `TICK_INTERVAL_MS` is never used [INFO] [stdout] --> src/utp/stream.rs:16:7 [INFO] [stdout] | [INFO] [stdout] 16 | const TICK_INTERVAL_MS: u64 = 50; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `connect` and `close_write` are never used [INFO] [stdout] --> src/utp/stream.rs:28:18 [INFO] [stdout] | [INFO] [stdout] 26 | impl UtpStream { [INFO] [stdout] | -------------- associated items in this implementation [INFO] [stdout] 27 | /// Establish a connection to a remote peer asynchronously. [INFO] [stdout] 28 | pub async fn connect(local_bind_addr: SocketAddr, remote_addr: SocketAddr) -> Result { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 75 | pub async fn close_write(&mut self) -> Result<(), UtpError> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `start_background_ticker` is never used [INFO] [stdout] --> src/utp/stream.rs:104:4 [INFO] [stdout] | [INFO] [stdout] 104 | fn start_background_ticker(stream: &UtpStream) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `OPERATION_TIMEOUT_MS` is never used [INFO] [stdout] --> src/utp/socket_manager.rs:10:7 [INFO] [stdout] | [INFO] [stdout] 10 | const OPERATION_TIMEOUT_MS: u64 = 100; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MAX_PENDING_CONNECTIONS` is never used [INFO] [stdout] --> src/utp/socket_manager.rs:11:7 [INFO] [stdout] | [INFO] [stdout] 11 | const MAX_PENDING_CONNECTIONS: usize = 16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `TMR_SIZE` is never used [INFO] [stdout] --> src/utp/socket_manager.rs:12:7 [INFO] [stdout] | [INFO] [stdout] 12 | const TMR_SIZE: usize = 3; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `UtpSocketManager` is never constructed [INFO] [stdout] --> src/utp/socket_manager.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 14 | pub struct UtpSocketManager { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `create_connection`, `listen`, `shutdown`, and `get_local_addr` are never used [INFO] [stdout] --> src/utp/socket_manager.rs:21:18 [INFO] [stdout] | [INFO] [stdout] 20 | impl UtpSocketManager { [INFO] [stdout] | --------------------- associated items in this implementation [INFO] [stdout] 21 | pub async fn new(bind_addr: SocketAddr) -> Result { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 60 | pub async fn create_connection(&self, remote_addr: SocketAddr) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 84 | pub async fn listen(&self) -> Result { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 107 | pub async fn shutdown(&self) -> Result<(), UtpError> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 113 | fn get_local_addr(&self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `UtpListener` is never constructed [INFO] [stdout] --> src/utp/socket_manager.rs:128:12 [INFO] [stdout] | [INFO] [stdout] 128 | pub struct UtpListener { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `accept`, `local_addr`, and `get_local_addr` are never used [INFO] [stdout] --> src/utp/socket_manager.rs:136:18 [INFO] [stdout] | [INFO] [stdout] 135 | impl UtpListener { [INFO] [stdout] | ---------------- methods in this implementation [INFO] [stdout] 136 | pub async fn accept(&mut self) -> Result<(UtpSocket, SocketAddr), UtpError> { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 153 | pub fn local_addr(&self) -> SocketAddr { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 160 | fn get_local_addr(&self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `log_error` is never used [INFO] [stdout] --> src/utp/socket_manager.rs:183:4 [INFO] [stdout] | [INFO] [stdout] 183 | fn log_error(message: &str) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `announce` is never used [INFO] [stdout] --> src/main.rs:25:16 [INFO] [stdout] | [INFO] [stdout] 25 | pub fn announce(tracker_url: &str, torrent_hash: &str) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `request_piece` is never used [INFO] [stdout] --> src/main.rs:42:12 [INFO] [stdout] | [INFO] [stdout] 42 | pub fn request_piece(peer_id: &str, piece_index: usize) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `verify_piece` is never used [INFO] [stdout] --> src/main.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 46 | pub fn verify_piece(piece_index: usize, data: &[u8]) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/utp/packet.rs:606:13 [INFO] [stdout] | [INFO] [stdout] 606 | let mut header = UtpHeader::new(ST_DATA, 1, 0, 0, 0, 0, 0, 1); // With extension [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/utp/packet.rs:613:13 [INFO] [stdout] | [INFO] [stdout] 613 | let mut header = UtpHeader::new(ST_DATA, 1, 0, 0, 0, 0, 0, 1); // With extension [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `rm` [INFO] [stdout] --> src/utp/connection.rs:97:9 [INFO] [stdout] | [INFO] [stdout] 97 | rm: &ReliabilityManager, // rm is now used for get_sack_data [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_rm` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `rm` [INFO] [stdout] --> src/utp/connection.rs:136:65 [INFO] [stdout] | [INFO] [stdout] 136 | pub fn create_syn_packet(&mut self, cc: &CongestionControl, rm: &ReliabilityManager) -> UtpPacket { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_rm` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `timestamp_micros` [INFO] [stdout] --> src/utp/congestion.rs:160:9 [INFO] [stdout] | [INFO] [stdout] 160 | timestamp_micros: u32, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_timestamp_micros` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/utp/stream.rs:113:21 [INFO] [stdout] | [INFO] [stdout] 113 | let mut socket_guard = socket.lock().unwrap(); [INFO] [stdout] | ----^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/utp/dispatcher.rs:558:28 [INFO] [stdout] | [INFO] [stdout] 558 | let (test_done_tx, mut test_done_rx) = oneshot::channel(); [INFO] [stdout] | ----^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/utp/dispatcher.rs:582:13 [INFO] [stdout] | [INFO] [stdout] 582 | let mut dispatcher = UtpDispatcher::new(local_addr).await.unwrap(); [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `test_packet` [INFO] [stdout] --> src/utp/dispatcher.rs:751:13 [INFO] [stdout] | [INFO] [stdout] 751 | let test_packet = create_test_packet(ST_DATA, conn_id, 1, 0, remote_addr); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_test_packet` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/utp/socket_manager.rs:227:13 [INFO] [stdout] | [INFO] [stdout] 227 | let mut listener = manager.listen().await.expect("Failed to listen"); [INFO] [stdout] | ----^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `data` [INFO] [stdout] --> src/main.rs:46:45 [INFO] [stdout] | [INFO] [stdout] 46 | pub fn verify_piece(piece_index: usize, data: &[u8]) -> bool { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_data` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ST_NUM_STATES` is never used [INFO] [stdout] --> src/utp/common.rs:15:11 [INFO] [stdout] | [INFO] [stdout] 15 | pub const ST_NUM_STATES: u8 = 5; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MIN_RTO_MICROS` is never used [INFO] [stdout] --> src/utp/common.rs:22:11 [INFO] [stdout] | [INFO] [stdout] 22 | pub const MIN_RTO_MICROS: u32 = 500_000; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `UDP_IPV4_OVERHEAD` is never used [INFO] [stdout] --> src/utp/common.rs:26:11 [INFO] [stdout] | [INFO] [stdout] 26 | pub const UDP_IPV4_OVERHEAD: usize = 20 + 8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `UDP_IPV6_OVERHEAD` is never used [INFO] [stdout] --> src/utp/common.rs:27:11 [INFO] [stdout] | [INFO] [stdout] 27 | pub const UDP_IPV6_OVERHEAD: usize = 40 + 8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SEQ_NR_MASK` is never used [INFO] [stdout] --> src/utp/common.rs:31:11 [INFO] [stdout] | [INFO] [stdout] 31 | pub const SEQ_NR_MASK: u16 = 0xFFFF; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ACK_NR_MASK` is never used [INFO] [stdout] --> src/utp/common.rs:32:11 [INFO] [stdout] | [INFO] [stdout] 32 | pub const ACK_NR_MASK: u16 = 0xFFFF; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `TIMESTAMP_MASK` is never used [INFO] [stdout] --> src/utp/common.rs:33:11 [INFO] [stdout] | [INFO] [stdout] 33 | pub const TIMESTAMP_MASK: u32 = 0xFFFFFFFF; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DUPLICATE_ACKS_BEFORE_RESEND` is never used [INFO] [stdout] --> src/utp/common.rs:36:11 [INFO] [stdout] | [INFO] [stdout] 36 | pub const DUPLICATE_ACKS_BEFORE_RESEND: u32 = 3; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ACK_NR_ALLOWED_WINDOW` is never used [INFO] [stdout] --> src/utp/common.rs:37:11 [INFO] [stdout] | [INFO] [stdout] 37 | pub const ACK_NR_ALLOWED_WINDOW: u32 = DUPLICATE_ACKS_BEFORE_RESEND; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MAX_WINDOW_DECAY` is never used [INFO] [stdout] --> src/utp/common.rs:38:11 [INFO] [stdout] | [INFO] [stdout] 38 | pub const MAX_WINDOW_DECAY: i64 = 100; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `TIMEOUT_CHECK_INTERVAL` is never used [INFO] [stdout] --> src/utp/common.rs:41:11 [INFO] [stdout] | [INFO] [stdout] 41 | pub const TIMEOUT_CHECK_INTERVAL: u64 = 500; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `KEEPALIVE_INTERVAL` is never used [INFO] [stdout] --> src/utp/common.rs:42:11 [INFO] [stdout] | [INFO] [stdout] 42 | pub const KEEPALIVE_INTERVAL: u64 = 29000; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `CONNECT_TIMEOUT` is never used [INFO] [stdout] --> src/utp/common.rs:43:11 [INFO] [stdout] | [INFO] [stdout] 43 | pub const CONNECT_TIMEOUT: u64 = 6000; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DELAYED_ACK_TIME` is never used [INFO] [stdout] --> src/utp/common.rs:44:11 [INFO] [stdout] | [INFO] [stdout] 44 | pub const DELAYED_ACK_TIME: u64 = 20; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `REORDER_BUFFER_SIZE` is never used [INFO] [stdout] --> src/utp/common.rs:47:11 [INFO] [stdout] | [INFO] [stdout] 47 | pub const REORDER_BUFFER_SIZE: usize = 32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `REORDER_BUFFER_MAX_SIZE` is never used [INFO] [stdout] --> src/utp/common.rs:48:11 [INFO] [stdout] | [INFO] [stdout] 48 | pub const REORDER_BUFFER_MAX_SIZE: usize = 1024; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `OUTGOING_BUFFER_MAX_SIZE` is never used [INFO] [stdout] --> src/utp/common.rs:49:11 [INFO] [stdout] | [INFO] [stdout] 49 | pub const OUTGOING_BUFFER_MAX_SIZE: usize = 1024; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `InvalidPacket`, `MaxRetransmit`, and `WindowTooSmall` are never constructed [INFO] [stdout] --> src/utp/common.rs:96:5 [INFO] [stdout] | [INFO] [stdout] 86 | pub enum UtpError { [INFO] [stdout] | -------- variants in this enum [INFO] [stdout] ... [INFO] [stdout] 96 | InvalidPacket, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 104 | MaxRetransmit, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 105 | #[error("Window size too small")] [INFO] [stdout] 106 | WindowTooSmall, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `UtpError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `BandwidthType` is never used [INFO] [stdout] --> src/utp/common.rs:111:10 [INFO] [stdout] | [INFO] [stdout] 111 | pub enum BandwidthType { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `BandwidthType` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `now` and `as_millis` are never used [INFO] [stdout] --> src/utp/common.rs:124:12 [INFO] [stdout] | [INFO] [stdout] 123 | impl Timestamp { [INFO] [stdout] | -------------- associated items in this implementation [INFO] [stdout] 124 | pub fn now() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 130 | pub fn as_millis(&self) -> u64 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `current_millis` is never used [INFO] [stdout] --> src/utp/common.rs:168:8 [INFO] [stdout] | [INFO] [stdout] 168 | pub fn current_millis() -> u64 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `duplicate_acks_received`, `min_rtt`, and `max_rtt` are never read [INFO] [stdout] --> src/utp/common.rs:192:9 [INFO] [stdout] | [INFO] [stdout] 184 | pub struct UtpSocketStats { [INFO] [stdout] | -------------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 192 | pub duplicate_acks_received: u64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 193 | pub rtt_samples: u64, [INFO] [stdout] 194 | pub min_rtt: u32, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 195 | pub max_rtt: u32, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `UtpSocketStats` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SackExtensionHeader` is never constructed [INFO] [stdout] --> src/utp/packet.rs:26:12 [INFO] [stdout] | [INFO] [stdout] 26 | pub struct SackExtensionHeader { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `remote_addr` is never read [INFO] [stdout] --> src/utp/packet.rs:141:9 [INFO] [stdout] | [INFO] [stdout] 137 | pub struct UtpPacket { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 141 | pub remote_addr: SocketAddr, // Source/destination address [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `UtpPacket` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `local_addr` is never read [INFO] [stdout] --> src/utp/socket.rs:30:16 [INFO] [stdout] | [INFO] [stdout] 29 | pub struct UtpSocketInternal { [INFO] [stdout] | ----------------- field in this struct [INFO] [stdout] 30 | pub(crate) local_addr: SocketAddr, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_rtt`, `get_mtu_payload_size`, `is_send_buffer_empty`, and `accept_initialize` are never used [INFO] [stdout] --> src/utp/socket.rs:526:12 [INFO] [stdout] | [INFO] [stdout] 278 | impl UtpSocket { [INFO] [stdout] | -------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 526 | pub fn get_rtt(&self) -> u32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 530 | pub fn get_mtu_payload_size(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 534 | pub fn is_send_buffer_empty(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 546 | pub fn accept_initialize(&self, remote_addr: SocketAddr, syn_packet_ref: &UtpPacket) -> Result<(), UtpError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_seq_nr`, `get_ack_nr`, and `get_sent_packets` are never used [INFO] [stdout] --> src/utp/connection.rs:398:12 [INFO] [stdout] | [INFO] [stdout] 45 | impl Connection { [INFO] [stdout] | --------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 398 | pub fn get_seq_nr(&self) -> u16 { self.seq_nr } [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 399 | pub fn get_ack_nr(&self) -> u16 { self.ack_nr } [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 400 | pub fn get_sent_packets(&self) -> &HashMap { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/utp/congestion.rs:130:12 [INFO] [stdout] | [INFO] [stdout] 73 | impl CongestionControl { [INFO] [stdout] | ---------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 130 | pub fn can_send(&self, packet_size: usize) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 323 | pub fn on_congestion_event(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 334 | pub fn reset(&mut self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 351 | pub fn set_target_delay(&mut self, target_micros: u32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 356 | pub fn set_receive_window(&mut self, window_bytes: usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 361 | pub fn get_base_delay_micros(&self) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 366 | pub fn get_current_queuing_delay(&self) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 381 | pub fn get_slow_start_threshold(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `seq_nr` and `is_syn` are never read [INFO] [stdout] --> src/utp/reliability.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 18 | pub struct SentPacketInfo { [INFO] [stdout] | -------------- fields in this struct [INFO] [stdout] 19 | pub seq_nr: u16, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 24 | pub is_syn: bool, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `SentPacketInfo` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `clear_ooo_packets` is never used [INFO] [stdout] --> src/utp/reliability.rs:262:12 [INFO] [stdout] | [INFO] [stdout] 78 | impl ReliabilityManager { [INFO] [stdout] | ----------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 262 | pub fn clear_ooo_packets(&mut self) { self.received_ooo_seqs.clear(); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `incoming` is never read [INFO] [stdout] --> src/utp/socket_manager.rs:131:5 [INFO] [stdout] | [INFO] [stdout] 128 | pub struct UtpListener { [INFO] [stdout] | ----------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 131 | incoming: mpsc::Receiver>, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `accept` is never used [INFO] [stdout] --> src/utp/socket_manager.rs:136:18 [INFO] [stdout] | [INFO] [stdout] 135 | impl UtpListener { [INFO] [stdout] | ---------------- method in this implementation [INFO] [stdout] 136 | pub async fn accept(&mut self) -> Result<(UtpSocket, SocketAddr), UtpError> { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `announce` is never used [INFO] [stdout] --> src/main.rs:25:16 [INFO] [stdout] | [INFO] [stdout] 25 | pub fn announce(tracker_url: &str, torrent_hash: &str) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `request_piece` is never used [INFO] [stdout] --> src/main.rs:42:12 [INFO] [stdout] | [INFO] [stdout] 42 | pub fn request_piece(peer_id: &str, piece_index: usize) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `verify_piece` is never used [INFO] [stdout] --> src/main.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 46 | pub fn verify_piece(piece_index: usize, data: &[u8]) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 17.62s [INFO] running `Command { std: "docker" "inspect" "0f3e3aa6a15abda3768a54e5f014a84f679be367837f1f6e9c87bd91ffed6f79", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0f3e3aa6a15abda3768a54e5f014a84f679be367837f1f6e9c87bd91ffed6f79", kill_on_drop: false }` [INFO] [stdout] 0f3e3aa6a15abda3768a54e5f014a84f679be367837f1f6e9c87bd91ffed6f79