[INFO] cloning repository https://github.com/1mmunity/chattr [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/1mmunity/chattr" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2F1mmunity%2Fchattr", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2F1mmunity%2Fchattr'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] a8a90748d12979bc1e23547214d74cde2dbb068e [INFO] testing 1mmunity/chattr against try#8de4c7234dd9b97c9d76b58671343fdbbc9a433e+target=x86_64-unknown-linux-musl for musl_upgrade_1_2_5_with_libc_patch_0 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2F1mmunity%2Fchattr" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/1mmunity/chattr [INFO] finished tweaking git repo https://github.com/1mmunity/chattr [INFO] tweaked toml for git repo https://github.com/1mmunity/chattr written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/1mmunity/chattr on toolchain 8de4c7234dd9b97c9d76b58671343fdbbc9a433e [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/1mmunity/chattr 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" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded tungstenite v0.14.0 [INFO] [stderr] Downloaded tokio-rustls v0.22.0 [INFO] [stderr] Downloaded phf_shared v0.10.0 [INFO] [stderr] Downloaded warp v0.3.2 [INFO] [stderr] Downloaded dotenv_codegen_implementation v0.15.0 [INFO] [stderr] Downloaded simple_asn1 v0.4.1 [INFO] [stderr] Downloaded buf_redux v0.8.4 [INFO] [stderr] Downloaded mobc v0.7.3 [INFO] [stderr] Downloaded base64 v0.12.3 [INFO] [stderr] Downloaded headers v0.3.5 [INFO] [stderr] Downloaded tokio-postgres v0.7.5 [INFO] [stderr] Downloaded syn v1.0.85 [INFO] [stderr] Downloaded chrono v0.4.19 [INFO] [stderr] Downloaded rustls v0.19.1 [INFO] [stderr] Downloaded h2 v0.3.10 [INFO] [stderr] Downloaded twoway v0.1.8 [INFO] [stderr] Downloaded hmac v0.12.0 [INFO] [stderr] Downloaded postgres-types v0.2.2 [INFO] [stderr] Downloaded tempfile v3.3.0 [INFO] [stderr] Downloaded jsonwebtoken v7.2.0 [INFO] [stderr] Downloaded futures-timer v3.0.2 [INFO] [stderr] Downloaded mobc-postgres v0.7.0 [INFO] [stderr] Downloaded crypto-common v0.1.1 [INFO] [stderr] Downloaded sha2 v0.10.1 [INFO] [stderr] Downloaded postgres-protocol v0.6.3 [INFO] [stderr] Downloaded validator_derive v0.14.0 [INFO] [stderr] Downloaded validator v0.14.0 [INFO] [stderr] Downloaded unicase v2.6.0 [INFO] [stderr] Downloaded mime_guess v2.0.3 [INFO] [stderr] Downloaded safemem v0.3.3 [INFO] [stderr] Downloaded fastrand v1.6.0 [INFO] [stderr] Downloaded multipart v0.18.0 [INFO] [stderr] Downloaded dotenv_codegen v0.15.0 [INFO] [stderr] Downloaded pem v0.8.3 [INFO] [stderr] Downloaded siphasher v0.3.7 [INFO] [stderr] Downloaded phf v0.10.1 [INFO] [stderr] Downloaded time v0.1.44 [INFO] [stderr] Downloaded md-5 v0.10.0 [INFO] [stderr] Downloaded block-buffer v0.10.0 [INFO] [stderr] Downloaded digest v0.10.1 [INFO] [stderr] Downloaded if_chain v1.0.2 [INFO] [stderr] Downloaded validator_types v0.14.0 [INFO] [stderr] Downloaded headers-core v0.2.0 [INFO] [stderr] Downloaded sct v0.6.1 [INFO] [stderr] Downloaded wasi v0.10.0+wasi-snapshot-preview1 [INFO] [stderr] Downloaded tokio-tungstenite v0.15.0 [INFO] [stderr] Downloaded utf-8 v0.7.6 [INFO] [stderr] Downloaded cap v0.1.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] bd122e6d874808d845c44a3190b60946595d8e585502a5539ee6f636cf7a14a2 [INFO] running `Command { std: "docker" "start" "-a" "bd122e6d874808d845c44a3190b60946595d8e585502a5539ee6f636cf7a14a2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "bd122e6d874808d845c44a3190b60946595d8e585502a5539ee6f636cf7a14a2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "bd122e6d874808d845c44a3190b60946595d8e585502a5539ee6f636cf7a14a2", kill_on_drop: false }` [INFO] [stdout] bd122e6d874808d845c44a3190b60946595d8e585502a5539ee6f636cf7a14a2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "build" "--frozen" "--message-format=json" "--target" "x86_64-unknown-linux-musl", kill_on_drop: false }` [INFO] [stdout] 365d11304e4b53f3cc82312be944c2ac560e56d50320ec80c9d222507c6ed16f [INFO] running `Command { std: "docker" "start" "-a" "365d11304e4b53f3cc82312be944c2ac560e56d50320ec80c9d222507c6ed16f", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.36 [INFO] [stderr] Compiling unicode-xid v0.2.2 [INFO] [stderr] Compiling syn v1.0.85 [INFO] [stderr] Compiling libc v0.2.112 [INFO] [stderr] Compiling memchr v2.4.1 [INFO] [stderr] Compiling autocfg v1.0.1 [INFO] [stderr] Compiling typenum v1.15.0 [INFO] [stderr] Compiling generic-array v0.14.5 [INFO] [stderr] Compiling log v0.4.14 [INFO] [stderr] Compiling bytes v1.1.0 [INFO] [stderr] Compiling once_cell v1.9.0 [INFO] [stderr] Compiling pin-project-lite v0.2.8 [INFO] [stderr] Compiling futures-core v0.3.19 [INFO] [stderr] Compiling parking_lot_core v0.8.5 [INFO] [stderr] Compiling instant v0.1.12 [INFO] [stderr] Compiling serde_derive v1.0.133 [INFO] [stderr] Compiling smallvec v1.7.0 [INFO] [stderr] Compiling tinyvec_macros v0.1.0 [INFO] [stderr] Compiling scopeguard v1.1.0 [INFO] [stderr] Compiling tinyvec v1.5.1 [INFO] [stderr] Compiling futures-task v0.3.19 [INFO] [stderr] Compiling lock_api v0.4.5 [INFO] [stderr] Compiling itoa v1.0.1 [INFO] [stderr] Compiling serde v1.0.133 [INFO] [stderr] Compiling base64 v0.13.0 [INFO] [stderr] Compiling futures-sink v0.3.19 [INFO] [stderr] Compiling quote v1.0.14 [INFO] [stderr] Compiling futures-channel v0.3.19 [INFO] [stderr] Compiling parking_lot v0.11.2 [INFO] [stderr] Compiling num_cpus v1.13.1 [INFO] [stderr] Compiling signal-hook-registry v1.4.0 [INFO] [stderr] Compiling mio v0.7.14 [INFO] [stderr] Compiling getrandom v0.2.3 [INFO] [stderr] Compiling futures-util v0.3.19 [INFO] [stderr] Compiling unicode-bidi v0.3.7 [INFO] [stderr] Compiling rand_core v0.6.3 [INFO] [stderr] Compiling unicode-normalization v0.1.19 [INFO] [stderr] Compiling num-traits v0.2.14 [INFO] [stderr] Compiling futures-io v0.3.19 [INFO] [stderr] Compiling cpufeatures v0.2.1 [INFO] [stderr] Compiling pin-utils v0.1.0 [INFO] [stderr] Compiling slab v0.4.5 [INFO] [stderr] Compiling rand_chacha v0.3.1 [INFO] [stderr] Compiling num-integer v0.1.44 [INFO] [stderr] Compiling unicase v2.6.0 [INFO] [stderr] Compiling percent-encoding v2.1.0 [INFO] [stderr] Compiling fnv v1.0.7 [INFO] [stderr] Compiling cc v1.0.72 [INFO] [stderr] Compiling http v0.2.6 [INFO] [stderr] Compiling rand v0.8.4 [INFO] [stderr] Compiling block-buffer v0.10.0 [INFO] [stderr] Compiling crypto-common v0.1.1 [INFO] [stderr] Compiling matches v0.1.9 [INFO] [stderr] Compiling subtle v2.4.1 [INFO] [stderr] Compiling digest v0.10.1 [INFO] [stderr] Compiling httparse v1.5.1 [INFO] [stderr] Compiling untrusted v0.7.1 [INFO] [stderr] Compiling spin v0.5.2 [INFO] [stderr] Compiling byteorder v1.4.3 [INFO] [stderr] Compiling form_urlencoded v1.0.1 [INFO] [stderr] Compiling time v0.1.44 [INFO] [stderr] Compiling idna v0.2.3 [INFO] [stderr] Compiling block-buffer v0.9.0 [INFO] [stderr] Compiling digest v0.9.0 [INFO] [stderr] Compiling indexmap v1.8.0 [INFO] [stderr] Compiling opaque-debug v0.3.0 [INFO] [stderr] Compiling async-trait v0.1.52 [INFO] [stderr] Compiling serde_json v1.0.74 [INFO] [stderr] Compiling ryu v1.0.9 [INFO] [stderr] Compiling ring v0.16.20 [INFO] [stderr] Compiling sha-1 v0.9.8 [INFO] [stderr] Compiling url v2.2.2 [INFO] [stderr] Compiling mime_guess v2.0.3 [INFO] [stderr] Compiling tracing-core v0.1.21 [INFO] [stderr] Compiling md-5 v0.10.0 [INFO] [stderr] Compiling hmac v0.12.0 [INFO] [stderr] Compiling sha2 v0.10.1 [INFO] [stderr] Compiling stringprep v0.1.2 [INFO] [stderr] Compiling socket2 v0.4.2 [INFO] [stderr] Compiling aho-corasick v0.7.18 [INFO] [stderr] Compiling num-bigint v0.2.6 [INFO] [stderr] Compiling siphasher v0.3.7 [INFO] [stderr] Compiling mime v0.3.16 [INFO] [stderr] Compiling proc-macro-hack v0.5.19 [INFO] [stderr] Compiling regex-syntax v0.6.25 [INFO] [stderr] Compiling fallible-iterator v0.2.0 [INFO] [stderr] Compiling phf_shared v0.10.0 [INFO] [stderr] Compiling postgres-protocol v0.6.3 [INFO] [stderr] Compiling tracing v0.1.29 [INFO] [stderr] Compiling proc-macro-error-attr v1.0.4 [INFO] [stderr] Compiling itoa v0.4.8 [INFO] [stderr] Compiling try-lock v0.2.3 [INFO] [stderr] Compiling fastrand v1.6.0 [INFO] [stderr] Compiling httpdate v1.0.2 [INFO] [stderr] Compiling remove_dir_all v0.5.3 [INFO] [stderr] Compiling utf-8 v0.7.6 [INFO] [stderr] Compiling safemem v0.3.3 [INFO] [stderr] Compiling tempfile v3.3.0 [INFO] [stderr] Compiling buf_redux v0.8.4 [INFO] [stderr] Compiling proc-macro-error v1.0.4 [INFO] [stderr] Compiling want v0.3.0 [INFO] [stderr] Compiling regex v1.5.4 [INFO] [stderr] Compiling sct v0.6.1 [INFO] [stderr] Compiling webpki v0.21.4 [INFO] [stderr] Compiling rustls v0.19.1 [INFO] [stderr] Compiling validator_types v0.14.0 [INFO] [stderr] Compiling phf v0.10.1 [INFO] [stderr] Compiling headers-core v0.2.0 [INFO] [stderr] Compiling http-body v0.4.4 [INFO] [stderr] Compiling twoway v0.1.8 [INFO] [stderr] Compiling dotenv v0.15.0 [INFO] [stderr] Compiling futures-timer v3.0.2 [INFO] [stderr] Compiling tokio-macros v1.7.0 [INFO] [stderr] Compiling futures-macro v0.3.19 [INFO] [stderr] Compiling thiserror-impl v1.0.30 [INFO] [stderr] Compiling tokio v1.15.0 [INFO] [stderr] Compiling pin-project-internal v1.0.10 [INFO] [stderr] Compiling pin-project v1.0.10 [INFO] [stderr] Compiling if_chain v1.0.2 [INFO] [stderr] Compiling quick-error v1.2.3 [INFO] [stderr] Compiling lazy_static v1.4.0 [INFO] [stderr] Compiling tower-service v0.3.1 [INFO] [stderr] Compiling headers v0.3.5 [INFO] [stderr] Compiling validator_derive v0.14.0 [INFO] [stderr] Compiling thiserror v1.0.30 [INFO] [stderr] Compiling tungstenite v0.14.0 [INFO] [stderr] Compiling multipart v0.18.0 [INFO] [stderr] Compiling dotenv_codegen_implementation v0.15.0 [INFO] [stderr] Compiling pem v0.8.3 [INFO] [stderr] Compiling base64 v0.12.3 [INFO] [stderr] Compiling scoped-tls v1.0.0 [INFO] [stderr] Compiling dotenv_codegen v0.15.0 [INFO] [stderr] Compiling cap v0.1.0 [INFO] [stderr] Compiling futures-executor v0.3.19 [INFO] [stderr] Compiling futures v0.3.19 [INFO] [stderr] Compiling tokio-util v0.6.9 [INFO] [stderr] Compiling tokio-rustls v0.22.0 [INFO] [stderr] Compiling tokio-stream v0.1.8 [INFO] [stderr] Compiling tokio-tungstenite v0.15.0 [INFO] [stderr] Compiling mobc v0.7.3 [INFO] [stderr] Compiling h2 v0.3.10 [INFO] [stderr] Compiling chrono v0.4.19 [INFO] [stderr] Compiling serde_urlencoded v0.7.0 [INFO] [stderr] Compiling postgres-types v0.2.2 [INFO] [stderr] Compiling simple_asn1 v0.4.1 [INFO] [stderr] Compiling jsonwebtoken v7.2.0 [INFO] [stderr] Compiling validator v0.14.0 [INFO] [stderr] Compiling tokio-postgres v0.7.5 [INFO] [stderr] Compiling hyper v0.14.16 [INFO] [stderr] Compiling mobc-postgres v0.7.0 [INFO] [stderr] Compiling warp v0.3.2 [INFO] [stderr] Compiling chattr-api v1.0.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `Serialize` [INFO] [stdout] --> src/ws_messages.rs:1:26 [INFO] [stdout] | [INFO] [stdout] 1 | use serde::{Deserialize, Serialize}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `username` [INFO] [stdout] --> src/database/user.rs:81:5 [INFO] [stdout] | [INFO] [stdout] 81 | username: String, [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_username` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `email` [INFO] [stdout] --> src/database/user.rs:82:5 [INFO] [stdout] | [INFO] [stdout] 82 | email: String, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_email` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `password` [INFO] [stdout] --> src/database/user.rs:83:5 [INFO] [stdout] | [INFO] [stdout] 83 | password: String [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_password` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `room_id` [INFO] [stdout] --> src/routes/messages.rs:4:27 [INFO] [stdout] | [INFO] [stdout] 4 | pub async fn post_to_room(room_id: i32, body: Message, db_pool: DbPool) -> Result { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_room_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `body` [INFO] [stdout] --> src/routes/messages.rs:4:41 [INFO] [stdout] | [INFO] [stdout] 4 | pub async fn post_to_room(room_id: i32, body: Message, db_pool: DbPool) -> Result { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_body` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `db_pool` [INFO] [stdout] --> src/routes/messages.rs:4:56 [INFO] [stdout] | [INFO] [stdout] 4 | pub async fn post_to_room(room_id: i32, body: Message, db_pool: DbPool) -> Result { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_db_pool` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `id` [INFO] [stdout] --> src/routes/ws.rs:130:25 [INFO] [stdout] | [INFO] [stdout] 130 | async fn handle_message(id: usize, message: Message, clients: &WsClients) -> Result<(), ()> { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `uid` [INFO] [stdout] --> src/routes/ws.rs:132:9 [INFO] [stdout] | [INFO] [stdout] 132 | for (&uid, client) in clients.read().await.iter() { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_uid` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `FutureExt` [INFO] [stdout] --> src/main.rs:13:20 [INFO] [stdout] | [INFO] [stdout] 13 | use futures_util::{FutureExt, StreamExt}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `StreamExt` [INFO] [stdout] --> src/main.rs:13:31 [INFO] [stdout] | [INFO] [stdout] 13 | use futures_util::{FutureExt, StreamExt}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `with_db` [INFO] [stdout] --> src/main.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | let with_db = warp::any().map(move || db_pool.clone()); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_with_db` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MESSAGE_TABLE` is never used [INFO] [stdout] --> src/database/message.rs:4:7 [INFO] [stdout] | [INFO] [stdout] 4 | const MESSAGE_TABLE: &str = "rooms.messages"; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `MessageError` is never used [INFO] [stdout] --> src/database/message.rs:5:10 [INFO] [stdout] | [INFO] [stdout] 5 | pub enum MessageError { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `id`, `author_id`, `content`, and `created_at` are never read [INFO] [stdout] --> src/database/message.rs:20:3 [INFO] [stdout] | [INFO] [stdout] 19 | pub struct Message { [INFO] [stdout] | ------- fields in this struct [INFO] [stdout] 20 | id: i64, [INFO] [stdout] | ^^ [INFO] [stdout] 21 | author_id: i32, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 22 | content: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 23 | created_at: Date // for javascript Date object. [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/database/message.rs:27:10 [INFO] [stdout] | [INFO] [stdout] 26 | impl Message { [INFO] [stdout] | ------------ associated function in this implementation [INFO] [stdout] 27 | pub fn new(id: i64, author_id: i32, content: String, created_at: Date) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MessageManager` is never constructed [INFO] [stdout] --> src/database/message.rs:37:8 [INFO] [stdout] | [INFO] [stdout] 37 | struct MessageManager { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `create_message`, and `delete_message` are never used [INFO] [stdout] --> src/database/message.rs:42:10 [INFO] [stdout] | [INFO] [stdout] 41 | impl MessageManager { [INFO] [stdout] | ------------------- associated items in this implementation [INFO] [stdout] 42 | pub fn new(db_con: DbCon) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 48 | pub async fn create_message( [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 68 | pub async fn delete_message(&mut self, message: &Message) -> Result<(), MessageError> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ROOM_TABLE` is never used [INFO] [stdout] --> src/database/room.rs:5:7 [INFO] [stdout] | [INFO] [stdout] 5 | const ROOM_TABLE: &str = "rooms.rooms"; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `RoomError` is never used [INFO] [stdout] --> src/database/room.rs:7:10 [INFO] [stdout] | [INFO] [stdout] 7 | pub enum RoomError { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_row` is never used [INFO] [stdout] --> src/database/room.rs:22:10 [INFO] [stdout] | [INFO] [stdout] 21 | impl Room { [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 22 | pub fn from_row(row: &Row) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `RoomManager` is never constructed [INFO] [stdout] --> src/database/room.rs:33:8 [INFO] [stdout] | [INFO] [stdout] 33 | struct RoomManager { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `create_room`, `delete_room`, `update_room_name`, and `update_room_description` are never used [INFO] [stdout] --> src/database/room.rs:38:10 [INFO] [stdout] | [INFO] [stdout] 37 | impl RoomManager { [INFO] [stdout] | ---------------- associated items in this implementation [INFO] [stdout] 38 | pub fn new(db_con: DbCon) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 44 | pub async fn create_room( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 63 | pub async fn delete_room( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 71 | pub async fn update_room_name( [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 80 | pub async fn update_room_description( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `USER_TABLE` is never used [INFO] [stdout] --> src/database/user.rs:9:7 [INFO] [stdout] | [INFO] [stdout] 9 | const USER_TABLE: &str = "users"; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SECRET_KEY` is never used [INFO] [stdout] --> src/database/user.rs:10:7 [INFO] [stdout] | [INFO] [stdout] 10 | const SECRET_KEY: &str = dotenv_codegen::dotenv!("SECRET_KEY"); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `UserError` is never used [INFO] [stdout] --> src/database/user.rs:12:10 [INFO] [stdout] | [INFO] [stdout] 12 | pub enum UserError { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_row` is never used [INFO] [stdout] --> src/database/user.rs:40:10 [INFO] [stdout] | [INFO] [stdout] 39 | impl User { [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 40 | pub fn from_row(row: &Row) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `TokenType` is never used [INFO] [stdout] --> src/database/user.rs:63:10 [INFO] [stdout] | [INFO] [stdout] 63 | pub enum TokenType { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `UserManager` is never constructed [INFO] [stdout] --> src/database/user.rs:68:12 [INFO] [stdout] | [INFO] [stdout] 68 | pub struct UserManager { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `create_user`, `get_from_token`, `login`, `issue_token`, and `reissue_token` are never used [INFO] [stdout] --> src/database/user.rs:73:10 [INFO] [stdout] | [INFO] [stdout] 72 | impl UserManager { [INFO] [stdout] | ---------------- associated items in this implementation [INFO] [stdout] 73 | pub fn new(db_con: DbCon) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 79 | pub async fn create_user( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 89 | pub async fn get_from_token(&mut self, token: String) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 94 | pub async fn login(&mut self, email: String, password: String) -> Result { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 99 | pub fn issue_token( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 124 | pub fn reissue_token(old_token: String, token_type: TokenType) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `post_to_room` is never used [INFO] [stdout] --> src/routes/messages.rs:4:14 [INFO] [stdout] | [INFO] [stdout] 4 | pub async fn post_to_room(room_id: i32, body: Message, db_pool: DbPool) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `user` is never read [INFO] [stdout] --> src/routes/ws.rs:21:3 [INFO] [stdout] | [INFO] [stdout] 19 | pub struct WsClient { [INFO] [stdout] | -------- field in this struct [INFO] [stdout] 20 | socket: Socket, [INFO] [stdout] 21 | user: Option [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `handle_login` is never used [INFO] [stdout] --> src/routes/ws.rs:143:10 [INFO] [stdout] | [INFO] [stdout] 143 | async fn handle_login() -> Result<(), ()> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DISCONNECT` is never used [INFO] [stdout] --> src/routes/ws.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | const DISCONNECT: u8 = 0; // client disconnect due to error or other [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `EVENT` is never used [INFO] [stdout] --> src/routes/ws.rs:40:9 [INFO] [stdout] | [INFO] [stdout] 40 | const EVENT: u8 = 1; // will only send after the user has logged in through the websocket [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `USER_LOGIN` is never used [INFO] [stdout] --> src/routes/ws.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | const USER_LOGIN: u8 = 11; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `LOGIN` is never used [INFO] [stdout] --> src/routes/ws.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | const LOGIN: u8 = 0; // when the user has logged in using the ws [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ROOM_MESSAGE` is never used [INFO] [stdout] --> src/routes/ws.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | const ROOM_MESSAGE: u8 = 1; // when the user got a room message [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ROOM_JOIN` is never used [INFO] [stdout] --> src/routes/ws.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | const ROOM_JOIN: u8 = 2; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ROOM_LEAVE` is never used [INFO] [stdout] --> src/routes/ws.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | const ROOM_LEAVE: u8 = 3; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `token` is never read [INFO] [stdout] --> src/ws_messages.rs:5:3 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct UserLogin { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] 5 | token: String, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `UserLogin` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `WsCodes` should have a snake case name [INFO] [stdout] --> src/routes/ws.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | pub mod WsCodes { [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case: `ws_codes` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `WsEvents` should have a snake case name [INFO] [stdout] --> src/routes/ws.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | pub mod WsEvents { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `ws_events` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/routes/ws.rs:134:61 [INFO] [stdout] | [INFO] [stdout] 134 | if let Err(_dc) = client.socket.send(Message::text(msg.clone())) { [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2m 22s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: buf_redux v0.8.4, multipart v0.18.0 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1` [INFO] running `Command { std: "docker" "inspect" "365d11304e4b53f3cc82312be944c2ac560e56d50320ec80c9d222507c6ed16f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "365d11304e4b53f3cc82312be944c2ac560e56d50320ec80c9d222507c6ed16f", kill_on_drop: false }` [INFO] [stdout] 365d11304e4b53f3cc82312be944c2ac560e56d50320ec80c9d222507c6ed16f [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "test" "--frozen" "--no-run" "--message-format=json" "--target" "x86_64-unknown-linux-musl", kill_on_drop: false }` [INFO] [stdout] f37c44e96f31aaa1e2d8c008ff0a362084eca884bde3f04c7a609415c1333981 [INFO] running `Command { std: "docker" "start" "-a" "f37c44e96f31aaa1e2d8c008ff0a362084eca884bde3f04c7a609415c1333981", kill_on_drop: false }` [INFO] [stderr] Compiling chattr-api v1.0.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `Serialize` [INFO] [stdout] --> src/ws_messages.rs:1:26 [INFO] [stdout] | [INFO] [stdout] 1 | use serde::{Deserialize, Serialize}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `username` [INFO] [stdout] --> src/database/user.rs:81:5 [INFO] [stdout] | [INFO] [stdout] 81 | username: String, [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_username` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `email` [INFO] [stdout] --> src/database/user.rs:82:5 [INFO] [stdout] | [INFO] [stdout] 82 | email: String, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_email` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `password` [INFO] [stdout] --> src/database/user.rs:83:5 [INFO] [stdout] | [INFO] [stdout] 83 | password: String [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_password` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `room_id` [INFO] [stdout] --> src/routes/messages.rs:4:27 [INFO] [stdout] | [INFO] [stdout] 4 | pub async fn post_to_room(room_id: i32, body: Message, db_pool: DbPool) -> Result { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_room_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `body` [INFO] [stdout] --> src/routes/messages.rs:4:41 [INFO] [stdout] | [INFO] [stdout] 4 | pub async fn post_to_room(room_id: i32, body: Message, db_pool: DbPool) -> Result { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_body` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `db_pool` [INFO] [stdout] --> src/routes/messages.rs:4:56 [INFO] [stdout] | [INFO] [stdout] 4 | pub async fn post_to_room(room_id: i32, body: Message, db_pool: DbPool) -> Result { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_db_pool` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `id` [INFO] [stdout] --> src/routes/ws.rs:130:25 [INFO] [stdout] | [INFO] [stdout] 130 | async fn handle_message(id: usize, message: Message, clients: &WsClients) -> Result<(), ()> { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `uid` [INFO] [stdout] --> src/routes/ws.rs:132:9 [INFO] [stdout] | [INFO] [stdout] 132 | for (&uid, client) in clients.read().await.iter() { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_uid` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `FutureExt` [INFO] [stdout] --> src/main.rs:13:20 [INFO] [stdout] | [INFO] [stdout] 13 | use futures_util::{FutureExt, StreamExt}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `StreamExt` [INFO] [stdout] --> src/main.rs:13:31 [INFO] [stdout] | [INFO] [stdout] 13 | use futures_util::{FutureExt, StreamExt}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `with_db` [INFO] [stdout] --> src/main.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | let with_db = warp::any().map(move || db_pool.clone()); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_with_db` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MESSAGE_TABLE` is never used [INFO] [stdout] --> src/database/message.rs:4:7 [INFO] [stdout] | [INFO] [stdout] 4 | const MESSAGE_TABLE: &str = "rooms.messages"; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `MessageError` is never used [INFO] [stdout] --> src/database/message.rs:5:10 [INFO] [stdout] | [INFO] [stdout] 5 | pub enum MessageError { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `id`, `author_id`, `content`, and `created_at` are never read [INFO] [stdout] --> src/database/message.rs:20:3 [INFO] [stdout] | [INFO] [stdout] 19 | pub struct Message { [INFO] [stdout] | ------- fields in this struct [INFO] [stdout] 20 | id: i64, [INFO] [stdout] | ^^ [INFO] [stdout] 21 | author_id: i32, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 22 | content: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 23 | created_at: Date // for javascript Date object. [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/database/message.rs:27:10 [INFO] [stdout] | [INFO] [stdout] 26 | impl Message { [INFO] [stdout] | ------------ associated function in this implementation [INFO] [stdout] 27 | pub fn new(id: i64, author_id: i32, content: String, created_at: Date) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MessageManager` is never constructed [INFO] [stdout] --> src/database/message.rs:37:8 [INFO] [stdout] | [INFO] [stdout] 37 | struct MessageManager { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `create_message`, and `delete_message` are never used [INFO] [stdout] --> src/database/message.rs:42:10 [INFO] [stdout] | [INFO] [stdout] 41 | impl MessageManager { [INFO] [stdout] | ------------------- associated items in this implementation [INFO] [stdout] 42 | pub fn new(db_con: DbCon) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 48 | pub async fn create_message( [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 68 | pub async fn delete_message(&mut self, message: &Message) -> Result<(), MessageError> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ROOM_TABLE` is never used [INFO] [stdout] --> src/database/room.rs:5:7 [INFO] [stdout] | [INFO] [stdout] 5 | const ROOM_TABLE: &str = "rooms.rooms"; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `RoomError` is never used [INFO] [stdout] --> src/database/room.rs:7:10 [INFO] [stdout] | [INFO] [stdout] 7 | pub enum RoomError { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_row` is never used [INFO] [stdout] --> src/database/room.rs:22:10 [INFO] [stdout] | [INFO] [stdout] 21 | impl Room { [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 22 | pub fn from_row(row: &Row) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `RoomManager` is never constructed [INFO] [stdout] --> src/database/room.rs:33:8 [INFO] [stdout] | [INFO] [stdout] 33 | struct RoomManager { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `create_room`, `delete_room`, `update_room_name`, and `update_room_description` are never used [INFO] [stdout] --> src/database/room.rs:38:10 [INFO] [stdout] | [INFO] [stdout] 37 | impl RoomManager { [INFO] [stdout] | ---------------- associated items in this implementation [INFO] [stdout] 38 | pub fn new(db_con: DbCon) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 44 | pub async fn create_room( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 63 | pub async fn delete_room( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 71 | pub async fn update_room_name( [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 80 | pub async fn update_room_description( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `USER_TABLE` is never used [INFO] [stdout] --> src/database/user.rs:9:7 [INFO] [stdout] | [INFO] [stdout] 9 | const USER_TABLE: &str = "users"; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SECRET_KEY` is never used [INFO] [stdout] --> src/database/user.rs:10:7 [INFO] [stdout] | [INFO] [stdout] 10 | const SECRET_KEY: &str = dotenv_codegen::dotenv!("SECRET_KEY"); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `UserError` is never used [INFO] [stdout] --> src/database/user.rs:12:10 [INFO] [stdout] | [INFO] [stdout] 12 | pub enum UserError { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_row` is never used [INFO] [stdout] --> src/database/user.rs:40:10 [INFO] [stdout] | [INFO] [stdout] 39 | impl User { [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 40 | pub fn from_row(row: &Row) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `TokenType` is never used [INFO] [stdout] --> src/database/user.rs:63:10 [INFO] [stdout] | [INFO] [stdout] 63 | pub enum TokenType { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `UserManager` is never constructed [INFO] [stdout] --> src/database/user.rs:68:12 [INFO] [stdout] | [INFO] [stdout] 68 | pub struct UserManager { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `create_user`, `get_from_token`, `login`, `issue_token`, and `reissue_token` are never used [INFO] [stdout] --> src/database/user.rs:73:10 [INFO] [stdout] | [INFO] [stdout] 72 | impl UserManager { [INFO] [stdout] | ---------------- associated items in this implementation [INFO] [stdout] 73 | pub fn new(db_con: DbCon) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 79 | pub async fn create_user( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 89 | pub async fn get_from_token(&mut self, token: String) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 94 | pub async fn login(&mut self, email: String, password: String) -> Result { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 99 | pub fn issue_token( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 124 | pub fn reissue_token(old_token: String, token_type: TokenType) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `post_to_room` is never used [INFO] [stdout] --> src/routes/messages.rs:4:14 [INFO] [stdout] | [INFO] [stdout] 4 | pub async fn post_to_room(room_id: i32, body: Message, db_pool: DbPool) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `user` is never read [INFO] [stdout] --> src/routes/ws.rs:21:3 [INFO] [stdout] | [INFO] [stdout] 19 | pub struct WsClient { [INFO] [stdout] | -------- field in this struct [INFO] [stdout] 20 | socket: Socket, [INFO] [stdout] 21 | user: Option [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `handle_login` is never used [INFO] [stdout] --> src/routes/ws.rs:143:10 [INFO] [stdout] | [INFO] [stdout] 143 | async fn handle_login() -> Result<(), ()> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DISCONNECT` is never used [INFO] [stdout] --> src/routes/ws.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | const DISCONNECT: u8 = 0; // client disconnect due to error or other [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `EVENT` is never used [INFO] [stdout] --> src/routes/ws.rs:40:9 [INFO] [stdout] | [INFO] [stdout] 40 | const EVENT: u8 = 1; // will only send after the user has logged in through the websocket [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `USER_LOGIN` is never used [INFO] [stdout] --> src/routes/ws.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | const USER_LOGIN: u8 = 11; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `LOGIN` is never used [INFO] [stdout] --> src/routes/ws.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | const LOGIN: u8 = 0; // when the user has logged in using the ws [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ROOM_MESSAGE` is never used [INFO] [stdout] --> src/routes/ws.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | const ROOM_MESSAGE: u8 = 1; // when the user got a room message [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ROOM_JOIN` is never used [INFO] [stdout] --> src/routes/ws.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | const ROOM_JOIN: u8 = 2; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ROOM_LEAVE` is never used [INFO] [stdout] --> src/routes/ws.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | const ROOM_LEAVE: u8 = 3; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `token` is never read [INFO] [stdout] --> src/ws_messages.rs:5:3 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct UserLogin { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] 5 | token: String, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `UserLogin` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `WsCodes` should have a snake case name [INFO] [stdout] --> src/routes/ws.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | pub mod WsCodes { [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case: `ws_codes` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `WsEvents` should have a snake case name [INFO] [stdout] --> src/routes/ws.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | pub mod WsEvents { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `ws_events` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/routes/ws.rs:134:61 [INFO] [stdout] | [INFO] [stdout] 134 | if let Err(_dc) = client.socket.send(Message::text(msg.clone())) { [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 1.58s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: buf_redux v0.8.4, multipart v0.18.0 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1` [INFO] running `Command { std: "docker" "inspect" "f37c44e96f31aaa1e2d8c008ff0a362084eca884bde3f04c7a609415c1333981", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f37c44e96f31aaa1e2d8c008ff0a362084eca884bde3f04c7a609415c1333981", kill_on_drop: false }` [INFO] [stdout] f37c44e96f31aaa1e2d8c008ff0a362084eca884bde3f04c7a609415c1333981 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "test" "--frozen" "--target" "x86_64-unknown-linux-musl", kill_on_drop: false }` [INFO] [stdout] 434d26e7c869053c37aabe57e3e69c4de9b2be1b0265c575165be51d10dc77f6 [INFO] running `Command { std: "docker" "start" "-a" "434d26e7c869053c37aabe57e3e69c4de9b2be1b0265c575165be51d10dc77f6", kill_on_drop: false }` [INFO] [stderr] warning: unused import: `Serialize` [INFO] [stderr] --> src/ws_messages.rs:1:26 [INFO] [stderr] | [INFO] [stderr] 1 | use serde::{Deserialize, Serialize}; [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_imports)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unused variable: `username` [INFO] [stderr] --> src/database/user.rs:81:5 [INFO] [stderr] | [INFO] [stderr] 81 | username: String, [INFO] [stderr] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_username` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_variables)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unused variable: `email` [INFO] [stderr] --> src/database/user.rs:82:5 [INFO] [stderr] | [INFO] [stderr] 82 | email: String, [INFO] [stderr] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_email` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `password` [INFO] [stderr] --> src/database/user.rs:83:5 [INFO] [stderr] | [INFO] [stderr] 83 | password: String [INFO] [stderr] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_password` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `room_id` [INFO] [stderr] --> src/routes/messages.rs:4:27 [INFO] [stderr] | [INFO] [stderr] 4 | pub async fn post_to_room(room_id: i32, body: Message, db_pool: DbPool) -> Result { [INFO] [stderr] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_room_id` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `body` [INFO] [stderr] --> src/routes/messages.rs:4:41 [INFO] [stderr] | [INFO] [stderr] 4 | pub async fn post_to_room(room_id: i32, body: Message, db_pool: DbPool) -> Result { [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_body` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `db_pool` [INFO] [stderr] --> src/routes/messages.rs:4:56 [INFO] [stderr] | [INFO] [stderr] 4 | pub async fn post_to_room(room_id: i32, body: Message, db_pool: DbPool) -> Result { [INFO] [stderr] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_db_pool` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `id` [INFO] [stderr] --> src/routes/ws.rs:130:25 [INFO] [stderr] | [INFO] [stderr] 130 | async fn handle_message(id: usize, message: Message, clients: &WsClients) -> Result<(), ()> { [INFO] [stderr] | ^^ help: if this is intentional, prefix it with an underscore: `_id` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `uid` [INFO] [stderr] --> src/routes/ws.rs:132:9 [INFO] [stderr] | [INFO] [stderr] 132 | for (&uid, client) in clients.read().await.iter() { [INFO] [stderr] | ^^^ help: if this is intentional, prefix it with an underscore: `_uid` [INFO] [stderr] [INFO] [stderr] warning: unused import: `FutureExt` [INFO] [stderr] --> src/main.rs:13:20 [INFO] [stderr] | [INFO] [stderr] 13 | use futures_util::{FutureExt, StreamExt}; [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused import: `StreamExt` [INFO] [stderr] --> src/main.rs:13:31 [INFO] [stderr] | [INFO] [stderr] 13 | use futures_util::{FutureExt, StreamExt}; [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused variable: `with_db` [INFO] [stderr] --> src/main.rs:47:9 [INFO] [stderr] | [INFO] [stderr] 47 | let with_db = warp::any().map(move || db_pool.clone()); [INFO] [stderr] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_with_db` [INFO] [stderr] [INFO] [stderr] warning: constant `MESSAGE_TABLE` is never used [INFO] [stderr] --> src/database/message.rs:4:7 [INFO] [stderr] | [INFO] [stderr] 4 | const MESSAGE_TABLE: &str = "rooms.messages"; [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(dead_code)]` on by default [INFO] [stderr] [INFO] [stderr] warning: enum `MessageError` is never used [INFO] [stderr] --> src/database/message.rs:5:10 [INFO] [stderr] | [INFO] [stderr] 5 | pub enum MessageError { [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: fields `id`, `author_id`, `content`, and `created_at` are never read [INFO] [stderr] --> src/database/message.rs:20:3 [INFO] [stderr] | [INFO] [stderr] 19 | pub struct Message { [INFO] [stderr] | ------- fields in this struct [INFO] [stderr] 20 | id: i64, [INFO] [stderr] | ^^ [INFO] [stderr] 21 | author_id: i32, [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] 22 | content: String, [INFO] [stderr] | ^^^^^^^ [INFO] [stderr] 23 | created_at: Date // for javascript Date object. [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function `new` is never used [INFO] [stderr] --> src/database/message.rs:27:10 [INFO] [stderr] | [INFO] [stderr] 26 | impl Message { [INFO] [stderr] | ------------ associated function in this implementation [INFO] [stderr] 27 | pub fn new(id: i64, author_id: i32, content: String, created_at: Date) -> Self { [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: struct `MessageManager` is never constructed [INFO] [stderr] --> src/database/message.rs:37:8 [INFO] [stderr] | [INFO] [stderr] 37 | struct MessageManager { [INFO] [stderr] | ^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated items `new`, `create_message`, and `delete_message` are never used [INFO] [stderr] --> src/database/message.rs:42:10 [INFO] [stderr] | [INFO] [stderr] 41 | impl MessageManager { [INFO] [stderr] | ------------------- associated items in this implementation [INFO] [stderr] 42 | pub fn new(db_con: DbCon) -> Self { [INFO] [stderr] | ^^^ [INFO] [stderr] ... [INFO] [stderr] 48 | pub async fn create_message( [INFO] [stderr] | ^^^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 68 | pub async fn delete_message(&mut self, message: &Message) -> Result<(), MessageError> { [INFO] [stderr] | ^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: constant `ROOM_TABLE` is never used [INFO] [stderr] --> src/database/room.rs:5:7 [INFO] [stderr] | [INFO] [stderr] 5 | const ROOM_TABLE: &str = "rooms.rooms"; [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: enum `RoomError` is never used [INFO] [stderr] --> src/database/room.rs:7:10 [INFO] [stderr] | [INFO] [stderr] 7 | pub enum RoomError { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function `from_row` is never used [INFO] [stderr] --> src/database/room.rs:22:10 [INFO] [stderr] | [INFO] [stderr] 21 | impl Room { [INFO] [stderr] | --------- associated function in this implementation [INFO] [stderr] 22 | pub fn from_row(row: &Row) -> Self { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: struct `RoomManager` is never constructed [INFO] [stderr] --> src/database/room.rs:33:8 [INFO] [stderr] | [INFO] [stderr] 33 | struct RoomManager { [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated items `new`, `create_room`, `delete_room`, `update_room_name`, and `update_room_description` are never used [INFO] [stderr] --> src/database/room.rs:38:10 [INFO] [stderr] | [INFO] [stderr] 37 | impl RoomManager { [INFO] [stderr] | ---------------- associated items in this implementation [INFO] [stderr] 38 | pub fn new(db_con: DbCon) -> Self { [INFO] [stderr] | ^^^ [INFO] [stderr] ... [INFO] [stderr] 44 | pub async fn create_room( [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 63 | pub async fn delete_room( [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 71 | pub async fn update_room_name( [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 80 | pub async fn update_room_description( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: constant `USER_TABLE` is never used [INFO] [stderr] --> src/database/user.rs:9:7 [INFO] [stderr] | [INFO] [stderr] 9 | const USER_TABLE: &str = "users"; [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: constant `SECRET_KEY` is never used [INFO] [stderr] --> src/database/user.rs:10:7 [INFO] [stderr] | [INFO] [stderr] 10 | const SECRET_KEY: &str = dotenv_codegen::dotenv!("SECRET_KEY"); [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: enum `UserError` is never used [INFO] [stderr] --> src/database/user.rs:12:10 [INFO] [stderr] | [INFO] [stderr] 12 | pub enum UserError { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function `from_row` is never used [INFO] [stderr] --> src/database/user.rs:40:10 [INFO] [stderr] | [INFO] [stderr] 39 | impl User { [INFO] [stderr] | --------- associated function in this implementation [INFO] [stderr] 40 | pub fn from_row(row: &Row) -> Self { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: enum `TokenType` is never used [INFO] [stderr] --> src/database/user.rs:63:10 [INFO] [stderr] | [INFO] [stderr] 63 | pub enum TokenType { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: struct `UserManager` is never constructed [INFO] [stderr] --> src/database/user.rs:68:12 [INFO] [stderr] | [INFO] [stderr] 68 | pub struct UserManager { [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated items `new`, `create_user`, `get_from_token`, `login`, `issue_token`, and `reissue_token` are never used [INFO] [stderr] --> src/database/user.rs:73:10 [INFO] [stderr] | [INFO] [stderr] 72 | impl UserManager { [INFO] [stderr] | ---------------- associated items in this implementation [INFO] [stderr] 73 | pub fn new(db_con: DbCon) -> Self { [INFO] [stderr] | ^^^ [INFO] [stderr] ... [INFO] [stderr] 79 | pub async fn create_user( [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 89 | pub async fn get_from_token(&mut self, token: String) -> Result { [INFO] [stderr] | ^^^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 94 | pub async fn login(&mut self, email: String, password: String) -> Result { [INFO] [stderr] | ^^^^^ [INFO] [stderr] ... [INFO] [stderr] 99 | pub fn issue_token( [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 124 | pub fn reissue_token(old_token: String, token_type: TokenType) -> Result { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function `post_to_room` is never used [INFO] [stderr] --> src/routes/messages.rs:4:14 [INFO] [stderr] | [INFO] [stderr] 4 | pub async fn post_to_room(room_id: i32, body: Message, db_pool: DbPool) -> Result { [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: field `user` is never read [INFO] [stderr] --> src/routes/ws.rs:21:3 [INFO] [stderr] | [INFO] [stderr] 19 | pub struct WsClient { [INFO] [stderr] | -------- field in this struct [INFO] [stderr] 20 | socket: Socket, [INFO] [stderr] 21 | user: Option [INFO] [stderr] | ^^^^ [INFO] [stderr] [INFO] [stderr] warning: function `handle_login` is never used [INFO] [stderr] --> src/routes/ws.rs:143:10 [INFO] [stderr] | [INFO] [stderr] 143 | async fn handle_login() -> Result<(), ()> { [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: constant `DISCONNECT` is never used [INFO] [stderr] --> src/routes/ws.rs:39:9 [INFO] [stderr] | [INFO] [stderr] 39 | const DISCONNECT: u8 = 0; // client disconnect due to error or other [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: constant `EVENT` is never used [INFO] [stderr] --> src/routes/ws.rs:40:9 [INFO] [stderr] | [INFO] [stderr] 40 | const EVENT: u8 = 1; // will only send after the user has logged in through the websocket [INFO] [stderr] | ^^^^^ [INFO] [stderr] [INFO] [stderr] warning: constant `USER_LOGIN` is never used [INFO] [stderr] --> src/routes/ws.rs:41:9 [INFO] [stderr] | [INFO] [stderr] 41 | const USER_LOGIN: u8 = 11; [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: constant `LOGIN` is never used [INFO] [stderr] --> src/routes/ws.rs:45:9 [INFO] [stderr] | [INFO] [stderr] 45 | const LOGIN: u8 = 0; // when the user has logged in using the ws [INFO] [stderr] | ^^^^^ [INFO] [stderr] [INFO] [stderr] warning: constant `ROOM_MESSAGE` is never used [INFO] [stderr] --> src/routes/ws.rs:46:9 [INFO] [stderr] | [INFO] [stderr] 46 | const ROOM_MESSAGE: u8 = 1; // when the user got a room message [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: constant `ROOM_JOIN` is never used [INFO] [stderr] --> src/routes/ws.rs:47:9 [INFO] [stderr] | [INFO] [stderr] 47 | const ROOM_JOIN: u8 = 2; [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: constant `ROOM_LEAVE` is never used [INFO] [stderr] --> src/routes/ws.rs:48:9 [INFO] [stderr] | [INFO] [stderr] 48 | const ROOM_LEAVE: u8 = 3; [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: field `token` is never read [INFO] [stderr] --> src/ws_messages.rs:5:3 [INFO] [stderr] | [INFO] [stderr] 4 | pub struct UserLogin { [INFO] [stderr] | --------- field in this struct [INFO] [stderr] 5 | token: String, [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `UserLogin` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stderr] [INFO] [stderr] warning: module `WsCodes` should have a snake case name [INFO] [stderr] --> src/routes/ws.rs:38:9 [INFO] [stderr] | [INFO] [stderr] 38 | pub mod WsCodes { [INFO] [stderr] | ^^^^^^^ help: convert the identifier to snake case: `ws_codes` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(non_snake_case)]` on by default [INFO] [stderr] [INFO] [stderr] warning: module `WsEvents` should have a snake case name [INFO] [stderr] --> src/routes/ws.rs:44:9 [INFO] [stderr] | [INFO] [stderr] 44 | pub mod WsEvents { [INFO] [stderr] | ^^^^^^^^ help: convert the identifier to snake case: `ws_events` [INFO] [stderr] [INFO] [stderr] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stderr] --> src/routes/ws.rs:134:61 [INFO] [stderr] | [INFO] [stderr] 134 | if let Err(_dc) = client.socket.send(Message::text(msg.clone())) { [INFO] [stderr] | ^^^^^^^^ help: remove this redundant call [INFO] [stderr] | [INFO] [stderr] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stderr] = note: `#[warn(noop_method_call)]` on by default [INFO] [stderr] [INFO] [stderr] warning: `chattr-api` (bin "chattr-api" test) generated 44 warnings (run `cargo fix --bin "chattr-api" --tests` to apply 2 suggestions) [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.26s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: buf_redux v0.8.4, multipart v0.18.0 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1` [INFO] [stderr] Running unittests src/main.rs (/opt/rustwide/target/x86_64-unknown-linux-musl/debug/deps/chattr_api-d5b78df62c8f0652) [INFO] [stdout] [INFO] [stdout] running 0 tests [INFO] [stdout] [INFO] [stdout] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "434d26e7c869053c37aabe57e3e69c4de9b2be1b0265c575165be51d10dc77f6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "434d26e7c869053c37aabe57e3e69c4de9b2be1b0265c575165be51d10dc77f6", kill_on_drop: false }` [INFO] [stdout] 434d26e7c869053c37aabe57e3e69c4de9b2be1b0265c575165be51d10dc77f6