[INFO] cloning repository https://github.com/wthornton18/rlox [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/wthornton18/rlox" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwthornton18%2Frlox", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwthornton18%2Frlox'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 6f727cccd62c158c6ba8dff0913992864e2bddf1 [INFO] linting wthornton18/rlox against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwthornton18%2Frlox" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/wthornton18/rlox [INFO] finished tweaking git repo https://github.com/wthornton18/rlox [INFO] tweaked toml for git repo https://github.com/wthornton18/rlox written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/wthornton18/rlox 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/wthornton18/rlox 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] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] ef9a16a4ab21993fde04d73482fce2503d160e890aee32be21980e4ffd6f8e24 [INFO] running `Command { std: "docker" "start" "-a" "ef9a16a4ab21993fde04d73482fce2503d160e890aee32be21980e4ffd6f8e24", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "ef9a16a4ab21993fde04d73482fce2503d160e890aee32be21980e4ffd6f8e24", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ef9a16a4ab21993fde04d73482fce2503d160e890aee32be21980e4ffd6f8e24", kill_on_drop: false }` [INFO] [stdout] ef9a16a4ab21993fde04d73482fce2503d160e890aee32be21980e4ffd6f8e24 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 10a900604ce9cec5ff1de10a9d584717730a09da064d1d03e44adc0fff495294 [INFO] running `Command { std: "docker" "start" "-a" "10a900604ce9cec5ff1de10a9d584717730a09da064d1d03e44adc0fff495294", kill_on_drop: false }` [INFO] [stderr] Checking rlox v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `Object::*` [INFO] [stdout] --> src/vm/core.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | use Object::*; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Object::*` [INFO] [stdout] --> src/vm/core.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | use Object::*; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/core.rs:60:30 [INFO] [stdout] | [INFO] [stdout] 60 | let previous_token = self.previous_token.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.previous_token` [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/compiler/core.rs:88:30 [INFO] [stdout] | [INFO] [stdout] 88 | if let Some(token) = self.previous_token.clone() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.previous_token` [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: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/core.rs:60:30 [INFO] [stdout] | [INFO] [stdout] 60 | let previous_token = self.previous_token.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.previous_token` [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/compiler/core.rs:88:30 [INFO] [stdout] | [INFO] [stdout] 88 | if let Some(token) = self.previous_token.clone() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.previous_token` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/compiler/core.rs:112:9 [INFO] [stdout] | [INFO] [stdout] 112 | / match self.previous_token { [INFO] [stdout] 113 | | Some(Token { [INFO] [stdout] 114 | | pos, length, line, .. [INFO] [stdout] 115 | | }) => { [INFO] [stdout] ... | [INFO] [stdout] 131 | | None => {} [INFO] [stdout] 132 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 112 ~ if let Some(Token { [INFO] [stdout] 113 + pos, length, line, .. [INFO] [stdout] 114 + }) = self.previous_token { [INFO] [stdout] 115 + let num = self.source[pos..(pos + length)] [INFO] [stdout] 116 + .iter() [INFO] [stdout] 117 + .collect::() [INFO] [stdout] 118 + .parse::(); [INFO] [stdout] 119 + let num = match num { [INFO] [stdout] 120 + Ok(num) => num, [INFO] [stdout] 121 + Err(_) => { [INFO] [stdout] 122 + self.error("Failed to parse number, defaulting to 0"); [INFO] [stdout] 123 + 0 as f64 [INFO] [stdout] 124 + } [INFO] [stdout] 125 + }; [INFO] [stdout] 126 + [INFO] [stdout] 127 + let idx = self.constants.push(Value::Float(num)); [INFO] [stdout] 128 + self.program.push((OpConstant(idx), line)) [INFO] [stdout] 129 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/compiler/core.rs:112:9 [INFO] [stdout] | [INFO] [stdout] 112 | / match self.previous_token { [INFO] [stdout] 113 | | Some(Token { [INFO] [stdout] 114 | | pos, length, line, .. [INFO] [stdout] 115 | | }) => { [INFO] [stdout] ... | [INFO] [stdout] 131 | | None => {} [INFO] [stdout] 132 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 112 ~ if let Some(Token { [INFO] [stdout] 113 + pos, length, line, .. [INFO] [stdout] 114 + }) = self.previous_token { [INFO] [stdout] 115 + let num = self.source[pos..(pos + length)] [INFO] [stdout] 116 + .iter() [INFO] [stdout] 117 + .collect::() [INFO] [stdout] 118 + .parse::(); [INFO] [stdout] 119 + let num = match num { [INFO] [stdout] 120 + Ok(num) => num, [INFO] [stdout] 121 + Err(_) => { [INFO] [stdout] 122 + self.error("Failed to parse number, defaulting to 0"); [INFO] [stdout] 123 + 0 as f64 [INFO] [stdout] 124 + } [INFO] [stdout] 125 + }; [INFO] [stdout] 126 + [INFO] [stdout] 127 + let idx = self.constants.push(Value::Float(num)); [INFO] [stdout] 128 + self.program.push((OpConstant(idx), line)) [INFO] [stdout] 129 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/core.rs:139:30 [INFO] [stdout] | [INFO] [stdout] 139 | if let Some(token) = self.previous_token.clone() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.previous_token` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/compiler/core.rs:152:9 [INFO] [stdout] | [INFO] [stdout] 152 | / match self.previous_token { [INFO] [stdout] 153 | | Some(Token { [INFO] [stdout] 154 | | pos, length, line, .. [INFO] [stdout] 155 | | }) => { [INFO] [stdout] ... | [INFO] [stdout] 167 | | None => {} [INFO] [stdout] 168 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 152 ~ if let Some(Token { [INFO] [stdout] 153 + pos, length, line, .. [INFO] [stdout] 154 + }) = self.previous_token { [INFO] [stdout] 155 + let string = self.source[(pos + 1)..(pos + length - 2)] [INFO] [stdout] 156 + .iter() [INFO] [stdout] 157 + .collect::(); [INFO] [stdout] 158 + self.strings.push(string); [INFO] [stdout] 159 + [INFO] [stdout] 160 + let idx = self [INFO] [stdout] 161 + .constants [INFO] [stdout] 162 + .push(Value::new_string(self.strings.len() - 2)); [INFO] [stdout] 163 + [INFO] [stdout] 164 + self.program.push((OpConstant(idx), line)) [INFO] [stdout] 165 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/core.rs:139:30 [INFO] [stdout] | [INFO] [stdout] 139 | if let Some(token) = self.previous_token.clone() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.previous_token` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/compiler/core.rs:152:9 [INFO] [stdout] | [INFO] [stdout] 152 | / match self.previous_token { [INFO] [stdout] 153 | | Some(Token { [INFO] [stdout] 154 | | pos, length, line, .. [INFO] [stdout] 155 | | }) => { [INFO] [stdout] ... | [INFO] [stdout] 167 | | None => {} [INFO] [stdout] 168 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 152 ~ if let Some(Token { [INFO] [stdout] 153 + pos, length, line, .. [INFO] [stdout] 154 + }) = self.previous_token { [INFO] [stdout] 155 + let string = self.source[(pos + 1)..(pos + length - 2)] [INFO] [stdout] 156 + .iter() [INFO] [stdout] 157 + .collect::(); [INFO] [stdout] 158 + self.strings.push(string); [INFO] [stdout] 159 + [INFO] [stdout] 160 + let idx = self [INFO] [stdout] 161 + .constants [INFO] [stdout] 162 + .push(Value::new_string(self.strings.len() - 2)); [INFO] [stdout] 163 + [INFO] [stdout] 164 + self.program.push((OpConstant(idx), line)) [INFO] [stdout] 165 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/compiler/core.rs:178:74 [INFO] [stdout] | [INFO] [stdout] 178 | let current_token: OTokenResult = self.current_token.clone().map(|t| Ok(t)); [INFO] [stdout] | ^^^^^^^^^ help: replace the closure with the tuple variant itself: `Ok` [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: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/core.rs:178:43 [INFO] [stdout] | [INFO] [stdout] 178 | let current_token: OTokenResult = self.current_token.clone().map(|t| Ok(t)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token` [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: redundant closure [INFO] [stdout] --> src/compiler/core.rs:178:74 [INFO] [stdout] | [INFO] [stdout] 178 | let current_token: OTokenResult = self.current_token.clone().map(|t| Ok(t)); [INFO] [stdout] | ^^^^^^^^^ help: replace the closure with the tuple variant itself: `Ok` [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: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/core.rs:178:43 [INFO] [stdout] | [INFO] [stdout] 178 | let current_token: OTokenResult = self.current_token.clone().map(|t| Ok(t)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.current_token` [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: redundant closure [INFO] [stdout] --> src/compiler/core.rs:192:76 [INFO] [stdout] | [INFO] [stdout] 192 | let previous_token: OTokenResult = self.previous_token.clone().map(|t| Ok(t)); [INFO] [stdout] | ^^^^^^^^^ help: replace the closure with the tuple variant itself: `Ok` [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: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/core.rs:192:44 [INFO] [stdout] | [INFO] [stdout] 192 | let previous_token: OTokenResult = self.previous_token.clone().map(|t| Ok(t)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.previous_token` [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: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/compiler/core.rs:199:17 [INFO] [stdout] | [INFO] [stdout] 199 | / if t.token_type == expected_token_type { [INFO] [stdout] 200 | | self.advance(); [INFO] [stdout] 201 | | return; [INFO] [stdout] 202 | | }; [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 198 ~ Some(t) [INFO] [stdout] 199 ~ if t.token_type == expected_token_type => { [INFO] [stdout] 200 | self.advance(); [INFO] [stdout] 201 | return; [INFO] [stdout] 202 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/compiler/core.rs:197:9 [INFO] [stdout] | [INFO] [stdout] 197 | / match self.current_token { [INFO] [stdout] 198 | | Some(t) => { [INFO] [stdout] 199 | | if t.token_type == expected_token_type { [INFO] [stdout] 200 | | self.advance(); [INFO] [stdout] ... | [INFO] [stdout] 204 | | None => {} [INFO] [stdout] 205 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 197 ~ if let Some(t) = self.current_token { [INFO] [stdout] 198 + if t.token_type == expected_token_type { [INFO] [stdout] 199 + self.advance(); [INFO] [stdout] 200 + return; [INFO] [stdout] 201 + }; [INFO] [stdout] 202 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/compiler/core.rs:192:76 [INFO] [stdout] | [INFO] [stdout] 192 | let previous_token: OTokenResult = self.previous_token.clone().map(|t| Ok(t)); [INFO] [stdout] | ^^^^^^^^^ help: replace the closure with the tuple variant itself: `Ok` [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: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/core.rs:192:44 [INFO] [stdout] | [INFO] [stdout] 192 | let previous_token: OTokenResult = self.previous_token.clone().map(|t| Ok(t)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.previous_token` [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: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/compiler/core.rs:199:17 [INFO] [stdout] | [INFO] [stdout] 199 | / if t.token_type == expected_token_type { [INFO] [stdout] 200 | | self.advance(); [INFO] [stdout] 201 | | return; [INFO] [stdout] 202 | | }; [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 198 ~ Some(t) [INFO] [stdout] 199 ~ if t.token_type == expected_token_type => { [INFO] [stdout] 200 | self.advance(); [INFO] [stdout] 201 | return; [INFO] [stdout] 202 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/compiler/core.rs:197:9 [INFO] [stdout] | [INFO] [stdout] 197 | / match self.current_token { [INFO] [stdout] 198 | | Some(t) => { [INFO] [stdout] 199 | | if t.token_type == expected_token_type { [INFO] [stdout] 200 | | self.advance(); [INFO] [stdout] ... | [INFO] [stdout] 204 | | None => {} [INFO] [stdout] 205 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 197 ~ if let Some(t) = self.current_token { [INFO] [stdout] 198 + if t.token_type == expected_token_type { [INFO] [stdout] 199 + self.advance(); [INFO] [stdout] 200 + return; [INFO] [stdout] 201 + }; [INFO] [stdout] 202 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/compiler/types.rs:28:30 [INFO] [stdout] | [INFO] [stdout] 28 | Some(Err(t)) => (format!(""), t.line), [INFO] [stdout] | ^^^^^^^^^^^ help: consider using `String::new()`: `String::new()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/compiler/types.rs:28:30 [INFO] [stdout] | [INFO] [stdout] 28 | Some(Err(t)) => (format!(""), t.line), [INFO] [stdout] | ^^^^^^^^^^^ help: consider using `String::new()`: `String::new()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same prefix: `Op` [INFO] [stdout] --> src/program.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | / pub enum OpCode { [INFO] [stdout] 3 | | OpReturn, [INFO] [stdout] ... | [INFO] [stdout] 23 | | OpNotEqual, [INFO] [stdout] 24 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the prefixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same prefix: `Op` [INFO] [stdout] --> src/program.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | / pub enum OpCode { [INFO] [stdout] 3 | | OpReturn, [INFO] [stdout] ... | [INFO] [stdout] 23 | | OpNotEqual, [INFO] [stdout] 24 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the prefixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Value` which implements the `Copy` trait [INFO] [stdout] --> src/stack.rs:50:16 [INFO] [stdout] | [INFO] [stdout] 50 | Ok(self.arr[self.sp].clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.arr[self.sp]` [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: using `clone` on type `Value` which implements the `Copy` trait [INFO] [stdout] --> src/stack.rs:50:16 [INFO] [stdout] | [INFO] [stdout] 50 | Ok(self.arr[self.sp].clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.arr[self.sp]` [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: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/tokenizer.rs:190:16 [INFO] [stdout] | [INFO] [stdout] 190 | if let Some(_) = token { [INFO] [stdout] | -------^^^^^^^-------- help: try: `if token.is_some()` [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: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/tokenizer.rs:259:37 [INFO] [stdout] | [INFO] [stdout] 259 | while !self.eof_n(n + 1) && self.peak_n(n + 1).is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.peak_n(n + 1).is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/tokenizer.rs:265:41 [INFO] [stdout] | [INFO] [stdout] 265 | while !self.eof_n(n + 1) && self.peak_n(n + 1).is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.peak_n(n + 1).is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tokenizer.rs:338:9 [INFO] [stdout] | [INFO] [stdout] 338 | return Some(unrecognised_token); [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] 338 - return Some(unrecognised_token); [INFO] [stdout] 338 + Some(unrecognised_token) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/tokenizer.rs:323:12 [INFO] [stdout] | [INFO] [stdout] 323 | if self.peak().is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.peak().is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/tokenizer.rs:190:16 [INFO] [stdout] | [INFO] [stdout] 190 | if let Some(_) = token { [INFO] [stdout] | -------^^^^^^^-------- help: try: `if token.is_some()` [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: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/tokenizer.rs:259:37 [INFO] [stdout] | [INFO] [stdout] 259 | while !self.eof_n(n + 1) && self.peak_n(n + 1).is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.peak_n(n + 1).is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/vm/core.rs:101:29 [INFO] [stdout] | [INFO] [stdout] 101 | let b = !(self.strings[a].len() == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.strings[a].len() != 0)` [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: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/tokenizer.rs:265:41 [INFO] [stdout] | [INFO] [stdout] 265 | while !self.eof_n(n + 1) && self.peak_n(n + 1).is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.peak_n(n + 1).is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/vm/core.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | / let res = match op.0 { [INFO] [stdout] 57 | | OpConstant(idx) => { [INFO] [stdout] 58 | | self.stack.push(self.constants[idx].clone())?; [INFO] [stdout] ... | [INFO] [stdout] 137 | | }; [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 56 - let res = match op.0 { [INFO] [stdout] 56 + match op.0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Value` which implements the `Copy` trait [INFO] [stdout] --> src/vm/core.rs:58:33 [INFO] [stdout] | [INFO] [stdout] 58 | self.stack.push(self.constants[idx].clone())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.constants[idx]` [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: calling `.extend(_.chars())` [INFO] [stdout] --> src/vm/core.rs:72:21 [INFO] [stdout] | [INFO] [stdout] 72 | new_string.extend(self.strings[b].chars()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `new_string.push_str(&self.strings[b])` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#string_extend_chars [INFO] [stdout] = note: `#[warn(clippy::string_extend_chars)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tokenizer.rs:338:9 [INFO] [stdout] | [INFO] [stdout] 338 | return Some(unrecognised_token); [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] 338 - return Some(unrecognised_token); [INFO] [stdout] 338 + Some(unrecognised_token) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/vm/core.rs:101:31 [INFO] [stdout] | [INFO] [stdout] 101 | let b = !(self.strings[a].len() == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.strings[a].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: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/tokenizer.rs:323:12 [INFO] [stdout] | [INFO] [stdout] 323 | if self.peak().is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.peak().is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be replaced by its body itself [INFO] [stdout] --> src/vm/value_err.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | / match value.0 { [INFO] [stdout] 9 | | _ => Self { [INFO] [stdout] 10 | | msg: "Addition err".to_string(), [INFO] [stdout] 11 | | error: Runtime, [INFO] [stdout] 12 | | }, [INFO] [stdout] 13 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] = note: `#[warn(clippy::match_single_binding)]` on by default [INFO] [stdout] help: consider using the match body instead [INFO] [stdout] | [INFO] [stdout] 8 ~ Self { [INFO] [stdout] 9 + msg: "Addition err".to_string(), [INFO] [stdout] 10 + error: Runtime, [INFO] [stdout] 11 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be replaced by its body itself [INFO] [stdout] --> src/vm/value_err.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | / match value.0 { [INFO] [stdout] 21 | | _ => Self { [INFO] [stdout] 22 | | msg: "Subtraction err".to_string(), [INFO] [stdout] 23 | | error: Runtime, [INFO] [stdout] 24 | | }, [INFO] [stdout] 25 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] help: consider using the match body instead [INFO] [stdout] | [INFO] [stdout] 20 ~ Self { [INFO] [stdout] 21 + msg: "Subtraction err".to_string(), [INFO] [stdout] 22 + error: Runtime, [INFO] [stdout] 23 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be replaced by its body itself [INFO] [stdout] --> src/vm/value_err.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | / match value.0 { [INFO] [stdout] 43 | | _ => Self { [INFO] [stdout] 44 | | msg: "Multiply err".to_string(), [INFO] [stdout] 45 | | error: Runtime, [INFO] [stdout] 46 | | }, [INFO] [stdout] 47 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] help: consider using the match body instead [INFO] [stdout] | [INFO] [stdout] 42 ~ Self { [INFO] [stdout] 43 + msg: "Multiply err".to_string(), [INFO] [stdout] 44 + error: Runtime, [INFO] [stdout] 45 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be replaced by its body itself [INFO] [stdout] --> src/vm/value_err.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | / match value.0 { [INFO] [stdout] 55 | | _ => Self { [INFO] [stdout] 56 | | msg: "Negation err".to_string(), [INFO] [stdout] 57 | | error: Runtime, [INFO] [stdout] 58 | | }, [INFO] [stdout] 59 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] help: consider using the match body instead [INFO] [stdout] | [INFO] [stdout] 54 ~ Self { [INFO] [stdout] 55 + msg: "Negation err".to_string(), [INFO] [stdout] 56 + error: Runtime, [INFO] [stdout] 57 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | return Ok(()); [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] 31 - return Ok(()); [INFO] [stdout] 31 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | return Err(()); [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] 37 - return Err(()); [INFO] [stdout] 37 + Err(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Chars<'_>` [INFO] [stdout] --> src/main.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | let chars = source_code.chars().into_iter().collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `source_code.chars()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:35:13 [INFO] [stdout] | [INFO] [stdout] 35 | println!("") [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/vm/core.rs:101:29 [INFO] [stdout] | [INFO] [stdout] 101 | let b = !(self.strings[a].len() == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.strings[a].len() != 0)` [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 let-binding has unit value [INFO] [stdout] --> src/vm/core.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | / let res = match op.0 { [INFO] [stdout] 57 | | OpConstant(idx) => { [INFO] [stdout] 58 | | self.stack.push(self.constants[idx].clone())?; [INFO] [stdout] ... | [INFO] [stdout] 137 | | }; [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 56 - let res = match op.0 { [INFO] [stdout] 56 + match op.0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Value` which implements the `Copy` trait [INFO] [stdout] --> src/vm/core.rs:58:33 [INFO] [stdout] | [INFO] [stdout] 58 | self.stack.push(self.constants[idx].clone())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.constants[idx]` [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: calling `.extend(_.chars())` [INFO] [stdout] --> src/vm/core.rs:72:21 [INFO] [stdout] | [INFO] [stdout] 72 | new_string.extend(self.strings[b].chars()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `new_string.push_str(&self.strings[b])` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#string_extend_chars [INFO] [stdout] = note: `#[warn(clippy::string_extend_chars)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/vm/core.rs:101:31 [INFO] [stdout] | [INFO] [stdout] 101 | let b = !(self.strings[a].len() == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.strings[a].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 match could be replaced by its body itself [INFO] [stdout] --> src/vm/value_err.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | / match value.0 { [INFO] [stdout] 9 | | _ => Self { [INFO] [stdout] 10 | | msg: "Addition err".to_string(), [INFO] [stdout] 11 | | error: Runtime, [INFO] [stdout] 12 | | }, [INFO] [stdout] 13 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] = note: `#[warn(clippy::match_single_binding)]` on by default [INFO] [stdout] help: consider using the match body instead [INFO] [stdout] | [INFO] [stdout] 8 ~ Self { [INFO] [stdout] 9 + msg: "Addition err".to_string(), [INFO] [stdout] 10 + error: Runtime, [INFO] [stdout] 11 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be replaced by its body itself [INFO] [stdout] --> src/vm/value_err.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | / match value.0 { [INFO] [stdout] 21 | | _ => Self { [INFO] [stdout] 22 | | msg: "Subtraction err".to_string(), [INFO] [stdout] 23 | | error: Runtime, [INFO] [stdout] 24 | | }, [INFO] [stdout] 25 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] help: consider using the match body instead [INFO] [stdout] | [INFO] [stdout] 20 ~ Self { [INFO] [stdout] 21 + msg: "Subtraction err".to_string(), [INFO] [stdout] 22 + error: Runtime, [INFO] [stdout] 23 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be replaced by its body itself [INFO] [stdout] --> src/vm/value_err.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | / match value.0 { [INFO] [stdout] 43 | | _ => Self { [INFO] [stdout] 44 | | msg: "Multiply err".to_string(), [INFO] [stdout] 45 | | error: Runtime, [INFO] [stdout] 46 | | }, [INFO] [stdout] 47 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] help: consider using the match body instead [INFO] [stdout] | [INFO] [stdout] 42 ~ Self { [INFO] [stdout] 43 + msg: "Multiply err".to_string(), [INFO] [stdout] 44 + error: Runtime, [INFO] [stdout] 45 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be replaced by its body itself [INFO] [stdout] --> src/vm/value_err.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | / match value.0 { [INFO] [stdout] 55 | | _ => Self { [INFO] [stdout] 56 | | msg: "Negation err".to_string(), [INFO] [stdout] 57 | | error: Runtime, [INFO] [stdout] 58 | | }, [INFO] [stdout] 59 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] help: consider using the match body instead [INFO] [stdout] | [INFO] [stdout] 54 ~ Self { [INFO] [stdout] 55 + msg: "Negation err".to_string(), [INFO] [stdout] 56 + error: Runtime, [INFO] [stdout] 57 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | return Ok(()); [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] 31 - return Ok(()); [INFO] [stdout] 31 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | return Err(()); [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] 37 - return Err(()); [INFO] [stdout] 37 + Err(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Chars<'_>` [INFO] [stdout] --> src/main.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | let chars = source_code.chars().into_iter().collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `source_code.chars()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:35:13 [INFO] [stdout] | [INFO] [stdout] 35 | println!("") [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.25s [INFO] running `Command { std: "docker" "inspect" "10a900604ce9cec5ff1de10a9d584717730a09da064d1d03e44adc0fff495294", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "10a900604ce9cec5ff1de10a9d584717730a09da064d1d03e44adc0fff495294", kill_on_drop: false }` [INFO] [stdout] 10a900604ce9cec5ff1de10a9d584717730a09da064d1d03e44adc0fff495294