[INFO] cloning repository https://github.com/adam429/rust-server [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/adam429/rust-server" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fadam429%2Frust-server", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fadam429%2Frust-server'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 0039b207d5bde9d59e9b7df16d1bfd9c767cc7d8 [INFO] checking adam429/rust-server against try#4f260f0f20b3133d20cfb50353c0221943af5796+rustflags=-Dunmustuse_in_always_ok for pr-148577 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fadam429%2Frust-server" "/workspace/builds/worker-3-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/adam429/rust-server [INFO] finished tweaking git repo https://github.com/adam429/rust-server [INFO] tweaked toml for git repo https://github.com/adam429/rust-server written to /workspace/builds/worker-3-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/adam429/rust-server on toolchain 4f260f0f20b3133d20cfb50353c0221943af5796 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+4f260f0f20b3133d20cfb50353c0221943af5796" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/adam429/rust-server 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" "+4f260f0f20b3133d20cfb50353c0221943af5796" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:4848fb76d95f26979359cc7e45710b1dbc8f3acb7aeedee7c460d7702230f228" "/opt/rustwide/cargo-home/bin/cargo" "+4f260f0f20b3133d20cfb50353c0221943af5796" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 92311a0dfb1178f9982c15db3f0c7d9ff31d2235eb349105c912c4be38f991cf [INFO] running `Command { std: "docker" "start" "-a" "92311a0dfb1178f9982c15db3f0c7d9ff31d2235eb349105c912c4be38f991cf", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "92311a0dfb1178f9982c15db3f0c7d9ff31d2235eb349105c912c4be38f991cf", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "92311a0dfb1178f9982c15db3f0c7d9ff31d2235eb349105c912c4be38f991cf", kill_on_drop: false }` [INFO] [stdout] 92311a0dfb1178f9982c15db3f0c7d9ff31d2235eb349105c912c4be38f991cf [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid -Dunmustuse_in_always_ok" "-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:4848fb76d95f26979359cc7e45710b1dbc8f3acb7aeedee7c460d7702230f228" "/opt/rustwide/cargo-home/bin/cargo" "+4f260f0f20b3133d20cfb50353c0221943af5796" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] c4e6d2d564df20792617a56194b634a1cebc50d4293dbfa3a9b244c503e95fb2 [INFO] running `Command { std: "docker" "start" "-a" "c4e6d2d564df20792617a56194b634a1cebc50d4293dbfa3a9b244c503e95fb2", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.87 [INFO] [stderr] Compiling libc v0.2.159 [INFO] [stderr] Checking regex-automata v0.4.8 [INFO] [stderr] Checking tracing-log v0.2.0 [INFO] [stderr] Checking time v0.3.36 [INFO] [stderr] Checking chrono v0.4.38 [INFO] [stderr] Checking getrandom v0.2.15 [INFO] [stderr] Compiling quote v1.0.37 [INFO] [stderr] Compiling syn v2.0.79 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking regex v1.11.0 [INFO] [stderr] Compiling zerocopy-derive v0.7.35 [INFO] [stderr] Compiling serde_derive v1.0.210 [INFO] [stderr] Compiling tracing-attributes v0.1.27 [INFO] [stderr] Compiling thiserror-impl v1.0.64 [INFO] [stderr] Checking zerocopy v0.7.35 [INFO] [stderr] Checking tracing v0.1.40 [INFO] [stderr] Checking thiserror v1.0.64 [INFO] [stderr] Checking tracing-subscriber v0.3.18 [INFO] [stderr] Checking ppv-lite86 v0.2.20 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking tracing-appender v0.2.3 [INFO] [stderr] Checking serde v1.0.210 [INFO] [stderr] Checking toml v0.5.11 [INFO] [stderr] Checking serde_json v1.0.128 [INFO] [stderr] Checking server v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `tracing_subscriber::filter` [INFO] [stdout] --> src/bin/../controller.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use tracing_subscriber::filter; [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: `tracing_subscriber::filter` [INFO] [stdout] --> src/bin/../controller.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use tracing_subscriber::filter; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `client` is never read [INFO] [stdout] --> src/bin/../config.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct Config { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] 9 | pub server: ServerConfig, // 包含服务器相关配置的嵌套结构 [INFO] [stdout] 10 | pub client: ClientConfig, // 包含客户端相关配置的嵌套结构 [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `loss_rate` is never read [INFO] [stdout] --> src/bin/../config.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 15 | pub struct ServerConfig { [INFO] [stdout] | ------------ field in this struct [INFO] [stdout] 16 | pub address: String, // 服务器地址,如 "127.0.0.1:8080" [INFO] [stdout] 17 | pub loss_rate: f32, // 模拟网络丢包率,范围 0.0 到 1.0 [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `timeout`, `retry`, and `invocation_semantic` are never read [INFO] [stdout] --> src/bin/../config.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 22 | pub struct ClientConfig { [INFO] [stdout] | ------------ fields in this struct [INFO] [stdout] 23 | pub timeout: u32, // 客户端请求超时时间,单位可能是秒或毫秒 [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 24 | pub retry: u32, // 客户端重试次数 [INFO] [stdout] | ^^^^^ [INFO] [stdout] 25 | pub invocation_semantic: String, // 调用语义,可能的值如 "at-least-once", "at-most-once" 等 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `tracing_subscriber::filter` [INFO] [stdout] --> src/bin/../controller.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use tracing_subscriber::filter; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `client` is never read [INFO] [stdout] --> src/bin/../config.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct Config { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] 9 | pub server: ServerConfig, // 包含服务器相关配置的嵌套结构 [INFO] [stdout] 10 | pub client: ClientConfig, // 包含客户端相关配置的嵌套结构 [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `loss_rate` is never read [INFO] [stdout] --> src/bin/../config.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 15 | pub struct ServerConfig { [INFO] [stdout] | ------------ field in this struct [INFO] [stdout] 16 | pub address: String, // 服务器地址,如 "127.0.0.1:8080" [INFO] [stdout] 17 | pub loss_rate: f32, // 模拟网络丢包率,范围 0.0 到 1.0 [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `timeout`, `retry`, and `invocation_semantic` are never read [INFO] [stdout] --> src/bin/../config.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 22 | pub struct ClientConfig { [INFO] [stdout] | ------------ fields in this struct [INFO] [stdout] 23 | pub timeout: u32, // 客户端请求超时时间,单位可能是秒或毫秒 [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 24 | pub retry: u32, // 客户端重试次数 [INFO] [stdout] | ^^^^^ [INFO] [stdout] 25 | pub invocation_semantic: String, // 调用语义,可能的值如 "at-least-once", "at-most-once" 等 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::str` [INFO] [stdout] --> src/bin/client.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::str; [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: `tracing_subscriber::filter` [INFO] [stdout] --> src/bin/../controller.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use tracing_subscriber::filter; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `remove_flight` and `clear_flights` are never used [INFO] [stdout] --> src/bin/../controller.rs:267:12 [INFO] [stdout] | [INFO] [stdout] 20 | impl FlightController { [INFO] [stdout] | --------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 267 | pub fn remove_flight(&mut self, flight_id: i32) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 271 | pub fn clear_flights(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Array` is never constructed [INFO] [stdout] --> src/bin/../serialization.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 16 | pub enum DataType { [INFO] [stdout] | -------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 21 | Array, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `DataType` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_u8` is never used [INFO] [stdout] --> src/bin/../serialization.rs:39:8 [INFO] [stdout] | [INFO] [stdout] 25 | impl DataType { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 39 | fn from_u8(value: u8) -> Option { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `serialize_array` is never used [INFO] [stdout] --> src/bin/../serialization.rs:104:12 [INFO] [stdout] | [INFO] [stdout] 58 | impl Serializer { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 104 | pub fn serialize_array(&mut self, array: &[T]) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Deserializer` is never constructed [INFO] [stdout] --> src/bin/../serialization.rs:177:12 [INFO] [stdout] | [INFO] [stdout] 177 | pub struct Deserializer<'a> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/bin/../serialization.rs:184:12 [INFO] [stdout] | [INFO] [stdout] 182 | impl<'a> Deserializer<'a> { [INFO] [stdout] | ------------------------- associated items in this implementation [INFO] [stdout] 183 | /// Creates a new Deserializer with the given buffer and byte order. [INFO] [stdout] 184 | pub fn new(buffer: &'a [u8], byte_order: ByteOrder) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 192 | fn read_type(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 199 | pub fn deserialize_next(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 221 | pub fn deserialize_int32(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 229 | pub fn deserialize_bool(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 234 | pub fn deserialize_string(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 243 | pub fn deserialize_float(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 251 | pub fn deserialize_array(&mut self, deserialize_item: F) -> std::io::Result> [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 265 | pub fn deserialize_map( [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Int32`, `Bool`, `String`, `Float`, `Array`, and `Map` are never constructed [INFO] [stdout] --> src/bin/../serialization.rs:290:5 [INFO] [stdout] | [INFO] [stdout] 289 | pub enum Value { [INFO] [stdout] | ----- variants in this enum [INFO] [stdout] 290 | Int32(i32), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 291 | Bool(bool), [INFO] [stdout] | ^^^^ [INFO] [stdout] 292 | String(String), [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 293 | Float(f32), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 294 | Array(Vec), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 295 | Map(HashMap), [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Value` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `ResetFlights` is never constructed [INFO] [stdout] --> src/bin/../flight_models.rs:55:5 [INFO] [stdout] | [INFO] [stdout] 17 | pub enum Request { [INFO] [stdout] | ------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 55 | ResetFlights, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Request` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: this type will no longer be must used: Result [INFO] [stdout] --> src/bin/../controller.rs:91:71 [INFO] [stdout] | [INFO] [stdout] 91 | let monitor_result = self.start_monitoring(flight_id, monitor_interval.try_into().unwrap(), client_addr.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: requested on the command line with `-D unmustuse-in-always-ok` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `server` (bin "demo_flight_controller" test) due to 1 previous error; 9 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] warning: unused import: `std::str` [INFO] [stdout] --> src/bin/client.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::str; [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: `tracing_subscriber::filter` [INFO] [stdout] --> src/bin/../controller.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use tracing_subscriber::filter; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `client` is never read [INFO] [stdout] --> src/bin/../config.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct Config { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] 9 | pub server: ServerConfig, // 包含服务器相关配置的嵌套结构 [INFO] [stdout] 10 | pub client: ClientConfig, // 包含客户端相关配置的嵌套结构 [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `loss_rate` is never read [INFO] [stdout] --> src/bin/../config.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 15 | pub struct ServerConfig { [INFO] [stdout] | ------------ field in this struct [INFO] [stdout] 16 | pub address: String, // 服务器地址,如 "127.0.0.1:8080" [INFO] [stdout] 17 | pub loss_rate: f32, // 模拟网络丢包率,范围 0.0 到 1.0 [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `timeout`, `retry`, and `invocation_semantic` are never read [INFO] [stdout] --> src/bin/../config.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 22 | pub struct ClientConfig { [INFO] [stdout] | ------------ fields in this struct [INFO] [stdout] 23 | pub timeout: u32, // 客户端请求超时时间,单位可能是秒或毫秒 [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 24 | pub retry: u32, // 客户端重试次数 [INFO] [stdout] | ^^^^^ [INFO] [stdout] 25 | pub invocation_semantic: String, // 调用语义,可能的值如 "at-least-once", "at-most-once" 等 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `tracing_subscriber::filter` [INFO] [stdout] --> src/bin/../controller.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use tracing_subscriber::filter; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `client` is never read [INFO] [stdout] --> src/bin/../config.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct Config { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] 9 | pub server: ServerConfig, // 包含服务器相关配置的嵌套结构 [INFO] [stdout] 10 | pub client: ClientConfig, // 包含客户端相关配置的嵌套结构 [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `loss_rate` is never read [INFO] [stdout] --> src/bin/../config.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 15 | pub struct ServerConfig { [INFO] [stdout] | ------------ field in this struct [INFO] [stdout] 16 | pub address: String, // 服务器地址,如 "127.0.0.1:8080" [INFO] [stdout] 17 | pub loss_rate: f32, // 模拟网络丢包率,范围 0.0 到 1.0 [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `timeout`, `retry`, and `invocation_semantic` are never read [INFO] [stdout] --> src/bin/../config.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 22 | pub struct ClientConfig { [INFO] [stdout] | ------------ fields in this struct [INFO] [stdout] 23 | pub timeout: u32, // 客户端请求超时时间,单位可能是秒或毫秒 [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 24 | pub retry: u32, // 客户端重试次数 [INFO] [stdout] | ^^^^^ [INFO] [stdout] 25 | pub invocation_semantic: String, // 调用语义,可能的值如 "at-least-once", "at-most-once" 等 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `remove_flight` and `clear_flights` are never used [INFO] [stdout] --> src/bin/../controller.rs:267:12 [INFO] [stdout] | [INFO] [stdout] 20 | impl FlightController { [INFO] [stdout] | --------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 267 | pub fn remove_flight(&mut self, flight_id: i32) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 271 | pub fn clear_flights(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Array` is never constructed [INFO] [stdout] --> src/bin/../serialization.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 16 | pub enum DataType { [INFO] [stdout] | -------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 21 | Array, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `DataType` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_u8` is never used [INFO] [stdout] --> src/bin/../serialization.rs:39:8 [INFO] [stdout] | [INFO] [stdout] 25 | impl DataType { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 39 | fn from_u8(value: u8) -> Option { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `serialize_array` is never used [INFO] [stdout] --> src/bin/../serialization.rs:104:12 [INFO] [stdout] | [INFO] [stdout] 58 | impl Serializer { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 104 | pub fn serialize_array(&mut self, array: &[T]) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Deserializer` is never constructed [INFO] [stdout] --> src/bin/../serialization.rs:177:12 [INFO] [stdout] | [INFO] [stdout] 177 | pub struct Deserializer<'a> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/bin/../serialization.rs:184:12 [INFO] [stdout] | [INFO] [stdout] 182 | impl<'a> Deserializer<'a> { [INFO] [stdout] | ------------------------- associated items in this implementation [INFO] [stdout] 183 | /// Creates a new Deserializer with the given buffer and byte order. [INFO] [stdout] 184 | pub fn new(buffer: &'a [u8], byte_order: ByteOrder) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 192 | fn read_type(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 199 | pub fn deserialize_next(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 221 | pub fn deserialize_int32(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 229 | pub fn deserialize_bool(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 234 | pub fn deserialize_string(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 243 | pub fn deserialize_float(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 251 | pub fn deserialize_array(&mut self, deserialize_item: F) -> std::io::Result> [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 265 | pub fn deserialize_map( [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Int32`, `Bool`, `String`, `Float`, `Array`, and `Map` are never constructed [INFO] [stdout] --> src/bin/../serialization.rs:290:5 [INFO] [stdout] | [INFO] [stdout] 289 | pub enum Value { [INFO] [stdout] | ----- variants in this enum [INFO] [stdout] 290 | Int32(i32), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 291 | Bool(bool), [INFO] [stdout] | ^^^^ [INFO] [stdout] 292 | String(String), [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 293 | Float(f32), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 294 | Array(Vec), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 295 | Map(HashMap), [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Value` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `ResetFlights` is never constructed [INFO] [stdout] --> src/bin/../flight_models.rs:55:5 [INFO] [stdout] | [INFO] [stdout] 17 | pub enum Request { [INFO] [stdout] | ------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 55 | ResetFlights, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Request` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: this type will no longer be must used: Result [INFO] [stdout] --> src/bin/../controller.rs:91:71 [INFO] [stdout] | [INFO] [stdout] 91 | let monitor_result = self.start_monitoring(flight_id, monitor_interval.try_into().unwrap(), client_addr.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: requested on the command line with `-D unmustuse-in-always-ok` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `server` (bin "demo_flight_controller") due to 1 previous error; 9 warnings emitted [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/server.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | let mut flight_controller = &mut init_flight_controller(); [INFO] [stdout] | ----^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `client_addr` [INFO] [stdout] --> src/bin/server.rs:185:9 [INFO] [stdout] | [INFO] [stdout] 185 | let client_addr = src.to_string(); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_client_addr` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `payload` [INFO] [stdout] --> src/bin/server.rs:333:18 [INFO] [stdout] | [INFO] [stdout] 333 | fn reset_flights(payload: &HashMap, controller: &mut FlightController, socket: &UdpSocket) -> Result src/bin/server.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 66 | struct RequestInfo { [INFO] [stdout] | ----------- field in this struct [INFO] [stdout] 67 | timestamp: NaiveDateTime, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `client` is never read [INFO] [stdout] --> src/bin/../config.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct Config { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] 9 | pub server: ServerConfig, // 包含服务器相关配置的嵌套结构 [INFO] [stdout] 10 | pub client: ClientConfig, // 包含客户端相关配置的嵌套结构 [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `timeout`, `retry`, and `invocation_semantic` are never read [INFO] [stdout] --> src/bin/../config.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 22 | pub struct ClientConfig { [INFO] [stdout] | ------------ fields in this struct [INFO] [stdout] 23 | pub timeout: u32, // 客户端请求超时时间,单位可能是秒或毫秒 [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 24 | pub retry: u32, // 客户端重试次数 [INFO] [stdout] | ^^^^^ [INFO] [stdout] 25 | pub invocation_semantic: String, // 调用语义,可能的值如 "at-least-once", "at-most-once" 等 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `flights`, `remove_flight`, and `clear_flights` are never used [INFO] [stdout] --> src/bin/../controller.rs:258:12 [INFO] [stdout] | [INFO] [stdout] 20 | impl FlightController { [INFO] [stdout] | --------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 258 | pub fn flights(&self) -> &HashMap { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 267 | pub fn remove_flight(&mut self, flight_id: i32) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 271 | pub fn clear_flights(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Array` is never constructed [INFO] [stdout] --> src/bin/../serialization.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 16 | pub enum DataType { [INFO] [stdout] | -------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 21 | Array, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `DataType` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_u8` is never used [INFO] [stdout] --> src/bin/../serialization.rs:39:8 [INFO] [stdout] | [INFO] [stdout] 25 | impl DataType { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 39 | fn from_u8(value: u8) -> Option { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `serialize_array` is never used [INFO] [stdout] --> src/bin/../serialization.rs:104:12 [INFO] [stdout] | [INFO] [stdout] 58 | impl Serializer { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 104 | pub fn serialize_array(&mut self, array: &[T]) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Deserializer` is never constructed [INFO] [stdout] --> src/bin/../serialization.rs:177:12 [INFO] [stdout] | [INFO] [stdout] 177 | pub struct Deserializer<'a> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/bin/../serialization.rs:184:12 [INFO] [stdout] | [INFO] [stdout] 182 | impl<'a> Deserializer<'a> { [INFO] [stdout] | ------------------------- associated items in this implementation [INFO] [stdout] 183 | /// Creates a new Deserializer with the given buffer and byte order. [INFO] [stdout] 184 | pub fn new(buffer: &'a [u8], byte_order: ByteOrder) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 192 | fn read_type(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 199 | pub fn deserialize_next(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 221 | pub fn deserialize_int32(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 229 | pub fn deserialize_bool(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 234 | pub fn deserialize_string(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 243 | pub fn deserialize_float(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 251 | pub fn deserialize_array(&mut self, deserialize_item: F) -> std::io::Result> [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 265 | pub fn deserialize_map( [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Int32`, `Bool`, `String`, `Float`, `Array`, and `Map` are never constructed [INFO] [stdout] --> src/bin/../serialization.rs:290:5 [INFO] [stdout] | [INFO] [stdout] 289 | pub enum Value { [INFO] [stdout] | ----- variants in this enum [INFO] [stdout] 290 | Int32(i32), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 291 | Bool(bool), [INFO] [stdout] | ^^^^ [INFO] [stdout] 292 | String(String), [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 293 | Float(f32), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 294 | Array(Vec), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 295 | Map(HashMap), [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Value` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: this type will no longer be must used: Result [INFO] [stdout] --> src/bin/../controller.rs:91:71 [INFO] [stdout] | [INFO] [stdout] 91 | let monitor_result = self.start_monitoring(flight_id, monitor_interval.try_into().unwrap(), client_addr.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: requested on the command line with `-D unmustuse-in-always-ok` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `server` (bin "server" test) due to 1 previous error; 14 warnings emitted [INFO] [stdout] warning: method `serialize_array` is never used [INFO] [stdout] --> src/bin/../serialization.rs:104:12 [INFO] [stdout] | [INFO] [stdout] 58 | impl Serializer { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 104 | pub fn serialize_array(&mut self, array: &[T]) -> std::io::Result<()> { [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 `FlightController` is never constructed [INFO] [stdout] --> src/bin/../controller.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 13 | pub struct FlightController { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/bin/../controller.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 20 | impl FlightController { [INFO] [stdout] | --------------------- associated items in this implementation [INFO] [stdout] 21 | /// Creates a new FlightController instance [INFO] [stdout] 22 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 30 | pub fn handle_request(&mut self, request: Request, socket: &UdpSocket, client_addr: Option) -> Response { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 122 | fn query_flight_ids(&self, source: &str, destination: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 131 | fn reserve_seats(&mut self, flight_id: i32, seats: i32) -> Result<(), String> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 145 | fn start_monitoring(&mut self, flight_id: i32, monitor_interval: i32, client_addr: std::net::SocketAddr) -> Result<(), String> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 164 | fn prepare_monitoring_updates(&self, flight_id: i32) -> Vec<(std::net::SocketAddr, FlightUpdate)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 181 | fn clean_expired_monitors(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 190 | fn reserve_seats_cheapest_price(&mut self, source: &str, destination: &str) -> Result<(), String> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 228 | fn reserve_seats_below_price(&mut self, source: &str, destination: &str, max_price: f32) -> Result<(), String> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 258 | pub fn flights(&self) -> &HashMap { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 263 | pub fn add_flight(&mut self, flight: Flight) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 267 | pub fn remove_flight(&mut self, flight_id: i32) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 271 | pub fn clear_flights(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 276 | pub fn reset_flights(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `DataType` is never used [INFO] [stdout] --> src/bin/../serialization.rs:16:10 [INFO] [stdout] | [INFO] [stdout] 16 | pub enum DataType { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `to_u8` and `from_u8` are never used [INFO] [stdout] --> src/bin/../serialization.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 25 | impl DataType { [INFO] [stdout] | ------------- associated items in this implementation [INFO] [stdout] 26 | /// Converts the DataType to its corresponding u8 representation. [INFO] [stdout] 27 | fn to_u8(self) -> u8 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 39 | fn from_u8(value: u8) -> Option { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Serializer` is never constructed [INFO] [stdout] --> src/bin/../serialization.rs:53:12 [INFO] [stdout] | [INFO] [stdout] 53 | pub struct Serializer { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/bin/../serialization.rs:60:12 [INFO] [stdout] | [INFO] [stdout] 58 | impl Serializer { [INFO] [stdout] | --------------- associated items in this implementation [INFO] [stdout] 59 | /// Creates a new Serializer with the specified byte order. [INFO] [stdout] 60 | pub fn new(byte_order: ByteOrder) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 68 | fn write_type(&mut self, data_type: DataType) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 73 | pub fn serialize_int32(&mut self, value: i32) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 82 | pub fn serialize_bool(&mut self, value: bool) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 88 | pub fn serialize_string(&mut self, value: &str) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 95 | pub fn serialize_float(&mut self, value: f32) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 104 | pub fn serialize_array(&mut self, array: &[T]) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 114 | pub fn serialize_map(&mut self, map: &HashMap) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 119 | pub fn get_buffer(self) -> Vec { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Serialize` is never used [INFO] [stdout] --> src/bin/../serialization.rs:125:11 [INFO] [stdout] | [INFO] [stdout] 125 | pub trait Serialize { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Deserializer` is never constructed [INFO] [stdout] --> src/bin/../serialization.rs:177:12 [INFO] [stdout] | [INFO] [stdout] 177 | pub struct Deserializer<'a> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/bin/../serialization.rs:184:12 [INFO] [stdout] | [INFO] [stdout] 182 | impl<'a> Deserializer<'a> { [INFO] [stdout] | ------------------------- associated items in this implementation [INFO] [stdout] 183 | /// Creates a new Deserializer with the given buffer and byte order. [INFO] [stdout] 184 | pub fn new(buffer: &'a [u8], byte_order: ByteOrder) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 192 | fn read_type(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 199 | pub fn deserialize_next(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 221 | pub fn deserialize_int32(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 229 | pub fn deserialize_bool(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 234 | pub fn deserialize_string(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 243 | pub fn deserialize_float(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 251 | pub fn deserialize_array(&mut self, deserialize_item: F) -> std::io::Result> [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 265 | pub fn deserialize_map( [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Int32`, `Bool`, `String`, `Float`, `Array`, and `Map` are never constructed [INFO] [stdout] --> src/bin/../serialization.rs:290:5 [INFO] [stdout] | [INFO] [stdout] 289 | pub enum Value { [INFO] [stdout] | ----- variants in this enum [INFO] [stdout] 290 | Int32(i32), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 291 | Bool(bool), [INFO] [stdout] | ^^^^ [INFO] [stdout] 292 | String(String), [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 293 | Float(f32), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 294 | Array(Vec), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 295 | Map(HashMap), [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Value` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Flight` is never constructed [INFO] [stdout] --> src/bin/../flight_models.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct Flight { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MonitoringClient` is never constructed [INFO] [stdout] --> src/bin/../flight_models.rs:101:12 [INFO] [stdout] | [INFO] [stdout] 101 | pub struct MonitoringClient { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `loss_rate` is never read [INFO] [stdout] --> src/bin/../config.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 15 | pub struct ServerConfig { [INFO] [stdout] | ------------ field in this struct [INFO] [stdout] 16 | pub address: String, // 服务器地址,如 "127.0.0.1:8080" [INFO] [stdout] 17 | pub loss_rate: f32, // 模拟网络丢包率,范围 0.0 到 1.0 [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: this type will no longer be must used: Result [INFO] [stdout] --> src/bin/../controller.rs:91:71 [INFO] [stdout] | [INFO] [stdout] 91 | let monitor_result = self.start_monitoring(flight_id, monitor_interval.try_into().unwrap(), client_addr.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: requested on the command line with `-D unmustuse-in-always-ok` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `server` (bin "client") due to 1 previous error; 16 warnings emitted [INFO] [stdout] warning: method `serialize_array` is never used [INFO] [stdout] --> src/bin/../serialization.rs:104:12 [INFO] [stdout] | [INFO] [stdout] 58 | impl Serializer { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 104 | pub fn serialize_array(&mut self, array: &[T]) -> std::io::Result<()> { [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 `FlightController` is never constructed [INFO] [stdout] --> src/bin/../controller.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 13 | pub struct FlightController { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/bin/../controller.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 20 | impl FlightController { [INFO] [stdout] | --------------------- associated items in this implementation [INFO] [stdout] 21 | /// Creates a new FlightController instance [INFO] [stdout] 22 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 30 | pub fn handle_request(&mut self, request: Request, socket: &UdpSocket, client_addr: Option) -> Response { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 122 | fn query_flight_ids(&self, source: &str, destination: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 131 | fn reserve_seats(&mut self, flight_id: i32, seats: i32) -> Result<(), String> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 145 | fn start_monitoring(&mut self, flight_id: i32, monitor_interval: i32, client_addr: std::net::SocketAddr) -> Result<(), String> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 164 | fn prepare_monitoring_updates(&self, flight_id: i32) -> Vec<(std::net::SocketAddr, FlightUpdate)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 181 | fn clean_expired_monitors(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 190 | fn reserve_seats_cheapest_price(&mut self, source: &str, destination: &str) -> Result<(), String> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 228 | fn reserve_seats_below_price(&mut self, source: &str, destination: &str, max_price: f32) -> Result<(), String> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 258 | pub fn flights(&self) -> &HashMap { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 263 | pub fn add_flight(&mut self, flight: Flight) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 267 | pub fn remove_flight(&mut self, flight_id: i32) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 271 | pub fn clear_flights(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 276 | pub fn reset_flights(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `DataType` is never used [INFO] [stdout] --> src/bin/../serialization.rs:16:10 [INFO] [stdout] | [INFO] [stdout] 16 | pub enum DataType { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `to_u8` and `from_u8` are never used [INFO] [stdout] --> src/bin/../serialization.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 25 | impl DataType { [INFO] [stdout] | ------------- associated items in this implementation [INFO] [stdout] 26 | /// Converts the DataType to its corresponding u8 representation. [INFO] [stdout] 27 | fn to_u8(self) -> u8 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 39 | fn from_u8(value: u8) -> Option { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Serializer` is never constructed [INFO] [stdout] --> src/bin/../serialization.rs:53:12 [INFO] [stdout] | [INFO] [stdout] 53 | pub struct Serializer { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/bin/../serialization.rs:60:12 [INFO] [stdout] | [INFO] [stdout] 58 | impl Serializer { [INFO] [stdout] | --------------- associated items in this implementation [INFO] [stdout] 59 | /// Creates a new Serializer with the specified byte order. [INFO] [stdout] 60 | pub fn new(byte_order: ByteOrder) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 68 | fn write_type(&mut self, data_type: DataType) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 73 | pub fn serialize_int32(&mut self, value: i32) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 82 | pub fn serialize_bool(&mut self, value: bool) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 88 | pub fn serialize_string(&mut self, value: &str) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 95 | pub fn serialize_float(&mut self, value: f32) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 104 | pub fn serialize_array(&mut self, array: &[T]) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 114 | pub fn serialize_map(&mut self, map: &HashMap) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 119 | pub fn get_buffer(self) -> Vec { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Serialize` is never used [INFO] [stdout] --> src/bin/../serialization.rs:125:11 [INFO] [stdout] | [INFO] [stdout] 125 | pub trait Serialize { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Deserializer` is never constructed [INFO] [stdout] --> src/bin/../serialization.rs:177:12 [INFO] [stdout] | [INFO] [stdout] 177 | pub struct Deserializer<'a> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/bin/../serialization.rs:184:12 [INFO] [stdout] | [INFO] [stdout] 182 | impl<'a> Deserializer<'a> { [INFO] [stdout] | ------------------------- associated items in this implementation [INFO] [stdout] 183 | /// Creates a new Deserializer with the given buffer and byte order. [INFO] [stdout] 184 | pub fn new(buffer: &'a [u8], byte_order: ByteOrder) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 192 | fn read_type(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 199 | pub fn deserialize_next(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 221 | pub fn deserialize_int32(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 229 | pub fn deserialize_bool(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 234 | pub fn deserialize_string(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 243 | pub fn deserialize_float(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 251 | pub fn deserialize_array(&mut self, deserialize_item: F) -> std::io::Result> [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 265 | pub fn deserialize_map( [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Int32`, `Bool`, `String`, `Float`, `Array`, and `Map` are never constructed [INFO] [stdout] --> src/bin/../serialization.rs:290:5 [INFO] [stdout] | [INFO] [stdout] 289 | pub enum Value { [INFO] [stdout] | ----- variants in this enum [INFO] [stdout] 290 | Int32(i32), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 291 | Bool(bool), [INFO] [stdout] | ^^^^ [INFO] [stdout] 292 | String(String), [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 293 | Float(f32), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 294 | Array(Vec), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 295 | Map(HashMap), [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Value` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Flight` is never constructed [INFO] [stdout] --> src/bin/../flight_models.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct Flight { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MonitoringClient` is never constructed [INFO] [stdout] --> src/bin/../flight_models.rs:101:12 [INFO] [stdout] | [INFO] [stdout] 101 | pub struct MonitoringClient { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `loss_rate` is never read [INFO] [stdout] --> src/bin/../config.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 15 | pub struct ServerConfig { [INFO] [stdout] | ------------ field in this struct [INFO] [stdout] 16 | pub address: String, // 服务器地址,如 "127.0.0.1:8080" [INFO] [stdout] 17 | pub loss_rate: f32, // 模拟网络丢包率,范围 0.0 到 1.0 [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: this type will no longer be must used: Result [INFO] [stdout] --> src/bin/../controller.rs:91:71 [INFO] [stdout] | [INFO] [stdout] 91 | let monitor_result = self.start_monitoring(flight_id, monitor_interval.try_into().unwrap(), client_addr.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: requested on the command line with `-D unmustuse-in-always-ok` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `server` (bin "client" test) due to 1 previous error; 16 warnings emitted [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/server.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | let mut flight_controller = &mut init_flight_controller(); [INFO] [stdout] | ----^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `client_addr` [INFO] [stdout] --> src/bin/server.rs:185:9 [INFO] [stdout] | [INFO] [stdout] 185 | let client_addr = src.to_string(); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_client_addr` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `payload` [INFO] [stdout] --> src/bin/server.rs:333:18 [INFO] [stdout] | [INFO] [stdout] 333 | fn reset_flights(payload: &HashMap, controller: &mut FlightController, socket: &UdpSocket) -> Result src/bin/server.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 66 | struct RequestInfo { [INFO] [stdout] | ----------- field in this struct [INFO] [stdout] 67 | timestamp: NaiveDateTime, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `client` is never read [INFO] [stdout] --> src/bin/../config.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct Config { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] 9 | pub server: ServerConfig, // 包含服务器相关配置的嵌套结构 [INFO] [stdout] 10 | pub client: ClientConfig, // 包含客户端相关配置的嵌套结构 [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `timeout`, `retry`, and `invocation_semantic` are never read [INFO] [stdout] --> src/bin/../config.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 22 | pub struct ClientConfig { [INFO] [stdout] | ------------ fields in this struct [INFO] [stdout] 23 | pub timeout: u32, // 客户端请求超时时间,单位可能是秒或毫秒 [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 24 | pub retry: u32, // 客户端重试次数 [INFO] [stdout] | ^^^^^ [INFO] [stdout] 25 | pub invocation_semantic: String, // 调用语义,可能的值如 "at-least-once", "at-most-once" 等 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `flights`, `remove_flight`, and `clear_flights` are never used [INFO] [stdout] --> src/bin/../controller.rs:258:12 [INFO] [stdout] | [INFO] [stdout] 20 | impl FlightController { [INFO] [stdout] | --------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 258 | pub fn flights(&self) -> &HashMap { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 267 | pub fn remove_flight(&mut self, flight_id: i32) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 271 | pub fn clear_flights(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Array` is never constructed [INFO] [stdout] --> src/bin/../serialization.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 16 | pub enum DataType { [INFO] [stdout] | -------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 21 | Array, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `DataType` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_u8` is never used [INFO] [stdout] --> src/bin/../serialization.rs:39:8 [INFO] [stdout] | [INFO] [stdout] 25 | impl DataType { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 39 | fn from_u8(value: u8) -> Option { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `serialize_array` is never used [INFO] [stdout] --> src/bin/../serialization.rs:104:12 [INFO] [stdout] | [INFO] [stdout] 58 | impl Serializer { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 104 | pub fn serialize_array(&mut self, array: &[T]) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Deserializer` is never constructed [INFO] [stdout] --> src/bin/../serialization.rs:177:12 [INFO] [stdout] | [INFO] [stdout] 177 | pub struct Deserializer<'a> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/bin/../serialization.rs:184:12 [INFO] [stdout] | [INFO] [stdout] 182 | impl<'a> Deserializer<'a> { [INFO] [stdout] | ------------------------- associated items in this implementation [INFO] [stdout] 183 | /// Creates a new Deserializer with the given buffer and byte order. [INFO] [stdout] 184 | pub fn new(buffer: &'a [u8], byte_order: ByteOrder) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 192 | fn read_type(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 199 | pub fn deserialize_next(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 221 | pub fn deserialize_int32(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 229 | pub fn deserialize_bool(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 234 | pub fn deserialize_string(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 243 | pub fn deserialize_float(&mut self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 251 | pub fn deserialize_array(&mut self, deserialize_item: F) -> std::io::Result> [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 265 | pub fn deserialize_map( [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Int32`, `Bool`, `String`, `Float`, `Array`, and `Map` are never constructed [INFO] [stdout] --> src/bin/../serialization.rs:290:5 [INFO] [stdout] | [INFO] [stdout] 289 | pub enum Value { [INFO] [stdout] | ----- variants in this enum [INFO] [stdout] 290 | Int32(i32), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 291 | Bool(bool), [INFO] [stdout] | ^^^^ [INFO] [stdout] 292 | String(String), [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 293 | Float(f32), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 294 | Array(Vec), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 295 | Map(HashMap), [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Value` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: this type will no longer be must used: Result [INFO] [stdout] --> src/bin/../controller.rs:91:71 [INFO] [stdout] | [INFO] [stdout] 91 | let monitor_result = self.start_monitoring(flight_id, monitor_interval.try_into().unwrap(), client_addr.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: requested on the command line with `-D unmustuse-in-always-ok` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `server` (bin "server") due to 1 previous error; 14 warnings emitted [INFO] running `Command { std: "docker" "inspect" "c4e6d2d564df20792617a56194b634a1cebc50d4293dbfa3a9b244c503e95fb2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c4e6d2d564df20792617a56194b634a1cebc50d4293dbfa3a9b244c503e95fb2", kill_on_drop: false }` [INFO] [stdout] c4e6d2d564df20792617a56194b634a1cebc50d4293dbfa3a9b244c503e95fb2