[INFO] cloning repository https://github.com/emmaknospe/rust-learning [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/emmaknospe/rust-learning" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Femmaknospe%2Frust-learning", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Femmaknospe%2Frust-learning'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 5740b18b6f14c10a02e74f59e52e368d7d8a4200 [INFO] linting emmaknospe/rust-learning against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Femmaknospe%2Frust-learning" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/emmaknospe/rust-learning [INFO] finished tweaking git repo https://github.com/emmaknospe/rust-learning [INFO] tweaked toml for git repo https://github.com/emmaknospe/rust-learning written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/emmaknospe/rust-learning 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/emmaknospe/rust-learning already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded inventory v0.3.16 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] fdba82b7c509dd14a3cc57d7a5a2ea220392519236facd7e4d8f57ce9f08ba78 [INFO] running `Command { std: "docker" "start" "-a" "fdba82b7c509dd14a3cc57d7a5a2ea220392519236facd7e4d8f57ce9f08ba78", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "fdba82b7c509dd14a3cc57d7a5a2ea220392519236facd7e4d8f57ce9f08ba78", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "fdba82b7c509dd14a3cc57d7a5a2ea220392519236facd7e4d8f57ce9f08ba78", kill_on_drop: false }` [INFO] [stdout] fdba82b7c509dd14a3cc57d7a5a2ea220392519236facd7e4d8f57ce9f08ba78 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 18970894bec8b870bb05397bad4451ea027a8c75276da21344bdb3ef9b3cd053 [INFO] running `Command { std: "docker" "start" "-a" "18970894bec8b870bb05397bad4451ea027a8c75276da21344bdb3ef9b3cd053", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.92 [INFO] [stderr] Compiling unicode-ident v1.0.14 [INFO] [stderr] Compiling libc v0.2.169 [INFO] [stderr] Checking inventory v0.3.16 [INFO] [stderr] Compiling quote v1.0.37 [INFO] [stderr] Compiling syn v2.0.91 [INFO] [stderr] Checking getrandom v0.2.15 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Compiling zerocopy-derive v0.7.35 [INFO] [stderr] Checking zerocopy v0.7.35 [INFO] [stderr] Checking ppv-lite86 v0.2.20 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking rust-learning v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | use inventory; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tokens.rs:47:25 [INFO] [stdout] | [INFO] [stdout] 47 | line_num: line_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `line_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tokens.rs:48:25 [INFO] [stdout] | [INFO] [stdout] 48 | col_num: col_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `col_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tokens.rs:62:25 [INFO] [stdout] | [INFO] [stdout] 62 | line_num: line_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `line_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tokens.rs:63:25 [INFO] [stdout] | [INFO] [stdout] 63 | col_num: col_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `col_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tokens.rs:78:25 [INFO] [stdout] | [INFO] [stdout] 78 | line_num: line_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `line_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tokens.rs:79:25 [INFO] [stdout] | [INFO] [stdout] 79 | col_num: col_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `col_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tokens.rs:109:17 [INFO] [stdout] | [INFO] [stdout] 109 | line_num: line_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `line_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tokens.rs:110:17 [INFO] [stdout] | [INFO] [stdout] 110 | col_num: col_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `col_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tokens.rs:116:17 [INFO] [stdout] | [INFO] [stdout] 116 | line_num: line_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `line_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tokens.rs:117:17 [INFO] [stdout] | [INFO] [stdout] 117 | col_num: col_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `col_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tokens.rs:131:21 [INFO] [stdout] | [INFO] [stdout] 131 | line_num: line_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `line_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tokens.rs:132:21 [INFO] [stdout] | [INFO] [stdout] 132 | col_num: col_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `col_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tokens.rs:151:17 [INFO] [stdout] | [INFO] [stdout] 151 | line_num: line_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `line_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tokens.rs:152:17 [INFO] [stdout] | [INFO] [stdout] 152 | col_num: col_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `col_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | use inventory; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tokens.rs:47:25 [INFO] [stdout] | [INFO] [stdout] 47 | line_num: line_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `line_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tokens.rs:48:25 [INFO] [stdout] | [INFO] [stdout] 48 | col_num: col_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `col_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tokens.rs:62:25 [INFO] [stdout] | [INFO] [stdout] 62 | line_num: line_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `line_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tokens.rs:63:25 [INFO] [stdout] | [INFO] [stdout] 63 | col_num: col_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `col_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tokens.rs:78:25 [INFO] [stdout] | [INFO] [stdout] 78 | line_num: line_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `line_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tokens.rs:79:25 [INFO] [stdout] | [INFO] [stdout] 79 | col_num: col_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `col_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tokens.rs:109:17 [INFO] [stdout] | [INFO] [stdout] 109 | line_num: line_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `line_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tokens.rs:110:17 [INFO] [stdout] | [INFO] [stdout] 110 | col_num: col_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `col_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tokens.rs:116:17 [INFO] [stdout] | [INFO] [stdout] 116 | line_num: line_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `line_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tokens.rs:117:17 [INFO] [stdout] | [INFO] [stdout] 117 | col_num: col_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `col_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tokens.rs:131:21 [INFO] [stdout] | [INFO] [stdout] 131 | line_num: line_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `line_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tokens.rs:132:21 [INFO] [stdout] | [INFO] [stdout] 132 | col_num: col_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `col_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tokens.rs:151:17 [INFO] [stdout] | [INFO] [stdout] 151 | line_num: line_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `line_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tokens.rs:152:17 [INFO] [stdout] | [INFO] [stdout] 152 | col_num: col_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `col_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `col_num` is used as a loop counter [INFO] [stdout] --> src/tokens.rs:40:9 [INFO] [stdout] | [INFO] [stdout] 40 | for c in line.chars() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (col_num, c) in line.chars().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/tokens.rs:67:21 [INFO] [stdout] | [INFO] [stdout] 67 | / if res.is_err() { [INFO] [stdout] 68 | | return res; [INFO] [stdout] 69 | | } [INFO] [stdout] | |_____________________^ help: replace it with: `res.as_ref()?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tokens.rs:82:24 [INFO] [stdout] | [INFO] [stdout] 82 | if cur_symbol.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_symbol.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/tokens.rs:84:25 [INFO] [stdout] | [INFO] [stdout] 84 | / if res.is_err() { [INFO] [stdout] 85 | | return res; [INFO] [stdout] 86 | | } [INFO] [stdout] | |_________________________^ help: replace it with: `res.as_ref()?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tokens.rs:104:8 [INFO] [stdout] | [INFO] [stdout] 104 | if cur_symbol.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_symbol.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/values.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | / impl Default for ValueType { [INFO] [stdout] 8 | | fn default() -> Self { [INFO] [stdout] 9 | | ValueType::Symbol [INFO] [stdout] 10 | | } [INFO] [stdout] 11 | | } [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 and mark the default variant [INFO] [stdout] | [INFO] [stdout] 7 + [INFO] [stdout] 8 | [INFO] [stdout] ... [INFO] [stdout] 11 | #[derive(PartialEq)] [INFO] [stdout] 12 + #[derive(Default)] [INFO] [stdout] 13 | pub enum ValueType { [INFO] [stdout] 14 ~ #[default] [INFO] [stdout] 15 ~ Symbol, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/display.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | / node.borrow().car().and_then( [INFO] [stdout] 22 | | |car| { [INFO] [stdout] 23 | | if car.borrow().is_list() { [INFO] [stdout] 24 | | print!("("); [INFO] [stdout] ... | [INFO] [stdout] 33 | | ); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: use `map` instead [INFO] [stdout] | [INFO] [stdout] 21 ~ node.borrow().car().map( [INFO] [stdout] 22 | |car| { [INFO] [stdout] ... [INFO] [stdout] 26 | print!(")"); [INFO] [stdout] 27 ~ car [INFO] [stdout] 28 | } else { [INFO] [stdout] 29 | display_tree(car.clone()); [INFO] [stdout] 30 ~ car [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/display.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | / node.borrow().cdr().and_then( [INFO] [stdout] 35 | | |cdr| { [INFO] [stdout] 36 | | if cdr.borrow().is_list() { [INFO] [stdout] 37 | | display_tree(cdr.clone()); [INFO] [stdout] ... | [INFO] [stdout] 47 | | ); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] help: use `map` instead [INFO] [stdout] | [INFO] [stdout] 34 ~ node.borrow().cdr().map( [INFO] [stdout] 35 | |cdr| { [INFO] [stdout] 36 | if cdr.borrow().is_list() { [INFO] [stdout] 37 | display_tree(cdr.clone()); [INFO] [stdout] 38 ~ cdr [INFO] [stdout] 39 | } else if !cdr.borrow().is_null() { [INFO] [stdout] 40 | print!(" . "); [INFO] [stdout] 41 | display_tree(cdr.clone()); [INFO] [stdout] 42 ~ cdr [INFO] [stdout] 43 | } else { [INFO] [stdout] 44 ~ cdr [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/nodes.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | !self.car.is_some() && !self.value.is_some() && !self.cdr.is_some() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `self.car.is_none()` [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/nodes.rs:39:32 [INFO] [stdout] | [INFO] [stdout] 39 | !self.car.is_some() && !self.value.is_some() && !self.cdr.is_some() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `self.value.is_none()` [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/nodes.rs:39:57 [INFO] [stdout] | [INFO] [stdout] 39 | !self.car.is_some() && !self.value.is_some() && !self.cdr.is_some() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `self.cdr.is_none()` [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: the variable `col_num` is used as a loop counter [INFO] [stdout] --> src/tokens.rs:40:9 [INFO] [stdout] | [INFO] [stdout] 40 | for c in line.chars() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (col_num, c) in line.chars().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/tokens.rs:67:21 [INFO] [stdout] | [INFO] [stdout] 67 | / if res.is_err() { [INFO] [stdout] 68 | | return res; [INFO] [stdout] 69 | | } [INFO] [stdout] | |_____________________^ help: replace it with: `res.as_ref()?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.parent` after checking its variant with `is_some` [INFO] [stdout] --> src/stackframe.rs:23:20 [INFO] [stdout] | [INFO] [stdout] 22 | if self.parent.is_some() { [INFO] [stdout] | ------------------------ help: try: `if let Some() = &self.parent` [INFO] [stdout] 23 | return self.parent.as_ref().unwrap().borrow().lookup(name); [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: length comparison to zero [INFO] [stdout] --> src/tokens.rs:82:24 [INFO] [stdout] | [INFO] [stdout] 82 | if cur_symbol.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_symbol.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/builtins.rs:12:15 [INFO] [stdout] | [INFO] [stdout] 12 | pub func: fn(Rc>, Rc>) -> Result>, String>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/tokens.rs:84:25 [INFO] [stdout] | [INFO] [stdout] 84 | / if res.is_err() { [INFO] [stdout] 85 | | return res; [INFO] [stdout] 86 | | } [INFO] [stdout] | |_________________________^ help: replace it with: `res.as_ref()?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tokens.rs:104:8 [INFO] [stdout] | [INFO] [stdout] 104 | if cur_symbol.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_symbol.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/values.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | / impl Default for ValueType { [INFO] [stdout] 8 | | fn default() -> Self { [INFO] [stdout] 9 | | ValueType::Symbol [INFO] [stdout] 10 | | } [INFO] [stdout] 11 | | } [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 and mark the default variant [INFO] [stdout] | [INFO] [stdout] 7 + [INFO] [stdout] 8 | [INFO] [stdout] ... [INFO] [stdout] 11 | #[derive(PartialEq)] [INFO] [stdout] 12 + #[derive(Default)] [INFO] [stdout] 13 | pub enum ValueType { [INFO] [stdout] 14 ~ #[default] [INFO] [stdout] 15 ~ Symbol, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/display.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | / node.borrow().car().and_then( [INFO] [stdout] 22 | | |car| { [INFO] [stdout] 23 | | if car.borrow().is_list() { [INFO] [stdout] 24 | | print!("("); [INFO] [stdout] ... | [INFO] [stdout] 33 | | ); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: use `map` instead [INFO] [stdout] | [INFO] [stdout] 21 ~ node.borrow().car().map( [INFO] [stdout] 22 | |car| { [INFO] [stdout] ... [INFO] [stdout] 26 | print!(")"); [INFO] [stdout] 27 ~ car [INFO] [stdout] 28 | } else { [INFO] [stdout] 29 | display_tree(car.clone()); [INFO] [stdout] 30 ~ car [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/display.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | / node.borrow().cdr().and_then( [INFO] [stdout] 35 | | |cdr| { [INFO] [stdout] 36 | | if cdr.borrow().is_list() { [INFO] [stdout] 37 | | display_tree(cdr.clone()); [INFO] [stdout] ... | [INFO] [stdout] 47 | | ); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] help: use `map` instead [INFO] [stdout] | [INFO] [stdout] 34 ~ node.borrow().cdr().map( [INFO] [stdout] 35 | |cdr| { [INFO] [stdout] 36 | if cdr.borrow().is_list() { [INFO] [stdout] 37 | display_tree(cdr.clone()); [INFO] [stdout] 38 ~ cdr [INFO] [stdout] 39 | } else if !cdr.borrow().is_null() { [INFO] [stdout] 40 | print!(" . "); [INFO] [stdout] 41 | display_tree(cdr.clone()); [INFO] [stdout] 42 ~ cdr [INFO] [stdout] 43 | } else { [INFO] [stdout] 44 ~ cdr [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/nodes.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | !self.car.is_some() && !self.value.is_some() && !self.cdr.is_some() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `self.car.is_none()` [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/nodes.rs:39:32 [INFO] [stdout] | [INFO] [stdout] 39 | !self.car.is_some() && !self.value.is_some() && !self.cdr.is_some() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `self.value.is_none()` [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/nodes.rs:39:57 [INFO] [stdout] | [INFO] [stdout] 39 | !self.car.is_some() && !self.value.is_some() && !self.cdr.is_some() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `self.cdr.is_none()` [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: comparison to empty slice [INFO] [stdout] --> src/builtins.rs:310:43 [INFO] [stdout] | [INFO] [stdout] 310 | ValueType::String => { return value_text(node.clone()) != ""; }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!value_text(node.clone()).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: called `unwrap` on `self.parent` after checking its variant with `is_some` [INFO] [stdout] --> src/stackframe.rs:23:20 [INFO] [stdout] | [INFO] [stdout] 22 | if self.parent.is_some() { [INFO] [stdout] | ------------------------ help: try: `if let Some() = &self.parent` [INFO] [stdout] 23 | return self.parent.as_ref().unwrap().borrow().lookup(name); [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: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/builtins.rs:332:5 [INFO] [stdout] | [INFO] [stdout] 332 | Ok(evaluate(stackframe, if_false)?) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 332 - Ok(evaluate(stackframe, if_false)?) [INFO] [stdout] 332 + evaluate(stackframe, if_false) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/builtins.rs:12:15 [INFO] [stdout] | [INFO] [stdout] 12 | pub func: fn(Rc>, Rc>) -> Result>, String>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/builtins.rs:330:16 [INFO] [stdout] | [INFO] [stdout] 330 | return Ok(evaluate(stackframe, if_true)?); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 330 - return Ok(evaluate(stackframe, if_true)?); [INFO] [stdout] 330 + return evaluate(stackframe, if_true); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:139:5 [INFO] [stdout] | [INFO] [stdout] 139 | value.int_value.as_ref().unwrap().clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*value.int_value.as_ref().unwrap()` [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 `f32` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:145:5 [INFO] [stdout] | [INFO] [stdout] 145 | value.float_value.as_ref().unwrap().clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*value.float_value.as_ref().unwrap()` [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: unneeded `return` statement [INFO] [stdout] --> src/main.rs:186:13 [INFO] [stdout] | [INFO] [stdout] 186 | return (builtin.func)(stackframe.clone(), evaluate_each(stackframe, args)?); [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] 186 - return (builtin.func)(stackframe.clone(), evaluate_each(stackframe, args)?); [INFO] [stdout] 186 + (builtin.func)(stackframe.clone(), evaluate_each(stackframe, args)?) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:188:13 [INFO] [stdout] | [INFO] [stdout] 188 | return (builtin.func)(stackframe, args); [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` [INFO] [stdout] | [INFO] [stdout] 188 - return (builtin.func)(stackframe, args); [INFO] [stdout] 188 + (builtin.func)(stackframe, args) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:193:9 [INFO] [stdout] | [INFO] [stdout] 193 | return Err("invalid operation: not a function".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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 193 - return Err("invalid operation: not a function".to_string()); [INFO] [stdout] 193 + Err("invalid operation: not a function".to_string()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/main.rs:161:66 [INFO] [stdout] | [INFO] [stdout] 161 | } else if value_type(node.clone()) == ValueType::Integer { [INFO] [stdout] | __________________________________________________________________^ [INFO] [stdout] 162 | | Ok(node) [INFO] [stdout] 163 | | } else if value_type(node.clone()) == ValueType::Float { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/main.rs:163:64 [INFO] [stdout] | [INFO] [stdout] 163 | } else if value_type(node.clone()) == ValueType::Float { [INFO] [stdout] | ________________________________________________________________^ [INFO] [stdout] 164 | | Ok(node) [INFO] [stdout] 165 | | } else if value_type(node.clone()) == ValueType::String { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/main.rs:163:64 [INFO] [stdout] | [INFO] [stdout] 163 | } else if value_type(node.clone()) == ValueType::Float { [INFO] [stdout] | ________________________________________________________________^ [INFO] [stdout] 164 | | Ok(node) [INFO] [stdout] 165 | | } else if value_type(node.clone()) == ValueType::String { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/main.rs:165:65 [INFO] [stdout] | [INFO] [stdout] 165 | } else if value_type(node.clone()) == ValueType::String { [INFO] [stdout] | _________________________________________________________________^ [INFO] [stdout] 166 | | Ok(node) [INFO] [stdout] 167 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/builtins.rs:310:43 [INFO] [stdout] | [INFO] [stdout] 310 | ValueType::String => { return value_text(node.clone()) != ""; }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!value_text(node.clone()).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: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/builtins.rs:332:5 [INFO] [stdout] | [INFO] [stdout] 332 | Ok(evaluate(stackframe, if_false)?) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 332 - Ok(evaluate(stackframe, if_false)?) [INFO] [stdout] 332 + evaluate(stackframe, if_false) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/builtins.rs:330:16 [INFO] [stdout] | [INFO] [stdout] 330 | return Ok(evaluate(stackframe, if_true)?); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 330 - return Ok(evaluate(stackframe, if_true)?); [INFO] [stdout] 330 + return evaluate(stackframe, if_true); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:139:5 [INFO] [stdout] | [INFO] [stdout] 139 | value.int_value.as_ref().unwrap().clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*value.int_value.as_ref().unwrap()` [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 `f32` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:145:5 [INFO] [stdout] | [INFO] [stdout] 145 | value.float_value.as_ref().unwrap().clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*value.float_value.as_ref().unwrap()` [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: unneeded `return` statement [INFO] [stdout] --> src/main.rs:186:13 [INFO] [stdout] | [INFO] [stdout] 186 | return (builtin.func)(stackframe.clone(), evaluate_each(stackframe, args)?); [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] 186 - return (builtin.func)(stackframe.clone(), evaluate_each(stackframe, args)?); [INFO] [stdout] 186 + (builtin.func)(stackframe.clone(), evaluate_each(stackframe, args)?) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:188:13 [INFO] [stdout] | [INFO] [stdout] 188 | return (builtin.func)(stackframe, args); [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` [INFO] [stdout] | [INFO] [stdout] 188 - return (builtin.func)(stackframe, args); [INFO] [stdout] 188 + (builtin.func)(stackframe, args) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:193:9 [INFO] [stdout] | [INFO] [stdout] 193 | return Err("invalid operation: not a function".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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 193 - return Err("invalid operation: not a function".to_string()); [INFO] [stdout] 193 + Err("invalid operation: not a function".to_string()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/main.rs:161:66 [INFO] [stdout] | [INFO] [stdout] 161 | } else if value_type(node.clone()) == ValueType::Integer { [INFO] [stdout] | __________________________________________________________________^ [INFO] [stdout] 162 | | Ok(node) [INFO] [stdout] 163 | | } else if value_type(node.clone()) == ValueType::Float { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/main.rs:163:64 [INFO] [stdout] | [INFO] [stdout] 163 | } else if value_type(node.clone()) == ValueType::Float { [INFO] [stdout] | ________________________________________________________________^ [INFO] [stdout] 164 | | Ok(node) [INFO] [stdout] 165 | | } else if value_type(node.clone()) == ValueType::String { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/main.rs:163:64 [INFO] [stdout] | [INFO] [stdout] 163 | } else if value_type(node.clone()) == ValueType::Float { [INFO] [stdout] | ________________________________________________________________^ [INFO] [stdout] 164 | | Ok(node) [INFO] [stdout] 165 | | } else if value_type(node.clone()) == ValueType::String { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/main.rs:165:65 [INFO] [stdout] | [INFO] [stdout] 165 | } else if value_type(node.clone()) == ValueType::String { [INFO] [stdout] | _________________________________________________________________^ [INFO] [stdout] 166 | | Ok(node) [INFO] [stdout] 167 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 5.35s [INFO] running `Command { std: "docker" "inspect" "18970894bec8b870bb05397bad4451ea027a8c75276da21344bdb3ef9b3cd053", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "18970894bec8b870bb05397bad4451ea027a8c75276da21344bdb3ef9b3cd053", kill_on_drop: false }` [INFO] [stdout] 18970894bec8b870bb05397bad4451ea027a8c75276da21344bdb3ef9b3cd053