[INFO] cloning repository https://github.com/akarvinR/redis [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/akarvinR/redis" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FakarvinR%2Fredis", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FakarvinR%2Fredis'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 390903b3803d6d1eb58e142179d2744ccb2ab5d1 [INFO] checking akarvinR/redis against try#9228062c11d321a3ea08123f57e47533a3c88b00 for pr-154781 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FakarvinR%2Fredis" "/workspace/builds/worker-6-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/akarvinR/redis [INFO] finished tweaking git repo https://github.com/akarvinR/redis [INFO] tweaked toml for git repo https://github.com/akarvinR/redis written to /workspace/builds/worker-6-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/akarvinR/redis on toolchain 9228062c11d321a3ea08123f57e47533a3c88b00 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+9228062c11d321a3ea08123f57e47533a3c88b00" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/akarvinR/redis 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" "+9228062c11d321a3ea08123f57e47533a3c88b00" "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 hermit-abi v0.1.17 [INFO] [stderr] Downloaded signal-hook-registry v1.2.2 [INFO] [stderr] Downloaded syn v1.0.67 [INFO] [stderr] Downloaded libc v0.2.138 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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" "+9228062c11d321a3ea08123f57e47533a3c88b00" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 3fa5a8aaeddff56d54b8202d155d6cdd051fc7a77e3cf61bed90db4bb88b5009 [INFO] running `Command { std: "docker" "start" "-a" "3fa5a8aaeddff56d54b8202d155d6cdd051fc7a77e3cf61bed90db4bb88b5009", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "3fa5a8aaeddff56d54b8202d155d6cdd051fc7a77e3cf61bed90db4bb88b5009", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "3fa5a8aaeddff56d54b8202d155d6cdd051fc7a77e3cf61bed90db4bb88b5009", kill_on_drop: false }` [INFO] [stdout] 3fa5a8aaeddff56d54b8202d155d6cdd051fc7a77e3cf61bed90db4bb88b5009 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+9228062c11d321a3ea08123f57e47533a3c88b00" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 83f512b1c9df568a126248b58c7131430534301018a4e78fb6ce623fe6b81c16 [INFO] running `Command { std: "docker" "start" "-a" "83f512b1c9df568a126248b58c7131430534301018a4e78fb6ce623fe6b81c16", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.138 [INFO] [stderr] Compiling proc-macro2 v1.0.24 [INFO] [stderr] Compiling unicode-xid v0.2.1 [INFO] [stderr] Compiling syn v1.0.67 [INFO] [stderr] Compiling parking_lot_core v0.9.5 [INFO] [stderr] Compiling memchr v2.3.4 [INFO] [stderr] Compiling anyhow v1.0.59 [INFO] [stderr] Checking bytes v1.3.0 [INFO] [stderr] Compiling tokio v1.23.0 [INFO] [stderr] Checking crossbeam-queue v0.3.11 [INFO] [stderr] Checking crossbeam-channel v0.5.13 [INFO] [stderr] Checking crossbeam-deque v0.8.5 [INFO] [stderr] Checking crossbeam v0.8.4 [INFO] [stderr] Checking num_cpus v1.13.0 [INFO] [stderr] Checking signal-hook-registry v1.2.2 [INFO] [stderr] Checking mio v0.8.5 [INFO] [stderr] Checking socket2 v0.4.7 [INFO] [stderr] Compiling quote v1.0.7 [INFO] [stderr] Checking parking_lot v0.12.1 [INFO] [stderr] Compiling thiserror-impl v1.0.32 [INFO] [stderr] Compiling tokio-macros v1.8.2 [INFO] [stderr] Checking thiserror v1.0.32 [INFO] [stderr] Checking redis-starter-rust v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error: expected item, found `;` [INFO] [stdout] --> src/redis/state.rs:8:2 [INFO] [stdout] | [INFO] [stdout] 8 | }; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: implementation declarations are not followed by a semicolon [INFO] [stdout] help: remove this semicolon [INFO] [stdout] | [INFO] [stdout] 8 - }; [INFO] [stdout] 8 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: expected item, found `;` [INFO] [stdout] --> src/redis/state.rs:8:2 [INFO] [stdout] | [INFO] [stdout] 8 | }; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: implementation declarations are not followed by a semicolon [INFO] [stdout] help: remove this semicolon [INFO] [stdout] | [INFO] [stdout] 8 - }; [INFO] [stdout] 8 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: expected one of `!` or `::`, found `}` [INFO] [stdout] --> src/redis/state.rs:13:1 [INFO] [stdout] | [INFO] [stdout] 10 | impl State for Slave{ [INFO] [stdout] | - while parsing this item list starting here [INFO] [stdout] 11 | [INFO] [stdout] 12 | make [INFO] [stdout] | - expected one of `!` or `::` [INFO] [stdout] 13 | }; [INFO] [stdout] | ^ [INFO] [stdout] | | [INFO] [stdout] | unexpected token [INFO] [stdout] | the item list ends here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: expected item, found `;` [INFO] [stdout] --> src/redis/state.rs:13:2 [INFO] [stdout] | [INFO] [stdout] 13 | }; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: implementation declarations are not followed by a semicolon [INFO] [stdout] help: remove this semicolon [INFO] [stdout] | [INFO] [stdout] 13 - }; [INFO] [stdout] 13 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: unexpected token: `}` [INFO] [stdout] --> src/redis/service.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | } [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: expected one of `!` or `::`, found `}` [INFO] [stdout] --> src/redis/state.rs:13:1 [INFO] [stdout] | [INFO] [stdout] 10 | impl State for Slave{ [INFO] [stdout] | - while parsing this item list starting here [INFO] [stdout] 11 | [INFO] [stdout] 12 | make [INFO] [stdout] | - expected one of `!` or `::` [INFO] [stdout] 13 | }; [INFO] [stdout] | ^ [INFO] [stdout] | | [INFO] [stdout] | unexpected token [INFO] [stdout] | the item list ends here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: expected item, found `;` [INFO] [stdout] --> src/redis/state.rs:13:2 [INFO] [stdout] | [INFO] [stdout] 13 | }; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: implementation declarations are not followed by a semicolon [INFO] [stdout] help: remove this semicolon [INFO] [stdout] | [INFO] [stdout] 13 - }; [INFO] [stdout] 13 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: unexpected token: `}` [INFO] [stdout] --> src/redis/service.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | } [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: expected `{`, found `}` [INFO] [stdout] --> src/redis/service.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | } [INFO] [stdout] | ^ expected `{` [INFO] [stdout] | [INFO] [stdout] note: the `if` expression is missing a block after this condition [INFO] [stdout] --> src/redis/service.rs:18:12 [INFO] [stdout] | [INFO] [stdout] 18 | if self.redis_server. [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: expected `{`, found `}` [INFO] [stdout] --> src/redis/service.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | } [INFO] [stdout] | ^ expected `{` [INFO] [stdout] | [INFO] [stdout] note: the `if` expression is missing a block after this condition [INFO] [stdout] --> src/redis/service.rs:18:12 [INFO] [stdout] | [INFO] [stdout] 18 | if self.redis_server. [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: expected expression, found `,` [INFO] [stdout] --> src/redis/masterService.rs:39:69 [INFO] [stdout] | [INFO] [stdout] 39 | let listener = std::net::TcpListener::bind(format!("{}:{}", , port)).unwrap(); [INFO] [stdout] | ^ expected expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: expected expression, found `,` [INFO] [stdout] --> src/redis/masterService.rs:39:69 [INFO] [stdout] | [INFO] [stdout] 39 | let listener = std::net::TcpListener::bind(format!("{}:{}", , port)).unwrap(); [INFO] [stdout] | ^ expected expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `reply` in this scope [INFO] [stdout] --> src/redis/masterService.rs:31:26 [INFO] [stdout] | [INFO] [stdout] 31 | stream.write(reply.encode().as_bytes()); [INFO] [stdout] | ^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find type `Master` in this scope [INFO] [stdout] --> src/redis/state.rs:6:16 [INFO] [stdout] | [INFO] [stdout] 6 | impl State for Master{ [INFO] [stdout] | ^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: these structs exist but are inaccessible [INFO] [stdout] --> src/redis/slaveService.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | struct Master{ [INFO] [stdout] | ^^^^^^^^^^^^^ `crate::redis::slaveService::Master`: not accessible [INFO] [stdout] | [INFO] [stdout] ::: src/redis/masterService.rs:12:1 [INFO] [stdout] | [INFO] [stdout] 12 | struct Master{ [INFO] [stdout] | ^^^^^^^^^^^^^ `crate::redis::masterService::Master`: not accessible [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find type `Slave` in this scope [INFO] [stdout] --> src/redis/state.rs:10:16 [INFO] [stdout] | [INFO] [stdout] 10 | impl State for Slave{ [INFO] [stdout] | ^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: struct `crate::redis::slaveService::Slave` exists but is inaccessible [INFO] [stdout] --> src/redis/slaveService.rs:30:1 [INFO] [stdout] | [INFO] [stdout] 30 | struct Slave{ [INFO] [stdout] | ^^^^^^^^^^^^^ not accessible [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::*` [INFO] [stdout] --> src/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::*; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::hash::Hash` [INFO] [stdout] --> src/main.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::hash::Hash; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `encoder` should have an upper camel case name [INFO] [stdout] --> src/resp/mod.rs:9:11 [INFO] [stdout] | [INFO] [stdout] 9 | pub trait encoder { [INFO] [stdout] | ^^^^^^^ help: convert the identifier to upper camel case: `Encoder` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `CommandType` [INFO] [stdout] --> src/command/command_factory.rs:1:22 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::command::{CommandType, Command, Set, Echo, Ping, Get, Info, ReplConf}; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::redis::server` [INFO] [stdout] --> src/command/set.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use crate::redis::server; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::resp::bulk_string::BulkString` [INFO] [stdout] --> src/command/command.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::resp::bulk_string::BulkString; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::redis::server` [INFO] [stdout] --> src/command/get.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use crate::redis::server; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Get` [INFO] [stdout] --> src/command/info.rs:3:22 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::command::{Get, Command, Info}; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::redis::server` [INFO] [stdout] --> src/command/info.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use crate::redis::server; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/command/info.rs:22:11 [INFO] [stdout] | [INFO] [stdout] 22 | if(self.args.len() == 0 || self.args.len() > 1){ [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 22 - if(self.args.len() == 0 || self.args.len() > 1){ [INFO] [stdout] 22 + if self.args.len() == 0 || self.args.len() > 1 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::hash::Hash` [INFO] [stdout] --> src/command/replconf.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::hash::Hash; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::str::from_utf8` [INFO] [stdout] --> src/redis/server.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::str::from_utf8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Condvar` [INFO] [stdout] --> src/redis/server.rs:7:22 [INFO] [stdout] | [INFO] [stdout] 7 | use std::sync::{Arc, Condvar, Mutex}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::resp::resp::Data` [INFO] [stdout] --> src/redis/server.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | use crate::resp::resp::Data; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashSet` [INFO] [stdout] --> src/redis/server.rs:16:33 [INFO] [stdout] | [INFO] [stdout] 16 | use std::collections::{HashMap, HashSet}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Duration` [INFO] [stdout] --> src/redis/kvstore.rs:3:17 [INFO] [stdout] | [INFO] [stdout] 3 | use std::time::{Duration, SystemTime, UNIX_EPOCH}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::redis::server::RedisServer` [INFO] [stdout] --> src/redis/slaveService.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::redis::server::RedisServer; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/redis/masterService.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::Arc` [INFO] [stdout] --> src/redis/masterService.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::sync::Arc; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `TcpListener` [INFO] [stdout] --> src/redis/masterService.rs:5:16 [INFO] [stdout] | [INFO] [stdout] 5 | use std::net::{TcpListener, TcpStream}; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::redis::kvstore::KvStore` [INFO] [stdout] --> src/redis/masterService.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use crate::redis::kvstore::KvStore; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/redis/service.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `reply` in this scope [INFO] [stdout] --> src/redis/masterService.rs:31:26 [INFO] [stdout] | [INFO] [stdout] 31 | stream.write(reply.encode().as_bytes()); [INFO] [stdout] | ^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find type `Master` in this scope [INFO] [stdout] --> src/redis/state.rs:6:16 [INFO] [stdout] | [INFO] [stdout] 6 | impl State for Master{ [INFO] [stdout] | ^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: these structs exist but are inaccessible [INFO] [stdout] --> src/redis/slaveService.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | struct Master{ [INFO] [stdout] | ^^^^^^^^^^^^^ `crate::redis::slaveService::Master`: not accessible [INFO] [stdout] | [INFO] [stdout] ::: src/redis/masterService.rs:12:1 [INFO] [stdout] | [INFO] [stdout] 12 | struct Master{ [INFO] [stdout] | ^^^^^^^^^^^^^ `crate::redis::masterService::Master`: not accessible [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find type `Slave` in this scope [INFO] [stdout] --> src/redis/state.rs:10:16 [INFO] [stdout] | [INFO] [stdout] 10 | impl State for Slave{ [INFO] [stdout] | ^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: struct `crate::redis::slaveService::Slave` exists but is inaccessible [INFO] [stdout] --> src/redis/slaveService.rs:30:1 [INFO] [stdout] | [INFO] [stdout] 30 | struct Slave{ [INFO] [stdout] | ^^^^^^^^^^^^^ not accessible [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::*` [INFO] [stdout] --> src/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::*; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::hash::Hash` [INFO] [stdout] --> src/main.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::hash::Hash; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `encoder` should have an upper camel case name [INFO] [stdout] --> src/resp/mod.rs:9:11 [INFO] [stdout] | [INFO] [stdout] 9 | pub trait encoder { [INFO] [stdout] | ^^^^^^^ help: convert the identifier to upper camel case: `Encoder` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::redis::server` [INFO] [stdout] --> src/command/set.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use crate::redis::server; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::resp::bulk_string::BulkString` [INFO] [stdout] --> src/command/command.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::resp::bulk_string::BulkString; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::redis::server` [INFO] [stdout] --> src/command/get.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use crate::redis::server; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Get` [INFO] [stdout] --> src/command/info.rs:3:22 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::command::{Get, Command, Info}; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::redis::server` [INFO] [stdout] --> src/command/info.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use crate::redis::server; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/command/info.rs:22:11 [INFO] [stdout] | [INFO] [stdout] 22 | if(self.args.len() == 0 || self.args.len() > 1){ [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 22 - if(self.args.len() == 0 || self.args.len() > 1){ [INFO] [stdout] 22 + if self.args.len() == 0 || self.args.len() > 1 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::hash::Hash` [INFO] [stdout] --> src/command/replconf.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::hash::Hash; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::str::from_utf8` [INFO] [stdout] --> src/redis/server.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::str::from_utf8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Condvar` [INFO] [stdout] --> src/redis/server.rs:7:22 [INFO] [stdout] | [INFO] [stdout] 7 | use std::sync::{Arc, Condvar, Mutex}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::resp::resp::Data` [INFO] [stdout] --> src/redis/server.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | use crate::resp::resp::Data; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashSet` [INFO] [stdout] --> src/redis/server.rs:16:33 [INFO] [stdout] | [INFO] [stdout] 16 | use std::collections::{HashMap, HashSet}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Duration` [INFO] [stdout] --> src/redis/kvstore.rs:3:17 [INFO] [stdout] | [INFO] [stdout] 3 | use std::time::{Duration, SystemTime, UNIX_EPOCH}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::redis::server::RedisServer` [INFO] [stdout] --> src/redis/slaveService.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::redis::server::RedisServer; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/redis/masterService.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::Arc` [INFO] [stdout] --> src/redis/masterService.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::sync::Arc; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `TcpListener` [INFO] [stdout] --> src/redis/masterService.rs:5:16 [INFO] [stdout] | [INFO] [stdout] 5 | use std::net::{TcpListener, TcpStream}; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::redis::kvstore::KvStore` [INFO] [stdout] --> src/redis/masterService.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use crate::redis::kvstore::KvStore; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/redis/service.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `(dyn command::Command + 'static)` cannot be known at compilation time [INFO] [stdout] --> src/redis/masterService.rs:14:15 [INFO] [stdout] | [INFO] [stdout] 14 | commands: Vec [INFO] [stdout] | ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `(dyn command::Command + 'static)` [INFO] [stdout] note: required by an implicit `Sized` bound in `Vec` [INFO] [stdout] --> /rustc/9228062c11d321a3ea08123f57e47533a3c88b00/library/alloc/src/vec/mod.rs:438:0 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `(dyn command::Command + 'static)` cannot be known at compilation time [INFO] [stdout] --> src/redis/masterService.rs:14:15 [INFO] [stdout] | [INFO] [stdout] 14 | commands: Vec [INFO] [stdout] | ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `(dyn command::Command + 'static)` [INFO] [stdout] note: required by an implicit `Sized` bound in `Vec` [INFO] [stdout] --> /rustc/9228062c11d321a3ea08123f57e47533a3c88b00/library/alloc/src/vec/mod.rs:438:0 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/redis/slaveService.rs:33:19 [INFO] [stdout] | [INFO] [stdout] 33 | fn handShake() -> bool{ [INFO] [stdout] | --------- ^^^^ expected `bool`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::command::Command` [INFO] [stdout] --> src/redis/server.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | use crate::command::Command; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/resp/array.rs:39:13 [INFO] [stdout] | [INFO] [stdout] 39 | let mut encoded = format!("*{}\r\n", self.size); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `data` [INFO] [stdout] --> src/resp/array.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | for data in &self.data { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_data` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `server` [INFO] [stdout] --> src/command/ping.rs:13:23 [INFO] [stdout] | [INFO] [stdout] 13 | fn execute(&self, server: &mut RedisServer) -> RespData { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_server` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `server` [INFO] [stdout] --> src/command/echo.rs:14:23 [INFO] [stdout] | [INFO] [stdout] 14 | fn execute(&self, server: &mut RedisServer) -> RespData [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_server` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/command/command_factory.rs:35:43 [INFO] [stdout] | [INFO] [stdout] 35 | let set_command = command_factory(CommandType::Set); [INFO] [stdout] | --------------- ^^^^^^^^^^^^^^^^ expected `&String`, found `CommandType` [INFO] [stdout] | | [INFO] [stdout] | arguments to this function are incorrect [INFO] [stdout] | [INFO] [stdout] note: function defined here [INFO] [stdout] --> src/command/command_factory.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn command_factory(command_type: &String) -> Result, String>{ [INFO] [stdout] | ^^^^^^^^^^^^^^^ --------------------- [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/command/command_factory.rs:36:44 [INFO] [stdout] | [INFO] [stdout] 36 | let echo_command = command_factory(CommandType::Echo); [INFO] [stdout] | --------------- ^^^^^^^^^^^^^^^^^ expected `&String`, found `CommandType` [INFO] [stdout] | | [INFO] [stdout] | arguments to this function are incorrect [INFO] [stdout] | [INFO] [stdout] note: function defined here [INFO] [stdout] --> src/command/command_factory.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn command_factory(command_type: &String) -> Result, String>{ [INFO] [stdout] | ^^^^^^^^^^^^^^^ --------------------- [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/command/set.rs:28:13 [INFO] [stdout] | [INFO] [stdout] 28 | let mut reply = "OK".to_string(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/command/command_factory.rs:37:44 [INFO] [stdout] | [INFO] [stdout] 37 | let ping_command = command_factory(CommandType::Ping); [INFO] [stdout] | --------------- ^^^^^^^^^^^^^^^^^ expected `&String`, found `CommandType` [INFO] [stdout] | | [INFO] [stdout] | arguments to this function are incorrect [INFO] [stdout] | [INFO] [stdout] note: function defined here [INFO] [stdout] --> src/command/command_factory.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn command_factory(command_type: &String) -> Result, String>{ [INFO] [stdout] | ^^^^^^^^^^^^^^^ --------------------- [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/command/command.rs:24:17 [INFO] [stdout] | [INFO] [stdout] 24 | let mut command = command_factory(&command.string); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/command/replconf.rs:9:10 [INFO] [stdout] | [INFO] [stdout] 9 | fn parse(mut args: Vec) -> HashMap { [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/command/replconf.rs:12:13 [INFO] [stdout] | [INFO] [stdout] 12 | let mut key = args[i - 1].clone(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/command/replconf.rs:13:13 [INFO] [stdout] | [INFO] [stdout] 13 | let mut value = args[i].clone(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `execute` found for enum `Result` in the current scope [INFO] [stdout] --> src/command/command_factory.rs:38:32 [INFO] [stdout] | [INFO] [stdout] 38 | assert_eq!(set_command.execute(vec!["key".to_string(), "value".to_string()]), "OK".to_string()); [INFO] [stdout] | ^^^^^^^ method not found in `Result, String>` [INFO] [stdout] | [INFO] [stdout] note: the method `execute` exists on the type `Box` [INFO] [stdout] --> src/command/mod.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | fn execute(&self, redis_server: &mut RedisServer) -> RespData; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: items from traits can only be used if the trait is implemented and in scope [INFO] [stdout] note: `command::Command` defines an item `execute`, perhaps you need to implement it [INFO] [stdout] --> src/command/mod.rs:12:1 [INFO] [stdout] | [INFO] [stdout] 12 | pub trait Command{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] help: consider using `Result::expect` to unwrap the `Box` value, panicking if the value is a `Result::Err` [INFO] [stdout] | [INFO] [stdout] 38 | assert_eq!(set_command.expect("REASON").execute(vec!["key".to_string(), "value".to_string()]), "OK".to_string()); [INFO] [stdout] | +++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `config` [INFO] [stdout] --> src/redis/server.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | let config = self.config.clone(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_config` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `config` [INFO] [stdout] --> src/redis/server.rs:61:13 [INFO] [stdout] | [INFO] [stdout] 61 | let config = self.config.clone(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_config` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `config` [INFO] [stdout] --> src/redis/server.rs:73:13 [INFO] [stdout] | [INFO] [stdout] 73 | let config = self.config.clone(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_config` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `execute` found for enum `Result` in the current scope [INFO] [stdout] --> src/command/command_factory.rs:39:33 [INFO] [stdout] | [INFO] [stdout] 39 | assert_eq!(echo_command.execute(vec!["Hello".to_string(), "World".to_string()]), "Hello World".to_string()); [INFO] [stdout] | ^^^^^^^ method not found in `Result, String>` [INFO] [stdout] | [INFO] [stdout] note: the method `execute` exists on the type `Box` [INFO] [stdout] --> src/command/mod.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | fn execute(&self, redis_server: &mut RedisServer) -> RespData; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: items from traits can only be used if the trait is implemented and in scope [INFO] [stdout] note: `command::Command` defines an item `execute`, perhaps you need to implement it [INFO] [stdout] --> src/command/mod.rs:12:1 [INFO] [stdout] | [INFO] [stdout] 12 | pub trait Command{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] help: consider using `Result::expect` to unwrap the `Box` value, panicking if the value is a `Result::Err` [INFO] [stdout] | [INFO] [stdout] 39 | assert_eq!(echo_command.expect("REASON").execute(vec!["Hello".to_string(), "World".to_string()]), "Hello World".to_string()); [INFO] [stdout] | +++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/redis/server.rs:143:25 [INFO] [stdout] | [INFO] [stdout] 143 | let (data, i) = resp_parser(&buffer, 0); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/redis/server.rs:151:28 [INFO] [stdout] | [INFO] [stdout] 151 | pub fn listenToClients(mut self){ [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/redis/server.rs:154:24 [INFO] [stdout] | [INFO] [stdout] 154 | pub fn runAsMaster(mut self){ [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/redis/server.rs:157:16 [INFO] [stdout] | [INFO] [stdout] 157 | pub fn run(mut self){ [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `execute` found for enum `Result` in the current scope [INFO] [stdout] --> src/command/command_factory.rs:40:33 [INFO] [stdout] | [INFO] [stdout] 40 | assert_eq!(ping_command.execute(vec![]), "PONG".to_string()); [INFO] [stdout] | ^^^^^^^ method not found in `Result, String>` [INFO] [stdout] | [INFO] [stdout] note: the method `execute` exists on the type `Box` [INFO] [stdout] --> src/command/mod.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | fn execute(&self, redis_server: &mut RedisServer) -> RespData; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: items from traits can only be used if the trait is implemented and in scope [INFO] [stdout] note: `command::Command` defines an item `execute`, perhaps you need to implement it [INFO] [stdout] --> src/command/mod.rs:12:1 [INFO] [stdout] | [INFO] [stdout] 12 | pub trait Command{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] help: consider using `Result::expect` to unwrap the `Box` value, panicking if the value is a `Result::Err` [INFO] [stdout] | [INFO] [stdout] 40 | assert_eq!(ping_command.expect("REASON").execute(vec![]), "PONG".to_string()); [INFO] [stdout] | +++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `i` is never read [INFO] [stdout] --> src/redis/argsParser.rs:34:13 [INFO] [stdout] | [INFO] [stdout] 34 | i+=1; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0515]: cannot return value referencing temporary value [INFO] [stdout] --> src/redis/slaveService.rs:25:16 [INFO] [stdout] | [INFO] [stdout] 21 | let buffer = &mut [0; 1024]; [INFO] [stdout] | --------- temporary value created here [INFO] [stdout] ... [INFO] [stdout] 25 | return response; [INFO] [stdout] | ^^^^^^^^ returns a value referencing data owned by the current function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/redis/slaveService.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | let mut master = Master::new(tcpStream); [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `master` [INFO] [stdout] --> src/redis/slaveService.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | let mut master = Master::new(tcpStream); [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_master` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ok` [INFO] [stdout] --> src/redis/slaveService.rs:40:9 [INFO] [stdout] | [INFO] [stdout] 40 | let ok = handShake(); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_ok` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/redis/service.rs:12:13 [INFO] [stdout] | [INFO] [stdout] 12 | let mut service = Service{ [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let mut server = RedisServer::new(args); [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/redis/slaveService.rs:33:19 [INFO] [stdout] | [INFO] [stdout] 33 | fn handShake() -> bool{ [INFO] [stdout] | --------- ^^^^ expected `bool`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::command::Command` [INFO] [stdout] --> src/redis/server.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | use crate::command::Command; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0308, E0425, E0515. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/resp/array.rs:39:13 [INFO] [stdout] | [INFO] [stdout] 39 | let mut encoded = format!("*{}\r\n", self.size); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `data` [INFO] [stdout] --> src/resp/array.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | for data in &self.data { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_data` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `server` [INFO] [stdout] --> src/command/ping.rs:13:23 [INFO] [stdout] | [INFO] [stdout] 13 | fn execute(&self, server: &mut RedisServer) -> RespData { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_server` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `server` [INFO] [stdout] --> src/command/echo.rs:14:23 [INFO] [stdout] | [INFO] [stdout] 14 | fn execute(&self, server: &mut RedisServer) -> RespData [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_server` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/command/set.rs:28:13 [INFO] [stdout] | [INFO] [stdout] 28 | let mut reply = "OK".to_string(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `redis-starter-rust` (bin "redis-starter-rust") due to 12 previous errors; 45 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/command/command.rs:24:17 [INFO] [stdout] | [INFO] [stdout] 24 | let mut command = command_factory(&command.string); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/command/replconf.rs:9:10 [INFO] [stdout] | [INFO] [stdout] 9 | fn parse(mut args: Vec) -> HashMap { [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/command/replconf.rs:12:13 [INFO] [stdout] | [INFO] [stdout] 12 | let mut key = args[i - 1].clone(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/command/replconf.rs:13:13 [INFO] [stdout] | [INFO] [stdout] 13 | let mut value = args[i].clone(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `config` [INFO] [stdout] --> src/redis/server.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | let config = self.config.clone(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_config` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `config` [INFO] [stdout] --> src/redis/server.rs:61:13 [INFO] [stdout] | [INFO] [stdout] 61 | let config = self.config.clone(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_config` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `config` [INFO] [stdout] --> src/redis/server.rs:73:13 [INFO] [stdout] | [INFO] [stdout] 73 | let config = self.config.clone(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_config` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/redis/server.rs:143:25 [INFO] [stdout] | [INFO] [stdout] 143 | let (data, i) = resp_parser(&buffer, 0); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/redis/server.rs:151:28 [INFO] [stdout] | [INFO] [stdout] 151 | pub fn listenToClients(mut self){ [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/redis/server.rs:154:24 [INFO] [stdout] | [INFO] [stdout] 154 | pub fn runAsMaster(mut self){ [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/redis/server.rs:157:16 [INFO] [stdout] | [INFO] [stdout] 157 | pub fn run(mut self){ [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `i` is never read [INFO] [stdout] --> src/redis/argsParser.rs:34:13 [INFO] [stdout] | [INFO] [stdout] 34 | i+=1; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0515]: cannot return value referencing temporary value [INFO] [stdout] --> src/redis/slaveService.rs:25:16 [INFO] [stdout] | [INFO] [stdout] 21 | let buffer = &mut [0; 1024]; [INFO] [stdout] | --------- temporary value created here [INFO] [stdout] ... [INFO] [stdout] 25 | return response; [INFO] [stdout] | ^^^^^^^^ returns a value referencing data owned by the current function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/redis/slaveService.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | let mut master = Master::new(tcpStream); [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `master` [INFO] [stdout] --> src/redis/slaveService.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | let mut master = Master::new(tcpStream); [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_master` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ok` [INFO] [stdout] --> src/redis/slaveService.rs:40:9 [INFO] [stdout] | [INFO] [stdout] 40 | let ok = handShake(); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_ok` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/redis/service.rs:12:13 [INFO] [stdout] | [INFO] [stdout] 12 | let mut service = Service{ [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let mut server = RedisServer::new(args); [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0308, E0425, E0515, E0599. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] [INFO] [stderr] error: could not compile `redis-starter-rust` (bin "redis-starter-rust" test) due to 18 previous errors; 44 warnings emitted [INFO] running `Command { std: "docker" "inspect" "83f512b1c9df568a126248b58c7131430534301018a4e78fb6ce623fe6b81c16", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "83f512b1c9df568a126248b58c7131430534301018a4e78fb6ce623fe6b81c16", kill_on_drop: false }` [INFO] [stdout] 83f512b1c9df568a126248b58c7131430534301018a4e78fb6ce623fe6b81c16