[INFO] cloning repository https://github.com/MCluck90/rust-vm [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/MCluck90/rust-vm" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMCluck90%2Frust-vm", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMCluck90%2Frust-vm'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 85f2cc5606068815a63a0af616860f7f4324b44a [INFO] linting MCluck90/rust-vm against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMCluck90%2Frust-vm" "/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/MCluck90/rust-vm [INFO] finished tweaking git repo https://github.com/MCluck90/rust-vm [INFO] tweaked toml for git repo https://github.com/MCluck90/rust-vm written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/MCluck90/rust-vm 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/MCluck90/rust-vm 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] warning: `package.edition` is unspecified, defaulting to `2015` while the latest is `2024` [INFO] [stderr] Blocking waiting for file lock on package cache [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] 49cf1de358395a4ed228a74cf56182486f4cd337049ca902efac9d85136641c7 [INFO] running `Command { std: "docker" "start" "-a" "49cf1de358395a4ed228a74cf56182486f4cd337049ca902efac9d85136641c7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "49cf1de358395a4ed228a74cf56182486f4cd337049ca902efac9d85136641c7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "49cf1de358395a4ed228a74cf56182486f4cd337049ca902efac9d85136641c7", kill_on_drop: false }` [INFO] [stdout] 49cf1de358395a4ed228a74cf56182486f4cd337049ca902efac9d85136641c7 [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] 6a971fc9a33ca1a1ff19890fc8c422a25d2924606e3b8ad5ef120d4d9ff9655e [INFO] running `Command { std: "docker" "start" "-a" "6a971fc9a33ca1a1ff19890fc8c422a25d2924606e3b8ad5ef120d4d9ff9655e", kill_on_drop: false }` [INFO] [stderr] warning: `package.edition` is unspecified, defaulting to `2015` while the latest is `2024` [INFO] [stderr] Checking byteorder v1.0.0 [INFO] [stderr] Checking vm v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: anonymous parameters are deprecated and will be removed in the next edition [INFO] [stdout] --> src/tokenizer.rs:9:22 [INFO] [stdout] | [INFO] [stdout] 9 | fn from_bytecode(i32) -> Option; [INFO] [stdout] | ^^^ help: try naming the parameter or explicitly ignoring it: `_: i32` [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(anonymous_parameters)]` (part of `#[warn(rust_2018_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/vm.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | memory: memory [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `memory` [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: anonymous parameters are deprecated and will be removed in the next edition [INFO] [stdout] --> src/tokenizer.rs:9:22 [INFO] [stdout] | [INFO] [stdout] 9 | fn from_bytecode(i32) -> Option; [INFO] [stdout] | ^^^ help: try naming the parameter or explicitly ignoring it: `_: i32` [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(anonymous_parameters)]` (part of `#[warn(rust_2018_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/vm.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | memory: memory [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `memory` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/assembler.rs:42:13 [INFO] [stdout] | [INFO] [stdout] 42 | / match &self.cmd_type { [INFO] [stdout] 43 | | &CommandType::Instruction(InstructionType::Add) => { [INFO] [stdout] 44 | | match &self.operand2.token_type { [INFO] [stdout] 45 | | &TokenType::Integer(_) => { [INFO] [stdout] ... | [INFO] [stdout] 51 | | _ => {} [INFO] [stdout] 52 | | }; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 42 ~ if let &CommandType::Instruction(InstructionType::Add) = &self.cmd_type { [INFO] [stdout] 43 + match &self.operand2.token_type { [INFO] [stdout] 44 + &TokenType::Integer(_) => { [INFO] [stdout] 45 + new_type = CommandType::Instruction(InstructionType::AddImmediate); [INFO] [stdout] 46 + }, [INFO] [stdout] 47 + _ => {} [INFO] [stdout] 48 + }; [INFO] [stdout] 49 ~ }; [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/assembler.rs:44:21 [INFO] [stdout] | [INFO] [stdout] 44 | / match &self.operand2.token_type { [INFO] [stdout] 45 | | &TokenType::Integer(_) => { [INFO] [stdout] 46 | | new_type = CommandType::Instruction(InstructionType::AddImmediate); [INFO] [stdout] 47 | | }, [INFO] [stdout] 48 | | _ => {} [INFO] [stdout] 49 | | }; [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] 44 ~ if let &TokenType::Integer(_) = &self.operand2.token_type { [INFO] [stdout] 45 + new_type = CommandType::Instruction(InstructionType::AddImmediate); [INFO] [stdout] 46 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to both the expression and the patterns [INFO] [stdout] --> src/assembler.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | / match &self.cmd_type { [INFO] [stdout] 62 | | &CommandType::Directive(_) => self.is_directive_complete(), [INFO] [stdout] 63 | | &CommandType::Instruction(ref instruction) => [INFO] [stdout] 64 | | self.is_instruction_complete(&instruction), [INFO] [stdout] 65 | | _ => false [INFO] [stdout] 66 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 61 ~ match self.cmd_type { [INFO] [stdout] 62 ~ CommandType::Directive(_) => self.is_directive_complete(), [INFO] [stdout] 63 ~ CommandType::Instruction(ref instruction) => [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/assembler.rs:63:13 [INFO] [stdout] | [INFO] [stdout] 63 | &CommandType::Instruction(ref instruction) => [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 63 - &CommandType::Instruction(ref instruction) => [INFO] [stdout] 63 + CommandType::Instruction(instruction) => [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/assembler.rs:64:46 [INFO] [stdout] | [INFO] [stdout] 64 | self.is_instruction_complete(&instruction), [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `instruction` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to both the expression and the patterns [INFO] [stdout] --> src/assembler.rs:70:9 [INFO] [stdout] | [INFO] [stdout] 70 | / match &self.cmd_type { [INFO] [stdout] 71 | | &CommandType::Directive(_) => match &self.operand1.token_type { [INFO] [stdout] 72 | | &TokenType::Character(c) => ByteCodeData::ByteDirective(c as u8), [INFO] [stdout] 73 | | &TokenType::Integer(val) => ByteCodeData::WordDirective(val as u16), [INFO] [stdout] ... | [INFO] [stdout] 105 | | &CommandType::Unknown => unreachable!() [INFO] [stdout] 106 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 70 ~ match self.cmd_type { [INFO] [stdout] 71 ~ CommandType::Directive(_) => match &self.operand1.token_type { [INFO] [stdout] 72 | &TokenType::Character(c) => ByteCodeData::ByteDirective(c as u8), [INFO] [stdout] ... [INFO] [stdout] 75 | }, [INFO] [stdout] 76 ~ CommandType::Instruction(ref instruction) => { [INFO] [stdout] 77 | let mut result = [0, 0, 0]; [INFO] [stdout] ... [INFO] [stdout] 104 | }, [INFO] [stdout] 105 ~ CommandType::Unknown => unreachable!() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to both the expression and the patterns [INFO] [stdout] --> src/assembler.rs:71:43 [INFO] [stdout] | [INFO] [stdout] 71 | &CommandType::Directive(_) => match &self.operand1.token_type { [INFO] [stdout] | ___________________________________________^ [INFO] [stdout] 72 | | &TokenType::Character(c) => ByteCodeData::ByteDirective(c as u8), [INFO] [stdout] 73 | | &TokenType::Integer(val) => ByteCodeData::WordDirective(val as u16), [INFO] [stdout] 74 | | _ => unreachable!() [INFO] [stdout] 75 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 71 ~ &CommandType::Directive(_) => match self.operand1.token_type { [INFO] [stdout] 72 ~ TokenType::Character(c) => ByteCodeData::ByteDirective(c as u8), [INFO] [stdout] 73 ~ TokenType::Integer(val) => ByteCodeData::WordDirective(val as u16), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/assembler.rs:76:13 [INFO] [stdout] | [INFO] [stdout] 76 | &CommandType::Instruction(ref instruction) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 76 - &CommandType::Instruction(ref instruction) => { [INFO] [stdout] 76 + CommandType::Instruction(instruction) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to both the expression and the patterns [INFO] [stdout] --> src/assembler.rs:79:29 [INFO] [stdout] | [INFO] [stdout] 79 | result[1] = match &self.operand1.token_type { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 80 | | &TokenType::Character(c) => (c as u8) as i32, [INFO] [stdout] 81 | | &TokenType::Integer(val) => val, [INFO] [stdout] 82 | | &TokenType::Register(ref reg) => reg.to_bytecode(), [INFO] [stdout] ... | [INFO] [stdout] 89 | | _ => 0, [INFO] [stdout] 90 | | }; [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 79 ~ result[1] = match self.operand1.token_type { [INFO] [stdout] 80 ~ TokenType::Character(c) => (c as u8) as i32, [INFO] [stdout] 81 ~ TokenType::Integer(val) => val, [INFO] [stdout] 82 ~ TokenType::Register(ref reg) => reg.to_bytecode(), [INFO] [stdout] 83 ~ TokenType::Label(ref label) => match label_table.get(label) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/assembler.rs:82:21 [INFO] [stdout] | [INFO] [stdout] 82 | &TokenType::Register(ref reg) => reg.to_bytecode(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 82 - &TokenType::Register(ref reg) => reg.to_bytecode(), [INFO] [stdout] 82 + TokenType::Register(reg) => reg.to_bytecode(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/assembler.rs:83:21 [INFO] [stdout] | [INFO] [stdout] 83 | &TokenType::Label(ref label) => match label_table.get(label) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 83 - &TokenType::Label(ref label) => match label_table.get(label) { [INFO] [stdout] 83 + TokenType::Label(label) => match label_table.get(label) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/assembler.rs:84:41 [INFO] [stdout] | [INFO] [stdout] 84 | Some(offset) => offset.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*offset` [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: you don't need to add `&` to both the expression and the patterns [INFO] [stdout] --> src/assembler.rs:91:29 [INFO] [stdout] | [INFO] [stdout] 91 | result[2] = match &self.operand2.token_type { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 92 | | &TokenType::Character(c) => (c as u8) as i32, [INFO] [stdout] 93 | | &TokenType::Integer(val) => val, [INFO] [stdout] 94 | | &TokenType::Register(ref reg) => reg.to_bytecode(), [INFO] [stdout] ... | [INFO] [stdout] 101 | | _ => 0, [INFO] [stdout] 102 | | }; [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 91 ~ result[2] = match self.operand2.token_type { [INFO] [stdout] 92 ~ TokenType::Character(c) => (c as u8) as i32, [INFO] [stdout] 93 ~ TokenType::Integer(val) => val, [INFO] [stdout] 94 ~ TokenType::Register(ref reg) => reg.to_bytecode(), [INFO] [stdout] 95 ~ TokenType::Label(ref label) => match label_table.get(label) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/assembler.rs:94:21 [INFO] [stdout] | [INFO] [stdout] 94 | &TokenType::Register(ref reg) => reg.to_bytecode(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 94 - &TokenType::Register(ref reg) => reg.to_bytecode(), [INFO] [stdout] 94 + TokenType::Register(reg) => reg.to_bytecode(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/assembler.rs:95:21 [INFO] [stdout] | [INFO] [stdout] 95 | &TokenType::Label(ref label) => match label_table.get(label) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 95 - &TokenType::Label(ref label) => match label_table.get(label) { [INFO] [stdout] 95 + TokenType::Label(label) => match label_table.get(label) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/assembler.rs:96:41 [INFO] [stdout] | [INFO] [stdout] 96 | Some(offset) => offset.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*offset` [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: immediately dereferencing a reference [INFO] [stdout] --> src/assembler.rs:115:19 [INFO] [stdout] | [INFO] [stdout] 115 | match *&instruction { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `instruction` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deref_addrof [INFO] [stdout] = note: `#[warn(clippy::deref_addrof)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/assembler.rs:251:21 [INFO] [stdout] | [INFO] [stdout] 251 | / if command.cmd_type == CommandType::Unknown { [INFO] [stdout] 252 | | if let Label(ref label) = token.token_type { [INFO] [stdout] 253 | | label_addresses.insert(label.to_string(), offset); [INFO] [stdout] ... | [INFO] [stdout] 257 | | command.add_operand(token); [INFO] [stdout] 258 | | } [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] 250 ~ Label(_) [INFO] [stdout] 251 ~ if command.cmd_type == CommandType::Unknown => { [INFO] [stdout] 252 | if let Label(ref label) = token.token_type { [INFO] [stdout] ... [INFO] [stdout] 255 | command.label = token; [INFO] [stdout] 256 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/syntax.rs:4:10 [INFO] [stdout] | [INFO] [stdout] 4 | Some(format!("Unexpected end of file")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Unexpected end of file".to_string()` [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: you don't need to add `&` to both the expression and the patterns [INFO] [stdout] --> src/syntax.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | / match &t.token_type { [INFO] [stdout] 17 | | &TokenType::Label(_) => { [INFO] [stdout] 18 | | token = tokens.next(); [INFO] [stdout] 19 | | if !prev_label { [INFO] [stdout] ... | [INFO] [stdout] 41 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 16 ~ match t.token_type { [INFO] [stdout] 17 ~ TokenType::Label(_) => { [INFO] [stdout] 18 | token = tokens.next(); [INFO] [stdout] ... [INFO] [stdout] 25 | }, [INFO] [stdout] 26 ~ TokenType::Directive(ref directive) => { [INFO] [stdout] 27 | let result = verify_directive(&mut tokens, directive); [INFO] [stdout] ... [INFO] [stdout] 31 | }, [INFO] [stdout] 32 ~ TokenType::Instruction(ref instruction) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/syntax.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | &TokenType::Directive(ref directive) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 26 - &TokenType::Directive(ref directive) => { [INFO] [stdout] 26 + TokenType::Directive(directive) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/syntax.rs:32:13 [INFO] [stdout] | [INFO] [stdout] 32 | &TokenType::Instruction(ref instruction) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 32 - &TokenType::Instruction(ref instruction) => { [INFO] [stdout] 32 + TokenType::Instruction(instruction) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/syntax.rs:50:8 [INFO] [stdout] | [INFO] [stdout] 50 | if !next_token.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `next_token.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: you don't need to add `&` to all patterns [INFO] [stdout] --> src/syntax.rs:54:5 [INFO] [stdout] | [INFO] [stdout] 54 | / match directive { [INFO] [stdout] 55 | | &DirectiveType::Byte => { [INFO] [stdout] 56 | | match &next_token.token_type { [INFO] [stdout] 57 | | &TokenType::Character(_) => None, [INFO] [stdout] ... | [INFO] [stdout] 67 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 54 ~ match *directive { [INFO] [stdout] 55 ~ DirectiveType::Byte => { [INFO] [stdout] 56 | match &next_token.token_type { [INFO] [stdout] ... [INFO] [stdout] 60 | }, [INFO] [stdout] 61 ~ DirectiveType::Word => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/syntax.rs:84:8 [INFO] [stdout] | [INFO] [stdout] 84 | if !next_token.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `next_token.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/syntax.rs:120:16 [INFO] [stdout] | [INFO] [stdout] 120 | if !second_op.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `second_op.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/syntax.rs:142:16 [INFO] [stdout] | [INFO] [stdout] 142 | if !second_op.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `second_op.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/syntax.rs:159:16 [INFO] [stdout] | [INFO] [stdout] 159 | if !second_op.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `second_op.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: you don't need to add `&` to all patterns [INFO] [stdout] --> src/tokenizer.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | / match self { [INFO] [stdout] 21 | | &DirectiveType::Byte => 0, [INFO] [stdout] 22 | | &DirectiveType::Word => 1 [INFO] [stdout] 23 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 20 ~ match *self { [INFO] [stdout] 21 ~ DirectiveType::Byte => 0, [INFO] [stdout] 22 ~ DirectiveType::Word => 1 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/tokenizer.rs:73:9 [INFO] [stdout] | [INFO] [stdout] 73 | / match self { [INFO] [stdout] 74 | | &InstructionType::End => 2, [INFO] [stdout] 75 | | &InstructionType::OutputInteger => 3, [INFO] [stdout] 76 | | &InstructionType::InputInteger => 4, [INFO] [stdout] ... | [INFO] [stdout] 105 | | &InstructionType::Compare => 28 [INFO] [stdout] 106 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 73 ~ match *self { [INFO] [stdout] 74 ~ InstructionType::End => 2, [INFO] [stdout] 75 ~ InstructionType::OutputInteger => 3, [INFO] [stdout] 76 ~ InstructionType::InputInteger => 4, [INFO] [stdout] 77 ~ InstructionType::OutputASCII => 5, [INFO] [stdout] 78 ~ InstructionType::InputASCII => 6, [INFO] [stdout] 79 ~ InstructionType::ConvertASCIIToInteger => 7, [INFO] [stdout] 80 ~ InstructionType::ConvertIntegerToASCII => 8, [INFO] [stdout] 81 | [INFO] [stdout] 82 ~ InstructionType::Jump => 9, [INFO] [stdout] 83 ~ InstructionType::JumpRelative => 10, [INFO] [stdout] 84 ~ InstructionType::NonZeroJump => 11, [INFO] [stdout] 85 ~ InstructionType::GreaterThanZeroJump => 12, [INFO] [stdout] 86 ~ InstructionType::LessThanZeroJump => 13, [INFO] [stdout] 87 ~ InstructionType::CompareZeroJump => 14, [INFO] [stdout] 88 | [INFO] [stdout] 89 ~ InstructionType::Move => 15, [INFO] [stdout] 90 ~ InstructionType::LoadAddress => 16, [INFO] [stdout] 91 ~ InstructionType::StoreWord => 17, [INFO] [stdout] 92 ~ InstructionType::LoadWord => 18, [INFO] [stdout] 93 ~ InstructionType::StoreByte => 19, [INFO] [stdout] 94 ~ InstructionType::LoadByte => 20, [INFO] [stdout] 95 | [INFO] [stdout] 96 ~ InstructionType::Add => 21, [INFO] [stdout] 97 ~ InstructionType::AddImmediate => 22, [INFO] [stdout] 98 ~ InstructionType::Subtract => 23, [INFO] [stdout] 99 ~ InstructionType::Multiply => 24, [INFO] [stdout] 100 ~ InstructionType::Divide => 25, [INFO] [stdout] 101 | [INFO] [stdout] 102 ~ InstructionType::And => 26, [INFO] [stdout] 103 ~ InstructionType::Or => 27, [INFO] [stdout] 104 | [INFO] [stdout] 105 ~ InstructionType::Compare => 28 [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/assembler.rs:42:13 [INFO] [stdout] | [INFO] [stdout] 42 | / match &self.cmd_type { [INFO] [stdout] 43 | | &CommandType::Instruction(InstructionType::Add) => { [INFO] [stdout] 44 | | match &self.operand2.token_type { [INFO] [stdout] 45 | | &TokenType::Integer(_) => { [INFO] [stdout] ... | [INFO] [stdout] 51 | | _ => {} [INFO] [stdout] 52 | | }; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 42 ~ if let &CommandType::Instruction(InstructionType::Add) = &self.cmd_type { [INFO] [stdout] 43 + match &self.operand2.token_type { [INFO] [stdout] 44 + &TokenType::Integer(_) => { [INFO] [stdout] 45 + new_type = CommandType::Instruction(InstructionType::AddImmediate); [INFO] [stdout] 46 + }, [INFO] [stdout] 47 + _ => {} [INFO] [stdout] 48 + }; [INFO] [stdout] 49 ~ }; [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/assembler.rs:44:21 [INFO] [stdout] | [INFO] [stdout] 44 | / match &self.operand2.token_type { [INFO] [stdout] 45 | | &TokenType::Integer(_) => { [INFO] [stdout] 46 | | new_type = CommandType::Instruction(InstructionType::AddImmediate); [INFO] [stdout] 47 | | }, [INFO] [stdout] 48 | | _ => {} [INFO] [stdout] 49 | | }; [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] 44 ~ if let &TokenType::Integer(_) = &self.operand2.token_type { [INFO] [stdout] 45 + new_type = CommandType::Instruction(InstructionType::AddImmediate); [INFO] [stdout] 46 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to both the expression and the patterns [INFO] [stdout] --> src/assembler.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | / match &self.cmd_type { [INFO] [stdout] 62 | | &CommandType::Directive(_) => self.is_directive_complete(), [INFO] [stdout] 63 | | &CommandType::Instruction(ref instruction) => [INFO] [stdout] 64 | | self.is_instruction_complete(&instruction), [INFO] [stdout] 65 | | _ => false [INFO] [stdout] 66 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 61 ~ match self.cmd_type { [INFO] [stdout] 62 ~ CommandType::Directive(_) => self.is_directive_complete(), [INFO] [stdout] 63 ~ CommandType::Instruction(ref instruction) => [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/assembler.rs:63:13 [INFO] [stdout] | [INFO] [stdout] 63 | &CommandType::Instruction(ref instruction) => [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 63 - &CommandType::Instruction(ref instruction) => [INFO] [stdout] 63 + CommandType::Instruction(instruction) => [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/assembler.rs:64:46 [INFO] [stdout] | [INFO] [stdout] 64 | self.is_instruction_complete(&instruction), [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `instruction` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/tokenizer.rs:167:9 [INFO] [stdout] | [INFO] [stdout] 167 | / match self { [INFO] [stdout] 168 | | &Register::Reg0 => 0, [INFO] [stdout] 169 | | &Register::Reg1 => 1, [INFO] [stdout] 170 | | &Register::Reg2 => 2, [INFO] [stdout] ... | [INFO] [stdout] 180 | | &Register::SB => 12, [INFO] [stdout] 181 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 167 ~ match *self { [INFO] [stdout] 168 ~ Register::Reg0 => 0, [INFO] [stdout] 169 ~ Register::Reg1 => 1, [INFO] [stdout] 170 ~ Register::Reg2 => 2, [INFO] [stdout] 171 ~ Register::Reg3 => 3, [INFO] [stdout] 172 ~ Register::Reg4 => 4, [INFO] [stdout] 173 ~ Register::Reg5 => 5, [INFO] [stdout] 174 ~ Register::Reg6 => 6, [INFO] [stdout] 175 ~ Register::IO => 7, [INFO] [stdout] 176 ~ Register::PC => 8, [INFO] [stdout] 177 ~ Register::SL => 9, [INFO] [stdout] 178 ~ Register::SP => 10, [INFO] [stdout] 179 ~ Register::FP => 11, [INFO] [stdout] 180 ~ Register::SB => 12, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to both the expression and the patterns [INFO] [stdout] --> src/assembler.rs:70:9 [INFO] [stdout] | [INFO] [stdout] 70 | / match &self.cmd_type { [INFO] [stdout] 71 | | &CommandType::Directive(_) => match &self.operand1.token_type { [INFO] [stdout] 72 | | &TokenType::Character(c) => ByteCodeData::ByteDirective(c as u8), [INFO] [stdout] 73 | | &TokenType::Integer(val) => ByteCodeData::WordDirective(val as u16), [INFO] [stdout] ... | [INFO] [stdout] 105 | | &CommandType::Unknown => unreachable!() [INFO] [stdout] 106 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 70 ~ match self.cmd_type { [INFO] [stdout] 71 ~ CommandType::Directive(_) => match &self.operand1.token_type { [INFO] [stdout] 72 | &TokenType::Character(c) => ByteCodeData::ByteDirective(c as u8), [INFO] [stdout] ... [INFO] [stdout] 75 | }, [INFO] [stdout] 76 ~ CommandType::Instruction(ref instruction) => { [INFO] [stdout] 77 | let mut result = [0, 0, 0]; [INFO] [stdout] ... [INFO] [stdout] 104 | }, [INFO] [stdout] 105 ~ CommandType::Unknown => unreachable!() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to both the expression and the patterns [INFO] [stdout] --> src/assembler.rs:71:43 [INFO] [stdout] | [INFO] [stdout] 71 | &CommandType::Directive(_) => match &self.operand1.token_type { [INFO] [stdout] | ___________________________________________^ [INFO] [stdout] 72 | | &TokenType::Character(c) => ByteCodeData::ByteDirective(c as u8), [INFO] [stdout] 73 | | &TokenType::Integer(val) => ByteCodeData::WordDirective(val as u16), [INFO] [stdout] 74 | | _ => unreachable!() [INFO] [stdout] 75 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 71 ~ &CommandType::Directive(_) => match self.operand1.token_type { [INFO] [stdout] 72 ~ TokenType::Character(c) => ByteCodeData::ByteDirective(c as u8), [INFO] [stdout] 73 ~ TokenType::Integer(val) => ByteCodeData::WordDirective(val as u16), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/assembler.rs:76:13 [INFO] [stdout] | [INFO] [stdout] 76 | &CommandType::Instruction(ref instruction) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 76 - &CommandType::Instruction(ref instruction) => { [INFO] [stdout] 76 + CommandType::Instruction(instruction) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to both the expression and the patterns [INFO] [stdout] --> src/assembler.rs:79:29 [INFO] [stdout] | [INFO] [stdout] 79 | result[1] = match &self.operand1.token_type { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 80 | | &TokenType::Character(c) => (c as u8) as i32, [INFO] [stdout] 81 | | &TokenType::Integer(val) => val, [INFO] [stdout] 82 | | &TokenType::Register(ref reg) => reg.to_bytecode(), [INFO] [stdout] ... | [INFO] [stdout] 89 | | _ => 0, [INFO] [stdout] 90 | | }; [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 79 ~ result[1] = match self.operand1.token_type { [INFO] [stdout] 80 ~ TokenType::Character(c) => (c as u8) as i32, [INFO] [stdout] 81 ~ TokenType::Integer(val) => val, [INFO] [stdout] 82 ~ TokenType::Register(ref reg) => reg.to_bytecode(), [INFO] [stdout] 83 ~ TokenType::Label(ref label) => match label_table.get(label) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/assembler.rs:82:21 [INFO] [stdout] | [INFO] [stdout] 82 | &TokenType::Register(ref reg) => reg.to_bytecode(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 82 - &TokenType::Register(ref reg) => reg.to_bytecode(), [INFO] [stdout] 82 + TokenType::Register(reg) => reg.to_bytecode(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/assembler.rs:83:21 [INFO] [stdout] | [INFO] [stdout] 83 | &TokenType::Label(ref label) => match label_table.get(label) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 83 - &TokenType::Label(ref label) => match label_table.get(label) { [INFO] [stdout] 83 + TokenType::Label(label) => match label_table.get(label) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/assembler.rs:84:41 [INFO] [stdout] | [INFO] [stdout] 84 | Some(offset) => offset.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*offset` [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: you don't need to add `&` to both the expression and the patterns [INFO] [stdout] --> src/assembler.rs:91:29 [INFO] [stdout] | [INFO] [stdout] 91 | result[2] = match &self.operand2.token_type { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 92 | | &TokenType::Character(c) => (c as u8) as i32, [INFO] [stdout] 93 | | &TokenType::Integer(val) => val, [INFO] [stdout] 94 | | &TokenType::Register(ref reg) => reg.to_bytecode(), [INFO] [stdout] ... | [INFO] [stdout] 101 | | _ => 0, [INFO] [stdout] 102 | | }; [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 91 ~ result[2] = match self.operand2.token_type { [INFO] [stdout] 92 ~ TokenType::Character(c) => (c as u8) as i32, [INFO] [stdout] 93 ~ TokenType::Integer(val) => val, [INFO] [stdout] 94 ~ TokenType::Register(ref reg) => reg.to_bytecode(), [INFO] [stdout] 95 ~ TokenType::Label(ref label) => match label_table.get(label) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/assembler.rs:94:21 [INFO] [stdout] | [INFO] [stdout] 94 | &TokenType::Register(ref reg) => reg.to_bytecode(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 94 - &TokenType::Register(ref reg) => reg.to_bytecode(), [INFO] [stdout] 94 + TokenType::Register(reg) => reg.to_bytecode(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/assembler.rs:95:21 [INFO] [stdout] | [INFO] [stdout] 95 | &TokenType::Label(ref label) => match label_table.get(label) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 95 - &TokenType::Label(ref label) => match label_table.get(label) { [INFO] [stdout] 95 + TokenType::Label(label) => match label_table.get(label) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/assembler.rs:96:41 [INFO] [stdout] | [INFO] [stdout] 96 | Some(offset) => offset.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*offset` [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 don't need to add `&` to all patterns [INFO] [stdout] --> src/tokenizer.rs:217:9 [INFO] [stdout] | [INFO] [stdout] 217 | / match self { [INFO] [stdout] 218 | | &TokenType::Character(ref str) => write!(f, "{}", str), [INFO] [stdout] 219 | | &TokenType::Directive(ref directive) => match directive { [INFO] [stdout] 220 | | &DirectiveType::Byte => write!(f, ".byte"), [INFO] [stdout] ... | [INFO] [stdout] 270 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 217 ~ match *self { [INFO] [stdout] 218 ~ TokenType::Character(ref str) => write!(f, "{}", str), [INFO] [stdout] 219 ~ TokenType::Directive(ref directive) => match directive { [INFO] [stdout] 220 | &DirectiveType::Byte => write!(f, ".byte"), [INFO] [stdout] 221 | &DirectiveType::Word => write!(f, ".word") [INFO] [stdout] 222 | }, [INFO] [stdout] 223 ~ TokenType::Instruction(ref instruction) => match instruction { [INFO] [stdout] 224 | &InstructionType::Add | [INFO] [stdout] ... [INFO] [stdout] 251 | }, [INFO] [stdout] 252 ~ TokenType::Integer(ref val) => write!(f, "{}", val), [INFO] [stdout] 253 ~ TokenType::Label(ref label) => write!(f, "{}", label), [INFO] [stdout] 254 ~ TokenType::None => write!(f, "None"), [INFO] [stdout] 255 ~ TokenType::Register(ref register) => match register { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/tokenizer.rs:218:13 [INFO] [stdout] | [INFO] [stdout] 218 | &TokenType::Character(ref str) => write!(f, "{}", str), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 218 - &TokenType::Character(ref str) => write!(f, "{}", str), [INFO] [stdout] 218 + TokenType::Character(str) => write!(f, "{}", str), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/tokenizer.rs:219:13 [INFO] [stdout] | [INFO] [stdout] 219 | &TokenType::Directive(ref directive) => match directive { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 219 - &TokenType::Directive(ref directive) => match directive { [INFO] [stdout] 219 + TokenType::Directive(directive) => match directive { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/tokenizer.rs:219:53 [INFO] [stdout] | [INFO] [stdout] 219 | &TokenType::Directive(ref directive) => match directive { [INFO] [stdout] | _____________________________________________________^ [INFO] [stdout] 220 | | &DirectiveType::Byte => write!(f, ".byte"), [INFO] [stdout] 221 | | &DirectiveType::Word => write!(f, ".word") [INFO] [stdout] 222 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 219 ~ &TokenType::Directive(ref directive) => match *directive { [INFO] [stdout] 220 ~ DirectiveType::Byte => write!(f, ".byte"), [INFO] [stdout] 221 ~ DirectiveType::Word => write!(f, ".word") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/tokenizer.rs:223:13 [INFO] [stdout] | [INFO] [stdout] 223 | &TokenType::Instruction(ref instruction) => match instruction { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 223 - &TokenType::Instruction(ref instruction) => match instruction { [INFO] [stdout] 223 + TokenType::Instruction(instruction) => match instruction { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/tokenizer.rs:252:13 [INFO] [stdout] | [INFO] [stdout] 252 | &TokenType::Integer(ref val) => write!(f, "{}", val), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 252 - &TokenType::Integer(ref val) => write!(f, "{}", val), [INFO] [stdout] 252 + TokenType::Integer(val) => write!(f, "{}", val), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/tokenizer.rs:253:13 [INFO] [stdout] | [INFO] [stdout] 253 | &TokenType::Label(ref label) => write!(f, "{}", label), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 253 - &TokenType::Label(ref label) => write!(f, "{}", label), [INFO] [stdout] 253 + TokenType::Label(label) => write!(f, "{}", label), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: immediately dereferencing a reference [INFO] [stdout] --> src/assembler.rs:115:19 [INFO] [stdout] | [INFO] [stdout] 115 | match *&instruction { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `instruction` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deref_addrof [INFO] [stdout] = note: `#[warn(clippy::deref_addrof)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/assembler.rs:251:21 [INFO] [stdout] | [INFO] [stdout] 251 | / if command.cmd_type == CommandType::Unknown { [INFO] [stdout] 252 | | if let Label(ref label) = token.token_type { [INFO] [stdout] 253 | | label_addresses.insert(label.to_string(), offset); [INFO] [stdout] ... | [INFO] [stdout] 257 | | command.add_operand(token); [INFO] [stdout] 258 | | } [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] 250 ~ Label(_) [INFO] [stdout] 251 ~ if command.cmd_type == CommandType::Unknown => { [INFO] [stdout] 252 | if let Label(ref label) = token.token_type { [INFO] [stdout] ... [INFO] [stdout] 255 | command.label = token; [INFO] [stdout] 256 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/tokenizer.rs:255:13 [INFO] [stdout] | [INFO] [stdout] 255 | &TokenType::Register(ref register) => match register { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 255 - &TokenType::Register(ref register) => match register { [INFO] [stdout] 255 + TokenType::Register(register) => match register { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/syntax.rs:4:10 [INFO] [stdout] | [INFO] [stdout] 4 | Some(format!("Unexpected end of file")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Unexpected end of file".to_string()` [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: you don't need to add `&` to all patterns [INFO] [stdout] --> src/tokenizer.rs:255:51 [INFO] [stdout] | [INFO] [stdout] 255 | &TokenType::Register(ref register) => match register { [INFO] [stdout] | ___________________________________________________^ [INFO] [stdout] 256 | | &Register::FP => write!(f, "FP"), [INFO] [stdout] 257 | | &Register::IO => write!(f, "IO"), [INFO] [stdout] 258 | | &Register::PC => write!(f, "PC"), [INFO] [stdout] ... | [INFO] [stdout] 268 | | &Register::SP => write!(f, "SP") [INFO] [stdout] 269 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 255 ~ &TokenType::Register(ref register) => match *register { [INFO] [stdout] 256 ~ Register::FP => write!(f, "FP"), [INFO] [stdout] 257 ~ Register::IO => write!(f, "IO"), [INFO] [stdout] 258 ~ Register::PC => write!(f, "PC"), [INFO] [stdout] 259 ~ Register::Reg0 => write!(f, "reg_0"), [INFO] [stdout] 260 ~ Register::Reg1 => write!(f, "reg_1"), [INFO] [stdout] 261 ~ Register::Reg2 => write!(f, "reg_2"), [INFO] [stdout] 262 ~ Register::Reg3 => write!(f, "reg_3"), [INFO] [stdout] 263 ~ Register::Reg4 => write!(f, "reg_4"), [INFO] [stdout] 264 ~ Register::Reg5 => write!(f, "reg_5"), [INFO] [stdout] 265 ~ Register::Reg6 => write!(f, "reg_6"), [INFO] [stdout] 266 ~ Register::SB => write!(f, "SB"), [INFO] [stdout] 267 ~ Register::SL => write!(f, "SL"), [INFO] [stdout] 268 ~ Register::SP => write!(f, "SP") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to both the expression and the patterns [INFO] [stdout] --> src/syntax.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | / match &t.token_type { [INFO] [stdout] 17 | | &TokenType::Label(_) => { [INFO] [stdout] 18 | | token = tokens.next(); [INFO] [stdout] 19 | | if !prev_label { [INFO] [stdout] ... | [INFO] [stdout] 41 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 16 ~ match t.token_type { [INFO] [stdout] 17 ~ TokenType::Label(_) => { [INFO] [stdout] 18 | token = tokens.next(); [INFO] [stdout] ... [INFO] [stdout] 25 | }, [INFO] [stdout] 26 ~ TokenType::Directive(ref directive) => { [INFO] [stdout] 27 | let result = verify_directive(&mut tokens, directive); [INFO] [stdout] ... [INFO] [stdout] 31 | }, [INFO] [stdout] 32 ~ TokenType::Instruction(ref instruction) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/syntax.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | &TokenType::Directive(ref directive) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 26 - &TokenType::Directive(ref directive) => { [INFO] [stdout] 26 + TokenType::Directive(directive) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/syntax.rs:32:13 [INFO] [stdout] | [INFO] [stdout] 32 | &TokenType::Instruction(ref instruction) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 32 - &TokenType::Instruction(ref instruction) => { [INFO] [stdout] 32 + TokenType::Instruction(instruction) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/syntax.rs:50:8 [INFO] [stdout] | [INFO] [stdout] 50 | if !next_token.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `next_token.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: you don't need to add `&` to all patterns [INFO] [stdout] --> src/syntax.rs:54:5 [INFO] [stdout] | [INFO] [stdout] 54 | / match directive { [INFO] [stdout] 55 | | &DirectiveType::Byte => { [INFO] [stdout] 56 | | match &next_token.token_type { [INFO] [stdout] 57 | | &TokenType::Character(_) => None, [INFO] [stdout] ... | [INFO] [stdout] 67 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 54 ~ match *directive { [INFO] [stdout] 55 ~ DirectiveType::Byte => { [INFO] [stdout] 56 | match &next_token.token_type { [INFO] [stdout] ... [INFO] [stdout] 60 | }, [INFO] [stdout] 61 ~ DirectiveType::Word => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/tokenizer.rs:316:12 [INFO] [stdout] | [INFO] [stdout] 316 | if !file_stream.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `file_stream.is_err()` [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/syntax.rs:84:8 [INFO] [stdout] | [INFO] [stdout] 84 | if !next_token.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `next_token.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/syntax.rs:120:16 [INFO] [stdout] | [INFO] [stdout] 120 | if !second_op.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `second_op.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/syntax.rs:142:16 [INFO] [stdout] | [INFO] [stdout] 142 | if !second_op.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `second_op.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/syntax.rs:159:16 [INFO] [stdout] | [INFO] [stdout] 159 | if !second_op.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `second_op.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: unneeded `return` statement [INFO] [stdout] --> src/tokenizer.rs:552:17 [INFO] [stdout] | [INFO] [stdout] 552 | return Some(self.newest_tokens.remove(0)); [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] 552 ~ Some(self.newest_tokens.remove(0)) [INFO] [stdout] 553 | }, [INFO] [stdout] ... [INFO] [stdout] 556 | } [INFO] [stdout] 557 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tokenizer.rs:555:17 [INFO] [stdout] | [INFO] [stdout] 555 | return None; [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] 555 ~ None [INFO] [stdout] 556 | } [INFO] [stdout] 557 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tokenizer.rs:334:12 [INFO] [stdout] | [INFO] [stdout] 334 | if self.newest_tokens.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.newest_tokens.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: length comparison to zero [INFO] [stdout] --> src/tokenizer.rs:347:20 [INFO] [stdout] | [INFO] [stdout] 347 | if line.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.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: you don't need to add `&` to all patterns [INFO] [stdout] --> src/tokenizer.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | / match self { [INFO] [stdout] 21 | | &DirectiveType::Byte => 0, [INFO] [stdout] 22 | | &DirectiveType::Word => 1 [INFO] [stdout] 23 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 20 ~ match *self { [INFO] [stdout] 21 ~ DirectiveType::Byte => 0, [INFO] [stdout] 22 ~ DirectiveType::Word => 1 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/tokenizer.rs:73:9 [INFO] [stdout] | [INFO] [stdout] 73 | / match self { [INFO] [stdout] 74 | | &InstructionType::End => 2, [INFO] [stdout] 75 | | &InstructionType::OutputInteger => 3, [INFO] [stdout] 76 | | &InstructionType::InputInteger => 4, [INFO] [stdout] ... | [INFO] [stdout] 105 | | &InstructionType::Compare => 28 [INFO] [stdout] 106 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 73 ~ match *self { [INFO] [stdout] 74 ~ InstructionType::End => 2, [INFO] [stdout] 75 ~ InstructionType::OutputInteger => 3, [INFO] [stdout] 76 ~ InstructionType::InputInteger => 4, [INFO] [stdout] 77 ~ InstructionType::OutputASCII => 5, [INFO] [stdout] 78 ~ InstructionType::InputASCII => 6, [INFO] [stdout] 79 ~ InstructionType::ConvertASCIIToInteger => 7, [INFO] [stdout] 80 ~ InstructionType::ConvertIntegerToASCII => 8, [INFO] [stdout] 81 | [INFO] [stdout] 82 ~ InstructionType::Jump => 9, [INFO] [stdout] 83 ~ InstructionType::JumpRelative => 10, [INFO] [stdout] 84 ~ InstructionType::NonZeroJump => 11, [INFO] [stdout] 85 ~ InstructionType::GreaterThanZeroJump => 12, [INFO] [stdout] 86 ~ InstructionType::LessThanZeroJump => 13, [INFO] [stdout] 87 ~ InstructionType::CompareZeroJump => 14, [INFO] [stdout] 88 | [INFO] [stdout] 89 ~ InstructionType::Move => 15, [INFO] [stdout] 90 ~ InstructionType::LoadAddress => 16, [INFO] [stdout] 91 ~ InstructionType::StoreWord => 17, [INFO] [stdout] 92 ~ InstructionType::LoadWord => 18, [INFO] [stdout] 93 ~ InstructionType::StoreByte => 19, [INFO] [stdout] 94 ~ InstructionType::LoadByte => 20, [INFO] [stdout] 95 | [INFO] [stdout] 96 ~ InstructionType::Add => 21, [INFO] [stdout] 97 ~ InstructionType::AddImmediate => 22, [INFO] [stdout] 98 ~ InstructionType::Subtract => 23, [INFO] [stdout] 99 ~ InstructionType::Multiply => 24, [INFO] [stdout] 100 ~ InstructionType::Divide => 25, [INFO] [stdout] 101 | [INFO] [stdout] 102 ~ InstructionType::And => 26, [INFO] [stdout] 103 ~ InstructionType::Or => 27, [INFO] [stdout] 104 | [INFO] [stdout] 105 ~ InstructionType::Compare => 28 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/tokenizer.rs:167:9 [INFO] [stdout] | [INFO] [stdout] 167 | / match self { [INFO] [stdout] 168 | | &Register::Reg0 => 0, [INFO] [stdout] 169 | | &Register::Reg1 => 1, [INFO] [stdout] 170 | | &Register::Reg2 => 2, [INFO] [stdout] ... | [INFO] [stdout] 180 | | &Register::SB => 12, [INFO] [stdout] 181 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 167 ~ match *self { [INFO] [stdout] 168 ~ Register::Reg0 => 0, [INFO] [stdout] 169 ~ Register::Reg1 => 1, [INFO] [stdout] 170 ~ Register::Reg2 => 2, [INFO] [stdout] 171 ~ Register::Reg3 => 3, [INFO] [stdout] 172 ~ Register::Reg4 => 4, [INFO] [stdout] 173 ~ Register::Reg5 => 5, [INFO] [stdout] 174 ~ Register::Reg6 => 6, [INFO] [stdout] 175 ~ Register::IO => 7, [INFO] [stdout] 176 ~ Register::PC => 8, [INFO] [stdout] 177 ~ Register::SL => 9, [INFO] [stdout] 178 ~ Register::SP => 10, [INFO] [stdout] 179 ~ Register::FP => 11, [INFO] [stdout] 180 ~ Register::SB => 12, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/vm.rs:123:60 [INFO] [stdout] | [INFO] [stdout] 123 | self.registers[Register::IO as usize] = if ascii < 0 || ascii > 9 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(0..=9).contains(&ascii)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/vm.rs:135:60 [INFO] [stdout] | [INFO] [stdout] 135 | self.registers[Register::IO as usize] = if integer < 48 || integer > 57 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(48..=57).contains(&integer)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/tokenizer.rs:217:9 [INFO] [stdout] | [INFO] [stdout] 217 | / match self { [INFO] [stdout] 218 | | &TokenType::Character(ref str) => write!(f, "{}", str), [INFO] [stdout] 219 | | &TokenType::Directive(ref directive) => match directive { [INFO] [stdout] 220 | | &DirectiveType::Byte => write!(f, ".byte"), [INFO] [stdout] ... | [INFO] [stdout] 270 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 217 ~ match *self { [INFO] [stdout] 218 ~ TokenType::Character(ref str) => write!(f, "{}", str), [INFO] [stdout] 219 ~ TokenType::Directive(ref directive) => match directive { [INFO] [stdout] 220 | &DirectiveType::Byte => write!(f, ".byte"), [INFO] [stdout] 221 | &DirectiveType::Word => write!(f, ".word") [INFO] [stdout] 222 | }, [INFO] [stdout] 223 ~ TokenType::Instruction(ref instruction) => match instruction { [INFO] [stdout] 224 | &InstructionType::Add | [INFO] [stdout] ... [INFO] [stdout] 251 | }, [INFO] [stdout] 252 ~ TokenType::Integer(ref val) => write!(f, "{}", val), [INFO] [stdout] 253 ~ TokenType::Label(ref label) => write!(f, "{}", label), [INFO] [stdout] 254 ~ TokenType::None => write!(f, "None"), [INFO] [stdout] 255 ~ TokenType::Register(ref register) => match register { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/tokenizer.rs:218:13 [INFO] [stdout] | [INFO] [stdout] 218 | &TokenType::Character(ref str) => write!(f, "{}", str), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 218 - &TokenType::Character(ref str) => write!(f, "{}", str), [INFO] [stdout] 218 + TokenType::Character(str) => write!(f, "{}", str), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/tokenizer.rs:219:13 [INFO] [stdout] | [INFO] [stdout] 219 | &TokenType::Directive(ref directive) => match directive { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 219 - &TokenType::Directive(ref directive) => match directive { [INFO] [stdout] 219 + TokenType::Directive(directive) => match directive { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/tokenizer.rs:219:53 [INFO] [stdout] | [INFO] [stdout] 219 | &TokenType::Directive(ref directive) => match directive { [INFO] [stdout] | _____________________________________________________^ [INFO] [stdout] 220 | | &DirectiveType::Byte => write!(f, ".byte"), [INFO] [stdout] 221 | | &DirectiveType::Word => write!(f, ".word") [INFO] [stdout] 222 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 219 ~ &TokenType::Directive(ref directive) => match *directive { [INFO] [stdout] 220 ~ DirectiveType::Byte => write!(f, ".byte"), [INFO] [stdout] 221 ~ DirectiveType::Word => write!(f, ".word") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/tokenizer.rs:223:13 [INFO] [stdout] | [INFO] [stdout] 223 | &TokenType::Instruction(ref instruction) => match instruction { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 223 - &TokenType::Instruction(ref instruction) => match instruction { [INFO] [stdout] 223 + TokenType::Instruction(instruction) => match instruction { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/tokenizer.rs:252:13 [INFO] [stdout] | [INFO] [stdout] 252 | &TokenType::Integer(ref val) => write!(f, "{}", val), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 252 - &TokenType::Integer(ref val) => write!(f, "{}", val), [INFO] [stdout] 252 + TokenType::Integer(val) => write!(f, "{}", val), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/tokenizer.rs:253:13 [INFO] [stdout] | [INFO] [stdout] 253 | &TokenType::Label(ref label) => write!(f, "{}", label), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 253 - &TokenType::Label(ref label) => write!(f, "{}", label), [INFO] [stdout] 253 + TokenType::Label(label) => write!(f, "{}", label), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/tokenizer.rs:255:13 [INFO] [stdout] | [INFO] [stdout] 255 | &TokenType::Register(ref register) => match register { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 255 - &TokenType::Register(ref register) => match register { [INFO] [stdout] 255 + TokenType::Register(register) => match register { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/tokenizer.rs:255:51 [INFO] [stdout] | [INFO] [stdout] 255 | &TokenType::Register(ref register) => match register { [INFO] [stdout] | ___________________________________________________^ [INFO] [stdout] 256 | | &Register::FP => write!(f, "FP"), [INFO] [stdout] 257 | | &Register::IO => write!(f, "IO"), [INFO] [stdout] 258 | | &Register::PC => write!(f, "PC"), [INFO] [stdout] ... | [INFO] [stdout] 268 | | &Register::SP => write!(f, "SP") [INFO] [stdout] 269 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 255 ~ &TokenType::Register(ref register) => match *register { [INFO] [stdout] 256 ~ Register::FP => write!(f, "FP"), [INFO] [stdout] 257 ~ Register::IO => write!(f, "IO"), [INFO] [stdout] 258 ~ Register::PC => write!(f, "PC"), [INFO] [stdout] 259 ~ Register::Reg0 => write!(f, "reg_0"), [INFO] [stdout] 260 ~ Register::Reg1 => write!(f, "reg_1"), [INFO] [stdout] 261 ~ Register::Reg2 => write!(f, "reg_2"), [INFO] [stdout] 262 ~ Register::Reg3 => write!(f, "reg_3"), [INFO] [stdout] 263 ~ Register::Reg4 => write!(f, "reg_4"), [INFO] [stdout] 264 ~ Register::Reg5 => write!(f, "reg_5"), [INFO] [stdout] 265 ~ Register::Reg6 => write!(f, "reg_6"), [INFO] [stdout] 266 ~ Register::SB => write!(f, "SB"), [INFO] [stdout] 267 ~ Register::SL => write!(f, "SL"), [INFO] [stdout] 268 ~ Register::SP => write!(f, "SP") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/tokenizer.rs:316:12 [INFO] [stdout] | [INFO] [stdout] 316 | if !file_stream.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `file_stream.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tokenizer.rs:552:17 [INFO] [stdout] | [INFO] [stdout] 552 | return Some(self.newest_tokens.remove(0)); [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] 552 ~ Some(self.newest_tokens.remove(0)) [INFO] [stdout] 553 | }, [INFO] [stdout] ... [INFO] [stdout] 556 | } [INFO] [stdout] 557 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tokenizer.rs:555:17 [INFO] [stdout] | [INFO] [stdout] 555 | return None; [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] 555 ~ None [INFO] [stdout] 556 | } [INFO] [stdout] 557 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tokenizer.rs:334:12 [INFO] [stdout] | [INFO] [stdout] 334 | if self.newest_tokens.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.newest_tokens.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: length comparison to zero [INFO] [stdout] --> src/tokenizer.rs:347:20 [INFO] [stdout] | [INFO] [stdout] 347 | if line.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.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: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/vm.rs:123:60 [INFO] [stdout] | [INFO] [stdout] 123 | self.registers[Register::IO as usize] = if ascii < 0 || ascii > 9 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(0..=9).contains(&ascii)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/vm.rs:135:60 [INFO] [stdout] | [INFO] [stdout] 135 | self.registers[Register::IO as usize] = if integer < 48 || integer > 57 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(48..=57).contains(&integer)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.51s [INFO] running `Command { std: "docker" "inspect" "6a971fc9a33ca1a1ff19890fc8c422a25d2924606e3b8ad5ef120d4d9ff9655e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6a971fc9a33ca1a1ff19890fc8c422a25d2924606e3b8ad5ef120d4d9ff9655e", kill_on_drop: false }` [INFO] [stdout] 6a971fc9a33ca1a1ff19890fc8c422a25d2924606e3b8ad5ef120d4d9ff9655e