[INFO] cloning repository https://github.com/AshishAntil07/do-it [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/AshishAntil07/do-it" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAshishAntil07%2Fdo-it", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAshishAntil07%2Fdo-it'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] b68099ec4bc439da49d5b2d73a67c3371bbebc78 [INFO] linting AshishAntil07/do-it against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAshishAntil07%2Fdo-it" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/AshishAntil07/do-it [INFO] finished tweaking git repo https://github.com/AshishAntil07/do-it [INFO] tweaked toml for git repo https://github.com/AshishAntil07/do-it written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/AshishAntil07/do-it on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/AshishAntil07/do-it 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" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded zmij v1.0.8 [INFO] [stderr] Downloaded inquire v0.9.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 504b52777857a6e127811a8d31a84258b7120c37dc97c4b745029c01bca2d586 [INFO] running `Command { std: "docker" "start" "-a" "504b52777857a6e127811a8d31a84258b7120c37dc97c4b745029c01bca2d586", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "504b52777857a6e127811a8d31a84258b7120c37dc97c4b745029c01bca2d586", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "504b52777857a6e127811a8d31a84258b7120c37dc97c4b745029c01bca2d586", kill_on_drop: false }` [INFO] [stdout] 504b52777857a6e127811a8d31a84258b7120c37dc97c4b745029c01bca2d586 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 3ef073f041d2387ef0e2f23901374f23907f2110af4edbce9e93d3c3a61963c5 [INFO] running `Command { std: "docker" "start" "-a" "3ef073f041d2387ef0e2f23901374f23907f2110af4edbce9e93d3c3a61963c5", kill_on_drop: false }` [INFO] [stderr] Compiling syn v2.0.111 [INFO] [stderr] Checking errno v0.3.14 [INFO] [stderr] Compiling rustix v1.1.3 [INFO] [stderr] Compiling zmij v1.0.8 [INFO] [stderr] Checking mio v1.1.1 [INFO] [stderr] Compiling serde_json v1.0.148 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking getrandom v0.3.4 [INFO] [stderr] Compiling owo-colors v4.2.3 [INFO] [stderr] Checking once_cell v1.21.3 [INFO] [stderr] Checking dirs-sys v0.4.1 [INFO] [stderr] Checking fuzzy-matcher v0.3.7 [INFO] [stderr] Checking itoa v1.0.16 [INFO] [stderr] Checking dyn-clone v1.0.20 [INFO] [stderr] Checking clap_builder v4.5.53 [INFO] [stderr] Checking dirs v5.0.1 [INFO] [stderr] Checking signal-hook-registry v1.4.8 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Checking signal-hook v0.3.18 [INFO] [stderr] Checking signal-hook-mio v0.2.5 [INFO] [stderr] Checking clap v4.5.53 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling derive_more-impl v2.1.1 [INFO] [stderr] Checking tempfile v3.23.0 [INFO] [stderr] Checking derive_more v2.1.1 [INFO] [stderr] Checking crossterm v0.29.0 [INFO] [stderr] Checking inquire v0.9.1 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking shared v0.1.0 (/opt/rustwide/workdir/shared) [INFO] [stdout] warning: called `unwrap` on `todo.description` after checking its variant with `is_some` [INFO] [stdout] --> shared/src/todo.rs:24:25 [INFO] [stdout] | [INFO] [stdout] 23 | if todo.description.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = todo.description` [INFO] [stdout] 24 | format!("\n{}", todo.description.unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> shared/src/todo.rs:41:1 [INFO] [stdout] | [INFO] [stdout] 41 | / impl Default for PartialTodo { [INFO] [stdout] 42 | | fn default() -> Self { [INFO] [stdout] 43 | | PartialTodo { [INFO] [stdout] 44 | | id: None, [INFO] [stdout] ... | [INFO] [stdout] 51 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 33 + #[derive(Default)] [INFO] [stdout] 34 | pub struct PartialTodo { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> shared/src/todo.rs:56:20 [INFO] [stdout] | [INFO] [stdout] 56 | id: ptodo.id.unwrap_or(String::new()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> shared/src/todo.rs:57:26 [INFO] [stdout] | [INFO] [stdout] 57 | title: ptodo.title.unwrap_or(String::new()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> shared/src/lesson.rs:24:22 [INFO] [stdout] | [INFO] [stdout] 24 | id: value.id.unwrap_or(String::new()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> shared/src/lesson.rs:25:30 [INFO] [stdout] | [INFO] [stdout] 25 | lesson: value.lesson.unwrap_or(String::new()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> shared/src/archive.rs:24:22 [INFO] [stdout] | [INFO] [stdout] 24 | id: value.id.unwrap_or(String::new()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> shared/src/archive.rs:25:26 [INFO] [stdout] | [INFO] [stdout] 25 | data: value.data.unwrap_or(String::new()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking ui v0.1.0 (/opt/rustwide/workdir/ui) [INFO] [stderr] Checking data v0.1.0 (/opt/rustwide/workdir/data) [INFO] [stdout] warning: called `unwrap` on `todo.description` after checking its variant with `is_some` [INFO] [stdout] --> shared/src/todo.rs:24:25 [INFO] [stdout] | [INFO] [stdout] 23 | if todo.description.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = todo.description` [INFO] [stdout] 24 | format!("\n{}", todo.description.unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> shared/src/todo.rs:41:1 [INFO] [stdout] | [INFO] [stdout] 41 | / impl Default for PartialTodo { [INFO] [stdout] 42 | | fn default() -> Self { [INFO] [stdout] 43 | | PartialTodo { [INFO] [stdout] 44 | | id: None, [INFO] [stdout] ... | [INFO] [stdout] 51 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 33 + #[derive(Default)] [INFO] [stdout] 34 | pub struct PartialTodo { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> shared/src/todo.rs:56:20 [INFO] [stdout] | [INFO] [stdout] 56 | id: ptodo.id.unwrap_or(String::new()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> shared/src/todo.rs:57:26 [INFO] [stdout] | [INFO] [stdout] 57 | title: ptodo.title.unwrap_or(String::new()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> shared/src/lesson.rs:24:22 [INFO] [stdout] | [INFO] [stdout] 24 | id: value.id.unwrap_or(String::new()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> shared/src/lesson.rs:25:30 [INFO] [stdout] | [INFO] [stdout] 25 | lesson: value.lesson.unwrap_or(String::new()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> shared/src/archive.rs:24:22 [INFO] [stdout] | [INFO] [stdout] 24 | id: value.id.unwrap_or(String::new()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> shared/src/archive.rs:25:26 [INFO] [stdout] | [INFO] [stdout] 25 | data: value.data.unwrap_or(String::new()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> ui/src/todo.rs:8:10 [INFO] [stdout] | [INFO] [stdout] 8 | if let None = ptodo.id { [INFO] [stdout] | -------^^^^----------- help: try: `if ptodo.id.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> ui/src/todo.rs:11:10 [INFO] [stdout] | [INFO] [stdout] 11 | if let None = ptodo.title { [INFO] [stdout] | -------^^^^-------------- help: try: `if ptodo.title.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> ui/src/todo.rs:14:10 [INFO] [stdout] | [INFO] [stdout] 14 | if let None = ptodo.description { [INFO] [stdout] | -------^^^^-------------------- help: try: `if ptodo.description.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> ui/src/todo.rs:18:10 [INFO] [stdout] | [INFO] [stdout] 18 | if let None = ptodo.priority { [INFO] [stdout] | -------^^^^----------------- help: try: `if ptodo.priority.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> ui/src/todo.rs:8:10 [INFO] [stdout] | [INFO] [stdout] 8 | if let None = ptodo.id { [INFO] [stdout] | -------^^^^----------- help: try: `if ptodo.id.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> ui/src/todo.rs:11:10 [INFO] [stdout] | [INFO] [stdout] 11 | if let None = ptodo.title { [INFO] [stdout] | -------^^^^-------------- help: try: `if ptodo.title.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> ui/src/todo.rs:14:10 [INFO] [stdout] | [INFO] [stdout] 14 | if let None = ptodo.description { [INFO] [stdout] | -------^^^^-------------------- help: try: `if ptodo.description.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> ui/src/todo.rs:18:10 [INFO] [stdout] | [INFO] [stdout] 18 | if let None = ptodo.priority { [INFO] [stdout] | -------^^^^----------------- help: try: `if ptodo.priority.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> data/src/todo.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 49 | / match fs::exists(path.clone()) { [INFO] [stdout] 50 | | Ok(res) => res, [INFO] [stdout] 51 | | Err(_) => false, [INFO] [stdout] 52 | | } [INFO] [stdout] | |_____^ help: replace it with: `fs::exists(path.clone()).unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> data/src/lesson.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 48 | / match fs::exists(path.clone()) { [INFO] [stdout] 49 | | Ok(res) => res, [INFO] [stdout] 50 | | Err(_) => false, [INFO] [stdout] 51 | | } [INFO] [stdout] | |_____^ help: replace it with: `fs::exists(path.clone()).unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> data/src/archive.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 48 | / match fs::exists(path.clone()) { [INFO] [stdout] 49 | | Ok(res) => res, [INFO] [stdout] 50 | | Err(_) => false, [INFO] [stdout] 51 | | } [INFO] [stdout] | |_____^ help: replace it with: `fs::exists(path.clone()).unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> data/src/lib.rs:47:17 [INFO] [stdout] | [INFO] [stdout] 47 | Err(e) => return Err(e.to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 47 - Err(e) => return Err(e.to_string()), [INFO] [stdout] 47 + Err(e) => Err(e.to_string()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking domain v0.1.0 (/opt/rustwide/workdir/domain) [INFO] [stdout] warning: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> data/src/todo.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 49 | / match fs::exists(path.clone()) { [INFO] [stdout] 50 | | Ok(res) => res, [INFO] [stdout] 51 | | Err(_) => false, [INFO] [stdout] 52 | | } [INFO] [stdout] | |_____^ help: replace it with: `fs::exists(path.clone()).unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> data/src/lesson.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 48 | / match fs::exists(path.clone()) { [INFO] [stdout] 49 | | Ok(res) => res, [INFO] [stdout] 50 | | Err(_) => false, [INFO] [stdout] 51 | | } [INFO] [stdout] | |_____^ help: replace it with: `fs::exists(path.clone()).unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> data/src/archive.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 48 | / match fs::exists(path.clone()) { [INFO] [stdout] 49 | | Ok(res) => res, [INFO] [stdout] 50 | | Err(_) => false, [INFO] [stdout] 51 | | } [INFO] [stdout] | |_____^ help: replace it with: `fs::exists(path.clone()).unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> data/src/lib.rs:47:17 [INFO] [stdout] | [INFO] [stdout] 47 | Err(e) => return Err(e.to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 47 - Err(e) => return Err(e.to_string()), [INFO] [stdout] 47 + Err(e) => Err(e.to_string()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> domain/src/todo/add.rs:42:15 [INFO] [stdout] | [INFO] [stdout] 42 | Err(e) => return Err(e.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 42 - Err(e) => return Err(e.to_string()) [INFO] [stdout] 42 + Err(e) => Err(e.to_string()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> domain/src/todo/add.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 12 | let id = if let Some(id) = id { [INFO] [stdout] | ____________^ [INFO] [stdout] 13 | | Some(id.clone()) [INFO] [stdout] 14 | | } else { None }; [INFO] [stdout] | |_________________^ help: try: `id.map(|id| id.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> domain/src/todo/add.rs:15:15 [INFO] [stdout] | [INFO] [stdout] 15 | let title = if let Some(title) = title { [INFO] [stdout] | _______________^ [INFO] [stdout] 16 | | Some(title.clone()) [INFO] [stdout] 17 | | } else { None }; [INFO] [stdout] | |_________________^ help: try: `title.map(|title| title.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> domain/src/todo/add.rs:18:21 [INFO] [stdout] | [INFO] [stdout] 18 | let description = if let Some(description) = description { [INFO] [stdout] | _____________________^ [INFO] [stdout] 19 | | Some(description.clone()) [INFO] [stdout] 20 | | } else { None }; [INFO] [stdout] | |_________________^ help: try: `description.map(|description| description.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> domain/src/todo/add.rs:21:18 [INFO] [stdout] | [INFO] [stdout] 21 | let priority = if let Some(priority) = priority { [INFO] [stdout] | __________________^ [INFO] [stdout] 22 | | Some(*priority) [INFO] [stdout] 23 | | } else { None }; [INFO] [stdout] | |_________________^ help: try: `priority.map(|priority| *priority)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> domain/src/todo/add.rs:37:54 [INFO] [stdout] | [INFO] [stdout] 37 | if todo.description.clone().is_some_and(|desc| desc == "") { [INFO] [stdout] | ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `desc.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> domain/src/todo/search.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | / true [INFO] [stdout] 42 | | && { id.is_none() || id.is_some_and(|id| *id == *todo_id) } [INFO] [stdout] 43 | | && { [INFO] [stdout] 44 | | query.is_none() [INFO] [stdout] ... | [INFO] [stdout] 60 | | true [INFO] [stdout] 61 | | } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 41 ~ { id.is_none() || id.is_some_and(|id| *id == *todo_id) } && { [INFO] [stdout] 42 + query.is_none() [INFO] [stdout] 43 + || query.is_some_and(|query| { [INFO] [stdout] 44 + todo.title.contains(query) [INFO] [stdout] 45 + || todo [INFO] [stdout] 46 + .description [INFO] [stdout] 47 + .as_ref() [INFO] [stdout] 48 + .is_some_and(|desc| desc.contains(query)) [INFO] [stdout] 49 + }) [INFO] [stdout] 50 + } && if has_description {todo.description.is_some() == has_description} else {true} && { priority.is_none() || priority.is_some_and(|priority| *priority == todo.priority) } && if completed { [INFO] [stdout] 51 + todo.completed == completed [INFO] [stdout] 52 + } else if not_completed { [INFO] [stdout] 53 + todo.completed == !not_completed [INFO] [stdout] 54 + } else { [INFO] [stdout] 55 + true [INFO] [stdout] 56 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> domain/src/todo/search.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | / true [INFO] [stdout] 42 | | && { id.is_none() || id.is_some_and(|id| *id == *todo_id) } [INFO] [stdout] 43 | | && { [INFO] [stdout] 44 | | query.is_none() [INFO] [stdout] ... | [INFO] [stdout] 53 | | && if has_description {todo.description.is_some() == has_description} else {true} [INFO] [stdout] 54 | | && { priority.is_none() || priority.is_some_and(|priority| *priority == todo.priority) } [INFO] [stdout] | |______________________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 41 ~ { id.is_none() || id.is_some_and(|id| *id == *todo_id) } && { [INFO] [stdout] 42 + query.is_none() [INFO] [stdout] 43 + || query.is_some_and(|query| { [INFO] [stdout] 44 + todo.title.contains(query) [INFO] [stdout] 45 + || todo [INFO] [stdout] 46 + .description [INFO] [stdout] 47 + .as_ref() [INFO] [stdout] 48 + .is_some_and(|desc| desc.contains(query)) [INFO] [stdout] 49 + }) [INFO] [stdout] 50 + } && if has_description {todo.description.is_some() == has_description} else {true} && { priority.is_none() || priority.is_some_and(|priority| *priority == todo.priority) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> domain/src/todo/search.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | / true [INFO] [stdout] 42 | | && { id.is_none() || id.is_some_and(|id| *id == *todo_id) } [INFO] [stdout] 43 | | && { [INFO] [stdout] 44 | | query.is_none() [INFO] [stdout] ... | [INFO] [stdout] 53 | | && if has_description {todo.description.is_some() == has_description} else {true} [INFO] [stdout] | |_______________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 41 ~ { id.is_none() || id.is_some_and(|id| *id == *todo_id) } && { [INFO] [stdout] 42 + query.is_none() [INFO] [stdout] 43 + || query.is_some_and(|query| { [INFO] [stdout] 44 + todo.title.contains(query) [INFO] [stdout] 45 + || todo [INFO] [stdout] 46 + .description [INFO] [stdout] 47 + .as_ref() [INFO] [stdout] 48 + .is_some_and(|desc| desc.contains(query)) [INFO] [stdout] 49 + }) [INFO] [stdout] 50 + } && if has_description {todo.description.is_some() == has_description} else {true} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> domain/src/todo/search.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | / true [INFO] [stdout] 42 | | && { id.is_none() || id.is_some_and(|id| *id == *todo_id) } [INFO] [stdout] 43 | | && { [INFO] [stdout] 44 | | query.is_none() [INFO] [stdout] ... | [INFO] [stdout] 51 | | }) [INFO] [stdout] 52 | | } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 41 ~ { id.is_none() || id.is_some_and(|id| *id == *todo_id) } && { [INFO] [stdout] 42 + query.is_none() [INFO] [stdout] 43 + || query.is_some_and(|query| { [INFO] [stdout] 44 + todo.title.contains(query) [INFO] [stdout] 45 + || todo [INFO] [stdout] 46 + .description [INFO] [stdout] 47 + .as_ref() [INFO] [stdout] 48 + .is_some_and(|desc| desc.contains(query)) [INFO] [stdout] 49 + }) [INFO] [stdout] 50 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> domain/src/todo/search.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | / true [INFO] [stdout] 42 | | && { id.is_none() || id.is_some_and(|id| *id == *todo_id) } [INFO] [stdout] | |_________________________________________________________________^ help: try: `{ id.is_none() || id.is_some_and(|id| *id == *todo_id) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> domain/src/todo/search.rs:34:11 [INFO] [stdout] | [INFO] [stdout] 34 | todo.completed == !not_completed [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `todo.completed != not_completed` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> domain/src/todo/search.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | todo.completed == !not_completed [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `todo.completed != not_completed` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> domain/src/todo/check.rs:11:3 [INFO] [stdout] | [INFO] [stdout] 11 | let some_ids: HashSet; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] 12 | [INFO] [stdout] 13 | / some_ids = if let Some(ids) = ids { [INFO] [stdout] 14 | | ids.split(',').map(|slice| String::from(slice)).collect::>() [INFO] [stdout] 15 | | } else { [INFO] [stdout] 16 | | match take_ids_input() { [INFO] [stdout] ... | [INFO] [stdout] 20 | | }; [INFO] [stdout] | |___^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `some_ids` here [INFO] [stdout] | [INFO] [stdout] 11 ~ [INFO] [stdout] 12 | [INFO] [stdout] 13 ~ let some_ids: HashSet = if let Some(ids) = ids { [INFO] [stdout] 14 + ids.split(',').map(|slice| String::from(slice)).collect::>() [INFO] [stdout] 15 + } else { [INFO] [stdout] 16 + match take_ids_input() { [INFO] [stdout] 17 + Ok(res) => res, [INFO] [stdout] 18 + Err(e) => return Err(e.to_string()) [INFO] [stdout] 19 + } [INFO] [stdout] 20 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> domain/src/todo/check.rs:14:24 [INFO] [stdout] | [INFO] [stdout] 14 | ids.split(',').map(|slice| String::from(slice)).collect::>() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> domain/src/todo/delete.rs:14:34 [INFO] [stdout] | [INFO] [stdout] 14 | ids_set = ids.split(',').map(|slice| String::from(slice)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `id` after checking its variant with `is_some` [INFO] [stdout] --> domain/src/lessons/add.rs:7:31 [INFO] [stdout] | [INFO] [stdout] 7 | id: if id.is_some() {Some(id.unwrap().to_owned())} else {None}, [INFO] [stdout] | --------------- ^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: try: `if let Some() = id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `lesson` after checking its variant with `is_some` [INFO] [stdout] --> domain/src/lessons/add.rs:8:39 [INFO] [stdout] | [INFO] [stdout] 8 | lesson: if lesson.is_some() {Some(lesson.unwrap().to_owned())} else {None}, [INFO] [stdout] | ------------------- ^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: try: `if let Some() = lesson` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> domain/src/lessons/search.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | / return { id.is_none() || *lesson_id == *id.unwrap() } || { [INFO] [stdout] 22 | | query.is_none() || lesson.lesson.contains(query.unwrap()) [INFO] [stdout] 23 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` and wrap the sequence with parentheses [INFO] [stdout] | [INFO] [stdout] 21 ~ ({ id.is_none() || *lesson_id == *id.unwrap() } || { [INFO] [stdout] 22 + query.is_none() || lesson.lesson.contains(query.unwrap()) [INFO] [stdout] 23 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> domain/src/lessons/delete.rs:12:3 [INFO] [stdout] | [INFO] [stdout] 12 | let map_ids: HashSet; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] 13 | [INFO] [stdout] 14 | / map_ids = if let Some(ids) = ids { [INFO] [stdout] 15 | | ids.split(',').map(|string| String::from(string)).collect() [INFO] [stdout] 16 | | } else { [INFO] [stdout] 17 | | match take_ids_input() { [INFO] [stdout] ... | [INFO] [stdout] 21 | | }; [INFO] [stdout] | |___^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `map_ids` here [INFO] [stdout] | [INFO] [stdout] 12 ~ [INFO] [stdout] 13 | [INFO] [stdout] 14 ~ let map_ids: HashSet = if let Some(ids) = ids { [INFO] [stdout] 15 + ids.split(',').map(|string| String::from(string)).collect() [INFO] [stdout] 16 + } else { [INFO] [stdout] 17 + match take_ids_input() { [INFO] [stdout] 18 + Ok(res) => res, [INFO] [stdout] 19 + Err(e) => return Err(e.to_string()) [INFO] [stdout] 20 + } [INFO] [stdout] 21 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> domain/src/lessons/delete.rs:15:24 [INFO] [stdout] | [INFO] [stdout] 15 | ids.split(',').map(|string| String::from(string)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `id` after checking its variant with `is_some` [INFO] [stdout] --> domain/src/archive/add.rs:9:31 [INFO] [stdout] | [INFO] [stdout] 9 | id: if id.is_some() {Some(id.unwrap().to_owned())} else {None}, [INFO] [stdout] | --------------- ^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: try: `if let Some() = id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `data` after checking its variant with `is_some` [INFO] [stdout] --> domain/src/archive/add.rs:10:35 [INFO] [stdout] | [INFO] [stdout] 10 | data: if data.is_some() {Some(data.unwrap().to_owned())} else {None}, [INFO] [stdout] | ----------------- ^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: try: `if let Some() = data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> domain/src/archive/search.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | / return { id.is_none() || *archive_id == *id.unwrap() } || { [INFO] [stdout] 18 | | query.is_none() || archive.data.contains(query.unwrap()) [INFO] [stdout] 19 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` and wrap the sequence with parentheses [INFO] [stdout] | [INFO] [stdout] 17 ~ ({ id.is_none() || *archive_id == *id.unwrap() } || { [INFO] [stdout] 18 + query.is_none() || archive.data.contains(query.unwrap()) [INFO] [stdout] 19 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> domain/src/archive/delete.rs:12:3 [INFO] [stdout] | [INFO] [stdout] 12 | let map_ids: HashSet; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] 13 | [INFO] [stdout] 14 | / map_ids = if let Some(ids) = ids { [INFO] [stdout] 15 | | ids.split(',').map(|string| String::from(string)).collect() [INFO] [stdout] 16 | | } else { [INFO] [stdout] 17 | | match take_ids_input() { [INFO] [stdout] ... | [INFO] [stdout] 21 | | }; [INFO] [stdout] | |___^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `map_ids` here [INFO] [stdout] | [INFO] [stdout] 12 ~ [INFO] [stdout] 13 | [INFO] [stdout] 14 ~ let map_ids: HashSet = if let Some(ids) = ids { [INFO] [stdout] 15 + ids.split(',').map(|string| String::from(string)).collect() [INFO] [stdout] 16 + } else { [INFO] [stdout] 17 + match take_ids_input() { [INFO] [stdout] 18 + Ok(res) => res, [INFO] [stdout] 19 + Err(e) => return Err(e.to_string()) [INFO] [stdout] 20 + } [INFO] [stdout] 21 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> domain/src/archive/delete.rs:15:24 [INFO] [stdout] | [INFO] [stdout] 15 | ids.split(',').map(|string| String::from(string)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> domain/src/todo/add.rs:42:15 [INFO] [stdout] | [INFO] [stdout] 42 | Err(e) => return Err(e.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 42 - Err(e) => return Err(e.to_string()) [INFO] [stdout] 42 + Err(e) => Err(e.to_string()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> domain/src/todo/add.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 12 | let id = if let Some(id) = id { [INFO] [stdout] | ____________^ [INFO] [stdout] 13 | | Some(id.clone()) [INFO] [stdout] 14 | | } else { None }; [INFO] [stdout] | |_________________^ help: try: `id.map(|id| id.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> domain/src/todo/add.rs:15:15 [INFO] [stdout] | [INFO] [stdout] 15 | let title = if let Some(title) = title { [INFO] [stdout] | _______________^ [INFO] [stdout] 16 | | Some(title.clone()) [INFO] [stdout] 17 | | } else { None }; [INFO] [stdout] | |_________________^ help: try: `title.map(|title| title.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> domain/src/todo/add.rs:18:21 [INFO] [stdout] | [INFO] [stdout] 18 | let description = if let Some(description) = description { [INFO] [stdout] | _____________________^ [INFO] [stdout] 19 | | Some(description.clone()) [INFO] [stdout] 20 | | } else { None }; [INFO] [stdout] | |_________________^ help: try: `description.map(|description| description.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> domain/src/todo/add.rs:21:18 [INFO] [stdout] | [INFO] [stdout] 21 | let priority = if let Some(priority) = priority { [INFO] [stdout] | __________________^ [INFO] [stdout] 22 | | Some(*priority) [INFO] [stdout] 23 | | } else { None }; [INFO] [stdout] | |_________________^ help: try: `priority.map(|priority| *priority)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> domain/src/todo/add.rs:37:54 [INFO] [stdout] | [INFO] [stdout] 37 | if todo.description.clone().is_some_and(|desc| desc == "") { [INFO] [stdout] | ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `desc.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> domain/src/todo/search.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | / true [INFO] [stdout] 42 | | && { id.is_none() || id.is_some_and(|id| *id == *todo_id) } [INFO] [stdout] 43 | | && { [INFO] [stdout] 44 | | query.is_none() [INFO] [stdout] ... | [INFO] [stdout] 60 | | true [INFO] [stdout] 61 | | } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 41 ~ { id.is_none() || id.is_some_and(|id| *id == *todo_id) } && { [INFO] [stdout] 42 + query.is_none() [INFO] [stdout] 43 + || query.is_some_and(|query| { [INFO] [stdout] 44 + todo.title.contains(query) [INFO] [stdout] 45 + || todo [INFO] [stdout] 46 + .description [INFO] [stdout] 47 + .as_ref() [INFO] [stdout] 48 + .is_some_and(|desc| desc.contains(query)) [INFO] [stdout] 49 + }) [INFO] [stdout] 50 + } && if has_description {todo.description.is_some() == has_description} else {true} && { priority.is_none() || priority.is_some_and(|priority| *priority == todo.priority) } && if completed { [INFO] [stdout] 51 + todo.completed == completed [INFO] [stdout] 52 + } else if not_completed { [INFO] [stdout] 53 + todo.completed == !not_completed [INFO] [stdout] 54 + } else { [INFO] [stdout] 55 + true [INFO] [stdout] 56 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> domain/src/todo/search.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | / true [INFO] [stdout] 42 | | && { id.is_none() || id.is_some_and(|id| *id == *todo_id) } [INFO] [stdout] 43 | | && { [INFO] [stdout] 44 | | query.is_none() [INFO] [stdout] ... | [INFO] [stdout] 53 | | && if has_description {todo.description.is_some() == has_description} else {true} [INFO] [stdout] 54 | | && { priority.is_none() || priority.is_some_and(|priority| *priority == todo.priority) } [INFO] [stdout] | |______________________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 41 ~ { id.is_none() || id.is_some_and(|id| *id == *todo_id) } && { [INFO] [stdout] 42 + query.is_none() [INFO] [stdout] 43 + || query.is_some_and(|query| { [INFO] [stdout] 44 + todo.title.contains(query) [INFO] [stdout] 45 + || todo [INFO] [stdout] 46 + .description [INFO] [stdout] 47 + .as_ref() [INFO] [stdout] 48 + .is_some_and(|desc| desc.contains(query)) [INFO] [stdout] 49 + }) [INFO] [stdout] 50 + } && if has_description {todo.description.is_some() == has_description} else {true} && { priority.is_none() || priority.is_some_and(|priority| *priority == todo.priority) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> domain/src/todo/search.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | / true [INFO] [stdout] 42 | | && { id.is_none() || id.is_some_and(|id| *id == *todo_id) } [INFO] [stdout] 43 | | && { [INFO] [stdout] 44 | | query.is_none() [INFO] [stdout] ... | [INFO] [stdout] 53 | | && if has_description {todo.description.is_some() == has_description} else {true} [INFO] [stdout] | |_______________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 41 ~ { id.is_none() || id.is_some_and(|id| *id == *todo_id) } && { [INFO] [stdout] 42 + query.is_none() [INFO] [stdout] 43 + || query.is_some_and(|query| { [INFO] [stdout] 44 + todo.title.contains(query) [INFO] [stdout] 45 + || todo [INFO] [stdout] 46 + .description [INFO] [stdout] 47 + .as_ref() [INFO] [stdout] 48 + .is_some_and(|desc| desc.contains(query)) [INFO] [stdout] 49 + }) [INFO] [stdout] 50 + } && if has_description {todo.description.is_some() == has_description} else {true} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> domain/src/todo/search.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | / true [INFO] [stdout] 42 | | && { id.is_none() || id.is_some_and(|id| *id == *todo_id) } [INFO] [stdout] 43 | | && { [INFO] [stdout] 44 | | query.is_none() [INFO] [stdout] ... | [INFO] [stdout] 51 | | }) [INFO] [stdout] 52 | | } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 41 ~ { id.is_none() || id.is_some_and(|id| *id == *todo_id) } && { [INFO] [stdout] 42 + query.is_none() [INFO] [stdout] 43 + || query.is_some_and(|query| { [INFO] [stdout] 44 + todo.title.contains(query) [INFO] [stdout] 45 + || todo [INFO] [stdout] 46 + .description [INFO] [stdout] 47 + .as_ref() [INFO] [stdout] 48 + .is_some_and(|desc| desc.contains(query)) [INFO] [stdout] 49 + }) [INFO] [stdout] 50 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> domain/src/todo/search.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | / true [INFO] [stdout] 42 | | && { id.is_none() || id.is_some_and(|id| *id == *todo_id) } [INFO] [stdout] | |_________________________________________________________________^ help: try: `{ id.is_none() || id.is_some_and(|id| *id == *todo_id) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> domain/src/todo/search.rs:34:11 [INFO] [stdout] | [INFO] [stdout] 34 | todo.completed == !not_completed [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `todo.completed != not_completed` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> domain/src/todo/search.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | todo.completed == !not_completed [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `todo.completed != not_completed` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> domain/src/todo/check.rs:11:3 [INFO] [stdout] | [INFO] [stdout] 11 | let some_ids: HashSet; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] 12 | [INFO] [stdout] 13 | / some_ids = if let Some(ids) = ids { [INFO] [stdout] 14 | | ids.split(',').map(|slice| String::from(slice)).collect::>() [INFO] [stdout] 15 | | } else { [INFO] [stdout] 16 | | match take_ids_input() { [INFO] [stdout] ... | [INFO] [stdout] 20 | | }; [INFO] [stdout] | |___^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `some_ids` here [INFO] [stdout] | [INFO] [stdout] 11 ~ [INFO] [stdout] 12 | [INFO] [stdout] 13 ~ let some_ids: HashSet = if let Some(ids) = ids { [INFO] [stdout] 14 + ids.split(',').map(|slice| String::from(slice)).collect::>() [INFO] [stdout] 15 + } else { [INFO] [stdout] 16 + match take_ids_input() { [INFO] [stdout] 17 + Ok(res) => res, [INFO] [stdout] 18 + Err(e) => return Err(e.to_string()) [INFO] [stdout] 19 + } [INFO] [stdout] 20 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> domain/src/todo/check.rs:14:24 [INFO] [stdout] | [INFO] [stdout] 14 | ids.split(',').map(|slice| String::from(slice)).collect::>() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> domain/src/todo/delete.rs:14:34 [INFO] [stdout] | [INFO] [stdout] 14 | ids_set = ids.split(',').map(|slice| String::from(slice)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `id` after checking its variant with `is_some` [INFO] [stdout] --> domain/src/lessons/add.rs:7:31 [INFO] [stdout] | [INFO] [stdout] 7 | id: if id.is_some() {Some(id.unwrap().to_owned())} else {None}, [INFO] [stdout] | --------------- ^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: try: `if let Some() = id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `lesson` after checking its variant with `is_some` [INFO] [stdout] --> domain/src/lessons/add.rs:8:39 [INFO] [stdout] | [INFO] [stdout] 8 | lesson: if lesson.is_some() {Some(lesson.unwrap().to_owned())} else {None}, [INFO] [stdout] | ------------------- ^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: try: `if let Some() = lesson` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> domain/src/lessons/search.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | / return { id.is_none() || *lesson_id == *id.unwrap() } || { [INFO] [stdout] 22 | | query.is_none() || lesson.lesson.contains(query.unwrap()) [INFO] [stdout] 23 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` and wrap the sequence with parentheses [INFO] [stdout] | [INFO] [stdout] 21 ~ ({ id.is_none() || *lesson_id == *id.unwrap() } || { [INFO] [stdout] 22 + query.is_none() || lesson.lesson.contains(query.unwrap()) [INFO] [stdout] 23 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> domain/src/lessons/delete.rs:12:3 [INFO] [stdout] | [INFO] [stdout] 12 | let map_ids: HashSet; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] 13 | [INFO] [stdout] 14 | / map_ids = if let Some(ids) = ids { [INFO] [stdout] 15 | | ids.split(',').map(|string| String::from(string)).collect() [INFO] [stdout] 16 | | } else { [INFO] [stdout] 17 | | match take_ids_input() { [INFO] [stdout] ... | [INFO] [stdout] 21 | | }; [INFO] [stdout] | |___^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `map_ids` here [INFO] [stdout] | [INFO] [stdout] 12 ~ [INFO] [stdout] 13 | [INFO] [stdout] 14 ~ let map_ids: HashSet = if let Some(ids) = ids { [INFO] [stdout] 15 + ids.split(',').map(|string| String::from(string)).collect() [INFO] [stdout] 16 + } else { [INFO] [stdout] 17 + match take_ids_input() { [INFO] [stdout] 18 + Ok(res) => res, [INFO] [stdout] 19 + Err(e) => return Err(e.to_string()) [INFO] [stdout] 20 + } [INFO] [stdout] 21 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> domain/src/lessons/delete.rs:15:24 [INFO] [stdout] | [INFO] [stdout] 15 | ids.split(',').map(|string| String::from(string)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `id` after checking its variant with `is_some` [INFO] [stdout] --> domain/src/archive/add.rs:9:31 [INFO] [stdout] | [INFO] [stdout] 9 | id: if id.is_some() {Some(id.unwrap().to_owned())} else {None}, [INFO] [stdout] | --------------- ^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: try: `if let Some() = id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `data` after checking its variant with `is_some` [INFO] [stdout] --> domain/src/archive/add.rs:10:35 [INFO] [stdout] | [INFO] [stdout] 10 | data: if data.is_some() {Some(data.unwrap().to_owned())} else {None}, [INFO] [stdout] | ----------------- ^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: try: `if let Some() = data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> domain/src/archive/search.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | / return { id.is_none() || *archive_id == *id.unwrap() } || { [INFO] [stdout] 18 | | query.is_none() || archive.data.contains(query.unwrap()) [INFO] [stdout] 19 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` and wrap the sequence with parentheses [INFO] [stdout] | [INFO] [stdout] 17 ~ ({ id.is_none() || *archive_id == *id.unwrap() } || { [INFO] [stdout] 18 + query.is_none() || archive.data.contains(query.unwrap()) [INFO] [stdout] 19 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> domain/src/archive/delete.rs:12:3 [INFO] [stdout] | [INFO] [stdout] 12 | let map_ids: HashSet; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] 13 | [INFO] [stdout] 14 | / map_ids = if let Some(ids) = ids { [INFO] [stdout] 15 | | ids.split(',').map(|string| String::from(string)).collect() [INFO] [stdout] 16 | | } else { [INFO] [stdout] 17 | | match take_ids_input() { [INFO] [stdout] ... | [INFO] [stdout] 21 | | }; [INFO] [stdout] | |___^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `map_ids` here [INFO] [stdout] | [INFO] [stdout] 12 ~ [INFO] [stdout] 13 | [INFO] [stdout] 14 ~ let map_ids: HashSet = if let Some(ids) = ids { [INFO] [stdout] 15 + ids.split(',').map(|string| String::from(string)).collect() [INFO] [stdout] 16 + } else { [INFO] [stdout] 17 + match take_ids_input() { [INFO] [stdout] 18 + Ok(res) => res, [INFO] [stdout] 19 + Err(e) => return Err(e.to_string()) [INFO] [stdout] 20 + } [INFO] [stdout] 21 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> domain/src/archive/delete.rs:15:24 [INFO] [stdout] | [INFO] [stdout] 15 | ids.split(',').map(|string| String::from(string)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking doit v1.0.1 (/opt/rustwide/workdir/cli) [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 9.25s [INFO] running `Command { std: "docker" "inspect" "3ef073f041d2387ef0e2f23901374f23907f2110af4edbce9e93d3c3a61963c5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "3ef073f041d2387ef0e2f23901374f23907f2110af4edbce9e93d3c3a61963c5", kill_on_drop: false }` [INFO] [stdout] 3ef073f041d2387ef0e2f23901374f23907f2110af4edbce9e93d3c3a61963c5