[INFO] cloning repository https://github.com/Erfankhodami/StoreManagerWithRust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Erfankhodami/StoreManagerWithRust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FErfankhodami%2FStoreManagerWithRust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FErfankhodami%2FStoreManagerWithRust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 047b5292c3597320ce8f085ab613939dd174c079 [INFO] linting Erfankhodami/StoreManagerWithRust against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FErfankhodami%2FStoreManagerWithRust" "/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/Erfankhodami/StoreManagerWithRust [INFO] finished tweaking git repo https://github.com/Erfankhodami/StoreManagerWithRust [INFO] tweaked toml for git repo https://github.com/Erfankhodami/StoreManagerWithRust written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Erfankhodami/StoreManagerWithRust 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/Erfankhodami/StoreManagerWithRust 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] 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] d887250080f6b879907c8b547d5db593d10db2cfe8d144fbd7e0e21707ecd954 [INFO] running `Command { std: "docker" "start" "-a" "d887250080f6b879907c8b547d5db593d10db2cfe8d144fbd7e0e21707ecd954", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "d887250080f6b879907c8b547d5db593d10db2cfe8d144fbd7e0e21707ecd954", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d887250080f6b879907c8b547d5db593d10db2cfe8d144fbd7e0e21707ecd954", kill_on_drop: false }` [INFO] [stdout] d887250080f6b879907c8b547d5db593d10db2cfe8d144fbd7e0e21707ecd954 [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] efd246a93c35804a4f1bcac03dcc0079cbf0a4bee2842b83623758e84a624839 [INFO] running `Command { std: "docker" "start" "-a" "efd246a93c35804a4f1bcac03dcc0079cbf0a4bee2842b83623758e84a624839", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.95 [INFO] [stderr] Checking colored v3.0.0 [INFO] [stderr] Compiling serde_json v1.0.140 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Compiling syn v2.0.100 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Checking serde v1.0.219 [INFO] [stderr] Checking MiniProject1 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::ptr::write` [INFO] [stdout] --> src/main.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use std::ptr::write; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Expensive_than` should have an upper camel case name [INFO] [stdout] --> src/main.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | Expensive_than, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `ExpensiveThan` [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: variant `Cheaper_than` should have an upper camel case name [INFO] [stdout] --> src/main.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | Cheaper_than, [INFO] [stdout] | ^^^^^^^^^^^^ help: convert the identifier to upper camel case: `CheaperThan` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/main.rs:49:16 [INFO] [stdout] | [INFO] [stdout] 49 | if (command[1] == "all") { [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] 49 - if (command[1] == "all") { [INFO] [stdout] 49 + if command[1] == "all" { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/main.rs:76:16 [INFO] [stdout] | [INFO] [stdout] 76 | if (!item.is_none()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 76 - if (!item.is_none()) { [INFO] [stdout] 76 + if !item.is_none() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/main.rs:83:16 [INFO] [stdout] | [INFO] [stdout] 83 | if (!item.is_none()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 83 - if (!item.is_none()) { [INFO] [stdout] 83 + if !item.is_none() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/main.rs:88:12 [INFO] [stdout] | [INFO] [stdout] 88 | if (command[0] == "discontinue") { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 88 - if (command[0] == "discontinue") { [INFO] [stdout] 88 + if command[0] == "discontinue" { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/main.rs:90:16 [INFO] [stdout] | [INFO] [stdout] 90 | if (!item.is_none()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 90 - if (!item.is_none()) { [INFO] [stdout] 90 + if !item.is_none() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::ptr::write` [INFO] [stdout] --> src/main.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use std::ptr::write; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Expensive_than` should have an upper camel case name [INFO] [stdout] --> src/main.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | Expensive_than, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `ExpensiveThan` [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: variant `Cheaper_than` should have an upper camel case name [INFO] [stdout] --> src/main.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | Cheaper_than, [INFO] [stdout] | ^^^^^^^^^^^^ help: convert the identifier to upper camel case: `CheaperThan` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/main.rs:49:16 [INFO] [stdout] | [INFO] [stdout] 49 | if (command[1] == "all") { [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] 49 - if (command[1] == "all") { [INFO] [stdout] 49 + if command[1] == "all" { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/main.rs:76:16 [INFO] [stdout] | [INFO] [stdout] 76 | if (!item.is_none()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 76 - if (!item.is_none()) { [INFO] [stdout] 76 + if !item.is_none() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/main.rs:83:16 [INFO] [stdout] | [INFO] [stdout] 83 | if (!item.is_none()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 83 - if (!item.is_none()) { [INFO] [stdout] 83 + if !item.is_none() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/main.rs:88:12 [INFO] [stdout] | [INFO] [stdout] 88 | if (command[0] == "discontinue") { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 88 - if (command[0] == "discontinue") { [INFO] [stdout] 88 + if command[0] == "discontinue" { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/main.rs:90:16 [INFO] [stdout] | [INFO] [stdout] 90 | if (!item.is_none()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 90 - if (!item.is_none()) { [INFO] [stdout] 90 + if !item.is_none() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `items` is never read [INFO] [stdout] --> src/main.rs:35:32 [INFO] [stdout] | [INFO] [stdout] 35 | let mut items: Vec = Vec::new(); [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] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:204:9 [INFO] [stdout] | [INFO] [stdout] 204 | let mut file: File; [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: method `UpdateQuantity` is never used [INFO] [stdout] --> src/main.rs:115:8 [INFO] [stdout] | [INFO] [stdout] 114 | impl Item { [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] 115 | fn UpdateQuantity(&mut self, _quantity: i32) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:76:16 [INFO] [stdout] | [INFO] [stdout] 76 | if (!item.is_none()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `item.is_some()` [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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:83:16 [INFO] [stdout] | [INFO] [stdout] 83 | if (!item.is_none()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `item.is_some()` [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] --> src/main.rs:90:16 [INFO] [stdout] | [INFO] [stdout] 90 | if (!item.is_none()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `item.is_some()` [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: called `unwrap` on `item` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:77:17 [INFO] [stdout] | [INFO] [stdout] 76 | if (!item.is_none()) { [INFO] [stdout] | -------------- the check is happening here [INFO] [stdout] 77 | item.unwrap().Sell(command[2].trim().parse().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [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 `item` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:84:17 [INFO] [stdout] | [INFO] [stdout] 83 | if (!item.is_none()) { [INFO] [stdout] | -------------- the check is happening here [INFO] [stdout] 84 | item.unwrap().DisplayInfo(); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [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 `item` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:91:17 [INFO] [stdout] | [INFO] [stdout] 90 | if (!item.is_none()) { [INFO] [stdout] | -------------- the check is happening here [INFO] [stdout] 91 | item.unwrap().DiscontinueItem(); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [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: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/main.rs:40:40 [INFO] [stdout] | [INFO] [stdout] 40 | let command: Vec<&str> = input.trim().split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:157:31 [INFO] [stdout] | [INFO] [stdout] 157 | if n.price >= price.clone().unwrap(){ [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `price` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:164:31 [INFO] [stdout] | [INFO] [stdout] 164 | if n.price <= price.clone().unwrap() { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `price` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `filteredItems` should have a snake case name [INFO] [stdout] --> src/main.rs:48:21 [INFO] [stdout] | [INFO] [stdout] 48 | let mut filteredItems: Vec=Vec::new(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to snake case: `filtered_items` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `UpdateQuantity` should have a snake case name [INFO] [stdout] --> src/main.rs:115:8 [INFO] [stdout] | [INFO] [stdout] 115 | fn UpdateQuantity(&mut self, _quantity: i32) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: convert the identifier to snake case: `update_quantity` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `Sell` should have a snake case name [INFO] [stdout] --> src/main.rs:118:8 [INFO] [stdout] | [INFO] [stdout] 118 | fn Sell(&mut self, amount: i32) { [INFO] [stdout] | ^^^^ help: convert the identifier to snake case (notice the capitalization): `sell` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `DisplayInfo` should have a snake case name [INFO] [stdout] --> src/main.rs:138:8 [INFO] [stdout] | [INFO] [stdout] 138 | fn DisplayInfo(&self) { [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to snake case: `display_info` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `DiscontinueItem` should have a snake case name [INFO] [stdout] --> src/main.rs:141:8 [INFO] [stdout] | [INFO] [stdout] 141 | fn DiscontinueItem(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `discontinue_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `DisplayItems` should have a snake case name [INFO] [stdout] --> src/main.rs:145:4 [INFO] [stdout] | [INFO] [stdout] 145 | fn DisplayItems(itmes: &Vec) { [INFO] [stdout] | ^^^^^^^^^^^^ help: convert the identifier to snake case: `display_items` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `FilterItmes` should have a snake case name [INFO] [stdout] --> src/main.rs:152:4 [INFO] [stdout] | [INFO] [stdout] 152 | fn FilterItmes(_type: FilterType, items: &Vec, price: Option) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to snake case: `filter_itmes` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `SaveToJson` should have a snake case name [INFO] [stdout] --> src/main.rs:194:4 [INFO] [stdout] | [INFO] [stdout] 194 | fn SaveToJson(itmes: &Vec) { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `save_to_json` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `ReadFromJson` should have a snake case name [INFO] [stdout] --> src/main.rs:201:4 [INFO] [stdout] | [INFO] [stdout] 201 | fn ReadFromJson() -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ help: convert the identifier to snake case: `read_from_json` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `SearchForItem` should have a snake case name [INFO] [stdout] --> src/main.rs:217:4 [INFO] [stdout] | [INFO] [stdout] 217 | fn SearchForItem<'a>(name: &'a str, items: &'a mut Vec) -> Option<&'a mut Item> { [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to snake case: `search_for_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `isFound` should have a snake case name [INFO] [stdout] --> src/main.rs:218:13 [INFO] [stdout] | [INFO] [stdout] 218 | let mut isFound = false; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case: `is_found` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `items` is never read [INFO] [stdout] --> src/main.rs:35:32 [INFO] [stdout] | [INFO] [stdout] 35 | let mut items: Vec = Vec::new(); [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] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:204:9 [INFO] [stdout] | [INFO] [stdout] 204 | let mut file: File; [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: method `UpdateQuantity` is never used [INFO] [stdout] --> src/main.rs:115:8 [INFO] [stdout] | [INFO] [stdout] 114 | impl Item { [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] 115 | fn UpdateQuantity(&mut self, _quantity: i32) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:76:16 [INFO] [stdout] | [INFO] [stdout] 76 | if (!item.is_none()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `item.is_some()` [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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:83:16 [INFO] [stdout] | [INFO] [stdout] 83 | if (!item.is_none()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `item.is_some()` [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] --> src/main.rs:90:16 [INFO] [stdout] | [INFO] [stdout] 90 | if (!item.is_none()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `item.is_some()` [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: called `unwrap` on `item` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:77:17 [INFO] [stdout] | [INFO] [stdout] 76 | if (!item.is_none()) { [INFO] [stdout] | -------------- the check is happening here [INFO] [stdout] 77 | item.unwrap().Sell(command[2].trim().parse().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [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 `item` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:84:17 [INFO] [stdout] | [INFO] [stdout] 83 | if (!item.is_none()) { [INFO] [stdout] | -------------- the check is happening here [INFO] [stdout] 84 | item.unwrap().DisplayInfo(); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [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 `item` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:91:17 [INFO] [stdout] | [INFO] [stdout] 90 | if (!item.is_none()) { [INFO] [stdout] | -------------- the check is happening here [INFO] [stdout] 91 | item.unwrap().DiscontinueItem(); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [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: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/main.rs:40:40 [INFO] [stdout] | [INFO] [stdout] 40 | let command: Vec<&str> = input.trim().split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:157:31 [INFO] [stdout] | [INFO] [stdout] 157 | if n.price >= price.clone().unwrap(){ [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `price` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:164:31 [INFO] [stdout] | [INFO] [stdout] 164 | if n.price <= price.clone().unwrap() { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `price` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `filteredItems` should have a snake case name [INFO] [stdout] --> src/main.rs:48:21 [INFO] [stdout] | [INFO] [stdout] 48 | let mut filteredItems: Vec=Vec::new(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to snake case: `filtered_items` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `UpdateQuantity` should have a snake case name [INFO] [stdout] --> src/main.rs:115:8 [INFO] [stdout] | [INFO] [stdout] 115 | fn UpdateQuantity(&mut self, _quantity: i32) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: convert the identifier to snake case: `update_quantity` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `Sell` should have a snake case name [INFO] [stdout] --> src/main.rs:118:8 [INFO] [stdout] | [INFO] [stdout] 118 | fn Sell(&mut self, amount: i32) { [INFO] [stdout] | ^^^^ help: convert the identifier to snake case (notice the capitalization): `sell` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `DisplayInfo` should have a snake case name [INFO] [stdout] --> src/main.rs:138:8 [INFO] [stdout] | [INFO] [stdout] 138 | fn DisplayInfo(&self) { [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to snake case: `display_info` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `DiscontinueItem` should have a snake case name [INFO] [stdout] --> src/main.rs:141:8 [INFO] [stdout] | [INFO] [stdout] 141 | fn DiscontinueItem(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `discontinue_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `DisplayItems` should have a snake case name [INFO] [stdout] --> src/main.rs:145:4 [INFO] [stdout] | [INFO] [stdout] 145 | fn DisplayItems(itmes: &Vec) { [INFO] [stdout] | ^^^^^^^^^^^^ help: convert the identifier to snake case: `display_items` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `FilterItmes` should have a snake case name [INFO] [stdout] --> src/main.rs:152:4 [INFO] [stdout] | [INFO] [stdout] 152 | fn FilterItmes(_type: FilterType, items: &Vec, price: Option) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to snake case: `filter_itmes` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `SaveToJson` should have a snake case name [INFO] [stdout] --> src/main.rs:194:4 [INFO] [stdout] | [INFO] [stdout] 194 | fn SaveToJson(itmes: &Vec) { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `save_to_json` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `ReadFromJson` should have a snake case name [INFO] [stdout] --> src/main.rs:201:4 [INFO] [stdout] | [INFO] [stdout] 201 | fn ReadFromJson() -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ help: convert the identifier to snake case: `read_from_json` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `SearchForItem` should have a snake case name [INFO] [stdout] --> src/main.rs:217:4 [INFO] [stdout] | [INFO] [stdout] 217 | fn SearchForItem<'a>(name: &'a str, items: &'a mut Vec) -> Option<&'a mut Item> { [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to snake case: `search_for_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `isFound` should have a snake case name [INFO] [stdout] --> src/main.rs:218:13 [INFO] [stdout] | [INFO] [stdout] 218 | let mut isFound = false; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case: `is_found` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 10.33s [INFO] running `Command { std: "docker" "inspect" "efd246a93c35804a4f1bcac03dcc0079cbf0a4bee2842b83623758e84a624839", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "efd246a93c35804a4f1bcac03dcc0079cbf0a4bee2842b83623758e84a624839", kill_on_drop: false }` [INFO] [stdout] efd246a93c35804a4f1bcac03dcc0079cbf0a4bee2842b83623758e84a624839