[INFO] cloning repository https://github.com/learnfrombasic/whoami [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/learnfrombasic/whoami" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flearnfrombasic%2Fwhoami", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flearnfrombasic%2Fwhoami'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 39aca24deb94f55c170f1db73a52a8718d38a63e [INFO] testing learnfrombasic/whoami against 1.97.0-beta.1 for beta-1.97-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flearnfrombasic%2Fwhoami" "/workspace/builds/worker-5-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/learnfrombasic/whoami [INFO] finished tweaking git repo https://github.com/learnfrombasic/whoami [INFO] tweaked toml for git repo https://github.com/learnfrombasic/whoami written to /workspace/builds/worker-5-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/learnfrombasic/whoami on toolchain 1.97.0-beta.1 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+1.97.0-beta.1" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/learnfrombasic/whoami 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" "+1.97.0-beta.1" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+1.97.0-beta.1" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] f9eda5d9bf8011074037e6c49158436aaee59a584feb9d15a3813f6f91e737f6 [INFO] running `Command { std: "docker" "start" "-a" "f9eda5d9bf8011074037e6c49158436aaee59a584feb9d15a3813f6f91e737f6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "f9eda5d9bf8011074037e6c49158436aaee59a584feb9d15a3813f6f91e737f6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f9eda5d9bf8011074037e6c49158436aaee59a584feb9d15a3813f6f91e737f6", kill_on_drop: false }` [INFO] [stdout] f9eda5d9bf8011074037e6c49158436aaee59a584feb9d15a3813f6f91e737f6 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-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:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+1.97.0-beta.1" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] ce534c6663ceb40f11778c2f354a1e7d3eebf550b7f71b879f5ea5b858711799 [INFO] running `Command { std: "docker" "start" "-a" "ce534c6663ceb40f11778c2f354a1e7d3eebf550b7f71b879f5ea5b858711799", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.95 [INFO] [stderr] Compiling libc v0.2.174 [INFO] [stderr] Compiling cfg-if v1.0.1 [INFO] [stderr] Compiling smallvec v1.15.1 [INFO] [stderr] Compiling slab v0.4.10 [INFO] [stderr] Compiling tracing-core v0.1.34 [INFO] [stderr] Compiling serde_json v1.0.141 [INFO] [stderr] Compiling aho-corasick v1.1.3 [INFO] [stderr] Compiling digest v0.10.7 [INFO] [stderr] Compiling foldhash v0.1.5 [INFO] [stderr] Compiling regex-syntax v0.8.5 [INFO] [stderr] Compiling rustls v0.23.29 [INFO] [stderr] Compiling log v0.4.27 [INFO] [stderr] Compiling thiserror v2.0.12 [INFO] [stderr] Compiling crc32fast v1.5.0 [INFO] [stderr] Compiling webpki-roots v1.0.2 [INFO] [stderr] Compiling time-core v0.1.4 [INFO] [stderr] Compiling time-macros v0.2.22 [INFO] [stderr] Compiling webpki-roots v0.26.11 [INFO] [stderr] Compiling event-listener v5.4.0 [INFO] [stderr] Compiling hashbrown v0.15.4 [INFO] [stderr] Compiling futures-util v0.3.31 [INFO] [stderr] Compiling deranged v0.4.0 [INFO] [stderr] Compiling sha2 v0.10.9 [INFO] [stderr] Compiling spin v0.9.8 [INFO] [stderr] Compiling bytestring v1.4.0 [INFO] [stderr] Compiling local-waker v0.1.4 [INFO] [stderr] Compiling zstd-safe v7.2.4 [INFO] [stderr] Compiling proc-macro-error-attr v1.0.4 [INFO] [stderr] Compiling regex-lite v0.1.6 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling brotli-decompressor v5.0.0 [INFO] [stderr] Compiling actix-utils v3.0.1 [INFO] [stderr] Compiling chrono v0.4.41 [INFO] [stderr] Compiling actix-service v2.0.3 [INFO] [stderr] Compiling cookie v0.16.2 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Compiling indexmap v2.10.0 [INFO] [stderr] Compiling hashlink v0.10.0 [INFO] [stderr] Compiling proc-macro-error v1.0.4 [INFO] [stderr] Compiling syn v2.0.104 [INFO] [stderr] Compiling jobserver v0.1.33 [INFO] [stderr] Compiling socket2 v0.5.10 [INFO] [stderr] Compiling parking_lot_core v0.9.11 [INFO] [stderr] Compiling mio v1.0.4 [INFO] [stderr] Compiling parking_lot v0.12.4 [INFO] [stderr] Compiling signal-hook-registry v1.4.5 [INFO] [stderr] Compiling getrandom v0.3.3 [INFO] [stderr] Compiling cc v1.2.30 [INFO] [stderr] Compiling getrandom v0.2.16 [INFO] [stderr] Compiling futures-intrusive v0.5.0 [INFO] [stderr] Compiling time v0.3.41 [INFO] [stderr] Compiling rand_core v0.9.3 [INFO] [stderr] Compiling base64 v0.22.1 [INFO] [stderr] Compiling bitflags v2.9.1 [INFO] [stderr] Compiling brotli v8.0.1 [INFO] [stderr] Compiling tokio v1.46.1 [INFO] [stderr] Compiling rand_chacha v0.9.0 [INFO] [stderr] Compiling flume v0.11.1 [INFO] [stderr] Compiling local-channel v0.1.5 [INFO] [stderr] Compiling sha1 v0.10.6 [INFO] [stderr] Compiling flate2 v1.1.2 [INFO] [stderr] Compiling regex-automata v0.4.9 [INFO] [stderr] Compiling rand v0.9.1 [INFO] [stderr] Compiling futures-channel v0.3.31 [INFO] [stderr] Compiling encoding_rs v0.8.35 [INFO] [stderr] Compiling byteorder v1.5.0 [INFO] [stderr] Compiling rust-embed-utils v8.7.2 [INFO] [stderr] Compiling num-integer v0.1.46 [INFO] [stderr] Compiling zip v0.6.6 [INFO] [stderr] Compiling inout v0.1.4 [INFO] [stderr] Compiling hex v0.4.3 [INFO] [stderr] Compiling impl-more v0.1.9 [INFO] [stderr] Compiling dotenvy v0.15.7 [INFO] [stderr] Compiling num-bigint v0.4.6 [INFO] [stderr] Compiling cipher v0.4.4 [INFO] [stderr] Compiling mime_guess v2.0.5 [INFO] [stderr] Compiling atoi v2.0.0 [INFO] [stderr] Compiling anstyle-query v1.1.3 [INFO] [stderr] Compiling anstyle v1.0.11 [INFO] [stderr] Compiling anyhow v1.0.98 [INFO] [stderr] Compiling blowfish v0.9.1 [INFO] [stderr] Compiling futures-executor v0.3.31 [INFO] [stderr] Compiling anstream v0.6.19 [INFO] [stderr] Compiling pem v3.0.5 [INFO] [stderr] Compiling jiff v0.2.15 [INFO] [stderr] Compiling ring v0.17.14 [INFO] [stderr] Compiling zstd-sys v2.0.15+zstd.1.5.7 [INFO] [stderr] Compiling libsqlite3-sys v0.30.1 [INFO] [stderr] Compiling bcrypt v0.15.1 [INFO] [stderr] Compiling regex v1.11.1 [INFO] [stderr] Compiling env_filter v0.1.3 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling tokio-stream v0.1.17 [INFO] [stderr] Compiling utoipa-swagger-ui v6.0.0 [INFO] [stderr] Compiling rustls-webpki v0.103.4 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.0 [INFO] [stderr] Compiling zerovec-derive v0.11.1 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling tracing-attributes v0.1.30 [INFO] [stderr] Compiling tokio-macros v2.5.0 [INFO] [stderr] Compiling thiserror-impl v2.0.12 [INFO] [stderr] Compiling derive_more-impl v2.0.1 [INFO] [stderr] Compiling actix-macros v0.2.4 [INFO] [stderr] Compiling rust-embed-impl v8.7.2 [INFO] [stderr] Compiling simple_asn1 v0.6.3 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling tracing v0.1.41 [INFO] [stderr] Compiling env_logger v0.11.8 [INFO] [stderr] Compiling zerofrom v0.1.6 [INFO] [stderr] Compiling yoke v0.8.0 [INFO] [stderr] Compiling rust-embed v8.7.2 [INFO] [stderr] Compiling zerovec v0.11.2 [INFO] [stderr] Compiling zerotrie v0.2.2 [INFO] [stderr] Compiling zstd v0.13.3 [INFO] [stderr] Compiling thiserror v1.0.69 [INFO] [stderr] Compiling derive_more v2.0.1 [INFO] [stderr] Compiling tinystr v0.8.1 [INFO] [stderr] Compiling potential_utf v0.1.2 [INFO] [stderr] Compiling icu_collections v2.0.0 [INFO] [stderr] Compiling icu_locale_core v2.0.0 [INFO] [stderr] Compiling serde v1.0.219 [INFO] [stderr] Compiling icu_provider v2.0.0 [INFO] [stderr] Compiling icu_normalizer v2.0.0 [INFO] [stderr] Compiling icu_properties v2.0.1 [INFO] [stderr] Compiling tokio-util v0.7.15 [INFO] [stderr] Compiling actix-rt v2.10.0 [INFO] [stderr] Compiling idna_adapter v1.2.1 [INFO] [stderr] Compiling idna v1.0.3 [INFO] [stderr] Compiling actix-codec v0.5.2 [INFO] [stderr] Compiling actix-server v2.6.0 [INFO] [stderr] Compiling url v2.5.4 [INFO] [stderr] Compiling uuid v1.17.0 [INFO] [stderr] Compiling serde_urlencoded v0.7.1 [INFO] [stderr] Compiling either v1.15.0 [INFO] [stderr] Compiling actix-router v0.5.3 [INFO] [stderr] Compiling utoipa-gen v4.3.1 [INFO] [stderr] Compiling actix-web-codegen v4.3.0 [INFO] [stderr] Compiling h2 v0.3.27 [INFO] [stderr] Compiling sqlx-core v0.8.6 [INFO] [stderr] Compiling jsonwebtoken v9.3.1 [INFO] [stderr] Compiling utoipa v4.2.3 [INFO] [stderr] Compiling sqlx-sqlite v0.8.6 [INFO] [stderr] Compiling actix-http v3.11.0 [INFO] [stderr] Compiling sqlx-macros-core v0.8.6 [INFO] [stderr] Compiling actix-web v4.11.0 [INFO] [stderr] Compiling sqlx-macros v0.8.6 [INFO] [stderr] Compiling sqlx v0.8.6 [INFO] [stderr] Compiling actix-cors v0.7.1 [INFO] [stderr] Compiling whoami v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: variants `AuthorizationError`, `RoleNotFound`, `PolicyNotFound`, and `PermissionDenied` are never constructed [INFO] [stdout] --> src/core/errors.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 5 | pub enum AppError { [INFO] [stdout] | -------- variants in this enum [INFO] [stdout] ... [INFO] [stdout] 13 | AuthorizationError(String), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 19 | RoleNotFound, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 22 | PolicyNotFound, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 31 | PermissionDenied, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `AppError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Policy` is never constructed [INFO] [stdout] --> src/models/policy.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct Policy { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `get_document` are never used [INFO] [stdout] --> src/models/policy.rs:40:12 [INFO] [stdout] | [INFO] [stdout] 39 | impl Policy { [INFO] [stdout] | ----------- associated items in this implementation [INFO] [stdout] 40 | pub fn new( [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 58 | pub fn get_document(&self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `admin_policy` and `read_only_policy` are never used [INFO] [stdout] --> src/models/policy.rs:65:12 [INFO] [stdout] | [INFO] [stdout] 64 | impl PolicyDocument { [INFO] [stdout] | ------------------- associated functions in this implementation [INFO] [stdout] 65 | pub fn admin_policy() -> Self { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 77 | pub fn read_only_policy() -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Role` is never constructed [INFO] [stdout] --> src/models/role.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct Role { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/models/role.rs:17:12 [INFO] [stdout] | [INFO] [stdout] 16 | impl Role { [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 17 | pub fn new(name: String, description: Option) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `pool` is never read [INFO] [stdout] --> src/repository/policy_repository.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct PolicyRepository { [INFO] [stdout] | ---------------- field in this struct [INFO] [stdout] 7 | pool: SqlitePool, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/repository/policy_repository.rs:15:18 [INFO] [stdout] | [INFO] [stdout] 10 | impl PolicyRepository { [INFO] [stdout] | --------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 15 | pub async fn create(&self, policy: &Policy) -> Result { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 35 | pub async fn find_by_id(&self, id: &str) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 44 | pub async fn find_by_name(&self, name: &str) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 53 | pub async fn list_all(&self) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 61 | pub async fn update( [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 111 | pub async fn delete(&self, id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 120 | pub async fn get_attached_roles(&self, policy_id: &str) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 136 | pub async fn get_attached_users(&self, policy_id: &str) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `pool` is never read [INFO] [stdout] --> src/repository/role_repository.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct RoleRepository { [INFO] [stdout] | -------------- field in this struct [INFO] [stdout] 7 | pool: SqlitePool, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/repository/role_repository.rs:15:18 [INFO] [stdout] | [INFO] [stdout] 10 | impl RoleRepository { [INFO] [stdout] | ------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 15 | pub async fn create(&self, role: &Role) -> Result { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 34 | pub async fn find_by_id(&self, id: &str) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 43 | pub async fn find_by_name(&self, name: &str) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 52 | pub async fn list_all(&self) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 60 | pub async fn update( [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 103 | pub async fn delete(&self, id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 112 | pub async fn attach_policy(&self, role_id: &str, policy_id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 127 | pub async fn detach_policy(&self, role_id: &str, policy_id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 137 | pub async fn get_role_policies(&self, role_id: &str) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 153 | pub async fn get_role_users(&self, role_id: &str) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/repository/user_repository.rs:70:18 [INFO] [stdout] | [INFO] [stdout] 10 | impl UserRepository { [INFO] [stdout] | ------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 70 | pub async fn list_all(&self) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 78 | pub async fn update( [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 129 | pub async fn delete(&self, id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 138 | pub async fn assign_role(&self, user_id: &str, role_id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 153 | pub async fn remove_role(&self, user_id: &str, role_id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 163 | pub async fn get_user_roles(&self, user_id: &str) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 179 | pub async fn assign_policy(&self, user_id: &str, policy_id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 194 | pub async fn remove_policy(&self, user_id: &str, policy_id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 204 | pub async fn get_user_policies(&self, user_id: &str) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 220 | pub async fn get_all_user_policies(&self, user_id: &str) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MessageResponse` is never constructed [INFO] [stdout] --> src/schemas/auth.rs:50:12 [INFO] [stdout] | [INFO] [stdout] 50 | pub struct MessageResponse { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CreatePolicyRequest` is never constructed [INFO] [stdout] --> src/schemas/policy.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct CreatePolicyRequest { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `UpdatePolicyRequest` is never constructed [INFO] [stdout] --> src/schemas/policy.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 13 | pub struct UpdatePolicyRequest { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PolicyWithDetailsResponse` is never constructed [INFO] [stdout] --> src/schemas/policy.rs:20:12 [INFO] [stdout] | [INFO] [stdout] 20 | pub struct PolicyWithDetailsResponse { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `RoleInfo` is never constructed [INFO] [stdout] --> src/schemas/policy.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 30 | pub struct RoleInfo { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `UserInfo` is never constructed [INFO] [stdout] --> src/schemas/policy.rs:37:12 [INFO] [stdout] | [INFO] [stdout] 37 | pub struct UserInfo { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CreateRoleRequest` is never constructed [INFO] [stdout] --> src/schemas/role.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct CreateRoleRequest { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `UpdateRoleRequest` is never constructed [INFO] [stdout] --> src/schemas/role.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 11 | pub struct UpdateRoleRequest { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `AttachPolicyRequest` is never constructed [INFO] [stdout] --> src/schemas/role.rs:17:12 [INFO] [stdout] | [INFO] [stdout] 17 | pub struct AttachPolicyRequest { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `RoleWithPoliciesResponse` is never constructed [INFO] [stdout] --> src/schemas/role.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 22 | pub struct RoleWithPoliciesResponse { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PolicyInfo` is never constructed [INFO] [stdout] --> src/schemas/role.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 31 | pub struct PolicyInfo { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `UserInfo` is never constructed [INFO] [stdout] --> src/schemas/role.rs:38:12 [INFO] [stdout] | [INFO] [stdout] 38 | pub struct UserInfo { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CreateUserRequest` is never constructed [INFO] [stdout] --> src/schemas/user.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct CreateUserRequest { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `UpdateUserRequest` is never constructed [INFO] [stdout] --> src/schemas/user.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 12 | pub struct UpdateUserRequest { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ChangePasswordRequest` is never constructed [INFO] [stdout] --> src/schemas/user.rs:19:12 [INFO] [stdout] | [INFO] [stdout] 19 | pub struct ChangePasswordRequest { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `AssignRoleRequest` is never constructed [INFO] [stdout] --> src/schemas/user.rs:25:12 [INFO] [stdout] | [INFO] [stdout] 25 | pub struct AssignRoleRequest { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `AssignPolicyRequest` is never constructed [INFO] [stdout] --> src/schemas/user.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 30 | pub struct AssignPolicyRequest { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `UserWithRolesResponse` is never constructed [INFO] [stdout] --> src/schemas/user.rs:35:12 [INFO] [stdout] | [INFO] [stdout] 35 | pub struct UserWithRolesResponse { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `RoleInfo` is never constructed [INFO] [stdout] --> src/schemas/user.rs:45:12 [INFO] [stdout] | [INFO] [stdout] 45 | pub struct RoleInfo { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PolicyInfo` is never constructed [INFO] [stdout] --> src/schemas/user.rs:52:12 [INFO] [stdout] | [INFO] [stdout] 52 | pub struct PolicyInfo { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `check_permission`, `matches_action`, and `matches_resource` are never used [INFO] [stdout] --> src/services/auth_service.rs:207:18 [INFO] [stdout] | [INFO] [stdout] 17 | impl AuthService { [INFO] [stdout] | ---------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 207 | pub async fn check_permission( [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 237 | fn matches_action(&self, policy_actions: &[String], requested_action: &str) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 254 | fn matches_resource(&self, policy_resources: &[String], requested_resource: &str) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `policy_repo` is never read [INFO] [stdout] --> src/services/policy_service.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct PolicyService { [INFO] [stdout] | ------------- field in this struct [INFO] [stdout] 8 | policy_repo: PolicyRepository, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `create_policy`, `get_policy`, `get_policy_with_details`, `list_policies`, `update_policy`, and `delete_policy` are never used [INFO] [stdout] --> src/services/policy_service.rs:16:18 [INFO] [stdout] | [INFO] [stdout] 11 | impl PolicyService { [INFO] [stdout] | ------------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 16 | pub async fn create_policy(&self, request: CreatePolicyRequest) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 35 | pub async fn get_policy(&self, id: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 42 | pub async fn get_policy_with_details( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 78 | pub async fn list_policies(&self) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 82 | pub async fn update_policy( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 116 | pub async fn delete_policy(&self, id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `role_repo` and `policy_repo` are never read [INFO] [stdout] --> src/services/role_service.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct RoleService { [INFO] [stdout] | ----------- fields in this struct [INFO] [stdout] 8 | role_repo: RoleRepository, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 9 | policy_repo: PolicyRepository, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/services/role_service.rs:20:18 [INFO] [stdout] | [INFO] [stdout] 12 | impl RoleService { [INFO] [stdout] | ---------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 20 | pub async fn create_role(&self, request: CreateRoleRequest) -> Result { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 30 | pub async fn get_role(&self, id: &str) -> Result { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 37 | pub async fn get_role_with_policies( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 68 | pub async fn list_roles(&self) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 72 | pub async fn update_role( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 94 | pub async fn delete_role(&self, id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 101 | pub async fn attach_policy(&self, role_id: &str, policy_id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 112 | pub async fn detach_policy(&self, role_id: &str, policy_id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `user_repo`, `role_repo`, and `policy_repo` are never read [INFO] [stdout] --> src/services/user_service.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct UserService { [INFO] [stdout] | ----------- fields in this struct [INFO] [stdout] 9 | user_repo: UserRepository, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 10 | role_repo: RoleRepository, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 11 | policy_repo: PolicyRepository, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/services/user_service.rs:27:18 [INFO] [stdout] | [INFO] [stdout] 14 | impl UserService { [INFO] [stdout] | ---------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 27 | pub async fn create_user(&self, request: CreateUserRequest) -> Result { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 58 | pub async fn get_user(&self, id: &str) -> Result { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 65 | pub async fn get_user_with_roles(&self, id: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 94 | pub async fn list_users(&self) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 98 | pub async fn update_user( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 128 | pub async fn delete_user(&self, id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 135 | pub async fn assign_role(&self, user_id: &str, role_id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 146 | pub async fn remove_role(&self, user_id: &str, role_id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 153 | pub async fn assign_policy(&self, user_id: &str, policy_id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 164 | pub async fn remove_policy(&self, user_id: &str, policy_id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2m 00s [INFO] running `Command { std: "docker" "inspect" "ce534c6663ceb40f11778c2f354a1e7d3eebf550b7f71b879f5ea5b858711799", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ce534c6663ceb40f11778c2f354a1e7d3eebf550b7f71b879f5ea5b858711799", kill_on_drop: false }` [INFO] [stdout] ce534c6663ceb40f11778c2f354a1e7d3eebf550b7f71b879f5ea5b858711799 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-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:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+1.97.0-beta.1" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] fc0ef66ababdb25cb2cc6bf08ae07598038e1440be096674e620cc4304ee9957 [INFO] running `Command { std: "docker" "start" "-a" "fc0ef66ababdb25cb2cc6bf08ae07598038e1440be096674e620cc4304ee9957", kill_on_drop: false }` [INFO] [stderr] Compiling whoami v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: variants `AuthorizationError`, `RoleNotFound`, `PolicyNotFound`, and `PermissionDenied` are never constructed [INFO] [stdout] --> src/core/errors.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 5 | pub enum AppError { [INFO] [stdout] | -------- variants in this enum [INFO] [stdout] ... [INFO] [stdout] 13 | AuthorizationError(String), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 19 | RoleNotFound, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 22 | PolicyNotFound, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 31 | PermissionDenied, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `AppError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Policy` is never constructed [INFO] [stdout] --> src/models/policy.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct Policy { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `get_document` are never used [INFO] [stdout] --> src/models/policy.rs:40:12 [INFO] [stdout] | [INFO] [stdout] 39 | impl Policy { [INFO] [stdout] | ----------- associated items in this implementation [INFO] [stdout] 40 | pub fn new( [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 58 | pub fn get_document(&self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `admin_policy` and `read_only_policy` are never used [INFO] [stdout] --> src/models/policy.rs:65:12 [INFO] [stdout] | [INFO] [stdout] 64 | impl PolicyDocument { [INFO] [stdout] | ------------------- associated functions in this implementation [INFO] [stdout] 65 | pub fn admin_policy() -> Self { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 77 | pub fn read_only_policy() -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Role` is never constructed [INFO] [stdout] --> src/models/role.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct Role { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/models/role.rs:17:12 [INFO] [stdout] | [INFO] [stdout] 16 | impl Role { [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 17 | pub fn new(name: String, description: Option) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `pool` is never read [INFO] [stdout] --> src/repository/policy_repository.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct PolicyRepository { [INFO] [stdout] | ---------------- field in this struct [INFO] [stdout] 7 | pool: SqlitePool, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/repository/policy_repository.rs:15:18 [INFO] [stdout] | [INFO] [stdout] 10 | impl PolicyRepository { [INFO] [stdout] | --------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 15 | pub async fn create(&self, policy: &Policy) -> Result { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 35 | pub async fn find_by_id(&self, id: &str) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 44 | pub async fn find_by_name(&self, name: &str) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 53 | pub async fn list_all(&self) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 61 | pub async fn update( [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 111 | pub async fn delete(&self, id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 120 | pub async fn get_attached_roles(&self, policy_id: &str) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 136 | pub async fn get_attached_users(&self, policy_id: &str) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `pool` is never read [INFO] [stdout] --> src/repository/role_repository.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct RoleRepository { [INFO] [stdout] | -------------- field in this struct [INFO] [stdout] 7 | pool: SqlitePool, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/repository/role_repository.rs:15:18 [INFO] [stdout] | [INFO] [stdout] 10 | impl RoleRepository { [INFO] [stdout] | ------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 15 | pub async fn create(&self, role: &Role) -> Result { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 34 | pub async fn find_by_id(&self, id: &str) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 43 | pub async fn find_by_name(&self, name: &str) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 52 | pub async fn list_all(&self) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 60 | pub async fn update( [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 103 | pub async fn delete(&self, id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 112 | pub async fn attach_policy(&self, role_id: &str, policy_id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 127 | pub async fn detach_policy(&self, role_id: &str, policy_id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 137 | pub async fn get_role_policies(&self, role_id: &str) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 153 | pub async fn get_role_users(&self, role_id: &str) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/repository/user_repository.rs:70:18 [INFO] [stdout] | [INFO] [stdout] 10 | impl UserRepository { [INFO] [stdout] | ------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 70 | pub async fn list_all(&self) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 78 | pub async fn update( [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 129 | pub async fn delete(&self, id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 138 | pub async fn assign_role(&self, user_id: &str, role_id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 153 | pub async fn remove_role(&self, user_id: &str, role_id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 163 | pub async fn get_user_roles(&self, user_id: &str) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 179 | pub async fn assign_policy(&self, user_id: &str, policy_id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 194 | pub async fn remove_policy(&self, user_id: &str, policy_id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 204 | pub async fn get_user_policies(&self, user_id: &str) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 220 | pub async fn get_all_user_policies(&self, user_id: &str) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MessageResponse` is never constructed [INFO] [stdout] --> src/schemas/auth.rs:50:12 [INFO] [stdout] | [INFO] [stdout] 50 | pub struct MessageResponse { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CreatePolicyRequest` is never constructed [INFO] [stdout] --> src/schemas/policy.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct CreatePolicyRequest { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `UpdatePolicyRequest` is never constructed [INFO] [stdout] --> src/schemas/policy.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 13 | pub struct UpdatePolicyRequest { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PolicyWithDetailsResponse` is never constructed [INFO] [stdout] --> src/schemas/policy.rs:20:12 [INFO] [stdout] | [INFO] [stdout] 20 | pub struct PolicyWithDetailsResponse { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `RoleInfo` is never constructed [INFO] [stdout] --> src/schemas/policy.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 30 | pub struct RoleInfo { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `UserInfo` is never constructed [INFO] [stdout] --> src/schemas/policy.rs:37:12 [INFO] [stdout] | [INFO] [stdout] 37 | pub struct UserInfo { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CreateRoleRequest` is never constructed [INFO] [stdout] --> src/schemas/role.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct CreateRoleRequest { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `UpdateRoleRequest` is never constructed [INFO] [stdout] --> src/schemas/role.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 11 | pub struct UpdateRoleRequest { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `AttachPolicyRequest` is never constructed [INFO] [stdout] --> src/schemas/role.rs:17:12 [INFO] [stdout] | [INFO] [stdout] 17 | pub struct AttachPolicyRequest { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `RoleWithPoliciesResponse` is never constructed [INFO] [stdout] --> src/schemas/role.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 22 | pub struct RoleWithPoliciesResponse { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PolicyInfo` is never constructed [INFO] [stdout] --> src/schemas/role.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 31 | pub struct PolicyInfo { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `UserInfo` is never constructed [INFO] [stdout] --> src/schemas/role.rs:38:12 [INFO] [stdout] | [INFO] [stdout] 38 | pub struct UserInfo { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CreateUserRequest` is never constructed [INFO] [stdout] --> src/schemas/user.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct CreateUserRequest { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `UpdateUserRequest` is never constructed [INFO] [stdout] --> src/schemas/user.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 12 | pub struct UpdateUserRequest { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ChangePasswordRequest` is never constructed [INFO] [stdout] --> src/schemas/user.rs:19:12 [INFO] [stdout] | [INFO] [stdout] 19 | pub struct ChangePasswordRequest { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `AssignRoleRequest` is never constructed [INFO] [stdout] --> src/schemas/user.rs:25:12 [INFO] [stdout] | [INFO] [stdout] 25 | pub struct AssignRoleRequest { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `AssignPolicyRequest` is never constructed [INFO] [stdout] --> src/schemas/user.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 30 | pub struct AssignPolicyRequest { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `UserWithRolesResponse` is never constructed [INFO] [stdout] --> src/schemas/user.rs:35:12 [INFO] [stdout] | [INFO] [stdout] 35 | pub struct UserWithRolesResponse { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `RoleInfo` is never constructed [INFO] [stdout] --> src/schemas/user.rs:45:12 [INFO] [stdout] | [INFO] [stdout] 45 | pub struct RoleInfo { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PolicyInfo` is never constructed [INFO] [stdout] --> src/schemas/user.rs:52:12 [INFO] [stdout] | [INFO] [stdout] 52 | pub struct PolicyInfo { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `check_permission`, `matches_action`, and `matches_resource` are never used [INFO] [stdout] --> src/services/auth_service.rs:207:18 [INFO] [stdout] | [INFO] [stdout] 17 | impl AuthService { [INFO] [stdout] | ---------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 207 | pub async fn check_permission( [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 237 | fn matches_action(&self, policy_actions: &[String], requested_action: &str) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 254 | fn matches_resource(&self, policy_resources: &[String], requested_resource: &str) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `policy_repo` is never read [INFO] [stdout] --> src/services/policy_service.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct PolicyService { [INFO] [stdout] | ------------- field in this struct [INFO] [stdout] 8 | policy_repo: PolicyRepository, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `create_policy`, `get_policy`, `get_policy_with_details`, `list_policies`, `update_policy`, and `delete_policy` are never used [INFO] [stdout] --> src/services/policy_service.rs:16:18 [INFO] [stdout] | [INFO] [stdout] 11 | impl PolicyService { [INFO] [stdout] | ------------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 16 | pub async fn create_policy(&self, request: CreatePolicyRequest) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 35 | pub async fn get_policy(&self, id: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 42 | pub async fn get_policy_with_details( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 78 | pub async fn list_policies(&self) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 82 | pub async fn update_policy( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 116 | pub async fn delete_policy(&self, id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `role_repo` and `policy_repo` are never read [INFO] [stdout] --> src/services/role_service.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct RoleService { [INFO] [stdout] | ----------- fields in this struct [INFO] [stdout] 8 | role_repo: RoleRepository, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 9 | policy_repo: PolicyRepository, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/services/role_service.rs:20:18 [INFO] [stdout] | [INFO] [stdout] 12 | impl RoleService { [INFO] [stdout] | ---------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 20 | pub async fn create_role(&self, request: CreateRoleRequest) -> Result { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 30 | pub async fn get_role(&self, id: &str) -> Result { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 37 | pub async fn get_role_with_policies( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 68 | pub async fn list_roles(&self) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 72 | pub async fn update_role( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 94 | pub async fn delete_role(&self, id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 101 | pub async fn attach_policy(&self, role_id: &str, policy_id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 112 | pub async fn detach_policy(&self, role_id: &str, policy_id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `user_repo`, `role_repo`, and `policy_repo` are never read [INFO] [stdout] --> src/services/user_service.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct UserService { [INFO] [stdout] | ----------- fields in this struct [INFO] [stdout] 9 | user_repo: UserRepository, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 10 | role_repo: RoleRepository, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 11 | policy_repo: PolicyRepository, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/services/user_service.rs:27:18 [INFO] [stdout] | [INFO] [stdout] 14 | impl UserService { [INFO] [stdout] | ---------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 27 | pub async fn create_user(&self, request: CreateUserRequest) -> Result { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 58 | pub async fn get_user(&self, id: &str) -> Result { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 65 | pub async fn get_user_with_roles(&self, id: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 94 | pub async fn list_users(&self) -> Result, AppError> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 98 | pub async fn update_user( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 128 | pub async fn delete_user(&self, id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 135 | pub async fn assign_role(&self, user_id: &str, role_id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 146 | pub async fn remove_role(&self, user_id: &str, role_id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 153 | pub async fn assign_policy(&self, user_id: &str, policy_id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 164 | pub async fn remove_policy(&self, user_id: &str, policy_id: &str) -> Result<(), AppError> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 3.03s [INFO] running `Command { std: "docker" "inspect" "fc0ef66ababdb25cb2cc6bf08ae07598038e1440be096674e620cc4304ee9957", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "fc0ef66ababdb25cb2cc6bf08ae07598038e1440be096674e620cc4304ee9957", kill_on_drop: false }` [INFO] [stdout] fc0ef66ababdb25cb2cc6bf08ae07598038e1440be096674e620cc4304ee9957 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-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:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+1.97.0-beta.1" "test" "--frozen", kill_on_drop: false }` [INFO] [stdout] 9ced51ee730263bfab0c13c4529a94a7410281739c0b54d2a91dc53f551d0563 [INFO] running `Command { std: "docker" "start" "-a" "9ced51ee730263bfab0c13c4529a94a7410281739c0b54d2a91dc53f551d0563", kill_on_drop: false }` [INFO] [stderr] warning: variants `AuthorizationError`, `RoleNotFound`, `PolicyNotFound`, and `PermissionDenied` are never constructed [INFO] [stderr] --> src/core/errors.rs:13:5 [INFO] [stderr] | [INFO] [stderr] 5 | pub enum AppError { [INFO] [stderr] | -------- variants in this enum [INFO] [stderr] ... [INFO] [stderr] 13 | AuthorizationError(String), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 19 | RoleNotFound, [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 22 | PolicyNotFound, [INFO] [stderr] | ^^^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 31 | PermissionDenied, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `AppError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stderr] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stderr] [INFO] [stderr] warning: struct `Policy` is never constructed [INFO] [stderr] --> src/models/policy.rs:8:12 [INFO] [stderr] | [INFO] [stderr] 8 | pub struct Policy { [INFO] [stderr] | ^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated items `new` and `get_document` are never used [INFO] [stderr] --> src/models/policy.rs:40:12 [INFO] [stderr] | [INFO] [stderr] 39 | impl Policy { [INFO] [stderr] | ----------- associated items in this implementation [INFO] [stderr] 40 | pub fn new( [INFO] [stderr] | ^^^ [INFO] [stderr] ... [INFO] [stderr] 58 | pub fn get_document(&self) -> Result { [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated functions `admin_policy` and `read_only_policy` are never used [INFO] [stderr] --> src/models/policy.rs:65:12 [INFO] [stderr] | [INFO] [stderr] 64 | impl PolicyDocument { [INFO] [stderr] | ------------------- associated functions in this implementation [INFO] [stderr] 65 | pub fn admin_policy() -> Self { [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 77 | pub fn read_only_policy() -> Self { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: struct `Role` is never constructed [INFO] [stderr] --> src/models/role.rs:8:12 [INFO] [stderr] | [INFO] [stderr] 8 | pub struct Role { [INFO] [stderr] | ^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function `new` is never used [INFO] [stderr] --> src/models/role.rs:17:12 [INFO] [stderr] | [INFO] [stderr] 16 | impl Role { [INFO] [stderr] | --------- associated function in this implementation [INFO] [stderr] 17 | pub fn new(name: String, description: Option) -> Self { [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: field `pool` is never read [INFO] [stderr] --> src/repository/policy_repository.rs:7:5 [INFO] [stderr] | [INFO] [stderr] 6 | pub struct PolicyRepository { [INFO] [stderr] | ---------------- field in this struct [INFO] [stderr] 7 | pool: SqlitePool, [INFO] [stderr] | ^^^^ [INFO] [stderr] [INFO] [stderr] warning: multiple methods are never used [INFO] [stderr] --> src/repository/policy_repository.rs:15:18 [INFO] [stderr] | [INFO] [stderr] 10 | impl PolicyRepository { [INFO] [stderr] | --------------------- methods in this implementation [INFO] [stderr] ... [INFO] [stderr] 15 | pub async fn create(&self, policy: &Policy) -> Result { [INFO] [stderr] | ^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 35 | pub async fn find_by_id(&self, id: &str) -> Result, AppError> { [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 44 | pub async fn find_by_name(&self, name: &str) -> Result, AppError> { [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 53 | pub async fn list_all(&self) -> Result, AppError> { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 61 | pub async fn update( [INFO] [stderr] | ^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 111 | pub async fn delete(&self, id: &str) -> Result<(), AppError> { [INFO] [stderr] | ^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 120 | pub async fn get_attached_roles(&self, policy_id: &str) -> Result, AppError> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 136 | pub async fn get_attached_users(&self, policy_id: &str) -> Result, AppError> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: field `pool` is never read [INFO] [stderr] --> src/repository/role_repository.rs:7:5 [INFO] [stderr] | [INFO] [stderr] 6 | pub struct RoleRepository { [INFO] [stderr] | -------------- field in this struct [INFO] [stderr] 7 | pool: SqlitePool, [INFO] [stderr] | ^^^^ [INFO] [stderr] [INFO] [stderr] warning: multiple methods are never used [INFO] [stderr] --> src/repository/role_repository.rs:15:18 [INFO] [stderr] | [INFO] [stderr] 10 | impl RoleRepository { [INFO] [stderr] | ------------------- methods in this implementation [INFO] [stderr] ... [INFO] [stderr] 15 | pub async fn create(&self, role: &Role) -> Result { [INFO] [stderr] | ^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 34 | pub async fn find_by_id(&self, id: &str) -> Result, AppError> { [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 43 | pub async fn find_by_name(&self, name: &str) -> Result, AppError> { [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 52 | pub async fn list_all(&self) -> Result, AppError> { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 60 | pub async fn update( [INFO] [stderr] | ^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 103 | pub async fn delete(&self, id: &str) -> Result<(), AppError> { [INFO] [stderr] | ^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 112 | pub async fn attach_policy(&self, role_id: &str, policy_id: &str) -> Result<(), AppError> { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 127 | pub async fn detach_policy(&self, role_id: &str, policy_id: &str) -> Result<(), AppError> { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 137 | pub async fn get_role_policies(&self, role_id: &str) -> Result, AppError> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 153 | pub async fn get_role_users(&self, role_id: &str) -> Result, AppError> { [INFO] [stderr] | ^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: multiple methods are never used [INFO] [stderr] --> src/repository/user_repository.rs:70:18 [INFO] [stderr] | [INFO] [stderr] 10 | impl UserRepository { [INFO] [stderr] | ------------------- methods in this implementation [INFO] [stderr] ... [INFO] [stderr] 70 | pub async fn list_all(&self) -> Result, AppError> { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 78 | pub async fn update( [INFO] [stderr] | ^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 129 | pub async fn delete(&self, id: &str) -> Result<(), AppError> { [INFO] [stderr] | ^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 138 | pub async fn assign_role(&self, user_id: &str, role_id: &str) -> Result<(), AppError> { [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 153 | pub async fn remove_role(&self, user_id: &str, role_id: &str) -> Result<(), AppError> { [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 163 | pub async fn get_user_roles(&self, user_id: &str) -> Result, AppError> { [INFO] [stderr] | ^^^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 179 | pub async fn assign_policy(&self, user_id: &str, policy_id: &str) -> Result<(), AppError> { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 194 | pub async fn remove_policy(&self, user_id: &str, policy_id: &str) -> Result<(), AppError> { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 204 | pub async fn get_user_policies(&self, user_id: &str) -> Result, AppError> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 220 | pub async fn get_all_user_policies(&self, user_id: &str) -> Result, AppError> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: struct `MessageResponse` is never constructed [INFO] [stderr] --> src/schemas/auth.rs:50:12 [INFO] [stderr] | [INFO] [stderr] 50 | pub struct MessageResponse { [INFO] [stderr] | ^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: struct `CreatePolicyRequest` is never constructed [INFO] [stderr] --> src/schemas/policy.rs:6:12 [INFO] [stderr] | [INFO] [stderr] 6 | pub struct CreatePolicyRequest { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: struct `UpdatePolicyRequest` is never constructed [INFO] [stderr] --> src/schemas/policy.rs:13:12 [INFO] [stderr] | [INFO] [stderr] 13 | pub struct UpdatePolicyRequest { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: struct `PolicyWithDetailsResponse` is never constructed [INFO] [stderr] --> src/schemas/policy.rs:20:12 [INFO] [stderr] | [INFO] [stderr] 20 | pub struct PolicyWithDetailsResponse { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: struct `RoleInfo` is never constructed [INFO] [stderr] --> src/schemas/policy.rs:30:12 [INFO] [stderr] | [INFO] [stderr] 30 | pub struct RoleInfo { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: struct `UserInfo` is never constructed [INFO] [stderr] --> src/schemas/policy.rs:37:12 [INFO] [stderr] | [INFO] [stderr] 37 | pub struct UserInfo { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: struct `CreateRoleRequest` is never constructed [INFO] [stderr] --> src/schemas/role.rs:5:12 [INFO] [stderr] | [INFO] [stderr] 5 | pub struct CreateRoleRequest { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: struct `UpdateRoleRequest` is never constructed [INFO] [stderr] --> src/schemas/role.rs:11:12 [INFO] [stderr] | [INFO] [stderr] 11 | pub struct UpdateRoleRequest { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: struct `AttachPolicyRequest` is never constructed [INFO] [stderr] --> src/schemas/role.rs:17:12 [INFO] [stderr] | [INFO] [stderr] 17 | pub struct AttachPolicyRequest { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: struct `RoleWithPoliciesResponse` is never constructed [INFO] [stderr] --> src/schemas/role.rs:22:12 [INFO] [stderr] | [INFO] [stderr] 22 | pub struct RoleWithPoliciesResponse { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: struct `PolicyInfo` is never constructed [INFO] [stderr] --> src/schemas/role.rs:31:12 [INFO] [stderr] | [INFO] [stderr] 31 | pub struct PolicyInfo { [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: struct `UserInfo` is never constructed [INFO] [stderr] --> src/schemas/role.rs:38:12 [INFO] [stderr] | [INFO] [stderr] 38 | pub struct UserInfo { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: struct `CreateUserRequest` is never constructed [INFO] [stderr] --> src/schemas/user.rs:5:12 [INFO] [stderr] | [INFO] [stderr] 5 | pub struct CreateUserRequest { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: struct `UpdateUserRequest` is never constructed [INFO] [stderr] --> src/schemas/user.rs:12:12 [INFO] [stderr] | [INFO] [stderr] 12 | pub struct UpdateUserRequest { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: struct `ChangePasswordRequest` is never constructed [INFO] [stderr] --> src/schemas/user.rs:19:12 [INFO] [stderr] | [INFO] [stderr] 19 | pub struct ChangePasswordRequest { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: struct `AssignRoleRequest` is never constructed [INFO] [stderr] --> src/schemas/user.rs:25:12 [INFO] [stderr] | [INFO] [stderr] 25 | pub struct AssignRoleRequest { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: struct `AssignPolicyRequest` is never constructed [INFO] [stderr] --> src/schemas/user.rs:30:12 [INFO] [stderr] | [INFO] [stderr] 30 | pub struct AssignPolicyRequest { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: struct `UserWithRolesResponse` is never constructed [INFO] [stderr] --> src/schemas/user.rs:35:12 [INFO] [stderr] | [INFO] [stderr] 35 | pub struct UserWithRolesResponse { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: struct `RoleInfo` is never constructed [INFO] [stderr] --> src/schemas/user.rs:45:12 [INFO] [stderr] | [INFO] [stderr] 45 | pub struct RoleInfo { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: struct `PolicyInfo` is never constructed [INFO] [stderr] --> src/schemas/user.rs:52:12 [INFO] [stderr] | [INFO] [stderr] 52 | pub struct PolicyInfo { [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: methods `check_permission`, `matches_action`, and `matches_resource` are never used [INFO] [stderr] --> src/services/auth_service.rs:207:18 [INFO] [stderr] | [INFO] [stderr] 17 | impl AuthService { [INFO] [stderr] | ---------------- methods in this implementation [INFO] [stderr] ... [INFO] [stderr] 207 | pub async fn check_permission( [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 237 | fn matches_action(&self, policy_actions: &[String], requested_action: &str) -> bool { [INFO] [stderr] | ^^^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 254 | fn matches_resource(&self, policy_resources: &[String], requested_resource: &str) -> bool { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: field `policy_repo` is never read [INFO] [stderr] --> src/services/policy_service.rs:8:5 [INFO] [stderr] | [INFO] [stderr] 7 | pub struct PolicyService { [INFO] [stderr] | ------------- field in this struct [INFO] [stderr] 8 | policy_repo: PolicyRepository, [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: methods `create_policy`, `get_policy`, `get_policy_with_details`, `list_policies`, `update_policy`, and `delete_policy` are never used [INFO] [stderr] --> src/services/policy_service.rs:16:18 [INFO] [stderr] | [INFO] [stderr] 11 | impl PolicyService { [INFO] [stderr] | ------------------ methods in this implementation [INFO] [stderr] ... [INFO] [stderr] 16 | pub async fn create_policy(&self, request: CreatePolicyRequest) -> Result { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 35 | pub async fn get_policy(&self, id: &str) -> Result { [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 42 | pub async fn get_policy_with_details( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 78 | pub async fn list_policies(&self) -> Result, AppError> { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 82 | pub async fn update_policy( [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 116 | pub async fn delete_policy(&self, id: &str) -> Result<(), AppError> { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: fields `role_repo` and `policy_repo` are never read [INFO] [stderr] --> src/services/role_service.rs:8:5 [INFO] [stderr] | [INFO] [stderr] 7 | pub struct RoleService { [INFO] [stderr] | ----------- fields in this struct [INFO] [stderr] 8 | role_repo: RoleRepository, [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] 9 | policy_repo: PolicyRepository, [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: multiple methods are never used [INFO] [stderr] --> src/services/role_service.rs:20:18 [INFO] [stderr] | [INFO] [stderr] 12 | impl RoleService { [INFO] [stderr] | ---------------- methods in this implementation [INFO] [stderr] ... [INFO] [stderr] 20 | pub async fn create_role(&self, request: CreateRoleRequest) -> Result { [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 30 | pub async fn get_role(&self, id: &str) -> Result { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 37 | pub async fn get_role_with_policies( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 68 | pub async fn list_roles(&self) -> Result, AppError> { [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 72 | pub async fn update_role( [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 94 | pub async fn delete_role(&self, id: &str) -> Result<(), AppError> { [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 101 | pub async fn attach_policy(&self, role_id: &str, policy_id: &str) -> Result<(), AppError> { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 112 | pub async fn detach_policy(&self, role_id: &str, policy_id: &str) -> Result<(), AppError> { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: fields `user_repo`, `role_repo`, and `policy_repo` are never read [INFO] [stderr] --> src/services/user_service.rs:9:5 [INFO] [stderr] | [INFO] [stderr] 8 | pub struct UserService { [INFO] [stderr] | ----------- fields in this struct [INFO] [stderr] 9 | user_repo: UserRepository, [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] 10 | role_repo: RoleRepository, [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] 11 | policy_repo: PolicyRepository, [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: multiple methods are never used [INFO] [stderr] --> src/services/user_service.rs:27:18 [INFO] [stderr] | [INFO] [stderr] 14 | impl UserService { [INFO] [stderr] | ---------------- methods in this implementation [INFO] [stderr] ... [INFO] [stderr] 27 | pub async fn create_user(&self, request: CreateUserRequest) -> Result { [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 58 | pub async fn get_user(&self, id: &str) -> Result { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 65 | pub async fn get_user_with_roles(&self, id: &str) -> Result { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 94 | pub async fn list_users(&self) -> Result, AppError> { [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 98 | pub async fn update_user( [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 128 | pub async fn delete_user(&self, id: &str) -> Result<(), AppError> { [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 135 | pub async fn assign_role(&self, user_id: &str, role_id: &str) -> Result<(), AppError> { [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 146 | pub async fn remove_role(&self, user_id: &str, role_id: &str) -> Result<(), AppError> { [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 153 | pub async fn assign_policy(&self, user_id: &str, policy_id: &str) -> Result<(), AppError> { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 164 | pub async fn remove_policy(&self, user_id: &str, policy_id: &str) -> Result<(), AppError> { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: `whoami` (bin "whoami" test) generated 38 warnings [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.36s [INFO] [stdout] [INFO] [stderr] Running unittests src/main.rs (/opt/rustwide/target/debug/deps/whoami-a58667587cfe6f0a) [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" "9ced51ee730263bfab0c13c4529a94a7410281739c0b54d2a91dc53f551d0563", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9ced51ee730263bfab0c13c4529a94a7410281739c0b54d2a91dc53f551d0563", kill_on_drop: false }` [INFO] [stdout] 9ced51ee730263bfab0c13c4529a94a7410281739c0b54d2a91dc53f551d0563