[INFO] cloning repository https://github.com/JulioRaf4/rust-learning [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/JulioRaf4/rust-learning" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FJulioRaf4%2Frust-learning", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FJulioRaf4%2Frust-learning'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] e3674264e91c3bd0ccf5d7b09ef0eb989019ed2c [INFO] checking JulioRaf4/rust-learning against try#44f3504e96c944ae54fc72b5f5008f53f7eda001 for pr-136776 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FJulioRaf4%2Frust-learning" "/workspace/builds/worker-5-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/JulioRaf4/rust-learning on toolchain 44f3504e96c944ae54fc72b5f5008f53f7eda001 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+44f3504e96c944ae54fc72b5f5008f53f7eda001" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/JulioRaf4/rust-learning [INFO] finished tweaking git repo https://github.com/JulioRaf4/rust-learning [INFO] tweaked toml for git repo https://github.com/JulioRaf4/rust-learning written to /workspace/builds/worker-5-tc2/source/Cargo.toml [INFO] crate git repo https://github.com/JulioRaf4/rust-learning 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" "+44f3504e96c944ae54fc72b5f5008f53f7eda001" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded cc v1.0.87 [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:3959728d45483eb673ba100a951a6b9f5012970368db2a9e08e0ac9b67c8a5ad" "/opt/rustwide/cargo-home/bin/cargo" "+44f3504e96c944ae54fc72b5f5008f53f7eda001" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 2e1ca4e39826730c407e5e45062def61b1f14202834f5e1f152b1d11503ffe8b [INFO] running `Command { std: "docker" "start" "-a" "2e1ca4e39826730c407e5e45062def61b1f14202834f5e1f152b1d11503ffe8b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "2e1ca4e39826730c407e5e45062def61b1f14202834f5e1f152b1d11503ffe8b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2e1ca4e39826730c407e5e45062def61b1f14202834f5e1f152b1d11503ffe8b", kill_on_drop: false }` [INFO] [stdout] 2e1ca4e39826730c407e5e45062def61b1f14202834f5e1f152b1d11503ffe8b [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=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:3959728d45483eb673ba100a951a6b9f5012970368db2a9e08e0ac9b67c8a5ad" "/opt/rustwide/cargo-home/bin/cargo" "+44f3504e96c944ae54fc72b5f5008f53f7eda001" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 2b482d1592c664caec86ff5cf7605fe4606c3871e8592753c816d39f830985bf [INFO] running `Command { std: "docker" "start" "-a" "2b482d1592c664caec86ff5cf7605fe4606c3871e8592753c816d39f830985bf", kill_on_drop: false }` [INFO] [stderr] Checking subtle v2.5.0 [INFO] [stderr] Checking getrandom v0.2.12 [INFO] [stderr] Checking ppv-lite86 v0.2.17 [INFO] [stderr] Checking unicode-normalization v0.1.23 [INFO] [stderr] Checking finl_unicode v1.2.0 [INFO] [stderr] Compiling syn v2.0.50 [INFO] [stderr] Checking cpufeatures v0.2.12 [INFO] [stderr] Checking unicode-bidi v0.3.15 [INFO] [stderr] Checking futures-core v0.3.30 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking futures-sink v0.3.30 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking socket2 v0.5.6 [INFO] [stderr] Checking md-5 v0.10.6 [INFO] [stderr] Checking hmac v0.12.1 [INFO] [stderr] Checking sha2 v0.10.8 [INFO] [stderr] Checking mio v0.8.10 [INFO] [stderr] Checking base64 v0.21.7 [INFO] [stderr] Compiling async-trait v0.1.77 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking stringprep v0.1.4 [INFO] [stderr] Checking memchr v2.7.1 [INFO] [stderr] Checking siphasher v0.3.11 [INFO] [stderr] Checking smallvec v1.13.1 [INFO] [stderr] Checking fallible-iterator v0.2.0 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Compiling serde v1.0.197 [INFO] [stderr] Checking tokio v1.36.0 [INFO] [stderr] Checking phf_shared v0.11.2 [INFO] [stderr] Checking parking_lot_core v0.9.9 [INFO] [stderr] Checking futures-task v0.3.30 [INFO] [stderr] Checking phf v0.11.2 [INFO] [stderr] Checking futures-channel v0.3.30 [INFO] [stderr] Compiling serde_json v1.0.114 [INFO] [stderr] Checking parking_lot v0.12.1 [INFO] [stderr] Checking whoami v1.4.1 [INFO] [stderr] Checking log v0.4.20 [INFO] [stderr] Checking ryu v1.0.17 [INFO] [stderr] Checking postgres-protocol v0.6.6 [INFO] [stderr] Checking postgres-types v0.2.6 [INFO] [stderr] Compiling futures-macro v0.3.30 [INFO] [stderr] Compiling serde_derive v1.0.197 [INFO] [stderr] Checking tokio-util v0.7.10 [INFO] [stderr] Checking futures-util v0.3.30 [INFO] [stderr] Checking tokio-postgres v0.7.10 [INFO] [stderr] Checking postgres v0.19.7 [INFO] [stderr] Checking rust-learning v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error[E0583]: file not found for module `routes` [INFO] [stdout] --> src/main.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | mod routes; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: to create the module `routes`, create file "src/routes.rs" or "src/routes/mod.rs" [INFO] [stdout] = note: if there is a `mod routes` elsewhere in the crate already, import it with `use crate::...` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0583]: file not found for module `routes` [INFO] [stdout] --> src/main.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | mod routes; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: to create the module `routes`, create file "src/routes.rs" or "src/routes/mod.rs" [INFO] [stdout] = note: if there is a `mod routes` elsewhere in the crate already, import it with `use crate::...` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: environment variable `DATABASE_URL` not defined at compile time [INFO] [stdout] --> src/db.rs:4:22 [INFO] [stdout] | [INFO] [stdout] 4 | const DB_URL: &str = env!("DATABASE_URL"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use `std::env::var("DATABASE_URL")` to read the variable at run time [INFO] [stdout] = note: this error originates in the macro `env` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: environment variable `DATABASE_URL` not defined at compile time [INFO] [stdout] --> src/db.rs:4:22 [INFO] [stdout] | [INFO] [stdout] 4 | const DB_URL: &str = env!("DATABASE_URL"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use `std::env::var("DATABASE_URL")` to read the variable at run time [INFO] [stdout] = note: this error originates in the macro `env` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: cannot find derive macro `Serialize` in this scope [INFO] [stdout] --> src/models.rs:3:10 [INFO] [stdout] | [INFO] [stdout] 3 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: `Serialize` is imported here, but it is only a trait, without a derive macro [INFO] [stdout] --> src/models.rs:1:13 [INFO] [stdout] | [INFO] [stdout] 1 | use serde::{Serialize, Deserialize}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] help: consider importing this derive macro [INFO] [stdout] | [INFO] [stdout] 1 + use serde_derive::Serialize; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: cannot find derive macro `Serialize` in this scope [INFO] [stdout] --> src/models.rs:3:10 [INFO] [stdout] | [INFO] [stdout] 3 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: `Serialize` is imported here, but it is only a trait, without a derive macro [INFO] [stdout] --> src/models.rs:1:13 [INFO] [stdout] | [INFO] [stdout] 1 | use serde::{Serialize, Deserialize}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] help: consider importing this derive macro [INFO] [stdout] | [INFO] [stdout] 1 + use serde_derive::Serialize; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: cannot find derive macro `Deserialize` in this scope [INFO] [stdout] --> src/models.rs:3:21 [INFO] [stdout] | [INFO] [stdout] 3 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: `Deserialize` is imported here, but it is only a trait, without a derive macro [INFO] [stdout] --> src/models.rs:1:24 [INFO] [stdout] | [INFO] [stdout] 1 | use serde::{Serialize, Deserialize}; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] help: consider importing this derive macro [INFO] [stdout] | [INFO] [stdout] 1 + use serde_derive::Deserialize; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: cannot find derive macro `Deserialize` in this scope [INFO] [stdout] --> src/models.rs:3:21 [INFO] [stdout] | [INFO] [stdout] 3 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: `Deserialize` is imported here, but it is only a trait, without a derive macro [INFO] [stdout] --> src/models.rs:1:24 [INFO] [stdout] | [INFO] [stdout] 1 | use serde::{Serialize, Deserialize}; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] help: consider importing this derive macro [INFO] [stdout] | [INFO] [stdout] 1 + use serde_derive::Deserialize; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `get_user_request_body` in this scope [INFO] [stdout] --> src/controllers.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 6 | match (get_user_request_body(&request), Client::connect(DB_URL, NoTls)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this function [INFO] [stdout] | [INFO] [stdout] 1 + use crate::utils::get_user_request_body; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Client` [INFO] [stdout] --> src/controllers.rs:6:45 [INFO] [stdout] | [INFO] [stdout] 6 | match (get_user_request_body(&request), Client::connect(DB_URL, NoTls)) { [INFO] [stdout] | ^^^^^^ use of undeclared type `Client` [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 1 + use postgres::Client; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `DB_URL` in this scope [INFO] [stdout] --> src/controllers.rs:6:61 [INFO] [stdout] | [INFO] [stdout] 6 | match (get_user_request_body(&request), Client::connect(DB_URL, NoTls)) { [INFO] [stdout] | ^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: constant `crate::db::DB_URL` exists but is inaccessible [INFO] [stdout] --> src/db.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | const DB_URL: &str = env!("DATABASE_URL"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not accessible [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `OK_RESPONSE` in this scope [INFO] [stdout] --> src/controllers.rs:15:14 [INFO] [stdout] | [INFO] [stdout] 15 | (OK_RESPONSE.to_string(), "User created".to_string()) [INFO] [stdout] | ^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this constant [INFO] [stdout] | [INFO] [stdout] 1 + use crate::OK_RESPONSE; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `INTERNAL_SERVER_ERROR` in this scope [INFO] [stdout] --> src/controllers.rs:17:15 [INFO] [stdout] | [INFO] [stdout] 17 | _ => (INTERNAL_SERVER_ERROR.to_string(), "Error".to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this constant [INFO] [stdout] | [INFO] [stdout] 1 + use crate::INTERNAL_SERVER_ERROR; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `get_id` in this scope [INFO] [stdout] --> src/controllers.rs:23:12 [INFO] [stdout] | [INFO] [stdout] 23 | match (get_id(&request).parse::(), Client::connect(DB_URL, NoTls)) { [INFO] [stdout] | ^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this function [INFO] [stdout] | [INFO] [stdout] 1 + use crate::utils::get_id; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Client` [INFO] [stdout] --> src/controllers.rs:23:45 [INFO] [stdout] | [INFO] [stdout] 23 | match (get_id(&request).parse::(), Client::connect(DB_URL, NoTls)) { [INFO] [stdout] | ^^^^^^ use of undeclared type `Client` [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 1 + use postgres::Client; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `DB_URL` in this scope [INFO] [stdout] --> src/controllers.rs:23:61 [INFO] [stdout] | [INFO] [stdout] 23 | match (get_id(&request).parse::(), Client::connect(DB_URL, NoTls)) { [INFO] [stdout] | ^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: constant `crate::db::DB_URL` exists but is inaccessible [INFO] [stdout] --> src/db.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | const DB_URL: &str = env!("DATABASE_URL"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not accessible [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `OK_RESPONSE` in this scope [INFO] [stdout] --> src/controllers.rs:33:22 [INFO] [stdout] | [INFO] [stdout] 33 | (OK_RESPONSE.to_string(), serde_json::to_string(&user).unwrap()) [INFO] [stdout] | ^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this constant [INFO] [stdout] | [INFO] [stdout] 1 + use crate::OK_RESPONSE; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `NOT_FOUND` in this scope [INFO] [stdout] --> src/controllers.rs:35:23 [INFO] [stdout] | [INFO] [stdout] 35 | _ => (NOT_FOUND.to_string(), "User not found".to_string()), [INFO] [stdout] | ^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this constant [INFO] [stdout] | [INFO] [stdout] 1 + use crate::NOT_FOUND; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `INTERNAL_SERVER_ERROR` in this scope [INFO] [stdout] --> src/controllers.rs:38:15 [INFO] [stdout] | [INFO] [stdout] 38 | _ => (INTERNAL_SERVER_ERROR.to_string(), "Error".to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this constant [INFO] [stdout] | [INFO] [stdout] 1 + use crate::INTERNAL_SERVER_ERROR; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Client` [INFO] [stdout] --> src/controllers.rs:44:11 [INFO] [stdout] | [INFO] [stdout] 44 | match Client::connect(DB_URL, NoTls) { [INFO] [stdout] | ^^^^^^ use of undeclared type `Client` [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 1 + use postgres::Client; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `DB_URL` in this scope [INFO] [stdout] --> src/controllers.rs:44:27 [INFO] [stdout] | [INFO] [stdout] 44 | match Client::connect(DB_URL, NoTls) { [INFO] [stdout] | ^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: constant `crate::db::DB_URL` exists but is inaccessible [INFO] [stdout] --> src/db.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | const DB_URL: &str = env!("DATABASE_URL"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not accessible [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `OK_RESPONSE` in this scope [INFO] [stdout] --> src/controllers.rs:56:14 [INFO] [stdout] | [INFO] [stdout] 56 | (OK_RESPONSE.to_string(), serde_json::to_string(&users).unwrap()) [INFO] [stdout] | ^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this constant [INFO] [stdout] | [INFO] [stdout] 1 + use crate::OK_RESPONSE; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `get_user_request_body` in this scope [INFO] [stdout] --> src/controllers.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 6 | match (get_user_request_body(&request), Client::connect(DB_URL, NoTls)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this function [INFO] [stdout] | [INFO] [stdout] 1 + use crate::utils::get_user_request_body; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `INTERNAL_SERVER_ERROR` in this scope [INFO] [stdout] --> src/controllers.rs:58:15 [INFO] [stdout] | [INFO] [stdout] 58 | _ => (INTERNAL_SERVER_ERROR.to_string(), "Error".to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this constant [INFO] [stdout] | [INFO] [stdout] 1 + use crate::INTERNAL_SERVER_ERROR; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `get_id` in this scope [INFO] [stdout] --> src/controllers.rs:66:13 [INFO] [stdout] | [INFO] [stdout] 66 | get_id(&request).parse::(), [INFO] [stdout] | ^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this function [INFO] [stdout] | [INFO] [stdout] 1 + use crate::utils::get_id; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Client` [INFO] [stdout] --> src/controllers.rs:6:45 [INFO] [stdout] | [INFO] [stdout] 6 | match (get_user_request_body(&request), Client::connect(DB_URL, NoTls)) { [INFO] [stdout] | ^^^^^^ use of undeclared type `Client` [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 1 + use postgres::Client; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `DB_URL` in this scope [INFO] [stdout] --> src/controllers.rs:6:61 [INFO] [stdout] | [INFO] [stdout] 6 | match (get_user_request_body(&request), Client::connect(DB_URL, NoTls)) { [INFO] [stdout] | ^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: constant `crate::db::DB_URL` exists but is inaccessible [INFO] [stdout] --> src/db.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | const DB_URL: &str = env!("DATABASE_URL"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not accessible [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `get_user_request_body` in this scope [INFO] [stdout] --> src/controllers.rs:67:13 [INFO] [stdout] | [INFO] [stdout] 67 | get_user_request_body(&request), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this function [INFO] [stdout] | [INFO] [stdout] 1 + use crate::utils::get_user_request_body; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Client` [INFO] [stdout] --> src/controllers.rs:68:13 [INFO] [stdout] | [INFO] [stdout] 68 | Client::connect(DB_URL, NoTls), [INFO] [stdout] | ^^^^^^ use of undeclared type `Client` [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 1 + use postgres::Client; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `DB_URL` in this scope [INFO] [stdout] --> src/controllers.rs:68:29 [INFO] [stdout] | [INFO] [stdout] 68 | Client::connect(DB_URL, NoTls), [INFO] [stdout] | ^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: constant `crate::db::DB_URL` exists but is inaccessible [INFO] [stdout] --> src/db.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | const DB_URL: &str = env!("DATABASE_URL"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not accessible [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `OK_RESPONSE` in this scope [INFO] [stdout] --> src/controllers.rs:79:14 [INFO] [stdout] | [INFO] [stdout] 79 | (OK_RESPONSE.to_string(), "User updated".to_string()) [INFO] [stdout] | ^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this constant [INFO] [stdout] | [INFO] [stdout] 1 + use crate::OK_RESPONSE; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `INTERNAL_SERVER_ERROR` in this scope [INFO] [stdout] --> src/controllers.rs:81:15 [INFO] [stdout] | [INFO] [stdout] 81 | _ => (INTERNAL_SERVER_ERROR.to_string(), "Error".to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this constant [INFO] [stdout] | [INFO] [stdout] 1 + use crate::INTERNAL_SERVER_ERROR; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `get_id` in this scope [INFO] [stdout] --> src/controllers.rs:87:12 [INFO] [stdout] | [INFO] [stdout] 87 | match (get_id(&request).parse::(), Client::connect(DB_URL, NoTls)) { [INFO] [stdout] | ^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this function [INFO] [stdout] | [INFO] [stdout] 1 + use crate::utils::get_id; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Client` [INFO] [stdout] --> src/controllers.rs:87:45 [INFO] [stdout] | [INFO] [stdout] 87 | match (get_id(&request).parse::(), Client::connect(DB_URL, NoTls)) { [INFO] [stdout] | ^^^^^^ use of undeclared type `Client` [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 1 + use postgres::Client; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `DB_URL` in this scope [INFO] [stdout] --> src/controllers.rs:87:61 [INFO] [stdout] | [INFO] [stdout] 87 | match (get_id(&request).parse::(), Client::connect(DB_URL, NoTls)) { [INFO] [stdout] | ^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: constant `crate::db::DB_URL` exists but is inaccessible [INFO] [stdout] --> src/db.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | const DB_URL: &str = env!("DATABASE_URL"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not accessible [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `NOT_FOUND` in this scope [INFO] [stdout] --> src/controllers.rs:92:25 [INFO] [stdout] | [INFO] [stdout] 92 | return (NOT_FOUND.to_string(), "User not found".to_string()); [INFO] [stdout] | ^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this constant [INFO] [stdout] | [INFO] [stdout] 1 + use crate::NOT_FOUND; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `OK_RESPONSE` in this scope [INFO] [stdout] --> src/controllers.rs:95:14 [INFO] [stdout] | [INFO] [stdout] 95 | (OK_RESPONSE.to_string(), "User deleted".to_string()) [INFO] [stdout] | ^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this constant [INFO] [stdout] | [INFO] [stdout] 1 + use crate::OK_RESPONSE; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `INTERNAL_SERVER_ERROR` in this scope [INFO] [stdout] --> src/controllers.rs:97:15 [INFO] [stdout] | [INFO] [stdout] 97 | _ => (INTERNAL_SERVER_ERROR.to_string(), "Error".to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this constant [INFO] [stdout] | [INFO] [stdout] 1 + use crate::INTERNAL_SERVER_ERROR; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `OK_RESPONSE` in this scope [INFO] [stdout] --> src/controllers.rs:15:14 [INFO] [stdout] | [INFO] [stdout] 15 | (OK_RESPONSE.to_string(), "User created".to_string()) [INFO] [stdout] | ^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this constant [INFO] [stdout] | [INFO] [stdout] 1 + use crate::OK_RESPONSE; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0412]: cannot find type `User` in this scope [INFO] [stdout] --> src/utils.rs:5:55 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn get_user_request_body(request: &str) -> Result { [INFO] [stdout] | ^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 1 + use crate::models::User; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `INTERNAL_SERVER_ERROR` in this scope [INFO] [stdout] --> src/controllers.rs:17:15 [INFO] [stdout] | [INFO] [stdout] 17 | _ => (INTERNAL_SERVER_ERROR.to_string(), "Error".to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this constant [INFO] [stdout] | [INFO] [stdout] 1 + use crate::INTERNAL_SERVER_ERROR; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0603]: function `handle_post_request` is private [INFO] [stdout] --> src/main.rs:12:19 [INFO] [stdout] | [INFO] [stdout] 12 | use controllers::{handle_post_request, handle_get_request, handle_get_all_request, handle_put_request, handle_delete_request}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ private function [INFO] [stdout] | [INFO] [stdout] note: the function `handle_post_request` is defined here [INFO] [stdout] --> src/controllers.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | fn handle_post_request(request: &str) -> (String, String) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `get_id` in this scope [INFO] [stdout] --> src/controllers.rs:23:12 [INFO] [stdout] | [INFO] [stdout] 23 | match (get_id(&request).parse::(), Client::connect(DB_URL, NoTls)) { [INFO] [stdout] | ^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this function [INFO] [stdout] | [INFO] [stdout] 1 + use crate::utils::get_id; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0603]: function `handle_get_request` is private [INFO] [stdout] --> src/main.rs:12:40 [INFO] [stdout] | [INFO] [stdout] 12 | use controllers::{handle_post_request, handle_get_request, handle_get_all_request, handle_put_request, handle_delete_request}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ private function [INFO] [stdout] | [INFO] [stdout] note: the function `handle_get_request` is defined here [INFO] [stdout] --> src/controllers.rs:22:1 [INFO] [stdout] | [INFO] [stdout] 22 | fn handle_get_request(request: &str) -> (String, String) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0603]: function `handle_get_all_request` is private [INFO] [stdout] --> src/main.rs:12:60 [INFO] [stdout] | [INFO] [stdout] 12 | use controllers::{handle_post_request, handle_get_request, handle_get_all_request, handle_put_request, handle_delete_request}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ private function [INFO] [stdout] | [INFO] [stdout] note: the function `handle_get_all_request` is defined here [INFO] [stdout] --> src/controllers.rs:43:1 [INFO] [stdout] | [INFO] [stdout] 43 | fn handle_get_all_request(request: &str) -> (String, String) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Client` [INFO] [stdout] --> src/controllers.rs:23:45 [INFO] [stdout] | [INFO] [stdout] 23 | match (get_id(&request).parse::(), Client::connect(DB_URL, NoTls)) { [INFO] [stdout] | ^^^^^^ use of undeclared type `Client` [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 1 + use postgres::Client; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0603]: function `handle_put_request` is private [INFO] [stdout] --> src/main.rs:12:84 [INFO] [stdout] | [INFO] [stdout] 12 | use controllers::{handle_post_request, handle_get_request, handle_get_all_request, handle_put_request, handle_delete_request}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ private function [INFO] [stdout] | [INFO] [stdout] note: the function `handle_put_request` is defined here [INFO] [stdout] --> src/controllers.rs:63:1 [INFO] [stdout] | [INFO] [stdout] 63 | fn handle_put_request(request: &str) -> (String, String) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0603]: function `handle_delete_request` is private [INFO] [stdout] --> src/main.rs:12:104 [INFO] [stdout] | [INFO] [stdout] 12 | use controllers::{handle_post_request, handle_get_request, handle_get_all_request, handle_put_request, handle_delete_request}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ private function [INFO] [stdout] | [INFO] [stdout] note: the function `handle_delete_request` is defined here [INFO] [stdout] --> src/controllers.rs:86:1 [INFO] [stdout] | [INFO] [stdout] 86 | fn handle_delete_request(request: &str) -> (String, String) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::env` [INFO] [stdout] --> src/main.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::env; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::models::User` [INFO] [stdout] --> src/db.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::models::User; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `DB_URL` in this scope [INFO] [stdout] --> src/controllers.rs:23:61 [INFO] [stdout] | [INFO] [stdout] 23 | match (get_id(&request).parse::(), Client::connect(DB_URL, NoTls)) { [INFO] [stdout] | ^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: constant `crate::db::DB_URL` exists but is inaccessible [INFO] [stdout] --> src/db.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | const DB_URL: &str = env!("DATABASE_URL"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not accessible [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::db::get_db_client` [INFO] [stdout] --> src/controllers.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::db::get_db_client; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `OK_RESPONSE` in this scope [INFO] [stdout] --> src/controllers.rs:33:22 [INFO] [stdout] | [INFO] [stdout] 33 | (OK_RESPONSE.to_string(), serde_json::to_string(&user).unwrap()) [INFO] [stdout] | ^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this constant [INFO] [stdout] | [INFO] [stdout] 1 + use crate::OK_RESPONSE; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `NOT_FOUND` in this scope [INFO] [stdout] --> src/controllers.rs:35:23 [INFO] [stdout] | [INFO] [stdout] 35 | _ => (NOT_FOUND.to_string(), "User not found".to_string()), [INFO] [stdout] | ^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this constant [INFO] [stdout] | [INFO] [stdout] 1 + use crate::NOT_FOUND; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `INTERNAL_SERVER_ERROR` in this scope [INFO] [stdout] --> src/controllers.rs:38:15 [INFO] [stdout] | [INFO] [stdout] 38 | _ => (INTERNAL_SERVER_ERROR.to_string(), "Error".to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this constant [INFO] [stdout] | [INFO] [stdout] 1 + use crate::INTERNAL_SERVER_ERROR; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Client` [INFO] [stdout] --> src/controllers.rs:44:11 [INFO] [stdout] | [INFO] [stdout] 44 | match Client::connect(DB_URL, NoTls) { [INFO] [stdout] | ^^^^^^ use of undeclared type `Client` [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 1 + use postgres::Client; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `DB_URL` in this scope [INFO] [stdout] --> src/controllers.rs:44:27 [INFO] [stdout] | [INFO] [stdout] 44 | match Client::connect(DB_URL, NoTls) { [INFO] [stdout] | ^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: constant `crate::db::DB_URL` exists but is inaccessible [INFO] [stdout] --> src/db.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | const DB_URL: &str = env!("DATABASE_URL"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not accessible [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `OK_RESPONSE` in this scope [INFO] [stdout] --> src/controllers.rs:56:14 [INFO] [stdout] | [INFO] [stdout] 56 | (OK_RESPONSE.to_string(), serde_json::to_string(&users).unwrap()) [INFO] [stdout] | ^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this constant [INFO] [stdout] | [INFO] [stdout] 1 + use crate::OK_RESPONSE; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `INTERNAL_SERVER_ERROR` in this scope [INFO] [stdout] --> src/controllers.rs:58:15 [INFO] [stdout] | [INFO] [stdout] 58 | _ => (INTERNAL_SERVER_ERROR.to_string(), "Error".to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this constant [INFO] [stdout] | [INFO] [stdout] 1 + use crate::INTERNAL_SERVER_ERROR; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `get_id` in this scope [INFO] [stdout] --> src/controllers.rs:66:13 [INFO] [stdout] | [INFO] [stdout] 66 | get_id(&request).parse::(), [INFO] [stdout] | ^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this function [INFO] [stdout] | [INFO] [stdout] 1 + use crate::utils::get_id; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `get_user_request_body` in this scope [INFO] [stdout] --> src/controllers.rs:67:13 [INFO] [stdout] | [INFO] [stdout] 67 | get_user_request_body(&request), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this function [INFO] [stdout] | [INFO] [stdout] 1 + use crate::utils::get_user_request_body; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Client` [INFO] [stdout] --> src/controllers.rs:68:13 [INFO] [stdout] | [INFO] [stdout] 68 | Client::connect(DB_URL, NoTls), [INFO] [stdout] | ^^^^^^ use of undeclared type `Client` [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 1 + use postgres::Client; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `DB_URL` in this scope [INFO] [stdout] --> src/controllers.rs:68:29 [INFO] [stdout] | [INFO] [stdout] 68 | Client::connect(DB_URL, NoTls), [INFO] [stdout] | ^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: constant `crate::db::DB_URL` exists but is inaccessible [INFO] [stdout] --> src/db.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | const DB_URL: &str = env!("DATABASE_URL"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not accessible [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `OK_RESPONSE` in this scope [INFO] [stdout] --> src/controllers.rs:79:14 [INFO] [stdout] | [INFO] [stdout] 79 | (OK_RESPONSE.to_string(), "User updated".to_string()) [INFO] [stdout] | ^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this constant [INFO] [stdout] | [INFO] [stdout] 1 + use crate::OK_RESPONSE; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `INTERNAL_SERVER_ERROR` in this scope [INFO] [stdout] --> src/controllers.rs:81:15 [INFO] [stdout] | [INFO] [stdout] 81 | _ => (INTERNAL_SERVER_ERROR.to_string(), "Error".to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this constant [INFO] [stdout] | [INFO] [stdout] 1 + use crate::INTERNAL_SERVER_ERROR; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `get_id` in this scope [INFO] [stdout] --> src/controllers.rs:87:12 [INFO] [stdout] | [INFO] [stdout] 87 | match (get_id(&request).parse::(), Client::connect(DB_URL, NoTls)) { [INFO] [stdout] | ^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this function [INFO] [stdout] | [INFO] [stdout] 1 + use crate::utils::get_id; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Client` [INFO] [stdout] --> src/controllers.rs:87:45 [INFO] [stdout] | [INFO] [stdout] 87 | match (get_id(&request).parse::(), Client::connect(DB_URL, NoTls)) { [INFO] [stdout] | ^^^^^^ use of undeclared type `Client` [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 1 + use postgres::Client; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `DB_URL` in this scope [INFO] [stdout] --> src/controllers.rs:87:61 [INFO] [stdout] | [INFO] [stdout] 87 | match (get_id(&request).parse::(), Client::connect(DB_URL, NoTls)) { [INFO] [stdout] | ^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: constant `crate::db::DB_URL` exists but is inaccessible [INFO] [stdout] --> src/db.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | const DB_URL: &str = env!("DATABASE_URL"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not accessible [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `NOT_FOUND` in this scope [INFO] [stdout] --> src/controllers.rs:92:25 [INFO] [stdout] | [INFO] [stdout] 92 | return (NOT_FOUND.to_string(), "User not found".to_string()); [INFO] [stdout] | ^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this constant [INFO] [stdout] | [INFO] [stdout] 1 + use crate::NOT_FOUND; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `OK_RESPONSE` in this scope [INFO] [stdout] --> src/controllers.rs:95:14 [INFO] [stdout] | [INFO] [stdout] 95 | (OK_RESPONSE.to_string(), "User deleted".to_string()) [INFO] [stdout] | ^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this constant [INFO] [stdout] | [INFO] [stdout] 1 + use crate::OK_RESPONSE; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `INTERNAL_SERVER_ERROR` in this scope [INFO] [stdout] --> src/controllers.rs:97:15 [INFO] [stdout] | [INFO] [stdout] 97 | _ => (INTERNAL_SERVER_ERROR.to_string(), "Error".to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this constant [INFO] [stdout] | [INFO] [stdout] 1 + use crate::INTERNAL_SERVER_ERROR; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0412]: cannot find type `User` in this scope [INFO] [stdout] --> src/utils.rs:5:55 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn get_user_request_body(request: &str) -> Result { [INFO] [stdout] | ^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 1 + use crate::models::User; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0603]: function `handle_post_request` is private [INFO] [stdout] --> src/main.rs:12:19 [INFO] [stdout] | [INFO] [stdout] 12 | use controllers::{handle_post_request, handle_get_request, handle_get_all_request, handle_put_request, handle_delete_request}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ private function [INFO] [stdout] | [INFO] [stdout] note: the function `handle_post_request` is defined here [INFO] [stdout] --> src/controllers.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | fn handle_post_request(request: &str) -> (String, String) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0603]: function `handle_get_request` is private [INFO] [stdout] --> src/main.rs:12:40 [INFO] [stdout] | [INFO] [stdout] 12 | use controllers::{handle_post_request, handle_get_request, handle_get_all_request, handle_put_request, handle_delete_request}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ private function [INFO] [stdout] | [INFO] [stdout] note: the function `handle_get_request` is defined here [INFO] [stdout] --> src/controllers.rs:22:1 [INFO] [stdout] | [INFO] [stdout] 22 | fn handle_get_request(request: &str) -> (String, String) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0603]: function `handle_get_all_request` is private [INFO] [stdout] --> src/main.rs:12:60 [INFO] [stdout] | [INFO] [stdout] 12 | use controllers::{handle_post_request, handle_get_request, handle_get_all_request, handle_put_request, handle_delete_request}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ private function [INFO] [stdout] | [INFO] [stdout] note: the function `handle_get_all_request` is defined here [INFO] [stdout] --> src/controllers.rs:43:1 [INFO] [stdout] | [INFO] [stdout] 43 | fn handle_get_all_request(request: &str) -> (String, String) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0603]: function `handle_put_request` is private [INFO] [stdout] --> src/main.rs:12:84 [INFO] [stdout] | [INFO] [stdout] 12 | use controllers::{handle_post_request, handle_get_request, handle_get_all_request, handle_put_request, handle_delete_request}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ private function [INFO] [stdout] | [INFO] [stdout] note: the function `handle_put_request` is defined here [INFO] [stdout] --> src/controllers.rs:63:1 [INFO] [stdout] | [INFO] [stdout] 63 | fn handle_put_request(request: &str) -> (String, String) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0603]: function `handle_delete_request` is private [INFO] [stdout] --> src/main.rs:12:104 [INFO] [stdout] | [INFO] [stdout] 12 | use controllers::{handle_post_request, handle_get_request, handle_get_all_request, handle_put_request, handle_delete_request}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ private function [INFO] [stdout] | [INFO] [stdout] note: the function `handle_delete_request` is defined here [INFO] [stdout] --> src/controllers.rs:86:1 [INFO] [stdout] | [INFO] [stdout] 86 | fn handle_delete_request(request: &str) -> (String, String) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::env` [INFO] [stdout] --> src/main.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::env; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::models::User` [INFO] [stdout] --> src/db.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::models::User; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::db::get_db_client` [INFO] [stdout] --> src/controllers.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::db::get_db_client; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `User: Serialize` is not satisfied [INFO] [stdout] --> src/controllers.rs:33:69 [INFO] [stdout] | [INFO] [stdout] 33 | (OK_RESPONSE.to_string(), serde_json::to_string(&user).unwrap()) [INFO] [stdout] | --------------------- ^^^^^ the trait `Serialize` is not implemented for `User` [INFO] [stdout] | | [INFO] [stdout] | required by a bound introduced by this call [INFO] [stdout] | [INFO] [stdout] = help: the following other types implement trait `Serialize`: [INFO] [stdout] &'a T [INFO] [stdout] &'a mut T [INFO] [stdout] () [INFO] [stdout] (T0, T1) [INFO] [stdout] (T0, T1, T2) [INFO] [stdout] (T0, T1, T2, T3) [INFO] [stdout] (T0, T1, T2, T3, T4) [INFO] [stdout] (T0, T1, T2, T3, T4, T5) [INFO] [stdout] and 130 others [INFO] [stdout] note: required by a bound in `serde_json::to_string` [INFO] [stdout] --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/serde_json-1.0.114/src/ser.rs:2209:17 [INFO] [stdout] | [INFO] [stdout] 2207 | pub fn to_string(value: &T) -> Result [INFO] [stdout] | --------- required by a bound in this function [INFO] [stdout] 2208 | where [INFO] [stdout] 2209 | T: ?Sized + Serialize, [INFO] [stdout] | ^^^^^^^^^ required by this bound in `to_string` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `User: Serialize` is not satisfied [INFO] [stdout] --> src/controllers.rs:33:69 [INFO] [stdout] | [INFO] [stdout] 33 | (OK_RESPONSE.to_string(), serde_json::to_string(&user).unwrap()) [INFO] [stdout] | --------------------- ^^^^^ the trait `Serialize` is not implemented for `User` [INFO] [stdout] | | [INFO] [stdout] | required by a bound introduced by this call [INFO] [stdout] | [INFO] [stdout] = help: the following other types implement trait `Serialize`: [INFO] [stdout] &'a T [INFO] [stdout] &'a mut T [INFO] [stdout] () [INFO] [stdout] (T0, T1) [INFO] [stdout] (T0, T1, T2) [INFO] [stdout] (T0, T1, T2, T3) [INFO] [stdout] (T0, T1, T2, T3, T4) [INFO] [stdout] (T0, T1, T2, T3, T4, T5) [INFO] [stdout] and 130 others [INFO] [stdout] note: required by a bound in `serde_json::to_string` [INFO] [stdout] --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/serde_json-1.0.114/src/ser.rs:2209:17 [INFO] [stdout] | [INFO] [stdout] 2207 | pub fn to_string(value: &T) -> Result [INFO] [stdout] | --------- required by a bound in this function [INFO] [stdout] 2208 | where [INFO] [stdout] 2209 | T: ?Sized + Serialize, [INFO] [stdout] | ^^^^^^^^^ required by this bound in `to_string` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `User: Serialize` is not satisfied [INFO] [stdout] --> src/controllers.rs:56:61 [INFO] [stdout] | [INFO] [stdout] 56 | (OK_RESPONSE.to_string(), serde_json::to_string(&users).unwrap()) [INFO] [stdout] | --------------------- ^^^^^^ the trait `Serialize` is not implemented for `User` [INFO] [stdout] | | [INFO] [stdout] | required by a bound introduced by this call [INFO] [stdout] | [INFO] [stdout] = help: the following other types implement trait `Serialize`: [INFO] [stdout] &'a T [INFO] [stdout] &'a mut T [INFO] [stdout] () [INFO] [stdout] (T0, T1) [INFO] [stdout] (T0, T1, T2) [INFO] [stdout] (T0, T1, T2, T3) [INFO] [stdout] (T0, T1, T2, T3, T4) [INFO] [stdout] (T0, T1, T2, T3, T4, T5) [INFO] [stdout] and 130 others [INFO] [stdout] = note: required for `Vec` to implement `Serialize` [INFO] [stdout] note: required by a bound in `serde_json::to_string` [INFO] [stdout] --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/serde_json-1.0.114/src/ser.rs:2209:17 [INFO] [stdout] | [INFO] [stdout] 2207 | pub fn to_string(value: &T) -> Result [INFO] [stdout] | --------- required by a bound in this function [INFO] [stdout] 2208 | where [INFO] [stdout] 2209 | T: ?Sized + Serialize, [INFO] [stdout] | ^^^^^^^^^ required by this bound in `to_string` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `User: Serialize` is not satisfied [INFO] [stdout] --> src/controllers.rs:56:61 [INFO] [stdout] | [INFO] [stdout] 56 | (OK_RESPONSE.to_string(), serde_json::to_string(&users).unwrap()) [INFO] [stdout] | --------------------- ^^^^^^ the trait `Serialize` is not implemented for `User` [INFO] [stdout] | | [INFO] [stdout] | required by a bound introduced by this call [INFO] [stdout] | [INFO] [stdout] = help: the following other types implement trait `Serialize`: [INFO] [stdout] &'a T [INFO] [stdout] &'a mut T [INFO] [stdout] () [INFO] [stdout] (T0, T1) [INFO] [stdout] (T0, T1, T2) [INFO] [stdout] (T0, T1, T2, T3) [INFO] [stdout] (T0, T1, T2, T3, T4) [INFO] [stdout] (T0, T1, T2, T3, T4, T5) [INFO] [stdout] and 130 others [INFO] [stdout] = note: required for `Vec` to implement `Serialize` [INFO] [stdout] note: required by a bound in `serde_json::to_string` [INFO] [stdout] --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/serde_json-1.0.114/src/ser.rs:2209:17 [INFO] [stdout] | [INFO] [stdout] 2207 | pub fn to_string(value: &T) -> Result [INFO] [stdout] | --------- required by a bound in this function [INFO] [stdout] 2208 | where [INFO] [stdout] 2209 | T: ?Sized + Serialize, [INFO] [stdout] | ^^^^^^^^^ required by this bound in `to_string` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0412, E0425, E0433, E0583, E0603. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0412, E0425, E0433, E0583, E0603. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] [INFO] [stderr] error: could not compile `rust-learning` (bin "rust-learning" test) due to 39 previous errors; 3 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] error: could not compile `rust-learning` (bin "rust-learning") due to 39 previous errors; 3 warnings emitted [INFO] running `Command { std: "docker" "inspect" "2b482d1592c664caec86ff5cf7605fe4606c3871e8592753c816d39f830985bf", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2b482d1592c664caec86ff5cf7605fe4606c3871e8592753c816d39f830985bf", kill_on_drop: false }` [INFO] [stdout] 2b482d1592c664caec86ff5cf7605fe4606c3871e8592753c816d39f830985bf