[INFO] cloning repository https://github.com/matthambrecht/eaql-db [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/matthambrecht/eaql-db" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmatthambrecht%2Feaql-db", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmatthambrecht%2Feaql-db'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 2816bb110a80f8e16207b734b059acde46158d76 [INFO] linting matthambrecht/eaql-db against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmatthambrecht%2Feaql-db" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/matthambrecht/eaql-db [INFO] finished tweaking git repo https://github.com/matthambrecht/eaql-db [INFO] tweaked toml for git repo https://github.com/matthambrecht/eaql-db written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/matthambrecht/eaql-db 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/matthambrecht/eaql-db already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded rustversion v1.0.21 [INFO] [stderr] Downloaded cfg-if v1.0.1 [INFO] [stderr] Downloaded windows-core v0.61.2 [INFO] [stderr] Downloaded chrono v0.4.41 [INFO] [stderr] Downloaded cc v1.2.29 [INFO] [stderr] Downloaded syn v2.0.104 [INFO] [stderr] Downloaded libc v0.2.174 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] df2dba8805400dc9609750b1fa13b9b1503b46267a6523575e23f627f1fa1eca [INFO] running `Command { std: "docker" "start" "-a" "df2dba8805400dc9609750b1fa13b9b1503b46267a6523575e23f627f1fa1eca", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "df2dba8805400dc9609750b1fa13b9b1503b46267a6523575e23f627f1fa1eca", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "df2dba8805400dc9609750b1fa13b9b1503b46267a6523575e23f627f1fa1eca", kill_on_drop: false }` [INFO] [stdout] df2dba8805400dc9609750b1fa13b9b1503b46267a6523575e23f627f1fa1eca [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] ecbc65c143345611a760519166545b0f64396e7678389000f65da5caf1495b2e [INFO] running `Command { std: "docker" "start" "-a" "ecbc65c143345611a760519166545b0f64396e7678389000f65da5caf1495b2e", kill_on_drop: false }` [INFO] [stderr] Compiling autocfg v1.5.0 [INFO] [stderr] Checking iana-time-zone v0.1.63 [INFO] [stderr] Checking lazy_static v1.5.0 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking chrono v0.4.41 [INFO] [stderr] Checking eaql v0.0.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/language/parser/get.rs:287:13 [INFO] [stdout] | [INFO] [stdout] 287 | column_names: column_names, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `column_names` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/language/parser/table.rs:172:13 [INFO] [stdout] | [INFO] [stdout] 172 | table: table, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `table` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/language/parser/table.rs:173:13 [INFO] [stdout] | [INFO] [stdout] 173 | condition: condition, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `condition` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/language/tokens.rs:61:13 [INFO] [stdout] | [INFO] [stdout] 61 | token_type: token_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `token_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/language/parser/get.rs:287:13 [INFO] [stdout] | [INFO] [stdout] 287 | column_names: column_names, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `column_names` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/language/parser/table.rs:172:13 [INFO] [stdout] | [INFO] [stdout] 172 | table: table, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `table` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/language/parser/table.rs:173:13 [INFO] [stdout] | [INFO] [stdout] 173 | condition: condition, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `condition` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/language/tokens.rs:61:13 [INFO] [stdout] | [INFO] [stdout] 61 | token_type: token_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `token_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/lexer.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | return query.chars().nth(*current + 1); [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] 19 - return query.chars().nth(*current + 1); [INFO] [stdout] 19 + query.chars().nth(*current + 1) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/language/lexer.rs:14:24 [INFO] [stdout] | [INFO] [stdout] 14 | fn peek_one(query: &String, current: &usize) -> Option { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 14 - fn peek_one(query: &String, current: &usize) -> Option { [INFO] [stdout] 14 + fn peek_one(query: &str, current: &usize) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/language/lexer.rs:56:27 [INFO] [stdout] | [INFO] [stdout] 56 | fn peek_string(query: &String, current: &mut usize, token_type: &mut TokenType) -> () { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 56 - fn peek_string(query: &String, current: &mut usize, token_type: &mut TokenType) -> () { [INFO] [stdout] 56 + fn peek_string(query: &str, current: &mut usize, token_type: &mut TokenType) -> () { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/language/lexer.rs:72:16 [INFO] [stdout] | [INFO] [stdout] 72 | query: &String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 72 - query: &String, [INFO] [stdout] 72 + query: &str, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TokenType` which implements the `Copy` trait [INFO] [stdout] --> src/language/lexer.rs:86:35 [INFO] [stdout] | [INFO] [stdout] 86 | *token_type = keyword_token.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*keyword_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: unneeded `return` statement [INFO] [stdout] --> src/language/lexer.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | return Ok(Token::new(token_type, &"".to_string(), &c.to_string())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 107 - return Ok(Token::new(token_type, &"".to_string(), &c.to_string())); [INFO] [stdout] 107 + Ok(Token::new(token_type, &"".to_string(), &c.to_string())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/lexer.rs:144:9 [INFO] [stdout] | [INFO] [stdout] 144 | / return Ok(Token::new( [INFO] [stdout] 145 | | token_type, [INFO] [stdout] 146 | | &"".to_string(), [INFO] [stdout] 147 | | &query[slice_start..slice_end].to_string(), [INFO] [stdout] 148 | | )); [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] 144 ~ Ok(Token::new( [INFO] [stdout] 145 + token_type, [INFO] [stdout] 146 + &"".to_string(), [INFO] [stdout] 147 + &query[slice_start..slice_end].to_string(), [INFO] [stdout] 148 ~ )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/lexer.rs:213:9 [INFO] [stdout] | [INFO] [stdout] 213 | / return Ok(Token::new( [INFO] [stdout] 214 | | token_type, [INFO] [stdout] 215 | | &literal, [INFO] [stdout] 216 | | &query[slice_start..slice_end].to_string(), [INFO] [stdout] 217 | | )); [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] 213 ~ Ok(Token::new( [INFO] [stdout] 214 + token_type, [INFO] [stdout] 215 + &literal, [INFO] [stdout] 216 + &query[slice_start..slice_end].to_string(), [INFO] [stdout] 217 ~ )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/language/lexer.rs:165:19 [INFO] [stdout] | [INFO] [stdout] 165 | } else if c.is_digit(10) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/lexer.rs:166:52 [INFO] [stdout] | [INFO] [stdout] 166 | || (c == '-' && Lexer::peek_one(query, ¤t).is_some_and(|x: char| x.is_digit(10))) [INFO] [stdout] | ^^^^^^^^ help: change this to: `current` [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: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/language/lexer.rs:166:84 [INFO] [stdout] | [INFO] [stdout] 166 | || (c == '-' && Lexer::peek_one(query, ¤t).is_some_and(|x: char| x.is_digit(10))) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `x.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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/lexer.rs:171:51 [INFO] [stdout] | [INFO] [stdout] 171 | if c == '-' && Lexer::peek_one(query, ¤t).is_some_and(|x: char| x.is_digit(10)) { [INFO] [stdout] | ^^^^^^^^ help: change this to: `current` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/language/lexer.rs:171:83 [INFO] [stdout] | [INFO] [stdout] 171 | if c == '-' && Lexer::peek_one(query, ¤t).is_some_and(|x: char| x.is_digit(10)) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `x.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/language/lexer.rs:224:13 [INFO] [stdout] | [INFO] [stdout] 224 | return Lexer::handle_single_token(query, c, current); [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] 224 - return Lexer::handle_single_token(query, c, current); [INFO] [stdout] 224 + Lexer::handle_single_token(query, c, current) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/lexer.rs:226:13 [INFO] [stdout] | [INFO] [stdout] 226 | return Lexer::handle_single_double_token(query, c, current); [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] 226 - return Lexer::handle_single_double_token(query, c, current); [INFO] [stdout] 226 + Lexer::handle_single_double_token(query, c, current) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/lexer.rs:228:13 [INFO] [stdout] | [INFO] [stdout] 228 | return Lexer::handle_default(query, c, current, start); [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] 228 - return Lexer::handle_default(query, c, current, start); [INFO] [stdout] 228 + Lexer::handle_default(query, c, current, start) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `token` after checking its variant with `is_err` [INFO] [stdout] --> src/language/lexer.rs:244:27 [INFO] [stdout] | [INFO] [stdout] 241 | if token.is_err() { [INFO] [stdout] | ----------------- help: try: `if let Ok() = token` [INFO] [stdout] ... [INFO] [stdout] 244 | toks.push(token.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/language/lexer.rs:283:17 [INFO] [stdout] | [INFO] [stdout] 283 | assert!(!test_lexer.is_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `test_lexer.is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/language/lexer.rs:302:17 [INFO] [stdout] | [INFO] [stdout] 302 | assert!(!test_lexer.is_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `test_lexer.is_ok()` [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/language/lexer.rs:320:17 [INFO] [stdout] | [INFO] [stdout] 320 | assert!(!test_lexer.is_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `test_lexer.is_ok()` [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/language/lexer.rs:336:17 [INFO] [stdout] | [INFO] [stdout] 336 | assert!(!test_lexer.is_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `test_lexer.is_ok()` [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/language/lexer.rs:352:17 [INFO] [stdout] | [INFO] [stdout] 352 | assert!(!test_lexer.is_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `test_lexer.is_ok()` [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/language/lexer.rs:368:17 [INFO] [stdout] | [INFO] [stdout] 368 | assert!(!test_lexer.is_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `test_lexer.is_ok()` [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/language/lexer.rs:384:17 [INFO] [stdout] | [INFO] [stdout] 384 | assert!(!test_lexer.is_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `test_lexer.is_ok()` [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/language/lexer.rs:400:17 [INFO] [stdout] | [INFO] [stdout] 400 | assert!(!test_lexer.is_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `test_lexer.is_ok()` [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/language/lexer.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | return query.chars().nth(*current + 1); [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] 19 - return query.chars().nth(*current + 1); [INFO] [stdout] 19 + query.chars().nth(*current + 1) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/language/lexer.rs:419:17 [INFO] [stdout] | [INFO] [stdout] 419 | assert!(!test_lexer.is_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `test_lexer.is_ok()` [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/language/lexer.rs:14:24 [INFO] [stdout] | [INFO] [stdout] 14 | fn peek_one(query: &String, current: &usize) -> Option { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 14 - fn peek_one(query: &String, current: &usize) -> Option { [INFO] [stdout] 14 + fn peek_one(query: &str, current: &usize) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/language/lexer.rs:435:17 [INFO] [stdout] | [INFO] [stdout] 435 | assert!(!test_lexer.is_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `test_lexer.is_ok()` [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/language/lexer.rs:451:17 [INFO] [stdout] | [INFO] [stdout] 451 | assert!(!test_lexer.is_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `test_lexer.is_ok()` [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/language/lexer.rs:56:27 [INFO] [stdout] | [INFO] [stdout] 56 | fn peek_string(query: &String, current: &mut usize, token_type: &mut TokenType) -> () { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 56 - fn peek_string(query: &String, current: &mut usize, token_type: &mut TokenType) -> () { [INFO] [stdout] 56 + fn peek_string(query: &str, current: &mut usize, token_type: &mut TokenType) -> () { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/language/lexer.rs:479:17 [INFO] [stdout] | [INFO] [stdout] 479 | assert!(!test_lexer.is_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `test_lexer.is_ok()` [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/language/lexer.rs:72:16 [INFO] [stdout] | [INFO] [stdout] 72 | query: &String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 72 - query: &String, [INFO] [stdout] 72 + query: &str, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/language/parser/conditional.rs:51:44 [INFO] [stdout] | [INFO] [stdout] 51 | fn update_depths(node: &mut ConditionChild) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:57:13 [INFO] [stdout] | [INFO] [stdout] 57 | return; [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] 56 - update_depths(&mut state.rs); [INFO] [stdout] 57 - return; [INFO] [stdout] 56 + update_depths(&mut state.rs); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:115:13 [INFO] [stdout] | [INFO] [stdout] 115 | / return Ok(ConditionChild::Op(Box::new(OperandNode { [INFO] [stdout] 116 | | op: "AND".to_string(), [INFO] [stdout] 117 | | ls: ret, [INFO] [stdout] 118 | | rs: match recurse_down( [INFO] [stdout] ... | [INFO] [stdout] 132 | | _depth: depth, [INFO] [stdout] 133 | | }))); [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] 115 ~ Ok(ConditionChild::Op(Box::new(OperandNode { [INFO] [stdout] 116 + op: "AND".to_string(), [INFO] [stdout] 117 + ls: ret, [INFO] [stdout] 118 + rs: match recurse_down( [INFO] [stdout] 119 + tokens, [INFO] [stdout] 120 + idx, [INFO] [stdout] 121 + depth + 1, [INFO] [stdout] 122 + "AND".to_string(), [INFO] [stdout] 123 + finished, [INFO] [stdout] 124 + closing_paren, [INFO] [stdout] 125 + opened_paren, [INFO] [stdout] 126 + closing_or, [INFO] [stdout] 127 + ) { [INFO] [stdout] 128 + Ok(node) => node, [INFO] [stdout] 129 + Err(msg) => return Err(msg), [INFO] [stdout] 130 + }, [INFO] [stdout] 131 + [INFO] [stdout] 132 + _depth: depth, [INFO] [stdout] 133 ~ }))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TokenType` which implements the `Copy` trait [INFO] [stdout] --> src/language/lexer.rs:86:35 [INFO] [stdout] | [INFO] [stdout] 86 | *token_type = keyword_token.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*keyword_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: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:145:13 [INFO] [stdout] | [INFO] [stdout] 145 | / return Ok(ConditionChild::Op(Box::new(OperandNode { [INFO] [stdout] 146 | | op: "OR".to_string(), [INFO] [stdout] 147 | | ls: ret, [INFO] [stdout] 148 | | rs: match recurse_down( [INFO] [stdout] ... | [INFO] [stdout] 162 | | _depth: depth, [INFO] [stdout] 163 | | }))); [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] 145 ~ Ok(ConditionChild::Op(Box::new(OperandNode { [INFO] [stdout] 146 + op: "OR".to_string(), [INFO] [stdout] 147 + ls: ret, [INFO] [stdout] 148 + rs: match recurse_down( [INFO] [stdout] 149 + tokens, [INFO] [stdout] 150 + idx, [INFO] [stdout] 151 + depth + 1, [INFO] [stdout] 152 + "OR".to_string(), [INFO] [stdout] 153 + finished, [INFO] [stdout] 154 + closing_paren, [INFO] [stdout] 155 + opened_paren, [INFO] [stdout] 156 + closing_or, [INFO] [stdout] 157 + ) { [INFO] [stdout] 158 + Ok(node) => node, [INFO] [stdout] 159 + Err(msg) => return Err(msg), [INFO] [stdout] 160 + }, [INFO] [stdout] 161 + [INFO] [stdout] 162 + _depth: depth, [INFO] [stdout] 163 ~ }))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/lexer.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | return Ok(Token::new(token_type, &"".to_string(), &c.to_string())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 107 - return Ok(Token::new(token_type, &"".to_string(), &c.to_string())); [INFO] [stdout] 107 + Ok(Token::new(token_type, &"".to_string(), &c.to_string())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:175:13 [INFO] [stdout] | [INFO] [stdout] 175 | return Ok(ret); [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] 175 - return Ok(ret); [INFO] [stdout] 175 + Ok(ret) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:181:13 [INFO] [stdout] | [INFO] [stdout] 181 | return Ok(ret); [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] 181 - return Ok(ret); [INFO] [stdout] 181 + Ok(ret) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:187:13 [INFO] [stdout] | [INFO] [stdout] 187 | return Ok(ret); [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] 187 - return Ok(ret); [INFO] [stdout] 187 + Ok(ret) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:190:13 [INFO] [stdout] | [INFO] [stdout] 190 | / return Err(format!( [INFO] [stdout] 191 | | "Something went wrong parsing a nested conditional: Expected a closing parentheses, \ [INFO] [stdout] 192 | | post-processor entrance, end-of-query, 'and' or 'or', \ [INFO] [stdout] 193 | | but got '{}' instead.", [INFO] [stdout] 194 | | tokens[*idx].lexeme [INFO] [stdout] 195 | | )); [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] 190 ~ Err(format!( [INFO] [stdout] 191 + "Something went wrong parsing a nested conditional: Expected a closing parentheses, \ [INFO] [stdout] 192 + post-processor entrance, end-of-query, 'and' or 'or', \ [INFO] [stdout] 193 + but got '{}' instead.", [INFO] [stdout] 194 + tokens[*idx].lexeme [INFO] [stdout] 195 ~ )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/conditional.rs:76:13 [INFO] [stdout] | [INFO] [stdout] 76 | ls: match recurse_down( [INFO] [stdout] | _____________^ [INFO] [stdout] 77 | | tokens, [INFO] [stdout] 78 | | idx, [INFO] [stdout] 79 | | depth + 1, [INFO] [stdout] ... | [INFO] [stdout] 87 | | Err(msg) => return Err(msg), [INFO] [stdout] 88 | | }, [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] help: try instead [INFO] [stdout] | [INFO] [stdout] 76 ~ ls: recurse_down( [INFO] [stdout] 77 + tokens, [INFO] [stdout] 78 + idx, [INFO] [stdout] 79 + depth + 1, [INFO] [stdout] 80 + "OR".to_string(), [INFO] [stdout] 81 + finished, [INFO] [stdout] 82 + closing_paren, [INFO] [stdout] 83 + opened_paren, [INFO] [stdout] 84 + closing_or, [INFO] [stdout] 85 ~ )?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/lexer.rs:144:9 [INFO] [stdout] | [INFO] [stdout] 144 | / return Ok(Token::new( [INFO] [stdout] 145 | | token_type, [INFO] [stdout] 146 | | &"".to_string(), [INFO] [stdout] 147 | | &query[slice_start..slice_end].to_string(), [INFO] [stdout] 148 | | )); [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] 144 ~ Ok(Token::new( [INFO] [stdout] 145 + token_type, [INFO] [stdout] 146 + &"".to_string(), [INFO] [stdout] 147 + &query[slice_start..slice_end].to_string(), [INFO] [stdout] 148 ~ )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/conditional.rs:89:13 [INFO] [stdout] | [INFO] [stdout] 89 | rs: match recurse_down( [INFO] [stdout] | _____________^ [INFO] [stdout] 90 | | tokens, [INFO] [stdout] 91 | | idx, [INFO] [stdout] 92 | | depth + 1, [INFO] [stdout] ... | [INFO] [stdout] 100 | | Err(msg) => return Err(msg), [INFO] [stdout] 101 | | }, [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] help: try instead [INFO] [stdout] | [INFO] [stdout] 89 ~ rs: recurse_down( [INFO] [stdout] 90 + tokens, [INFO] [stdout] 91 + idx, [INFO] [stdout] 92 + depth + 1, [INFO] [stdout] 93 + "OR".to_string(), [INFO] [stdout] 94 + finished, [INFO] [stdout] 95 + closing_paren, [INFO] [stdout] 96 + opened_paren, [INFO] [stdout] 97 + closing_or, [INFO] [stdout] 98 ~ )?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/conditional.rs:118:21 [INFO] [stdout] | [INFO] [stdout] 118 | rs: match recurse_down( [INFO] [stdout] | _____________________^ [INFO] [stdout] 119 | | tokens, [INFO] [stdout] 120 | | idx, [INFO] [stdout] 121 | | depth + 1, [INFO] [stdout] ... | [INFO] [stdout] 129 | | Err(msg) => return Err(msg), [INFO] [stdout] 130 | | }, [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] help: try instead [INFO] [stdout] | [INFO] [stdout] 118 ~ rs: recurse_down( [INFO] [stdout] 119 + tokens, [INFO] [stdout] 120 + idx, [INFO] [stdout] 121 + depth + 1, [INFO] [stdout] 122 + "AND".to_string(), [INFO] [stdout] 123 + finished, [INFO] [stdout] 124 + closing_paren, [INFO] [stdout] 125 + opened_paren, [INFO] [stdout] 126 + closing_or, [INFO] [stdout] 127 ~ )?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/lexer.rs:213:9 [INFO] [stdout] | [INFO] [stdout] 213 | / return Ok(Token::new( [INFO] [stdout] 214 | | token_type, [INFO] [stdout] 215 | | &literal, [INFO] [stdout] 216 | | &query[slice_start..slice_end].to_string(), [INFO] [stdout] 217 | | )); [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] 213 ~ Ok(Token::new( [INFO] [stdout] 214 + token_type, [INFO] [stdout] 215 + &literal, [INFO] [stdout] 216 + &query[slice_start..slice_end].to_string(), [INFO] [stdout] 217 ~ )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/language/lexer.rs:165:19 [INFO] [stdout] | [INFO] [stdout] 165 | } else if c.is_digit(10) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.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 `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/conditional.rs:148:21 [INFO] [stdout] | [INFO] [stdout] 148 | rs: match recurse_down( [INFO] [stdout] | _____________________^ [INFO] [stdout] 149 | | tokens, [INFO] [stdout] 150 | | idx, [INFO] [stdout] 151 | | depth + 1, [INFO] [stdout] ... | [INFO] [stdout] 159 | | Err(msg) => return Err(msg), [INFO] [stdout] 160 | | }, [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] help: try instead [INFO] [stdout] | [INFO] [stdout] 148 ~ rs: recurse_down( [INFO] [stdout] 149 + tokens, [INFO] [stdout] 150 + idx, [INFO] [stdout] 151 + depth + 1, [INFO] [stdout] 152 + "OR".to_string(), [INFO] [stdout] 153 + finished, [INFO] [stdout] 154 + closing_paren, [INFO] [stdout] 155 + opened_paren, [INFO] [stdout] 156 + closing_or, [INFO] [stdout] 157 ~ )?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/lexer.rs:166:52 [INFO] [stdout] | [INFO] [stdout] 166 | || (c == '-' && Lexer::peek_one(query, ¤t).is_some_and(|x: char| x.is_digit(10))) [INFO] [stdout] | ^^^^^^^^ help: change this to: `current` [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: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/language/lexer.rs:166:84 [INFO] [stdout] | [INFO] [stdout] 166 | || (c == '-' && Lexer::peek_one(query, ¤t).is_some_and(|x: char| x.is_digit(10))) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `x.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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/lexer.rs:171:51 [INFO] [stdout] | [INFO] [stdout] 171 | if c == '-' && Lexer::peek_one(query, ¤t).is_some_and(|x: char| x.is_digit(10)) { [INFO] [stdout] | ^^^^^^^^ help: change this to: `current` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/language/lexer.rs:171:83 [INFO] [stdout] | [INFO] [stdout] 171 | if c == '-' && Lexer::peek_one(query, ¤t).is_some_and(|x: char| x.is_digit(10)) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `x.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` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/conditional.rs:212:13 [INFO] [stdout] | [INFO] [stdout] 212 | ls: match recurse_down( [INFO] [stdout] | _____________^ [INFO] [stdout] 213 | | tokens, [INFO] [stdout] 214 | | idx, [INFO] [stdout] 215 | | depth + 1, [INFO] [stdout] ... | [INFO] [stdout] 223 | | Err(msg) => return Err(msg), [INFO] [stdout] 224 | | }, [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] help: try instead [INFO] [stdout] | [INFO] [stdout] 212 ~ ls: recurse_down( [INFO] [stdout] 213 + tokens, [INFO] [stdout] 214 + idx, [INFO] [stdout] 215 + depth + 1, [INFO] [stdout] 216 + "AND".to_string(), [INFO] [stdout] 217 + finished, [INFO] [stdout] 218 + closing_paren, [INFO] [stdout] 219 + opened_paren, [INFO] [stdout] 220 + closing_or, [INFO] [stdout] 221 ~ )?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/conditional.rs:225:13 [INFO] [stdout] | [INFO] [stdout] 225 | rs: match recurse_down( [INFO] [stdout] | _____________^ [INFO] [stdout] 226 | | tokens, [INFO] [stdout] 227 | | idx, [INFO] [stdout] 228 | | depth + 1, [INFO] [stdout] ... | [INFO] [stdout] 236 | | Err(msg) => return Err(msg), [INFO] [stdout] 237 | | }, [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] help: try instead [INFO] [stdout] | [INFO] [stdout] 225 ~ rs: recurse_down( [INFO] [stdout] 226 + tokens, [INFO] [stdout] 227 + idx, [INFO] [stdout] 228 + depth + 1, [INFO] [stdout] 229 + "AND".to_string(), [INFO] [stdout] 230 + finished, [INFO] [stdout] 231 + closing_paren, [INFO] [stdout] 232 + opened_paren, [INFO] [stdout] 233 + closing_or, [INFO] [stdout] 234 ~ )?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/lexer.rs:224:13 [INFO] [stdout] | [INFO] [stdout] 224 | return Lexer::handle_single_token(query, c, current); [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] 224 - return Lexer::handle_single_token(query, c, current); [INFO] [stdout] 224 + Lexer::handle_single_token(query, c, current) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:270:5 [INFO] [stdout] | [INFO] [stdout] 270 | / return Ok(ConditionChild::Op(Box::new(OperandNode { [INFO] [stdout] 271 | | op: "AND".to_string(), [INFO] [stdout] 272 | | _depth: depth, [INFO] [stdout] 273 | | ls, [INFO] [stdout] 274 | | rs, [INFO] [stdout] 275 | | }))); [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] 270 ~ Ok(ConditionChild::Op(Box::new(OperandNode { [INFO] [stdout] 271 + op: "AND".to_string(), [INFO] [stdout] 272 + _depth: depth, [INFO] [stdout] 273 + ls, [INFO] [stdout] 274 + rs, [INFO] [stdout] 275 ~ }))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/conditional.rs:251:9 [INFO] [stdout] | [INFO] [stdout] 251 | / match ExpressionNode::parse(tokens, idx, depth + 1) { [INFO] [stdout] 252 | | Ok(node) => node, [INFO] [stdout] 253 | | Err(msg) => return Err(msg), [INFO] [stdout] 254 | | }, [INFO] [stdout] | |_________^ help: try instead: `ExpressionNode::parse(tokens, idx, depth + 1)?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/conditional.rs:256:30 [INFO] [stdout] | [INFO] [stdout] 256 | let rs: ConditionChild = match recurse_down( [INFO] [stdout] | ______________________________^ [INFO] [stdout] 257 | | tokens, [INFO] [stdout] 258 | | idx, [INFO] [stdout] 259 | | depth + 1, [INFO] [stdout] ... | [INFO] [stdout] 267 | | Err(msg) => return Err(msg), [INFO] [stdout] 268 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] help: try instead [INFO] [stdout] | [INFO] [stdout] 256 ~ let rs: ConditionChild = recurse_down( [INFO] [stdout] 257 + tokens, [INFO] [stdout] 258 + idx, [INFO] [stdout] 259 + depth + 1, [INFO] [stdout] 260 + "AND".to_string(), [INFO] [stdout] 261 + finished, [INFO] [stdout] 262 + closing_paren, [INFO] [stdout] 263 + opened_paren, [INFO] [stdout] 264 + closing_or, [INFO] [stdout] 265 ~ )?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/lexer.rs:226:13 [INFO] [stdout] | [INFO] [stdout] 226 | return Lexer::handle_single_double_token(query, c, current); [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] 226 - return Lexer::handle_single_double_token(query, c, current); [INFO] [stdout] 226 + Lexer::handle_single_double_token(query, c, current) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/lexer.rs:228:13 [INFO] [stdout] | [INFO] [stdout] 228 | return Lexer::handle_default(query, c, current, start); [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] 228 - return Lexer::handle_default(query, c, current, start); [INFO] [stdout] 228 + Lexer::handle_default(query, c, current, start) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `token` after checking its variant with `is_err` [INFO] [stdout] --> src/language/lexer.rs:244:27 [INFO] [stdout] | [INFO] [stdout] 241 | if token.is_err() { [INFO] [stdout] | ----------------- help: try: `if let Ok() = token` [INFO] [stdout] ... [INFO] [stdout] 244 | toks.push(token.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/conditional.rs:295:18 [INFO] [stdout] | [INFO] [stdout] 295 | handle_close(&parent_node, depth) [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `parent_node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/conditional.rs:304:18 [INFO] [stdout] | [INFO] [stdout] 304 | handle_close(&parent_node, depth) [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `parent_node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/language/parser/conditional.rs:307:1 [INFO] [stdout] | [INFO] [stdout] 307 | / fn parse_child( [INFO] [stdout] 308 | | tokens: &Vec, [INFO] [stdout] 309 | | idx: &mut usize, [INFO] [stdout] 310 | | depth: u16, [INFO] [stdout] ... | [INFO] [stdout] 315 | | closing_or: &mut bool, [INFO] [stdout] 316 | | ) -> Result { [INFO] [stdout] | |___________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:320:13 [INFO] [stdout] | [INFO] [stdout] 320 | / return handle_and( [INFO] [stdout] 321 | | tokens, [INFO] [stdout] 322 | | idx, [INFO] [stdout] 323 | | depth, [INFO] [stdout] ... | [INFO] [stdout] 327 | | closing_or, [INFO] [stdout] 328 | | ); [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] 320 ~ handle_and( [INFO] [stdout] 321 + tokens, [INFO] [stdout] 322 + idx, [INFO] [stdout] 323 + depth, [INFO] [stdout] 324 + finished, [INFO] [stdout] 325 + closing_paren, [INFO] [stdout] 326 + opened_paren, [INFO] [stdout] 327 + closing_or, [INFO] [stdout] 328 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:332:13 [INFO] [stdout] | [INFO] [stdout] 332 | return Ok(handle_or(closing_or, &parent_node, depth)); [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] 332 - return Ok(handle_or(closing_or, &parent_node, depth)); [INFO] [stdout] 332 + Ok(handle_or(closing_or, &parent_node, depth)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:337:13 [INFO] [stdout] | [INFO] [stdout] 337 | / return handle_open_paren( [INFO] [stdout] 338 | | tokens, [INFO] [stdout] 339 | | idx, [INFO] [stdout] 340 | | depth, [INFO] [stdout] ... | [INFO] [stdout] 344 | | closing_or, [INFO] [stdout] 345 | | ); [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] 337 ~ handle_open_paren( [INFO] [stdout] 338 + tokens, [INFO] [stdout] 339 + idx, [INFO] [stdout] 340 + depth, [INFO] [stdout] 341 + finished, [INFO] [stdout] 342 + closing_paren, [INFO] [stdout] 343 + opened_paren, [INFO] [stdout] 344 + closing_or, [INFO] [stdout] 345 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:357:13 [INFO] [stdout] | [INFO] [stdout] 357 | return Ok(handle_close_paren(closing_paren, &parent_node, depth)); [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] 357 - return Ok(handle_close_paren(closing_paren, &parent_node, depth)); [INFO] [stdout] 357 + Ok(handle_close_paren(closing_paren, &parent_node, depth)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:368:13 [INFO] [stdout] | [INFO] [stdout] 368 | return Ok(handle_close(&parent_node, depth)); [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] 368 - return Ok(handle_close(&parent_node, depth)); [INFO] [stdout] 368 + Ok(handle_close(&parent_node, depth)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:379:13 [INFO] [stdout] | [INFO] [stdout] 379 | return Ok(handle_close(&parent_node, depth)); [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] 379 - return Ok(handle_close(&parent_node, depth)); [INFO] [stdout] 379 + Ok(handle_close(&parent_node, depth)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:382:13 [INFO] [stdout] | [INFO] [stdout] 382 | / return handle_literal( [INFO] [stdout] 383 | | tokens, [INFO] [stdout] 384 | | idx, [INFO] [stdout] 385 | | depth, [INFO] [stdout] ... | [INFO] [stdout] 389 | | closing_or, [INFO] [stdout] 390 | | ); [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] 382 ~ handle_literal( [INFO] [stdout] 383 + tokens, [INFO] [stdout] 384 + idx, [INFO] [stdout] 385 + depth, [INFO] [stdout] 386 + finished, [INFO] [stdout] 387 + closing_paren, [INFO] [stdout] 388 + opened_paren, [INFO] [stdout] 389 + closing_or, [INFO] [stdout] 390 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:393:13 [INFO] [stdout] | [INFO] [stdout] 393 | / return Err(format!( [INFO] [stdout] 394 | | "Unexpected token found while parsing conditional expression -> {}", [INFO] [stdout] 395 | | tokens[*idx].lexeme [INFO] [stdout] 396 | | )); [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] 393 ~ Err(format!( [INFO] [stdout] 394 + "Unexpected token found while parsing conditional expression -> {}", [INFO] [stdout] 395 + tokens[*idx].lexeme [INFO] [stdout] 396 ~ )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/language/parser/conditional.rs:51:44 [INFO] [stdout] | [INFO] [stdout] 51 | fn update_depths(node: &mut ConditionChild) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:57:13 [INFO] [stdout] | [INFO] [stdout] 57 | return; [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] 56 - update_depths(&mut state.rs); [INFO] [stdout] 57 - return; [INFO] [stdout] 56 + update_depths(&mut state.rs); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/language/parser/conditional.rs:401:1 [INFO] [stdout] | [INFO] [stdout] 401 | / fn recurse_down( [INFO] [stdout] 402 | | tokens: &Vec, [INFO] [stdout] 403 | | idx: &mut usize, [INFO] [stdout] 404 | | depth: u16, [INFO] [stdout] ... | [INFO] [stdout] 409 | | closing_or: &mut bool, [INFO] [stdout] 410 | | ) -> Result { [INFO] [stdout] | |___________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:115:13 [INFO] [stdout] | [INFO] [stdout] 115 | / return Ok(ConditionChild::Op(Box::new(OperandNode { [INFO] [stdout] 116 | | op: "AND".to_string(), [INFO] [stdout] 117 | | ls: ret, [INFO] [stdout] 118 | | rs: match recurse_down( [INFO] [stdout] ... | [INFO] [stdout] 132 | | _depth: depth, [INFO] [stdout] 133 | | }))); [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] 115 ~ Ok(ConditionChild::Op(Box::new(OperandNode { [INFO] [stdout] 116 + op: "AND".to_string(), [INFO] [stdout] 117 + ls: ret, [INFO] [stdout] 118 + rs: match recurse_down( [INFO] [stdout] 119 + tokens, [INFO] [stdout] 120 + idx, [INFO] [stdout] 121 + depth + 1, [INFO] [stdout] 122 + "AND".to_string(), [INFO] [stdout] 123 + finished, [INFO] [stdout] 124 + closing_paren, [INFO] [stdout] 125 + opened_paren, [INFO] [stdout] 126 + closing_or, [INFO] [stdout] 127 + ) { [INFO] [stdout] 128 + Ok(node) => node, [INFO] [stdout] 129 + Err(msg) => return Err(msg), [INFO] [stdout] 130 + }, [INFO] [stdout] 131 + [INFO] [stdout] 132 + _depth: depth, [INFO] [stdout] 133 ~ }))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:461:5 [INFO] [stdout] | [INFO] [stdout] 461 | / return parse_child( [INFO] [stdout] 462 | | tokens, [INFO] [stdout] 463 | | idx, [INFO] [stdout] 464 | | depth, [INFO] [stdout] ... | [INFO] [stdout] 469 | | closing_or, [INFO] [stdout] 470 | | ); [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] 461 ~ parse_child( [INFO] [stdout] 462 + tokens, [INFO] [stdout] 463 + idx, [INFO] [stdout] 464 + depth, [INFO] [stdout] 465 + parent_node, [INFO] [stdout] 466 + finished, [INFO] [stdout] 467 + closing_paren, [INFO] [stdout] 468 + opened_paren, [INFO] [stdout] 469 + closing_or, [INFO] [stdout] 470 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:145:13 [INFO] [stdout] | [INFO] [stdout] 145 | / return Ok(ConditionChild::Op(Box::new(OperandNode { [INFO] [stdout] 146 | | op: "OR".to_string(), [INFO] [stdout] 147 | | ls: ret, [INFO] [stdout] 148 | | rs: match recurse_down( [INFO] [stdout] ... | [INFO] [stdout] 162 | | _depth: depth, [INFO] [stdout] 163 | | }))); [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] 145 ~ Ok(ConditionChild::Op(Box::new(OperandNode { [INFO] [stdout] 146 + op: "OR".to_string(), [INFO] [stdout] 147 + ls: ret, [INFO] [stdout] 148 + rs: match recurse_down( [INFO] [stdout] 149 + tokens, [INFO] [stdout] 150 + idx, [INFO] [stdout] 151 + depth + 1, [INFO] [stdout] 152 + "OR".to_string(), [INFO] [stdout] 153 + finished, [INFO] [stdout] 154 + closing_paren, [INFO] [stdout] 155 + opened_paren, [INFO] [stdout] 156 + closing_or, [INFO] [stdout] 157 + ) { [INFO] [stdout] 158 + Ok(node) => node, [INFO] [stdout] 159 + Err(msg) => return Err(msg), [INFO] [stdout] 160 + }, [INFO] [stdout] 161 + [INFO] [stdout] 162 + _depth: depth, [INFO] [stdout] 163 ~ }))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:175:13 [INFO] [stdout] | [INFO] [stdout] 175 | return Ok(ret); [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] 175 - return Ok(ret); [INFO] [stdout] 175 + Ok(ret) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:181:13 [INFO] [stdout] | [INFO] [stdout] 181 | return Ok(ret); [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] 181 - return Ok(ret); [INFO] [stdout] 181 + Ok(ret) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:187:13 [INFO] [stdout] | [INFO] [stdout] 187 | return Ok(ret); [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] 187 - return Ok(ret); [INFO] [stdout] 187 + Ok(ret) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/conditional.rs:429:21 [INFO] [stdout] | [INFO] [stdout] 429 | ls: match recurse_down( [INFO] [stdout] | _____________________^ [INFO] [stdout] 430 | | tokens, [INFO] [stdout] 431 | | idx, [INFO] [stdout] 432 | | depth + 1, [INFO] [stdout] ... | [INFO] [stdout] 440 | | Err(msg) => return Err(msg), [INFO] [stdout] 441 | | }, [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] help: try instead [INFO] [stdout] | [INFO] [stdout] 429 ~ ls: recurse_down( [INFO] [stdout] 430 + tokens, [INFO] [stdout] 431 + idx, [INFO] [stdout] 432 + depth + 1, [INFO] [stdout] 433 + "OR".to_string(), [INFO] [stdout] 434 + finished, [INFO] [stdout] 435 + closing_paren, [INFO] [stdout] 436 + opened_paren, [INFO] [stdout] 437 + closing_or, [INFO] [stdout] 438 ~ )?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:190:13 [INFO] [stdout] | [INFO] [stdout] 190 | / return Err(format!( [INFO] [stdout] 191 | | "Something went wrong parsing a nested conditional: Expected a closing parentheses, \ [INFO] [stdout] 192 | | post-processor entrance, end-of-query, 'and' or 'or', \ [INFO] [stdout] 193 | | but got '{}' instead.", [INFO] [stdout] 194 | | tokens[*idx].lexeme [INFO] [stdout] 195 | | )); [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] 190 ~ Err(format!( [INFO] [stdout] 191 + "Something went wrong parsing a nested conditional: Expected a closing parentheses, \ [INFO] [stdout] 192 + post-processor entrance, end-of-query, 'and' or 'or', \ [INFO] [stdout] 193 + but got '{}' instead.", [INFO] [stdout] 194 + tokens[*idx].lexeme [INFO] [stdout] 195 ~ )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/conditional.rs:76:13 [INFO] [stdout] | [INFO] [stdout] 76 | ls: match recurse_down( [INFO] [stdout] | _____________^ [INFO] [stdout] 77 | | tokens, [INFO] [stdout] 78 | | idx, [INFO] [stdout] 79 | | depth + 1, [INFO] [stdout] ... | [INFO] [stdout] 87 | | Err(msg) => return Err(msg), [INFO] [stdout] 88 | | }, [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] help: try instead [INFO] [stdout] | [INFO] [stdout] 76 ~ ls: recurse_down( [INFO] [stdout] 77 + tokens, [INFO] [stdout] 78 + idx, [INFO] [stdout] 79 + depth + 1, [INFO] [stdout] 80 + "OR".to_string(), [INFO] [stdout] 81 + finished, [INFO] [stdout] 82 + closing_paren, [INFO] [stdout] 83 + opened_paren, [INFO] [stdout] 84 + closing_or, [INFO] [stdout] 85 ~ )?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/conditional.rs:442:21 [INFO] [stdout] | [INFO] [stdout] 442 | rs: match recurse_down( [INFO] [stdout] | _____________________^ [INFO] [stdout] 443 | | tokens, [INFO] [stdout] 444 | | idx, [INFO] [stdout] 445 | | depth + 1, [INFO] [stdout] ... | [INFO] [stdout] 453 | | Err(msg) => return Err(msg), [INFO] [stdout] 454 | | }, [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] help: try instead [INFO] [stdout] | [INFO] [stdout] 442 ~ rs: recurse_down( [INFO] [stdout] 443 + tokens, [INFO] [stdout] 444 + idx, [INFO] [stdout] 445 + depth + 1, [INFO] [stdout] 446 + "OR".to_string(), [INFO] [stdout] 447 + finished, [INFO] [stdout] 448 + closing_paren, [INFO] [stdout] 449 + opened_paren, [INFO] [stdout] 450 + closing_or, [INFO] [stdout] 451 ~ )?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/conditional.rs:89:13 [INFO] [stdout] | [INFO] [stdout] 89 | rs: match recurse_down( [INFO] [stdout] | _____________^ [INFO] [stdout] 90 | | tokens, [INFO] [stdout] 91 | | idx, [INFO] [stdout] 92 | | depth + 1, [INFO] [stdout] ... | [INFO] [stdout] 100 | | Err(msg) => return Err(msg), [INFO] [stdout] 101 | | }, [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] help: try instead [INFO] [stdout] | [INFO] [stdout] 89 ~ rs: recurse_down( [INFO] [stdout] 90 + tokens, [INFO] [stdout] 91 + idx, [INFO] [stdout] 92 + depth + 1, [INFO] [stdout] 93 + "OR".to_string(), [INFO] [stdout] 94 + finished, [INFO] [stdout] 95 + closing_paren, [INFO] [stdout] 96 + opened_paren, [INFO] [stdout] 97 + closing_or, [INFO] [stdout] 98 ~ )?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/language/parser/conditional.rs:476:36 [INFO] [stdout] | [INFO] [stdout] 476 | fn reconstruct_literal(tokens: &Vec, start_idx: usize, end_idx: usize) -> String { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 476 - fn reconstruct_literal(tokens: &Vec, start_idx: usize, end_idx: usize) -> String { [INFO] [stdout] 476 + fn reconstruct_literal(tokens: &[Token], start_idx: usize, end_idx: usize) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/conditional.rs:118:21 [INFO] [stdout] | [INFO] [stdout] 118 | rs: match recurse_down( [INFO] [stdout] | _____________________^ [INFO] [stdout] 119 | | tokens, [INFO] [stdout] 120 | | idx, [INFO] [stdout] 121 | | depth + 1, [INFO] [stdout] ... | [INFO] [stdout] 129 | | Err(msg) => return Err(msg), [INFO] [stdout] 130 | | }, [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] help: try instead [INFO] [stdout] | [INFO] [stdout] 118 ~ rs: recurse_down( [INFO] [stdout] 119 + tokens, [INFO] [stdout] 120 + idx, [INFO] [stdout] 121 + depth + 1, [INFO] [stdout] 122 + "AND".to_string(), [INFO] [stdout] 123 + finished, [INFO] [stdout] 124 + closing_paren, [INFO] [stdout] 125 + opened_paren, [INFO] [stdout] 126 + closing_or, [INFO] [stdout] 127 ~ )?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/conditional.rs:148:21 [INFO] [stdout] | [INFO] [stdout] 148 | rs: match recurse_down( [INFO] [stdout] | _____________________^ [INFO] [stdout] 149 | | tokens, [INFO] [stdout] 150 | | idx, [INFO] [stdout] 151 | | depth + 1, [INFO] [stdout] ... | [INFO] [stdout] 159 | | Err(msg) => return Err(msg), [INFO] [stdout] 160 | | }, [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] help: try instead [INFO] [stdout] | [INFO] [stdout] 148 ~ rs: recurse_down( [INFO] [stdout] 149 + tokens, [INFO] [stdout] 150 + idx, [INFO] [stdout] 151 + depth + 1, [INFO] [stdout] 152 + "OR".to_string(), [INFO] [stdout] 153 + finished, [INFO] [stdout] 154 + closing_paren, [INFO] [stdout] 155 + opened_paren, [INFO] [stdout] 156 + closing_or, [INFO] [stdout] 157 ~ )?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:569:9 [INFO] [stdout] | [INFO] [stdout] 569 | / return Ok(ConditionNode { [INFO] [stdout] 570 | | condition: ret, [INFO] [stdout] 571 | | _depth: depth, [INFO] [stdout] 572 | | literal: ConditionNode::reconstruct_literal(tokens, start_idx, *idx), [INFO] [stdout] 573 | | }); [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] 569 ~ Ok(ConditionNode { [INFO] [stdout] 570 + condition: ret, [INFO] [stdout] 571 + _depth: depth, [INFO] [stdout] 572 + literal: ConditionNode::reconstruct_literal(tokens, start_idx, *idx), [INFO] [stdout] 573 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/conditional.rs:537:17 [INFO] [stdout] | [INFO] [stdout] 537 | ls: match recurse_down( [INFO] [stdout] | _________________^ [INFO] [stdout] 538 | | tokens, [INFO] [stdout] 539 | | idx, [INFO] [stdout] 540 | | depth + 2, [INFO] [stdout] ... | [INFO] [stdout] 548 | | Err(msg) => return Err(msg), [INFO] [stdout] 549 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] help: try instead [INFO] [stdout] | [INFO] [stdout] 537 ~ ls: recurse_down( [INFO] [stdout] 538 + tokens, [INFO] [stdout] 539 + idx, [INFO] [stdout] 540 + depth + 2, [INFO] [stdout] 541 + "OR".to_string(), [INFO] [stdout] 542 + &mut finished, [INFO] [stdout] 543 + &mut closing_paren, [INFO] [stdout] 544 + &mut opened_paren, [INFO] [stdout] 545 + &mut closing_or, [INFO] [stdout] 546 ~ )?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/conditional.rs:212:13 [INFO] [stdout] | [INFO] [stdout] 212 | ls: match recurse_down( [INFO] [stdout] | _____________^ [INFO] [stdout] 213 | | tokens, [INFO] [stdout] 214 | | idx, [INFO] [stdout] 215 | | depth + 1, [INFO] [stdout] ... | [INFO] [stdout] 223 | | Err(msg) => return Err(msg), [INFO] [stdout] 224 | | }, [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] help: try instead [INFO] [stdout] | [INFO] [stdout] 212 ~ ls: recurse_down( [INFO] [stdout] 213 + tokens, [INFO] [stdout] 214 + idx, [INFO] [stdout] 215 + depth + 1, [INFO] [stdout] 216 + "AND".to_string(), [INFO] [stdout] 217 + finished, [INFO] [stdout] 218 + closing_paren, [INFO] [stdout] 219 + opened_paren, [INFO] [stdout] 220 + closing_or, [INFO] [stdout] 221 ~ )?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/conditional.rs:225:13 [INFO] [stdout] | [INFO] [stdout] 225 | rs: match recurse_down( [INFO] [stdout] | _____________^ [INFO] [stdout] 226 | | tokens, [INFO] [stdout] 227 | | idx, [INFO] [stdout] 228 | | depth + 1, [INFO] [stdout] ... | [INFO] [stdout] 236 | | Err(msg) => return Err(msg), [INFO] [stdout] 237 | | }, [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] help: try instead [INFO] [stdout] | [INFO] [stdout] 225 ~ rs: recurse_down( [INFO] [stdout] 226 + tokens, [INFO] [stdout] 227 + idx, [INFO] [stdout] 228 + depth + 1, [INFO] [stdout] 229 + "AND".to_string(), [INFO] [stdout] 230 + finished, [INFO] [stdout] 231 + closing_paren, [INFO] [stdout] 232 + opened_paren, [INFO] [stdout] 233 + closing_or, [INFO] [stdout] 234 ~ )?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/conditional.rs:550:17 [INFO] [stdout] | [INFO] [stdout] 550 | rs: match recurse_down( [INFO] [stdout] | _________________^ [INFO] [stdout] 551 | | tokens, [INFO] [stdout] 552 | | idx, [INFO] [stdout] 553 | | depth + 2, [INFO] [stdout] ... | [INFO] [stdout] 561 | | Err(msg) => return Err(msg), [INFO] [stdout] 562 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] help: try instead [INFO] [stdout] | [INFO] [stdout] 550 ~ rs: recurse_down( [INFO] [stdout] 551 + tokens, [INFO] [stdout] 552 + idx, [INFO] [stdout] 553 + depth + 2, [INFO] [stdout] 554 + "OR".to_string(), [INFO] [stdout] 555 + &mut finished, [INFO] [stdout] 556 + &mut closing_paren, [INFO] [stdout] 557 + &mut opened_paren, [INFO] [stdout] 558 + &mut closing_or, [INFO] [stdout] 559 ~ )?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:270:5 [INFO] [stdout] | [INFO] [stdout] 270 | / return Ok(ConditionChild::Op(Box::new(OperandNode { [INFO] [stdout] 271 | | op: "AND".to_string(), [INFO] [stdout] 272 | | _depth: depth, [INFO] [stdout] 273 | | ls, [INFO] [stdout] 274 | | rs, [INFO] [stdout] 275 | | }))); [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] 270 ~ Ok(ConditionChild::Op(Box::new(OperandNode { [INFO] [stdout] 271 + op: "AND".to_string(), [INFO] [stdout] 272 + _depth: depth, [INFO] [stdout] 273 + ls, [INFO] [stdout] 274 + rs, [INFO] [stdout] 275 ~ }))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/conditional.rs:251:9 [INFO] [stdout] | [INFO] [stdout] 251 | / match ExpressionNode::parse(tokens, idx, depth + 1) { [INFO] [stdout] 252 | | Ok(node) => node, [INFO] [stdout] 253 | | Err(msg) => return Err(msg), [INFO] [stdout] 254 | | }, [INFO] [stdout] | |_________^ help: try instead: `ExpressionNode::parse(tokens, idx, depth + 1)?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/language/parser/conditional.rs:580:9 [INFO] [stdout] | [INFO] [stdout] 580 | format!("{}", self.literal) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `self.literal.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: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/conditional.rs:256:30 [INFO] [stdout] | [INFO] [stdout] 256 | let rs: ConditionChild = match recurse_down( [INFO] [stdout] | ______________________________^ [INFO] [stdout] 257 | | tokens, [INFO] [stdout] 258 | | idx, [INFO] [stdout] 259 | | depth + 1, [INFO] [stdout] ... | [INFO] [stdout] 267 | | Err(msg) => return Err(msg), [INFO] [stdout] 268 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] help: try instead [INFO] [stdout] | [INFO] [stdout] 256 ~ let rs: ConditionChild = recurse_down( [INFO] [stdout] 257 + tokens, [INFO] [stdout] 258 + idx, [INFO] [stdout] 259 + depth + 1, [INFO] [stdout] 260 + "AND".to_string(), [INFO] [stdout] 261 + finished, [INFO] [stdout] 262 + closing_paren, [INFO] [stdout] 263 + opened_paren, [INFO] [stdout] 264 + closing_or, [INFO] [stdout] 265 ~ )?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/language/parser/conditional.rs:585:9 [INFO] [stdout] | [INFO] [stdout] 585 | format!("{}", self.literal) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `self.literal.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] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:635:9 [INFO] [stdout] | [INFO] [stdout] 635 | / return Ok(ExpressionNode { [INFO] [stdout] 636 | | identifier, [INFO] [stdout] 637 | | comparison_operator, [INFO] [stdout] 638 | | literal, [INFO] [stdout] 639 | | [INFO] [stdout] 640 | | _depth: depth, [INFO] [stdout] 641 | | }); [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] 635 ~ Ok(ExpressionNode { [INFO] [stdout] 636 + identifier, [INFO] [stdout] 637 + comparison_operator, [INFO] [stdout] 638 + literal, [INFO] [stdout] 639 + [INFO] [stdout] 640 + _depth: depth, [INFO] [stdout] 641 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/conditional.rs:295:18 [INFO] [stdout] | [INFO] [stdout] 295 | handle_close(&parent_node, depth) [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `parent_node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/conditional.rs:304:18 [INFO] [stdout] | [INFO] [stdout] 304 | handle_close(&parent_node, depth) [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `parent_node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/language/parser/conditional.rs:307:1 [INFO] [stdout] | [INFO] [stdout] 307 | / fn parse_child( [INFO] [stdout] 308 | | tokens: &Vec, [INFO] [stdout] 309 | | idx: &mut usize, [INFO] [stdout] 310 | | depth: u16, [INFO] [stdout] ... | [INFO] [stdout] 315 | | closing_or: &mut bool, [INFO] [stdout] 316 | | ) -> Result { [INFO] [stdout] | |___________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:320:13 [INFO] [stdout] | [INFO] [stdout] 320 | / return handle_and( [INFO] [stdout] 321 | | tokens, [INFO] [stdout] 322 | | idx, [INFO] [stdout] 323 | | depth, [INFO] [stdout] ... | [INFO] [stdout] 327 | | closing_or, [INFO] [stdout] 328 | | ); [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] 320 ~ handle_and( [INFO] [stdout] 321 + tokens, [INFO] [stdout] 322 + idx, [INFO] [stdout] 323 + depth, [INFO] [stdout] 324 + finished, [INFO] [stdout] 325 + closing_paren, [INFO] [stdout] 326 + opened_paren, [INFO] [stdout] 327 + closing_or, [INFO] [stdout] 328 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:332:13 [INFO] [stdout] | [INFO] [stdout] 332 | return Ok(handle_or(closing_or, &parent_node, depth)); [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] 332 - return Ok(handle_or(closing_or, &parent_node, depth)); [INFO] [stdout] 332 + Ok(handle_or(closing_or, &parent_node, depth)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:337:13 [INFO] [stdout] | [INFO] [stdout] 337 | / return handle_open_paren( [INFO] [stdout] 338 | | tokens, [INFO] [stdout] 339 | | idx, [INFO] [stdout] 340 | | depth, [INFO] [stdout] ... | [INFO] [stdout] 344 | | closing_or, [INFO] [stdout] 345 | | ); [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] 337 ~ handle_open_paren( [INFO] [stdout] 338 + tokens, [INFO] [stdout] 339 + idx, [INFO] [stdout] 340 + depth, [INFO] [stdout] 341 + finished, [INFO] [stdout] 342 + closing_paren, [INFO] [stdout] 343 + opened_paren, [INFO] [stdout] 344 + closing_or, [INFO] [stdout] 345 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:357:13 [INFO] [stdout] | [INFO] [stdout] 357 | return Ok(handle_close_paren(closing_paren, &parent_node, depth)); [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] 357 - return Ok(handle_close_paren(closing_paren, &parent_node, depth)); [INFO] [stdout] 357 + Ok(handle_close_paren(closing_paren, &parent_node, depth)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:368:13 [INFO] [stdout] | [INFO] [stdout] 368 | return Ok(handle_close(&parent_node, depth)); [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] 368 - return Ok(handle_close(&parent_node, depth)); [INFO] [stdout] 368 + Ok(handle_close(&parent_node, depth)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:379:13 [INFO] [stdout] | [INFO] [stdout] 379 | return Ok(handle_close(&parent_node, depth)); [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] 379 - return Ok(handle_close(&parent_node, depth)); [INFO] [stdout] 379 + Ok(handle_close(&parent_node, depth)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:382:13 [INFO] [stdout] | [INFO] [stdout] 382 | / return handle_literal( [INFO] [stdout] 383 | | tokens, [INFO] [stdout] 384 | | idx, [INFO] [stdout] 385 | | depth, [INFO] [stdout] ... | [INFO] [stdout] 389 | | closing_or, [INFO] [stdout] 390 | | ); [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] 382 ~ handle_literal( [INFO] [stdout] 383 + tokens, [INFO] [stdout] 384 + idx, [INFO] [stdout] 385 + depth, [INFO] [stdout] 386 + finished, [INFO] [stdout] 387 + closing_paren, [INFO] [stdout] 388 + opened_paren, [INFO] [stdout] 389 + closing_or, [INFO] [stdout] 390 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:393:13 [INFO] [stdout] | [INFO] [stdout] 393 | / return Err(format!( [INFO] [stdout] 394 | | "Unexpected token found while parsing conditional expression -> {}", [INFO] [stdout] 395 | | tokens[*idx].lexeme [INFO] [stdout] 396 | | )); [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] 393 ~ Err(format!( [INFO] [stdout] 394 + "Unexpected token found while parsing conditional expression -> {}", [INFO] [stdout] 395 + tokens[*idx].lexeme [INFO] [stdout] 396 ~ )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/language/parser/conditional.rs:401:1 [INFO] [stdout] | [INFO] [stdout] 401 | / fn recurse_down( [INFO] [stdout] 402 | | tokens: &Vec, [INFO] [stdout] 403 | | idx: &mut usize, [INFO] [stdout] 404 | | depth: u16, [INFO] [stdout] ... | [INFO] [stdout] 409 | | closing_or: &mut bool, [INFO] [stdout] 410 | | ) -> Result { [INFO] [stdout] | |___________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:461:5 [INFO] [stdout] | [INFO] [stdout] 461 | / return parse_child( [INFO] [stdout] 462 | | tokens, [INFO] [stdout] 463 | | idx, [INFO] [stdout] 464 | | depth, [INFO] [stdout] ... | [INFO] [stdout] 469 | | closing_or, [INFO] [stdout] 470 | | ); [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] 461 ~ parse_child( [INFO] [stdout] 462 + tokens, [INFO] [stdout] 463 + idx, [INFO] [stdout] 464 + depth, [INFO] [stdout] 465 + parent_node, [INFO] [stdout] 466 + finished, [INFO] [stdout] 467 + closing_paren, [INFO] [stdout] 468 + opened_paren, [INFO] [stdout] 469 + closing_or, [INFO] [stdout] 470 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/conditional.rs:429:21 [INFO] [stdout] | [INFO] [stdout] 429 | ls: match recurse_down( [INFO] [stdout] | _____________________^ [INFO] [stdout] 430 | | tokens, [INFO] [stdout] 431 | | idx, [INFO] [stdout] 432 | | depth + 1, [INFO] [stdout] ... | [INFO] [stdout] 440 | | Err(msg) => return Err(msg), [INFO] [stdout] 441 | | }, [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] help: try instead [INFO] [stdout] | [INFO] [stdout] 429 ~ ls: recurse_down( [INFO] [stdout] 430 + tokens, [INFO] [stdout] 431 + idx, [INFO] [stdout] 432 + depth + 1, [INFO] [stdout] 433 + "OR".to_string(), [INFO] [stdout] 434 + finished, [INFO] [stdout] 435 + closing_paren, [INFO] [stdout] 436 + opened_paren, [INFO] [stdout] 437 + closing_or, [INFO] [stdout] 438 ~ )?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/conditional.rs:442:21 [INFO] [stdout] | [INFO] [stdout] 442 | rs: match recurse_down( [INFO] [stdout] | _____________________^ [INFO] [stdout] 443 | | tokens, [INFO] [stdout] 444 | | idx, [INFO] [stdout] 445 | | depth + 1, [INFO] [stdout] ... | [INFO] [stdout] 453 | | Err(msg) => return Err(msg), [INFO] [stdout] 454 | | }, [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] help: try instead [INFO] [stdout] | [INFO] [stdout] 442 ~ rs: recurse_down( [INFO] [stdout] 443 + tokens, [INFO] [stdout] 444 + idx, [INFO] [stdout] 445 + depth + 1, [INFO] [stdout] 446 + "OR".to_string(), [INFO] [stdout] 447 + finished, [INFO] [stdout] 448 + closing_paren, [INFO] [stdout] 449 + opened_paren, [INFO] [stdout] 450 + closing_or, [INFO] [stdout] 451 ~ )?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/language/parser/conditional.rs:733:25 [INFO] [stdout] | [INFO] [stdout] 733 | Err(err) => assert!(false, "Output errored out -> {}", err), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] = note: `#[warn(clippy::assertions_on_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/language/parser/conditional.rs:476:36 [INFO] [stdout] | [INFO] [stdout] 476 | fn reconstruct_literal(tokens: &Vec, start_idx: usize, end_idx: usize) -> String { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 476 - fn reconstruct_literal(tokens: &Vec, start_idx: usize, end_idx: usize) -> String { [INFO] [stdout] 476 + fn reconstruct_literal(tokens: &[Token], start_idx: usize, end_idx: usize) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/language/parser/conditional.rs:749:25 [INFO] [stdout] | [INFO] [stdout] 749 | Ok(_val) => assert!(false, "Output expected to error!"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> src/language/parser/conditional.rs:750:25 [INFO] [stdout] | [INFO] [stdout] 750 | Err(err) => assert!(true, "Output errored out -> {}", err), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:569:9 [INFO] [stdout] | [INFO] [stdout] 569 | / return Ok(ConditionNode { [INFO] [stdout] 570 | | condition: ret, [INFO] [stdout] 571 | | _depth: depth, [INFO] [stdout] 572 | | literal: ConditionNode::reconstruct_literal(tokens, start_idx, *idx), [INFO] [stdout] 573 | | }); [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] 569 ~ Ok(ConditionNode { [INFO] [stdout] 570 + condition: ret, [INFO] [stdout] 571 + _depth: depth, [INFO] [stdout] 572 + literal: ConditionNode::reconstruct_literal(tokens, start_idx, *idx), [INFO] [stdout] 573 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/language/parser/database.rs:19:16 [INFO] [stdout] | [INFO] [stdout] 19 | use std::{fmt, usize}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/conditional.rs:537:17 [INFO] [stdout] | [INFO] [stdout] 537 | ls: match recurse_down( [INFO] [stdout] | _________________^ [INFO] [stdout] 538 | | tokens, [INFO] [stdout] 539 | | idx, [INFO] [stdout] 540 | | depth + 2, [INFO] [stdout] ... | [INFO] [stdout] 548 | | Err(msg) => return Err(msg), [INFO] [stdout] 549 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] help: try instead [INFO] [stdout] | [INFO] [stdout] 537 ~ ls: recurse_down( [INFO] [stdout] 538 + tokens, [INFO] [stdout] 539 + idx, [INFO] [stdout] 540 + depth + 2, [INFO] [stdout] 541 + "OR".to_string(), [INFO] [stdout] 542 + &mut finished, [INFO] [stdout] 543 + &mut closing_paren, [INFO] [stdout] 544 + &mut opened_paren, [INFO] [stdout] 545 + &mut closing_or, [INFO] [stdout] 546 ~ )?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/conditional.rs:550:17 [INFO] [stdout] | [INFO] [stdout] 550 | rs: match recurse_down( [INFO] [stdout] | _________________^ [INFO] [stdout] 551 | | tokens, [INFO] [stdout] 552 | | idx, [INFO] [stdout] 553 | | depth + 2, [INFO] [stdout] ... | [INFO] [stdout] 561 | | Err(msg) => return Err(msg), [INFO] [stdout] 562 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] help: try instead [INFO] [stdout] | [INFO] [stdout] 550 ~ rs: recurse_down( [INFO] [stdout] 551 + tokens, [INFO] [stdout] 552 + idx, [INFO] [stdout] 553 + depth + 2, [INFO] [stdout] 554 + "OR".to_string(), [INFO] [stdout] 555 + &mut finished, [INFO] [stdout] 556 + &mut closing_paren, [INFO] [stdout] 557 + &mut opened_paren, [INFO] [stdout] 558 + &mut closing_or, [INFO] [stdout] 559 ~ )?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/language/parser/conditional.rs:580:9 [INFO] [stdout] | [INFO] [stdout] 580 | format!("{}", self.literal) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `self.literal.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: useless use of `format!` [INFO] [stdout] --> src/language/parser/conditional.rs:585:9 [INFO] [stdout] | [INFO] [stdout] 585 | format!("{}", self.literal) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `self.literal.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] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/database.rs:129:9 [INFO] [stdout] | [INFO] [stdout] 129 | return Ok(database_node); [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] 129 - return Ok(database_node); [INFO] [stdout] 129 + Ok(database_node) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/conditional.rs:635:9 [INFO] [stdout] | [INFO] [stdout] 635 | / return Ok(ExpressionNode { [INFO] [stdout] 636 | | identifier, [INFO] [stdout] 637 | | comparison_operator, [INFO] [stdout] 638 | | literal, [INFO] [stdout] 639 | | [INFO] [stdout] 640 | | _depth: depth, [INFO] [stdout] 641 | | }); [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] 635 ~ Ok(ExpressionNode { [INFO] [stdout] 636 + identifier, [INFO] [stdout] 637 + comparison_operator, [INFO] [stdout] 638 + literal, [INFO] [stdout] 639 + [INFO] [stdout] 640 + _depth: depth, [INFO] [stdout] 641 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: immediately dereferencing a reference [INFO] [stdout] --> src/language/parser/database.rs:147:22 [INFO] [stdout] | [INFO] [stdout] 147 | + if *&pair.1.0.len() != 0 { &" " } else { "" } [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `pair.1.0.len()` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/database.rs:147:46 [INFO] [stdout] | [INFO] [stdout] 147 | + if *&pair.1.0.len() != 0 { &" " } else { "" } [INFO] [stdout] | ^^^^ help: change this to: `" "` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/language/parser/database.rs:19:16 [INFO] [stdout] | [INFO] [stdout] 19 | use std::{fmt, usize}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/database.rs:182:9 [INFO] [stdout] | [INFO] [stdout] 182 | / return Ok(CreateNode { [INFO] [stdout] 183 | | name: tokens[*idx - 1].literal.clone(), [INFO] [stdout] 184 | | [INFO] [stdout] 185 | | _literal: tokens[*idx - 1].lexeme.clone(), [INFO] [stdout] 186 | | _depth: depth, [INFO] [stdout] 187 | | }); [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] 182 ~ Ok(CreateNode { [INFO] [stdout] 183 + name: tokens[*idx - 1].literal.clone(), [INFO] [stdout] 184 + [INFO] [stdout] 185 + _literal: tokens[*idx - 1].lexeme.clone(), [INFO] [stdout] 186 + _depth: depth, [INFO] [stdout] 187 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/database.rs:195:22 [INFO] [stdout] | [INFO] [stdout] 195 | colorize(&self._literal.as_str(), AnsiColor::Blue), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self._literal.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/database.rs:196:22 [INFO] [stdout] | [INFO] [stdout] 196 | colorize(&self.name.as_str(), AnsiColor::Blue), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `self.name.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/database.rs:230:9 [INFO] [stdout] | [INFO] [stdout] 230 | / return Err("Something went wrong parsing database names, \ [INFO] [stdout] 231 | | make sure they're in a valid list notation." [INFO] [stdout] 232 | | .to_string()); [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 230 ~ Err("Something went wrong parsing database names, \ [INFO] [stdout] 231 + make sure they're in a valid list notation." [INFO] [stdout] 232 ~ .to_string()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/database.rs:212:54 [INFO] [stdout] | [INFO] [stdout] 212 | let next_token: TokenType = peek_one(tokens, &idx); [INFO] [stdout] | ^^^^ help: change this to: `idx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/database.rs:129:9 [INFO] [stdout] | [INFO] [stdout] 129 | return Ok(database_node); [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] 129 - return Ok(database_node); [INFO] [stdout] 129 + Ok(database_node) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/language/parser/database.rs:219:16 [INFO] [stdout] | [INFO] [stdout] 219 | } else if next_token == TokenType::And || next_token == TokenType::Comma { [INFO] [stdout] | ________________^ [INFO] [stdout] 220 | | if tokens[*idx].token_type == TokenType::Identifier { [INFO] [stdout] 221 | | dbs.push(tokens[*idx].literal.clone()); [INFO] [stdout] 222 | | *idx += 2; [INFO] [stdout] ... | [INFO] [stdout] 228 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 219 ~ } else if (next_token == TokenType::And || next_token == TokenType::Comma) { [INFO] [stdout] 220 ~ && tokens[*idx].token_type == TokenType::Identifier { [INFO] [stdout] 221 | dbs.push(tokens[*idx].literal.clone()); [INFO] [stdout] ... [INFO] [stdout] 226 | return Ok(()); [INFO] [stdout] 227 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/database.rs:247:9 [INFO] [stdout] | [INFO] [stdout] 247 | / return Ok(DestroyNode { [INFO] [stdout] 248 | | databases: db_names, [INFO] [stdout] 249 | | [INFO] [stdout] 250 | | _literal: { [INFO] [stdout] ... | [INFO] [stdout] 257 | | _depth: depth, [INFO] [stdout] 258 | | }); [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] 247 ~ Ok(DestroyNode { [INFO] [stdout] 248 + databases: db_names, [INFO] [stdout] 249 + [INFO] [stdout] 250 + _literal: { [INFO] [stdout] 251 + tokens[start_idx..*idx] [INFO] [stdout] 252 + .iter() [INFO] [stdout] 253 + .map(|v| v.lexeme.as_str()) [INFO] [stdout] 254 + .collect::>() [INFO] [stdout] 255 + .join(" ") [INFO] [stdout] 256 + }, [INFO] [stdout] 257 + _depth: depth, [INFO] [stdout] 258 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/database.rs:266:22 [INFO] [stdout] | [INFO] [stdout] 266 | colorize(&self._literal.as_str(), AnsiColor::Blue), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self._literal.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: immediately dereferencing a reference [INFO] [stdout] --> src/language/parser/database.rs:147:22 [INFO] [stdout] | [INFO] [stdout] 147 | + if *&pair.1.0.len() != 0 { &" " } else { "" } [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `pair.1.0.len()` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/database.rs:147:46 [INFO] [stdout] | [INFO] [stdout] 147 | + if *&pair.1.0.len() != 0 { &" " } else { "" } [INFO] [stdout] | ^^^^ help: change this to: `" "` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/database.rs:291:9 [INFO] [stdout] | [INFO] [stdout] 291 | / return Ok(UseNode { [INFO] [stdout] 292 | | name: tokens[*idx - 1].literal.clone(), [INFO] [stdout] 293 | | [INFO] [stdout] 294 | | _literal: tokens[*idx - 1].lexeme.clone(), [INFO] [stdout] 295 | | _depth: depth, [INFO] [stdout] 296 | | }); [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] 291 ~ Ok(UseNode { [INFO] [stdout] 292 + name: tokens[*idx - 1].literal.clone(), [INFO] [stdout] 293 + [INFO] [stdout] 294 + _literal: tokens[*idx - 1].lexeme.clone(), [INFO] [stdout] 295 + _depth: depth, [INFO] [stdout] 296 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/database.rs:304:22 [INFO] [stdout] | [INFO] [stdout] 304 | colorize(&self._literal.as_str(), AnsiColor::Blue), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self._literal.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/database.rs:182:9 [INFO] [stdout] | [INFO] [stdout] 182 | / return Ok(CreateNode { [INFO] [stdout] 183 | | name: tokens[*idx - 1].literal.clone(), [INFO] [stdout] 184 | | [INFO] [stdout] 185 | | _literal: tokens[*idx - 1].lexeme.clone(), [INFO] [stdout] 186 | | _depth: depth, [INFO] [stdout] 187 | | }); [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] 182 ~ Ok(CreateNode { [INFO] [stdout] 183 + name: tokens[*idx - 1].literal.clone(), [INFO] [stdout] 184 + [INFO] [stdout] 185 + _literal: tokens[*idx - 1].lexeme.clone(), [INFO] [stdout] 186 + _depth: depth, [INFO] [stdout] 187 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/database.rs:305:22 [INFO] [stdout] | [INFO] [stdout] 305 | colorize(&self.name.as_str(), AnsiColor::Blue), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `self.name.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/database.rs:319:9 [INFO] [stdout] | [INFO] [stdout] 319 | return Ok(ShowNode { _depth: depth }); [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] 319 - return Ok(ShowNode { _depth: depth }); [INFO] [stdout] 319 + Ok(ShowNode { _depth: depth }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/database.rs:195:22 [INFO] [stdout] | [INFO] [stdout] 195 | colorize(&self._literal.as_str(), AnsiColor::Blue), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self._literal.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/database.rs:196:22 [INFO] [stdout] | [INFO] [stdout] 196 | colorize(&self.name.as_str(), AnsiColor::Blue), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `self.name.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/database.rs:230:9 [INFO] [stdout] | [INFO] [stdout] 230 | / return Err("Something went wrong parsing database names, \ [INFO] [stdout] 231 | | make sure they're in a valid list notation." [INFO] [stdout] 232 | | .to_string()); [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 230 ~ Err("Something went wrong parsing database names, \ [INFO] [stdout] 231 + make sure they're in a valid list notation." [INFO] [stdout] 232 ~ .to_string()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/database.rs:212:54 [INFO] [stdout] | [INFO] [stdout] 212 | let next_token: TokenType = peek_one(tokens, &idx); [INFO] [stdout] | ^^^^ help: change this to: `idx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/language/parser/database.rs:219:16 [INFO] [stdout] | [INFO] [stdout] 219 | } else if next_token == TokenType::And || next_token == TokenType::Comma { [INFO] [stdout] | ________________^ [INFO] [stdout] 220 | | if tokens[*idx].token_type == TokenType::Identifier { [INFO] [stdout] 221 | | dbs.push(tokens[*idx].literal.clone()); [INFO] [stdout] 222 | | *idx += 2; [INFO] [stdout] ... | [INFO] [stdout] 228 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 219 ~ } else if (next_token == TokenType::And || next_token == TokenType::Comma) { [INFO] [stdout] 220 ~ && tokens[*idx].token_type == TokenType::Identifier { [INFO] [stdout] 221 | dbs.push(tokens[*idx].literal.clone()); [INFO] [stdout] ... [INFO] [stdout] 226 | return Ok(()); [INFO] [stdout] 227 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/database.rs:247:9 [INFO] [stdout] | [INFO] [stdout] 247 | / return Ok(DestroyNode { [INFO] [stdout] 248 | | databases: db_names, [INFO] [stdout] 249 | | [INFO] [stdout] 250 | | _literal: { [INFO] [stdout] ... | [INFO] [stdout] 257 | | _depth: depth, [INFO] [stdout] 258 | | }); [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] 247 ~ Ok(DestroyNode { [INFO] [stdout] 248 + databases: db_names, [INFO] [stdout] 249 + [INFO] [stdout] 250 + _literal: { [INFO] [stdout] 251 + tokens[start_idx..*idx] [INFO] [stdout] 252 + .iter() [INFO] [stdout] 253 + .map(|v| v.lexeme.as_str()) [INFO] [stdout] 254 + .collect::>() [INFO] [stdout] 255 + .join(" ") [INFO] [stdout] 256 + }, [INFO] [stdout] 257 + _depth: depth, [INFO] [stdout] 258 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/database.rs:266:22 [INFO] [stdout] | [INFO] [stdout] 266 | colorize(&self._literal.as_str(), AnsiColor::Blue), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self._literal.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/language/parser/database.rs:425:25 [INFO] [stdout] | [INFO] [stdout] 425 | Err(err) => assert!(false, "Output errored out -> {}", err), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/database.rs:291:9 [INFO] [stdout] | [INFO] [stdout] 291 | / return Ok(UseNode { [INFO] [stdout] 292 | | name: tokens[*idx - 1].literal.clone(), [INFO] [stdout] 293 | | [INFO] [stdout] 294 | | _literal: tokens[*idx - 1].lexeme.clone(), [INFO] [stdout] 295 | | _depth: depth, [INFO] [stdout] 296 | | }); [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] 291 ~ Ok(UseNode { [INFO] [stdout] 292 + name: tokens[*idx - 1].literal.clone(), [INFO] [stdout] 293 + [INFO] [stdout] 294 + _literal: tokens[*idx - 1].lexeme.clone(), [INFO] [stdout] 295 + _depth: depth, [INFO] [stdout] 296 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> src/language/parser/database.rs:450:25 [INFO] [stdout] | [INFO] [stdout] 450 | Err(err) => assert!(true, "Output errored out -> {}", err), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/database.rs:304:22 [INFO] [stdout] | [INFO] [stdout] 304 | colorize(&self._literal.as_str(), AnsiColor::Blue), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self._literal.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/database.rs:305:22 [INFO] [stdout] | [INFO] [stdout] 305 | colorize(&self.name.as_str(), AnsiColor::Blue), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `self.name.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/database.rs:319:9 [INFO] [stdout] | [INFO] [stdout] 319 | return Ok(ShowNode { _depth: depth }); [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] 319 - return Ok(ShowNode { _depth: depth }); [INFO] [stdout] 319 + Ok(ShowNode { _depth: depth }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/language/parser/database.rs:465:24 [INFO] [stdout] | [INFO] [stdout] 465 | Ok(val) => assert!( [INFO] [stdout] | ________________________^ [INFO] [stdout] 466 | | false, [INFO] [stdout] 467 | | "Output was expected to error but returned -> {}", [INFO] [stdout] 468 | | val [INFO] [stdout] 469 | | ), [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> src/language/parser/database.rs:470:23 [INFO] [stdout] | [INFO] [stdout] 470 | Err(_) => assert!(true, "Output expected to error and did."), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/language/parser/database.rs:495:25 [INFO] [stdout] | [INFO] [stdout] 495 | Err(err) => assert!(false, "Output errored out -> {}", err), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/language/parser/get.rs:12:16 [INFO] [stdout] | [INFO] [stdout] 12 | use std::{fmt, usize}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/language/parser/database.rs:510:24 [INFO] [stdout] | [INFO] [stdout] 510 | Ok(val) => assert!( [INFO] [stdout] | ________________________^ [INFO] [stdout] 511 | | false, [INFO] [stdout] 512 | | "Output was expected to error but returned -> {}", [INFO] [stdout] 513 | | val [INFO] [stdout] 514 | | ), [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> src/language/parser/database.rs:515:23 [INFO] [stdout] | [INFO] [stdout] 515 | Err(_) => assert!(true, "Output expected to error and did."), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/language/parser/database.rs:540:25 [INFO] [stdout] | [INFO] [stdout] 540 | Err(err) => assert!(false, "Output errored out -> {}", err), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/get.rs:53:35 [INFO] [stdout] | [INFO] [stdout] 53 | let columns: ColumnNode = match ColumnNode::parse(tokens, idx, depth + 1) { [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 54 | | Ok(column) => column, [INFO] [stdout] 55 | | Err(err) => return Err(err), [INFO] [stdout] 56 | | }; [INFO] [stdout] | |_________^ help: try instead: `ColumnNode::parse(tokens, idx, depth + 1)?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/get.rs:58:32 [INFO] [stdout] | [INFO] [stdout] 58 | let table: TableNode = match TableNode::parse(tokens, idx, depth + 1) { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 59 | | Ok(table) => table, [INFO] [stdout] 60 | | Err(err) => return Err(err), [INFO] [stdout] 61 | | }; [INFO] [stdout] | |_________^ help: try instead: `TableNode::parse(tokens, idx, depth + 1)?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/get.rs:63:42 [INFO] [stdout] | [INFO] [stdout] 63 | let filter: Option = match FilterNode::parse(tokens, idx, depth + 1) { [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 64 | | Ok(filter) => filter, [INFO] [stdout] 65 | | Err(err) => return Err(err), [INFO] [stdout] 66 | | }; [INFO] [stdout] | |_________^ help: try instead: `FilterNode::parse(tokens, idx, depth + 1)?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/get.rs:69:13 [INFO] [stdout] | [INFO] [stdout] 69 | / match PostProcessorNode::parse(tokens, idx, depth + 1) { [INFO] [stdout] 70 | | Ok(postprocessor) => postprocessor, [INFO] [stdout] 71 | | Err(msg) => return Err(msg), [INFO] [stdout] 72 | | }; [INFO] [stdout] | |_____________^ help: try instead: `PostProcessorNode::parse(tokens, idx, depth + 1)?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/language/parser/database.rs:581:25 [INFO] [stdout] | [INFO] [stdout] 581 | Err(err) => assert!(false, "Output errored out -> {}", err), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/language/parser/get.rs:99:48 [INFO] [stdout] | [INFO] [stdout] 99 | let filter: Option<(String, String)> = match &self.filter { [INFO] [stdout] | ________________________________________________^ [INFO] [stdout] 100 | | Some(filter) => Some(filter.transpile_color()), [INFO] [stdout] 101 | | None => None, [INFO] [stdout] 102 | | }; [INFO] [stdout] | |_________^ help: try: `self.filter.as_ref().map(|filter| filter.transpile_color())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/language/parser/get.rs:103:55 [INFO] [stdout] | [INFO] [stdout] 103 | let postprocessor: Option<(String, String)> = match &self.postprocessor { [INFO] [stdout] | _______________________________________________________^ [INFO] [stdout] 104 | | Some(postprocessor) => Some(postprocessor.transpile_color()), [INFO] [stdout] 105 | | None => None, [INFO] [stdout] 106 | | }; [INFO] [stdout] | |_________^ help: try: `self.postprocessor.as_ref().map(|postprocessor| postprocessor.transpile_color())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/language/parser/database.rs:606:24 [INFO] [stdout] | [INFO] [stdout] 606 | Ok(val) => assert!( [INFO] [stdout] | ________________________^ [INFO] [stdout] 607 | | false, [INFO] [stdout] 608 | | "Output was expected to error but returned -> {}", [INFO] [stdout] 609 | | val [INFO] [stdout] 610 | | ), [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> src/language/parser/database.rs:611:23 [INFO] [stdout] | [INFO] [stdout] 611 | Err(_) => assert!(true, "Output expected to error and did."), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/language/parser/get.rs:136:38 [INFO] [stdout] | [INFO] [stdout] 136 | let filter: Option = match &self.filter { [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 137 | | Some(filter) => Some(filter.transpile_raw()), [INFO] [stdout] 138 | | None => None, [INFO] [stdout] 139 | | }; [INFO] [stdout] | |_________^ help: try: `self.filter.as_ref().map(|filter| filter.transpile_raw())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/language/parser/database.rs:625:24 [INFO] [stdout] | [INFO] [stdout] 625 | Ok(val) => assert!( [INFO] [stdout] | ________________________^ [INFO] [stdout] 626 | | false, [INFO] [stdout] 627 | | "Output was expected to error but returned -> {}", [INFO] [stdout] 628 | | val [INFO] [stdout] 629 | | ), [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/language/parser/get.rs:140:45 [INFO] [stdout] | [INFO] [stdout] 140 | let postprocessor: Option = match &self.postprocessor { [INFO] [stdout] | _____________________________________________^ [INFO] [stdout] 141 | | Some(postprocessor) => Some(postprocessor.transpile_raw()), [INFO] [stdout] 142 | | None => None, [INFO] [stdout] 143 | | }; [INFO] [stdout] | |_________^ help: try: `self.postprocessor.as_ref().map(|postprocessor| postprocessor.transpile_raw())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> src/language/parser/database.rs:630:23 [INFO] [stdout] | [INFO] [stdout] 630 | Err(_) => assert!(true, "Output expected to error and did."), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `as_ref.map(...)` does nothing [INFO] [stdout] --> src/language/parser/get.rs:148:13 [INFO] [stdout] | [INFO] [stdout] 148 | filter.as_ref().map(|f| f.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `filter.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] = note: `#[warn(clippy::useless_asref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `as_ref.map(...)` does nothing [INFO] [stdout] --> src/language/parser/get.rs:149:13 [INFO] [stdout] | [INFO] [stdout] 149 | postprocessor.as_ref().map(|f| f.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `postprocessor.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/language/parser/get.rs:12:16 [INFO] [stdout] | [INFO] [stdout] 12 | use std::{fmt, usize}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/get.rs:178:9 [INFO] [stdout] | [INFO] [stdout] 178 | / return Ok(TableNode { [INFO] [stdout] 179 | | table_name: tokens[*idx - 1].literal.clone(), [INFO] [stdout] 180 | | [INFO] [stdout] 181 | | _literal: { [INFO] [stdout] ... | [INFO] [stdout] 189 | | _depth: depth, [INFO] [stdout] 190 | | }); [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] 178 ~ Ok(TableNode { [INFO] [stdout] 179 + table_name: tokens[*idx - 1].literal.clone(), [INFO] [stdout] 180 + [INFO] [stdout] 181 + _literal: { [INFO] [stdout] 182 + tokens[start_idx..*idx] [INFO] [stdout] 183 + .iter() [INFO] [stdout] 184 + .map(|v| v.lexeme.as_str()) [INFO] [stdout] 185 + .collect::>() [INFO] [stdout] 186 + .join(" ") [INFO] [stdout] 187 + }, [INFO] [stdout] 188 + [INFO] [stdout] 189 + _depth: depth, [INFO] [stdout] 190 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/get.rs:53:35 [INFO] [stdout] | [INFO] [stdout] 53 | let columns: ColumnNode = match ColumnNode::parse(tokens, idx, depth + 1) { [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 54 | | Ok(column) => column, [INFO] [stdout] 55 | | Err(err) => return Err(err), [INFO] [stdout] 56 | | }; [INFO] [stdout] | |_________^ help: try instead: `ColumnNode::parse(tokens, idx, depth + 1)?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/get.rs:233:9 [INFO] [stdout] | [INFO] [stdout] 233 | / return Err("Something went wrong parsing column names, \ [INFO] [stdout] 234 | | make sure they're in a valid list notation." [INFO] [stdout] 235 | | .to_string()); [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 233 ~ Err("Something went wrong parsing column names, \ [INFO] [stdout] 234 + make sure they're in a valid list notation." [INFO] [stdout] 235 ~ .to_string()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/get.rs:58:32 [INFO] [stdout] | [INFO] [stdout] 58 | let table: TableNode = match TableNode::parse(tokens, idx, depth + 1) { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 59 | | Ok(table) => table, [INFO] [stdout] 60 | | Err(err) => return Err(err), [INFO] [stdout] 61 | | }; [INFO] [stdout] | |_________^ help: try instead: `TableNode::parse(tokens, idx, depth + 1)?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/get.rs:215:54 [INFO] [stdout] | [INFO] [stdout] 215 | let next_token: TokenType = peek_one(tokens, &idx); [INFO] [stdout] | ^^^^ help: change this to: `idx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/get.rs:63:42 [INFO] [stdout] | [INFO] [stdout] 63 | let filter: Option = match FilterNode::parse(tokens, idx, depth + 1) { [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 64 | | Ok(filter) => filter, [INFO] [stdout] 65 | | Err(err) => return Err(err), [INFO] [stdout] 66 | | }; [INFO] [stdout] | |_________^ help: try instead: `FilterNode::parse(tokens, idx, depth + 1)?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/language/parser/get.rs:222:16 [INFO] [stdout] | [INFO] [stdout] 222 | } else if next_token == TokenType::And || next_token == TokenType::Comma { [INFO] [stdout] | ________________^ [INFO] [stdout] 223 | | if tokens[*idx].token_type == TokenType::Identifier { [INFO] [stdout] 224 | | cols.push(tokens[*idx].literal.clone()); [INFO] [stdout] 225 | | *idx += 2; [INFO] [stdout] ... | [INFO] [stdout] 231 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 222 ~ } else if (next_token == TokenType::And || next_token == TokenType::Comma) { [INFO] [stdout] 223 ~ && tokens[*idx].token_type == TokenType::Identifier { [INFO] [stdout] 224 | cols.push(tokens[*idx].literal.clone()); [INFO] [stdout] ... [INFO] [stdout] 229 | return Ok(()); [INFO] [stdout] 230 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/language/parser/get.rs:240:36 [INFO] [stdout] | [INFO] [stdout] 240 | fn reconstruct_literal(tokens: &Vec, start_idx: usize, end_idx: usize) -> String { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 240 - fn reconstruct_literal(tokens: &Vec, start_idx: usize, end_idx: usize) -> String { [INFO] [stdout] 240 + fn reconstruct_literal(tokens: &[Token], start_idx: usize, end_idx: usize) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/language/parser/get.rs:69:13 [INFO] [stdout] | [INFO] [stdout] 69 | / match PostProcessorNode::parse(tokens, idx, depth + 1) { [INFO] [stdout] 70 | | Ok(postprocessor) => postprocessor, [INFO] [stdout] 71 | | Err(msg) => return Err(msg), [INFO] [stdout] 72 | | }; [INFO] [stdout] | |_____________^ help: try instead: `PostProcessorNode::parse(tokens, idx, depth + 1)?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/get.rs:285:9 [INFO] [stdout] | [INFO] [stdout] 285 | / return Ok(ColumnNode { [INFO] [stdout] 286 | | is_wildcard: false, [INFO] [stdout] 287 | | column_names: column_names, [INFO] [stdout] ... | [INFO] [stdout] 290 | | _depth: depth, [INFO] [stdout] 291 | | }); [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] 285 ~ Ok(ColumnNode { [INFO] [stdout] 286 + is_wildcard: false, [INFO] [stdout] 287 + column_names: column_names, [INFO] [stdout] 288 + [INFO] [stdout] 289 + _literal: ColumnNode::reconstruct_literal(tokens, start_idx, *idx), [INFO] [stdout] 290 + _depth: depth, [INFO] [stdout] 291 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/language/parser/get.rs:99:48 [INFO] [stdout] | [INFO] [stdout] 99 | let filter: Option<(String, String)> = match &self.filter { [INFO] [stdout] | ________________________________________________^ [INFO] [stdout] 100 | | Some(filter) => Some(filter.transpile_color()), [INFO] [stdout] 101 | | None => None, [INFO] [stdout] 102 | | }; [INFO] [stdout] | |_________^ help: try: `self.filter.as_ref().map(|filter| filter.transpile_color())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/get.rs:350:9 [INFO] [stdout] | [INFO] [stdout] 350 | return Ok(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] 350 - return Ok(None); [INFO] [stdout] 350 + Ok(None) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/language/parser/get.rs:103:55 [INFO] [stdout] | [INFO] [stdout] 103 | let postprocessor: Option<(String, String)> = match &self.postprocessor { [INFO] [stdout] | _______________________________________________________^ [INFO] [stdout] 104 | | Some(postprocessor) => Some(postprocessor.transpile_color()), [INFO] [stdout] 105 | | None => None, [INFO] [stdout] 106 | | }; [INFO] [stdout] | |_________^ help: try: `self.postprocessor.as_ref().map(|postprocessor| postprocessor.transpile_color())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/language/parser/get.rs:136:38 [INFO] [stdout] | [INFO] [stdout] 136 | let filter: Option = match &self.filter { [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 137 | | Some(filter) => Some(filter.transpile_raw()), [INFO] [stdout] 138 | | None => None, [INFO] [stdout] 139 | | }; [INFO] [stdout] | |_________^ help: try: `self.filter.as_ref().map(|filter| filter.transpile_raw())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/language/parser/get.rs:140:45 [INFO] [stdout] | [INFO] [stdout] 140 | let postprocessor: Option = match &self.postprocessor { [INFO] [stdout] | _____________________________________________^ [INFO] [stdout] 141 | | Some(postprocessor) => Some(postprocessor.transpile_raw()), [INFO] [stdout] 142 | | None => None, [INFO] [stdout] 143 | | }; [INFO] [stdout] | |_________^ help: try: `self.postprocessor.as_ref().map(|postprocessor| postprocessor.transpile_raw())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `as_ref.map(...)` does nothing [INFO] [stdout] --> src/language/parser/get.rs:148:13 [INFO] [stdout] | [INFO] [stdout] 148 | filter.as_ref().map(|f| f.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `filter.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] = note: `#[warn(clippy::useless_asref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `as_ref.map(...)` does nothing [INFO] [stdout] --> src/language/parser/get.rs:149:13 [INFO] [stdout] | [INFO] [stdout] 149 | postprocessor.as_ref().map(|f| f.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `postprocessor.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/get.rs:178:9 [INFO] [stdout] | [INFO] [stdout] 178 | / return Ok(TableNode { [INFO] [stdout] 179 | | table_name: tokens[*idx - 1].literal.clone(), [INFO] [stdout] 180 | | [INFO] [stdout] 181 | | _literal: { [INFO] [stdout] ... | [INFO] [stdout] 189 | | _depth: depth, [INFO] [stdout] 190 | | }); [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] 178 ~ Ok(TableNode { [INFO] [stdout] 179 + table_name: tokens[*idx - 1].literal.clone(), [INFO] [stdout] 180 + [INFO] [stdout] 181 + _literal: { [INFO] [stdout] 182 + tokens[start_idx..*idx] [INFO] [stdout] 183 + .iter() [INFO] [stdout] 184 + .map(|v| v.lexeme.as_str()) [INFO] [stdout] 185 + .collect::>() [INFO] [stdout] 186 + .join(" ") [INFO] [stdout] 187 + }, [INFO] [stdout] 188 + [INFO] [stdout] 189 + _depth: depth, [INFO] [stdout] 190 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/get.rs:233:9 [INFO] [stdout] | [INFO] [stdout] 233 | / return Err("Something went wrong parsing column names, \ [INFO] [stdout] 234 | | make sure they're in a valid list notation." [INFO] [stdout] 235 | | .to_string()); [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 233 ~ Err("Something went wrong parsing column names, \ [INFO] [stdout] 234 + make sure they're in a valid list notation." [INFO] [stdout] 235 ~ .to_string()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/get.rs:215:54 [INFO] [stdout] | [INFO] [stdout] 215 | let next_token: TokenType = peek_one(tokens, &idx); [INFO] [stdout] | ^^^^ help: change this to: `idx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/language/parser/get.rs:222:16 [INFO] [stdout] | [INFO] [stdout] 222 | } else if next_token == TokenType::And || next_token == TokenType::Comma { [INFO] [stdout] | ________________^ [INFO] [stdout] 223 | | if tokens[*idx].token_type == TokenType::Identifier { [INFO] [stdout] 224 | | cols.push(tokens[*idx].literal.clone()); [INFO] [stdout] 225 | | *idx += 2; [INFO] [stdout] ... | [INFO] [stdout] 231 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 222 ~ } else if (next_token == TokenType::And || next_token == TokenType::Comma) { [INFO] [stdout] 223 ~ && tokens[*idx].token_type == TokenType::Identifier { [INFO] [stdout] 224 | cols.push(tokens[*idx].literal.clone()); [INFO] [stdout] ... [INFO] [stdout] 229 | return Ok(()); [INFO] [stdout] 230 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/language/parser/get.rs:240:36 [INFO] [stdout] | [INFO] [stdout] 240 | fn reconstruct_literal(tokens: &Vec, start_idx: usize, end_idx: usize) -> String { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 240 - fn reconstruct_literal(tokens: &Vec, start_idx: usize, end_idx: usize) -> String { [INFO] [stdout] 240 + fn reconstruct_literal(tokens: &[Token], start_idx: usize, end_idx: usize) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/language/parser/helpers.rs:5:32 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn validate_length(tokens: &Vec, idx: &usize, required: bool) -> Result<(), String> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 5 - pub fn validate_length(tokens: &Vec, idx: &usize, required: bool) -> Result<(), String> { [INFO] [stdout] 5 + pub fn validate_length(tokens: &[Token], idx: &usize, required: bool) -> Result<(), String> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/get.rs:285:9 [INFO] [stdout] | [INFO] [stdout] 285 | / return Ok(ColumnNode { [INFO] [stdout] 286 | | is_wildcard: false, [INFO] [stdout] 287 | | column_names: column_names, [INFO] [stdout] ... | [INFO] [stdout] 290 | | _depth: depth, [INFO] [stdout] 291 | | }); [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] 285 ~ Ok(ColumnNode { [INFO] [stdout] 286 + is_wildcard: false, [INFO] [stdout] 287 + column_names: column_names, [INFO] [stdout] 288 + [INFO] [stdout] 289 + _literal: ColumnNode::reconstruct_literal(tokens, start_idx, *idx), [INFO] [stdout] 290 + _depth: depth, [INFO] [stdout] 291 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/language/parser/helpers.rs:10:18 [INFO] [stdout] | [INFO] [stdout] 10 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/language/parser/helpers.rs:25:36 [INFO] [stdout] | [INFO] [stdout] 25 | pub fn valid_until_warning(tokens: &Vec, idx: &usize) -> String { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 25 - pub fn valid_until_warning(tokens: &Vec, idx: &usize) -> String { [INFO] [stdout] 25 + pub fn valid_until_warning(tokens: &[Token], idx: &usize) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/language/parser/helpers.rs:33:14 [INFO] [stdout] | [INFO] [stdout] 33 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/language/parser/helpers.rs:42:25 [INFO] [stdout] | [INFO] [stdout] 42 | pub fn peek_one(tokens: &Vec, idx: &usize) -> TokenType { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 42 - pub fn peek_one(tokens: &Vec, idx: &usize) -> TokenType { [INFO] [stdout] 42 + pub fn peek_one(tokens: &[Token], idx: &usize) -> TokenType { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TokenType` which implements the `Copy` trait [INFO] [stdout] --> src/language/parser/helpers.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | tokens[*idx + 1].token_type.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tokens[*idx + 1].token_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/get.rs:350:9 [INFO] [stdout] | [INFO] [stdout] 350 | return Ok(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] 350 - return Ok(None); [INFO] [stdout] 350 + Ok(None) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/language/parser/mod.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | pub mod parser; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/parser.rs:121:9 [INFO] [stdout] | [INFO] [stdout] 121 | return Err("Couldn't determine requested action. Please review documentation for valid query actions.".to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 121 - return Err("Couldn't determine requested action. Please review documentation for valid query actions.".to_string()); [INFO] [stdout] 121 + Err("Couldn't determine requested action. Please review documentation for valid query actions.".to_string()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/parser.rs:53:25 [INFO] [stdout] | [INFO] [stdout] 53 | validate_length(&tokens, &idx, true)?; [INFO] [stdout] | ^^^^^^^ help: change this to: `tokens` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/parser.rs:53:34 [INFO] [stdout] | [INFO] [stdout] 53 | validate_length(&tokens, &idx, true)?; [INFO] [stdout] | ^^^^ help: change this to: `idx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/parser.rs:58:52 [INFO] [stdout] | [INFO] [stdout] 58 | let get_node: GetNode = GetNode::parse(&tokens, idx, depth + 1)?; [INFO] [stdout] | ^^^^^^^ help: change this to: `tokens` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/parser.rs:82:25 [INFO] [stdout] | [INFO] [stdout] 82 | &tokens, [INFO] [stdout] | ^^^^^^^ help: change this to: `tokens` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/parser.rs:99:25 [INFO] [stdout] | [INFO] [stdout] 99 | &tokens, [INFO] [stdout] | ^^^^^^^ help: change this to: `tokens` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/parser.rs:129:13 [INFO] [stdout] | [INFO] [stdout] 129 | return get.transpile_color(); [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] 129 ~ get.transpile_color() [INFO] [stdout] 130 | } else if let Some(database) = &self.database { [INFO] [stdout] ... [INFO] [stdout] 135 | logger::error("A fatal error occurred while transpiling your query!"); [INFO] [stdout] 136 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/parser.rs:131:13 [INFO] [stdout] | [INFO] [stdout] 131 | return database.transpile_color(); [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] 131 ~ database.transpile_color() [INFO] [stdout] 132 | } else if let Some(table) = &self.table { [INFO] [stdout] ... [INFO] [stdout] 135 | logger::error("A fatal error occurred while transpiling your query!"); [INFO] [stdout] 136 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/parser.rs:133:13 [INFO] [stdout] | [INFO] [stdout] 133 | return table.transpile_color(); [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] 133 ~ table.transpile_color() [INFO] [stdout] 134 | } else { [INFO] [stdout] 135 | logger::error("A fatal error occurred while transpiling your query!"); [INFO] [stdout] 136 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/language/parser/get.rs:471:24 [INFO] [stdout] | [INFO] [stdout] 471 | Ok(val) => assert!( [INFO] [stdout] | ________________________^ [INFO] [stdout] 472 | | false, [INFO] [stdout] 473 | | "Output was expected to error but returned -> {}", [INFO] [stdout] 474 | | val [INFO] [stdout] 475 | | ), [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> src/language/parser/get.rs:476:25 [INFO] [stdout] | [INFO] [stdout] 476 | Err(err) => assert!(true, "Output errored out -> {}", err), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/parser.rs:142:13 [INFO] [stdout] | [INFO] [stdout] 142 | return get.transpile_raw(); [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] 142 ~ get.transpile_raw() [INFO] [stdout] 143 | } else if let Some(database) = &self.database { [INFO] [stdout] ... [INFO] [stdout] 148 | logger::error("A fatal error occurred while transpiling your query!"); [INFO] [stdout] 149 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/parser.rs:144:13 [INFO] [stdout] | [INFO] [stdout] 144 | return database.transpile_raw(); [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] 144 ~ database.transpile_raw() [INFO] [stdout] 145 | } else if let Some(table) = &self.table { [INFO] [stdout] ... [INFO] [stdout] 148 | logger::error("A fatal error occurred while transpiling your query!"); [INFO] [stdout] 149 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/parser.rs:146:13 [INFO] [stdout] | [INFO] [stdout] 146 | return table.transpile_raw(); [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] 146 ~ table.transpile_raw() [INFO] [stdout] 147 | } else { [INFO] [stdout] 148 | logger::error("A fatal error occurred while transpiling your query!"); [INFO] [stdout] 149 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/language/parser/get.rs:503:25 [INFO] [stdout] | [INFO] [stdout] 503 | Err(err) => assert!(false, "Output errored out -> {}", err), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/language/parser/postprocessor.rs:8:16 [INFO] [stdout] | [INFO] [stdout] 8 | use std::{fmt, usize}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/language/parser/get.rs:526:25 [INFO] [stdout] | [INFO] [stdout] 526 | Err(err) => assert!(false, "Output errored out -> {}", err), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/postprocessor.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | / return Ok(LimitNode { [INFO] [stdout] 42 | | limit: match tokens[*idx].literal.parse::() { [INFO] [stdout] 43 | | Ok(state) => state, [INFO] [stdout] 44 | | Err(_) => { [INFO] [stdout] ... | [INFO] [stdout] 59 | | _depth: depth, [INFO] [stdout] 60 | | }); [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] 41 ~ Ok(LimitNode { [INFO] [stdout] 42 + limit: match tokens[*idx].literal.parse::() { [INFO] [stdout] 43 + Ok(state) => state, [INFO] [stdout] 44 + Err(_) => { [INFO] [stdout] 45 + return Err(format!( [INFO] [stdout] 46 + "Limit post-processor expects 32-bit integer, got -> {}", [INFO] [stdout] 47 + tokens[*idx].lexeme [INFO] [stdout] 48 + )); [INFO] [stdout] 49 + } [INFO] [stdout] 50 + }, [INFO] [stdout] 51 + [INFO] [stdout] 52 + _literal: { [INFO] [stdout] 53 + tokens[start_idx..*idx + 1] [INFO] [stdout] 54 + .iter() [INFO] [stdout] 55 + .map(|v| v.lexeme.as_str()) [INFO] [stdout] 56 + .collect::>() [INFO] [stdout] 57 + .join(" ") [INFO] [stdout] 58 + }, [INFO] [stdout] 59 + _depth: depth, [INFO] [stdout] 60 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/language/parser/get.rs:561:25 [INFO] [stdout] | [INFO] [stdout] 561 | Err(err) => assert!(false, "Output errored out -> {}", err), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/language/parser/get.rs:577:24 [INFO] [stdout] | [INFO] [stdout] 577 | Ok(val) => assert!( [INFO] [stdout] | ________________________^ [INFO] [stdout] 578 | | false, [INFO] [stdout] 579 | | "Output was expected to error but returned -> {}", [INFO] [stdout] 580 | | val [INFO] [stdout] 581 | | ), [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> src/language/parser/get.rs:582:25 [INFO] [stdout] | [INFO] [stdout] 582 | Err(err) => assert!(true, "Output errored out -> {}", err), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/postprocessor.rs:122:13 [INFO] [stdout] | [INFO] [stdout] 122 | 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] 122 - return Ok(()); [INFO] [stdout] 122 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/postprocessor.rs:128:13 [INFO] [stdout] | [INFO] [stdout] 128 | 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] 128 - return Ok(()); [INFO] [stdout] 128 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/postprocessor.rs:117:54 [INFO] [stdout] | [INFO] [stdout] 117 | let next_token: TokenType = peek_one(tokens, &idx); [INFO] [stdout] | ^^^^ help: change this to: `idx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/language/parser/get.rs:608:25 [INFO] [stdout] | [INFO] [stdout] 608 | Err(err) => assert!(false, "Output errored out -> {}", err), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/postprocessor.rs:155:9 [INFO] [stdout] | [INFO] [stdout] 155 | return Ok(Some(final_node)); [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] 155 - return Ok(Some(final_node)); [INFO] [stdout] 155 + Ok(Some(final_node)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/language/parser/helpers.rs:5:32 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn validate_length(tokens: &Vec, idx: &usize, required: bool) -> Result<(), String> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 5 - pub fn validate_length(tokens: &Vec, idx: &usize, required: bool) -> Result<(), String> { [INFO] [stdout] 5 + pub fn validate_length(tokens: &[Token], idx: &usize, required: bool) -> Result<(), String> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/language/parser/helpers.rs:10:18 [INFO] [stdout] | [INFO] [stdout] 10 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.limit` after checking its variant with `is_some` [INFO] [stdout] --> src/language/parser/postprocessor.rs:166:54 [INFO] [stdout] | [INFO] [stdout] 165 | if self.limit.is_some() { [INFO] [stdout] | ----------------------- help: try: `if let Some() = &self.limit` [INFO] [stdout] 166 | let limit_transpiled: (String, String) = self.limit.as_ref().unwrap().transpile_color(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/language/parser/helpers.rs:25:36 [INFO] [stdout] | [INFO] [stdout] 25 | pub fn valid_until_warning(tokens: &Vec, idx: &usize) -> String { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 25 - pub fn valid_until_warning(tokens: &Vec, idx: &usize) -> String { [INFO] [stdout] 25 + pub fn valid_until_warning(tokens: &[Token], idx: &usize) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.limit` after checking its variant with `is_some` [INFO] [stdout] --> src/language/parser/postprocessor.rs:180:44 [INFO] [stdout] | [INFO] [stdout] 179 | if self.limit.is_some() { [INFO] [stdout] | ----------------------- help: try: `if let Some() = &self.limit` [INFO] [stdout] 180 | let limit_transpiled: String = self.limit.as_ref().unwrap().transpile_raw(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/language/parser/helpers.rs:33:14 [INFO] [stdout] | [INFO] [stdout] 33 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/language/parser/helpers.rs:42:25 [INFO] [stdout] | [INFO] [stdout] 42 | pub fn peek_one(tokens: &Vec, idx: &usize) -> TokenType { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 42 - pub fn peek_one(tokens: &Vec, idx: &usize) -> TokenType { [INFO] [stdout] 42 + pub fn peek_one(tokens: &[Token], idx: &usize) -> TokenType { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TokenType` which implements the `Copy` trait [INFO] [stdout] --> src/language/parser/helpers.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | tokens[*idx + 1].token_type.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tokens[*idx + 1].token_type` [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: module has the same name as its containing module [INFO] [stdout] --> src/language/parser/mod.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | pub mod parser; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/language/parser/table.rs:20:16 [INFO] [stdout] | [INFO] [stdout] 20 | use std::{fmt, usize}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/table.rs:96:9 [INFO] [stdout] | [INFO] [stdout] 96 | return Ok(table_node); [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] 96 - return Ok(table_node); [INFO] [stdout] 96 + Ok(table_node) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/parser.rs:121:9 [INFO] [stdout] | [INFO] [stdout] 121 | return Err("Couldn't determine requested action. Please review documentation for valid query actions.".to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 121 - return Err("Couldn't determine requested action. Please review documentation for valid query actions.".to_string()); [INFO] [stdout] 121 + Err("Couldn't determine requested action. Please review documentation for valid query actions.".to_string()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/parser.rs:53:25 [INFO] [stdout] | [INFO] [stdout] 53 | validate_length(&tokens, &idx, true)?; [INFO] [stdout] | ^^^^^^^ help: change this to: `tokens` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/parser.rs:53:34 [INFO] [stdout] | [INFO] [stdout] 53 | validate_length(&tokens, &idx, true)?; [INFO] [stdout] | ^^^^ help: change this to: `idx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/parser.rs:58:52 [INFO] [stdout] | [INFO] [stdout] 58 | let get_node: GetNode = GetNode::parse(&tokens, idx, depth + 1)?; [INFO] [stdout] | ^^^^^^^ help: change this to: `tokens` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/parser.rs:82:25 [INFO] [stdout] | [INFO] [stdout] 82 | &tokens, [INFO] [stdout] | ^^^^^^^ help: change this to: `tokens` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: immediately dereferencing a reference [INFO] [stdout] --> src/language/parser/table.rs:118:22 [INFO] [stdout] | [INFO] [stdout] 118 | + if *&pair.1.0.len() != 0 { &" " } else { "" } [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `pair.1.0.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deref_addrof [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/parser.rs:99:25 [INFO] [stdout] | [INFO] [stdout] 99 | &tokens, [INFO] [stdout] | ^^^^^^^ help: change this to: `tokens` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/table.rs:118:46 [INFO] [stdout] | [INFO] [stdout] 118 | + if *&pair.1.0.len() != 0 { &" " } else { "" } [INFO] [stdout] | ^^^^ help: change this to: `" "` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/parser.rs:129:13 [INFO] [stdout] | [INFO] [stdout] 129 | return get.transpile_color(); [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] 129 ~ get.transpile_color() [INFO] [stdout] 130 | } else if let Some(database) = &self.database { [INFO] [stdout] ... [INFO] [stdout] 135 | logger::error("A fatal error occurred while transpiling your query!"); [INFO] [stdout] 136 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/parser.rs:131:13 [INFO] [stdout] | [INFO] [stdout] 131 | return database.transpile_color(); [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] 131 ~ database.transpile_color() [INFO] [stdout] 132 | } else if let Some(table) = &self.table { [INFO] [stdout] ... [INFO] [stdout] 135 | logger::error("A fatal error occurred while transpiling your query!"); [INFO] [stdout] 136 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/table.rs:171:9 [INFO] [stdout] | [INFO] [stdout] 171 | / return Ok(DestroyNode { [INFO] [stdout] 172 | | table: table, [INFO] [stdout] 173 | | condition: condition, [INFO] [stdout] ... | [INFO] [stdout] 182 | | _depth: depth, [INFO] [stdout] 183 | | }); [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] 171 ~ Ok(DestroyNode { [INFO] [stdout] 172 + table: table, [INFO] [stdout] 173 + condition: condition, [INFO] [stdout] 174 + [INFO] [stdout] 175 + _literal: { [INFO] [stdout] 176 + tokens[start_idx..*idx] [INFO] [stdout] 177 + .iter() [INFO] [stdout] 178 + .map(|v| v.lexeme.as_str()) [INFO] [stdout] 179 + .collect::>() [INFO] [stdout] 180 + .join(" ") [INFO] [stdout] 181 + }, [INFO] [stdout] 182 + _depth: depth, [INFO] [stdout] 183 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/parser.rs:133:13 [INFO] [stdout] | [INFO] [stdout] 133 | return table.transpile_color(); [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] 133 ~ table.transpile_color() [INFO] [stdout] 134 | } else { [INFO] [stdout] 135 | logger::error("A fatal error occurred while transpiling your query!"); [INFO] [stdout] 136 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/parser.rs:142:13 [INFO] [stdout] | [INFO] [stdout] 142 | return get.transpile_raw(); [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] 142 ~ get.transpile_raw() [INFO] [stdout] 143 | } else if let Some(database) = &self.database { [INFO] [stdout] ... [INFO] [stdout] 148 | logger::error("A fatal error occurred while transpiling your query!"); [INFO] [stdout] 149 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/parser.rs:144:13 [INFO] [stdout] | [INFO] [stdout] 144 | return database.transpile_raw(); [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] 144 ~ database.transpile_raw() [INFO] [stdout] 145 | } else if let Some(table) = &self.table { [INFO] [stdout] ... [INFO] [stdout] 148 | logger::error("A fatal error occurred while transpiling your query!"); [INFO] [stdout] 149 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/parser.rs:146:13 [INFO] [stdout] | [INFO] [stdout] 146 | return table.transpile_raw(); [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] 146 ~ table.transpile_raw() [INFO] [stdout] 147 | } else { [INFO] [stdout] 148 | logger::error("A fatal error occurred while transpiling your query!"); [INFO] [stdout] 149 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/language/parser/postprocessor.rs:8:16 [INFO] [stdout] | [INFO] [stdout] 8 | use std::{fmt, usize}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/language/parser/table.rs:215:45 [INFO] [stdout] | [INFO] [stdout] 215 | table_name.clone() + &colorize(&format!("{}", &where_clause_raw), AnsiColor::Cyan), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(&where_clause_raw).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] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/language/parser/table.rs:216:45 [INFO] [stdout] | [INFO] [stdout] 216 | table_name.clone() + &colorize(&format!("{}", &where_clause_sql), AnsiColor::Cyan), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(&where_clause_sql).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] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/postprocessor.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | / return Ok(LimitNode { [INFO] [stdout] 42 | | limit: match tokens[*idx].literal.parse::() { [INFO] [stdout] 43 | | Ok(state) => state, [INFO] [stdout] 44 | | Err(_) => { [INFO] [stdout] ... | [INFO] [stdout] 59 | | _depth: depth, [INFO] [stdout] 60 | | }); [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] 41 ~ Ok(LimitNode { [INFO] [stdout] 42 + limit: match tokens[*idx].literal.parse::() { [INFO] [stdout] 43 + Ok(state) => state, [INFO] [stdout] 44 + Err(_) => { [INFO] [stdout] 45 + return Err(format!( [INFO] [stdout] 46 + "Limit post-processor expects 32-bit integer, got -> {}", [INFO] [stdout] 47 + tokens[*idx].lexeme [INFO] [stdout] 48 + )); [INFO] [stdout] 49 + } [INFO] [stdout] 50 + }, [INFO] [stdout] 51 + [INFO] [stdout] 52 + _literal: { [INFO] [stdout] 53 + tokens[start_idx..*idx + 1] [INFO] [stdout] 54 + .iter() [INFO] [stdout] 55 + .map(|v| v.lexeme.as_str()) [INFO] [stdout] 56 + .collect::>() [INFO] [stdout] 57 + .join(" ") [INFO] [stdout] 58 + }, [INFO] [stdout] 59 + _depth: depth, [INFO] [stdout] 60 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/language/parser/table.rs:234:31 [INFO] [stdout] | [INFO] [stdout] 234 | self.table.clone() + &format!("{}", &where_clause_sql) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(&where_clause_sql).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] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/table.rs:242:9 [INFO] [stdout] | [INFO] [stdout] 242 | return Ok(ShowNode { _depth: depth }); [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] 242 - return Ok(ShowNode { _depth: depth }); [INFO] [stdout] 242 + Ok(ShowNode { _depth: depth }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/postprocessor.rs:122:13 [INFO] [stdout] | [INFO] [stdout] 122 | 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] 122 - return Ok(()); [INFO] [stdout] 122 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/postprocessor.rs:128:13 [INFO] [stdout] | [INFO] [stdout] 128 | 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] 128 - return Ok(()); [INFO] [stdout] 128 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/postprocessor.rs:117:54 [INFO] [stdout] | [INFO] [stdout] 117 | let next_token: TokenType = peek_one(tokens, &idx); [INFO] [stdout] | ^^^^ help: change this to: `idx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/postprocessor.rs:155:9 [INFO] [stdout] | [INFO] [stdout] 155 | return Ok(Some(final_node)); [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] 155 - return Ok(Some(final_node)); [INFO] [stdout] 155 + Ok(Some(final_node)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.limit` after checking its variant with `is_some` [INFO] [stdout] --> src/language/parser/postprocessor.rs:166:54 [INFO] [stdout] | [INFO] [stdout] 165 | if self.limit.is_some() { [INFO] [stdout] | ----------------------- help: try: `if let Some() = &self.limit` [INFO] [stdout] 166 | let limit_transpiled: (String, String) = self.limit.as_ref().unwrap().transpile_color(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.limit` after checking its variant with `is_some` [INFO] [stdout] --> src/language/parser/postprocessor.rs:180:44 [INFO] [stdout] | [INFO] [stdout] 179 | if self.limit.is_some() { [INFO] [stdout] | ----------------------- help: try: `if let Some() = &self.limit` [INFO] [stdout] 180 | let limit_transpiled: String = self.limit.as_ref().unwrap().transpile_raw(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/transpiler/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod transpiler; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/language/parser/postprocessor.rs:233:22 [INFO] [stdout] | [INFO] [stdout] 233 | Ok(_) => assert!(false, "Output was expected to error!"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> src/language/parser/postprocessor.rs:234:25 [INFO] [stdout] | [INFO] [stdout] 234 | Err(err) => assert!(true, "Output errored out -> {}", err), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/transpiler/transpiler.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | return Ok(format!("{};", parsed.transpile_raw())); [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] 56 - return Ok(format!("{};", parsed.transpile_raw())); [INFO] [stdout] 56 + Ok(format!("{};", parsed.transpile_raw())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/utils/help.rs:25:22 [INFO] [stdout] | [INFO] [stdout] 25 | pub fn display_logo() -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/utils/help.rs:29:39 [INFO] [stdout] | [INFO] [stdout] 29 | pub fn display_help(msg: Option<&str>) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/language/parser/postprocessor.rs:263:22 [INFO] [stdout] | [INFO] [stdout] 263 | Ok(_) => assert!(false, "Output was expected to error!"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> src/language/parser/postprocessor.rs:264:25 [INFO] [stdout] | [INFO] [stdout] 264 | Err(err) => assert!(true, "Output errored out -> {}", err), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/language/parser/postprocessor.rs:300:25 [INFO] [stdout] | [INFO] [stdout] 300 | None => assert!(false, "Output returned nothing but something was expected!"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils/logger.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | return Local::now().format("%Y-%m-%d %H:%M:%S").to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 28 - return Local::now().format("%Y-%m-%d %H:%M:%S").to_string(); [INFO] [stdout] 28 + Local::now().format("%Y-%m-%d %H:%M:%S").to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/utils/logger.rs:31:24 [INFO] [stdout] | [INFO] [stdout] 31 | pub fn debug(msg: &str) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/utils/logger.rs:37:24 [INFO] [stdout] | [INFO] [stdout] 37 | pub fn _info(msg: &str) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/utils/logger.rs:43:26 [INFO] [stdout] | [INFO] [stdout] 43 | pub fn warning(msg: &str) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils/query.rs:46:5 [INFO] [stdout] | [INFO] [stdout] 46 | return Some(ast); [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] 46 - return Some(ast); [INFO] [stdout] 46 + Some(ast) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils/query.rs:13:63 [INFO] [stdout] | [INFO] [stdout] 13 | let tokenized: Result = lexer::scan_tokens(&query); [INFO] [stdout] | ^^^^^^ help: change this to: `query` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/utils/query.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 27 | if tokens.len() != 0 && tokens[tokens.len() - 1].token_type != tokens::TokenType::EoqToken { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!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: module has the same name as its containing module [INFO] [stdout] --> src/validator/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod validator; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/validator/validator.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | / match process_query(&query.to_string()) { [INFO] [stdout] 38 | | Some(_) => true, [INFO] [stdout] 39 | | None => false, [INFO] [stdout] 40 | | } [INFO] [stdout] | |_____^ help: try: `process_query(&query.to_string()).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: useless use of `vec!` [INFO] [stdout] --> src/language/parser/conditional.rs:611:12 [INFO] [stdout] | [INFO] [stdout] 611 | if vec![ [INFO] [stdout] | ____________^ [INFO] [stdout] 612 | | TokenType::Equal, [INFO] [stdout] 613 | | TokenType::Lte, [INFO] [stdout] 614 | | TokenType::Lt, [INFO] [stdout] 615 | | TokenType::Gt, [INFO] [stdout] 616 | | TokenType::Gte, [INFO] [stdout] 617 | | ] [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 611 ~ if [TokenType::Equal, [INFO] [stdout] 612 + TokenType::Lte, [INFO] [stdout] 613 + TokenType::Lt, [INFO] [stdout] 614 + TokenType::Gt, [INFO] [stdout] 615 + TokenType::Gte] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/language/parser/parser.rs:65:19 [INFO] [stdout] | [INFO] [stdout] 65 | } else if vec![ [INFO] [stdout] | ___________________^ [INFO] [stdout] 66 | | TokenType::CreateKeyword, [INFO] [stdout] 67 | | TokenType::DeleteKeyword, [INFO] [stdout] 68 | | TokenType::UseKeyword, [INFO] [stdout] 69 | | TokenType::ShowKeyword, [INFO] [stdout] 70 | | ] [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 65 ~ } else if [TokenType::CreateKeyword, [INFO] [stdout] 66 + TokenType::DeleteKeyword, [INFO] [stdout] 67 + TokenType::UseKeyword, [INFO] [stdout] 68 + TokenType::ShowKeyword] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/language/parser/postprocessor.rs:302:25 [INFO] [stdout] | [INFO] [stdout] 302 | Err(err) => assert!(false, "Output errored out -> {}", err), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/language/parser/table.rs:20:16 [INFO] [stdout] | [INFO] [stdout] 20 | use std::{fmt, usize}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/table.rs:96:9 [INFO] [stdout] | [INFO] [stdout] 96 | return Ok(table_node); [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] 96 - return Ok(table_node); [INFO] [stdout] 96 + Ok(table_node) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: immediately dereferencing a reference [INFO] [stdout] --> src/language/parser/table.rs:118:22 [INFO] [stdout] | [INFO] [stdout] 118 | + if *&pair.1.0.len() != 0 { &" " } else { "" } [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `pair.1.0.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deref_addrof [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/language/parser/table.rs:118:46 [INFO] [stdout] | [INFO] [stdout] 118 | + if *&pair.1.0.len() != 0 { &" " } else { "" } [INFO] [stdout] | ^^^^ help: change this to: `" "` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/table.rs:171:9 [INFO] [stdout] | [INFO] [stdout] 171 | / return Ok(DestroyNode { [INFO] [stdout] 172 | | table: table, [INFO] [stdout] 173 | | condition: condition, [INFO] [stdout] ... | [INFO] [stdout] 182 | | _depth: depth, [INFO] [stdout] 183 | | }); [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] 171 ~ Ok(DestroyNode { [INFO] [stdout] 172 + table: table, [INFO] [stdout] 173 + condition: condition, [INFO] [stdout] 174 + [INFO] [stdout] 175 + _literal: { [INFO] [stdout] 176 + tokens[start_idx..*idx] [INFO] [stdout] 177 + .iter() [INFO] [stdout] 178 + .map(|v| v.lexeme.as_str()) [INFO] [stdout] 179 + .collect::>() [INFO] [stdout] 180 + .join(" ") [INFO] [stdout] 181 + }, [INFO] [stdout] 182 + _depth: depth, [INFO] [stdout] 183 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/language/parser/table.rs:215:45 [INFO] [stdout] | [INFO] [stdout] 215 | table_name.clone() + &colorize(&format!("{}", &where_clause_raw), AnsiColor::Cyan), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(&where_clause_raw).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] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/language/parser/table.rs:216:45 [INFO] [stdout] | [INFO] [stdout] 216 | table_name.clone() + &colorize(&format!("{}", &where_clause_sql), AnsiColor::Cyan), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(&where_clause_sql).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] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/language/parser/table.rs:234:31 [INFO] [stdout] | [INFO] [stdout] 234 | self.table.clone() + &format!("{}", &where_clause_sql) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(&where_clause_sql).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] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/language/parser/table.rs:242:9 [INFO] [stdout] | [INFO] [stdout] 242 | return Ok(ShowNode { _depth: depth }); [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] 242 - return Ok(ShowNode { _depth: depth }); [INFO] [stdout] 242 + Ok(ShowNode { _depth: depth }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/language/parser/table.rs:318:25 [INFO] [stdout] | [INFO] [stdout] 318 | Err(err) => assert!(false, "Output errored out -> {}", err), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/language/parser/table.rs:344:25 [INFO] [stdout] | [INFO] [stdout] 344 | Err(err) => assert!(false, "Output errored out -> {}", err), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/language/parser/table.rs:359:24 [INFO] [stdout] | [INFO] [stdout] 359 | Ok(val) => assert!( [INFO] [stdout] | ________________________^ [INFO] [stdout] 360 | | false, [INFO] [stdout] 361 | | "Output was expected to error but returned -> {}", [INFO] [stdout] 362 | | val [INFO] [stdout] 363 | | ), [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> src/language/parser/table.rs:364:23 [INFO] [stdout] | [INFO] [stdout] 364 | Err(_) => assert!(true, "Output expected to error and did."), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/transpiler/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod transpiler; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/transpiler/transpiler.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | return Ok(format!("{};", parsed.transpile_raw())); [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] 56 - return Ok(format!("{};", parsed.transpile_raw())); [INFO] [stdout] 56 + Ok(format!("{};", parsed.transpile_raw())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/utils/help.rs:25:22 [INFO] [stdout] | [INFO] [stdout] 25 | pub fn display_logo() -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/utils/help.rs:29:39 [INFO] [stdout] | [INFO] [stdout] 29 | pub fn display_help(msg: Option<&str>) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils/logger.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | return Local::now().format("%Y-%m-%d %H:%M:%S").to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 28 - return Local::now().format("%Y-%m-%d %H:%M:%S").to_string(); [INFO] [stdout] 28 + Local::now().format("%Y-%m-%d %H:%M:%S").to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/utils/logger.rs:31:24 [INFO] [stdout] | [INFO] [stdout] 31 | pub fn debug(msg: &str) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/utils/logger.rs:37:24 [INFO] [stdout] | [INFO] [stdout] 37 | pub fn _info(msg: &str) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/utils/logger.rs:43:26 [INFO] [stdout] | [INFO] [stdout] 43 | pub fn warning(msg: &str) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils/query.rs:46:5 [INFO] [stdout] | [INFO] [stdout] 46 | return Some(ast); [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] 46 - return Some(ast); [INFO] [stdout] 46 + Some(ast) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils/query.rs:13:63 [INFO] [stdout] | [INFO] [stdout] 13 | let tokenized: Result = lexer::scan_tokens(&query); [INFO] [stdout] | ^^^^^^ help: change this to: `query` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/utils/query.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 27 | if tokens.len() != 0 && tokens[tokens.len() - 1].token_type != tokens::TokenType::EoqToken { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!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: module has the same name as its containing module [INFO] [stdout] --> src/validator/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod validator; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/validator/validator.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | / match process_query(&query.to_string()) { [INFO] [stdout] 38 | | Some(_) => true, [INFO] [stdout] 39 | | None => false, [INFO] [stdout] 40 | | } [INFO] [stdout] | |_____^ help: try: `process_query(&query.to_string()).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: useless use of `vec!` [INFO] [stdout] --> src/language/parser/conditional.rs:611:12 [INFO] [stdout] | [INFO] [stdout] 611 | if vec![ [INFO] [stdout] | ____________^ [INFO] [stdout] 612 | | TokenType::Equal, [INFO] [stdout] 613 | | TokenType::Lte, [INFO] [stdout] 614 | | TokenType::Lt, [INFO] [stdout] 615 | | TokenType::Gt, [INFO] [stdout] 616 | | TokenType::Gte, [INFO] [stdout] 617 | | ] [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 611 ~ if [TokenType::Equal, [INFO] [stdout] 612 + TokenType::Lte, [INFO] [stdout] 613 + TokenType::Lt, [INFO] [stdout] 614 + TokenType::Gt, [INFO] [stdout] 615 + TokenType::Gte] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/language/parser/parser.rs:65:19 [INFO] [stdout] | [INFO] [stdout] 65 | } else if vec![ [INFO] [stdout] | ___________________^ [INFO] [stdout] 66 | | TokenType::CreateKeyword, [INFO] [stdout] 67 | | TokenType::DeleteKeyword, [INFO] [stdout] 68 | | TokenType::UseKeyword, [INFO] [stdout] 69 | | TokenType::ShowKeyword, [INFO] [stdout] 70 | | ] [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 65 ~ } else if [TokenType::CreateKeyword, [INFO] [stdout] 66 + TokenType::DeleteKeyword, [INFO] [stdout] 67 + TokenType::UseKeyword, [INFO] [stdout] 68 + TokenType::ShowKeyword] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | assert_eq!(engine("create database test;"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 8 - assert_eq!(engine("create database test;"), true); [INFO] [stdout] 8 + assert!(engine("create database test;")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | assert_eq!(engine("make database test."), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 9 - assert_eq!(engine("make database test."), true); [INFO] [stdout] 9 + assert!(engine("make database test.")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | assert_eq!(engine("use database test;"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 15 - assert_eq!(engine("use database test;"), true); [INFO] [stdout] 15 + assert!(engine("use database test;")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | assert_eq!(engine("enter database test;"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 16 - assert_eq!(engine("enter database test;"), true); [INFO] [stdout] 16 + assert!(engine("enter database test;")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | assert_eq!(engine("show database;"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 22 - assert_eq!(engine("show database;"), true); [INFO] [stdout] 22 + assert!(engine("show database;")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | assert_eq!(engine("list databases."), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 23 - assert_eq!(engine("list databases."), true); [INFO] [stdout] 23 + assert!(engine("list databases.")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | assert_eq!(engine("remove database db1!"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 29 - assert_eq!(engine("remove database db1!"), true); [INFO] [stdout] 29 + assert!(engine("remove database db1!")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | assert_eq!(engine("destroy database db1!"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 30 - assert_eq!(engine("destroy database db1!"), true); [INFO] [stdout] 30 + assert!(engine("destroy database db1!")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | assert_eq!(engine("delete database db1!"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 31 - assert_eq!(engine("delete database db1!"), true); [INFO] [stdout] 31 + assert!(engine("delete database db1!")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | assert_eq!(engine("delete databases db1, db2, db3;"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 34 - assert_eq!(engine("delete databases db1, db2, db3;"), true); [INFO] [stdout] 34 + assert!(engine("delete databases db1, db2, db3;")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:35:5 [INFO] [stdout] | [INFO] [stdout] 35 | assert_eq!(engine("Destroy the databases db1, db2 and db3."), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 35 - assert_eq!(engine("Destroy the databases db1, db2 and db3."), true); [INFO] [stdout] 35 + assert!(engine("Destroy the databases db1, db2 and db3.")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:42:5 [INFO] [stdout] | [INFO] [stdout] 42 | assert_eq!(engine("create database test"), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 42 - assert_eq!(engine("create database test"), false); [INFO] [stdout] 42 + assert!(!engine("create database test")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | assert_eq!(engine("Create the test!"), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 43 - assert_eq!(engine("Create the test!"), false); [INFO] [stdout] 43 + assert!(!engine("Create the test!")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 44 | assert_eq!(engine("Make the database \"test\"."), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 44 - assert_eq!(engine("Make the database \"test\"."), false); [INFO] [stdout] 44 + assert!(!engine("Make the database \"test\".")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:50:5 [INFO] [stdout] | [INFO] [stdout] 50 | assert_eq!(engine("use database test"), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 50 - assert_eq!(engine("use database test"), false); [INFO] [stdout] 50 + assert!(!engine("use database test")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:51:5 [INFO] [stdout] | [INFO] [stdout] 51 | assert_eq!(engine("Enter test!"), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 51 - assert_eq!(engine("Enter test!"), false); [INFO] [stdout] 51 + assert!(!engine("Enter test!")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:52:5 [INFO] [stdout] | [INFO] [stdout] 52 | assert_eq!(engine("enter the database \"test\"."), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 52 - assert_eq!(engine("enter the database \"test\"."), false); [INFO] [stdout] 52 + assert!(!engine("enter the database \"test\".")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:58:5 [INFO] [stdout] | [INFO] [stdout] 58 | assert_eq!(engine("show database"), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 58 - assert_eq!(engine("show database"), false); [INFO] [stdout] 58 + assert!(!engine("show database")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | assert_eq!(engine("show!"), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 59 - assert_eq!(engine("show!"), false); [INFO] [stdout] 59 + assert!(!engine("show!")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:60:5 [INFO] [stdout] | [INFO] [stdout] 60 | assert_eq!(engine("List the \"databases\"."), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 60 - assert_eq!(engine("List the \"databases\"."), false); [INFO] [stdout] 60 + assert!(!engine("List the \"databases\".")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:68:5 [INFO] [stdout] | [INFO] [stdout] 68 | assert_eq!(engine("show table;"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 68 - assert_eq!(engine("show table;"), true); [INFO] [stdout] 68 + assert!(engine("show table;")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:69:5 [INFO] [stdout] | [INFO] [stdout] 69 | assert_eq!(engine("list tables."), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 69 - assert_eq!(engine("list tables."), true); [INFO] [stdout] 69 + assert!(engine("list tables.")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:75:5 [INFO] [stdout] | [INFO] [stdout] 75 | assert_eq!(engine("remove table t1!"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 75 - assert_eq!(engine("remove table t1!"), true); [INFO] [stdout] 75 + assert!(engine("remove table t1!")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:76:5 [INFO] [stdout] | [INFO] [stdout] 76 | assert_eq!(engine("destroy table t1!"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 76 - assert_eq!(engine("destroy table t1!"), true); [INFO] [stdout] 76 + assert!(engine("destroy table t1!")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:77:5 [INFO] [stdout] | [INFO] [stdout] 77 | assert_eq!(engine("delete table t1!"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 77 - assert_eq!(engine("delete table t1!"), true); [INFO] [stdout] 77 + assert!(engine("delete table t1!")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:80:5 [INFO] [stdout] | [INFO] [stdout] 80 | assert_eq!(engine("delete table t1 where value = 3;"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 80 - assert_eq!(engine("delete table t1 where value = 3;"), true); [INFO] [stdout] 80 + assert!(engine("delete table t1 where value = 3;")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:81:5 [INFO] [stdout] | [INFO] [stdout] 81 | / assert_eq!( [INFO] [stdout] 82 | | engine("Destroy the table t1 where the value is 5 and (price < 3 or time >= 7)."), [INFO] [stdout] 83 | | true [INFO] [stdout] 84 | | ); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 81 ~ assert!( [INFO] [stdout] 82 ~ engine("Destroy the table t1 where the value is 5 and (price < 3 or time >= 7).") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:91:5 [INFO] [stdout] | [INFO] [stdout] 91 | assert_eq!(engine("show table"), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 91 - assert_eq!(engine("show table"), false); [INFO] [stdout] 91 + assert!(!engine("show table")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:92:5 [INFO] [stdout] | [INFO] [stdout] 92 | assert_eq!(engine("show!"), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 92 - assert_eq!(engine("show!"), false); [INFO] [stdout] 92 + assert!(!engine("show!")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:93:5 [INFO] [stdout] | [INFO] [stdout] 93 | assert_eq!(engine("List the \"tables\"."), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 93 - assert_eq!(engine("List the \"tables\"."), false); [INFO] [stdout] 93 + assert!(!engine("List the \"tables\".")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:99:5 [INFO] [stdout] | [INFO] [stdout] 99 | assert_eq!(engine("delete table t1"), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 99 - assert_eq!(engine("delete table t1"), false); [INFO] [stdout] 99 + assert!(!engine("delete table t1")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:100:5 [INFO] [stdout] | [INFO] [stdout] 100 | assert_eq!(engine("Delete t1!"), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 100 - assert_eq!(engine("Delete t1!"), false); [INFO] [stdout] 100 + assert!(!engine("Delete t1!")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:101:5 [INFO] [stdout] | [INFO] [stdout] 101 | assert_eq!(engine("Destroy the tables t1, \"t2\" and t3."), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 101 - assert_eq!(engine("Destroy the tables t1, \"t2\" and t3."), false); [INFO] [stdout] 101 + assert!(!engine("Destroy the tables t1, \"t2\" and t3.")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:109:5 [INFO] [stdout] | [INFO] [stdout] 109 | assert_eq!(engine("get all from test_table;"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 109 - assert_eq!(engine("get all from test_table;"), true); [INFO] [stdout] 109 + assert!(engine("get all from test_table;")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:110:5 [INFO] [stdout] | [INFO] [stdout] 110 | assert_eq!(engine("get any from test_table;"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 110 - assert_eq!(engine("get any from test_table;"), true); [INFO] [stdout] 110 + assert!(engine("get any from test_table;")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:111:5 [INFO] [stdout] | [INFO] [stdout] 111 | assert_eq!(engine("get everything from test_table;"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 111 - assert_eq!(engine("get everything from test_table;"), true); [INFO] [stdout] 111 + assert!(engine("get everything from test_table;")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:114:5 [INFO] [stdout] | [INFO] [stdout] 114 | assert_eq!(engine("get all from test_table;"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 114 - assert_eq!(engine("get all from test_table;"), true); [INFO] [stdout] 114 + assert!(engine("get all from test_table;")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:115:5 [INFO] [stdout] | [INFO] [stdout] 115 | assert_eq!(engine("retrieve all from test_table;"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 115 - assert_eq!(engine("retrieve all from test_table;"), true); [INFO] [stdout] 115 + assert!(engine("retrieve all from test_table;")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:116:5 [INFO] [stdout] | [INFO] [stdout] 116 | assert_eq!(engine("find all from test_table;"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 116 - assert_eq!(engine("find all from test_table;"), true); [INFO] [stdout] 116 + assert!(engine("find all from test_table;")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:119:5 [INFO] [stdout] | [INFO] [stdout] 119 | assert_eq!(engine("get me id and value from test_table."), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 119 - assert_eq!(engine("get me id and value from test_table."), true); [INFO] [stdout] 119 + assert!(engine("get me id and value from test_table.")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:120:5 [INFO] [stdout] | [INFO] [stdout] 120 | assert_eq!(engine("get me id, price, value from test_table!"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 120 - assert_eq!(engine("get me id, price, value from test_table!"), true); [INFO] [stdout] 120 + assert!(engine("get me id, price, value from test_table!")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:126:5 [INFO] [stdout] | [INFO] [stdout] 126 | assert_eq!(engine("get all from test_table where id = 3;"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 126 - assert_eq!(engine("get all from test_table where id = 3;"), true); [INFO] [stdout] 126 + assert!(engine("get all from test_table where id = 3;")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:127:5 [INFO] [stdout] | [INFO] [stdout] 127 | assert_eq!(engine("get all from test_table wherever id = 3;"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 127 - assert_eq!(engine("get all from test_table wherever id = 3;"), true); [INFO] [stdout] 127 + assert!(engine("get all from test_table wherever id = 3;")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:128:5 [INFO] [stdout] | [INFO] [stdout] 128 | assert_eq!(engine("get all from test_table whenever id = 3;"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 128 - assert_eq!(engine("get all from test_table whenever id = 3;"), true); [INFO] [stdout] 128 + assert!(engine("get all from test_table whenever id = 3;")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:131:5 [INFO] [stdout] | [INFO] [stdout] 131 | / assert_eq!( [INFO] [stdout] 132 | | engine("get all from test_table where id = 3 and price = 2.0."), [INFO] [stdout] 133 | | true [INFO] [stdout] 134 | | ); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 131 ~ assert!( [INFO] [stdout] 132 ~ engine("get all from test_table where id = 3 and price = 2.0.") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:135:5 [INFO] [stdout] | [INFO] [stdout] 135 | / assert_eq!( [INFO] [stdout] 136 | | engine("get all from test_table where id = 3 or (price <= 2 and name is \"3\")!"), [INFO] [stdout] 137 | | true [INFO] [stdout] 138 | | ); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 135 ~ assert!( [INFO] [stdout] 136 ~ engine("get all from test_table where id = 3 or (price <= 2 and name is \"3\")!") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:139:5 [INFO] [stdout] | [INFO] [stdout] 139 | / assert_eq!( [INFO] [stdout] 140 | | engine( [INFO] [stdout] 141 | | "get all from test_table where (price < 3 or name is \"test\" and (id = 3 or (value < 4 and time >= 5)));" [INFO] [stdout] 142 | | ), [INFO] [stdout] 143 | | true [INFO] [stdout] 144 | | ); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 139 ~ assert!( [INFO] [stdout] 140 | engine( [INFO] [stdout] 141 | "get all from test_table where (price < 3 or name is \"test\" and (id = 3 or (value < 4 and time >= 5)));" [INFO] [stdout] 142 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:150:5 [INFO] [stdout] | [INFO] [stdout] 150 | assert_eq!(engine("get all from test_table then limit 5;"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 150 - assert_eq!(engine("get all from test_table then limit 5;"), true); [INFO] [stdout] 150 + assert!(engine("get all from test_table then limit 5;")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:151:5 [INFO] [stdout] | [INFO] [stdout] 151 | assert_eq!(engine("get all from test_table afterwords limit 5;"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 151 - assert_eq!(engine("get all from test_table afterwords limit 5;"), true); [INFO] [stdout] 151 + assert!(engine("get all from test_table afterwords limit 5;")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:152:5 [INFO] [stdout] | [INFO] [stdout] 152 | assert_eq!(engine("get all from test_table after limit 5;"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 152 - assert_eq!(engine("get all from test_table after limit 5;"), true); [INFO] [stdout] 152 + assert!(engine("get all from test_table after limit 5;")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:155:5 [INFO] [stdout] | [INFO] [stdout] 155 | / assert_eq!( [INFO] [stdout] 156 | | engine( [INFO] [stdout] 157 | | "get all from test_table where id = 3 or (price <= 2 and name is \"3\") then limit 5." [INFO] [stdout] 158 | | ), [INFO] [stdout] 159 | | true [INFO] [stdout] 160 | | ); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 155 ~ assert!( [INFO] [stdout] 156 | engine( [INFO] [stdout] 157 | "get all from test_table where id = 3 or (price <= 2 and name is \"3\") then limit 5." [INFO] [stdout] 158 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:166:5 [INFO] [stdout] | [INFO] [stdout] 166 | assert_eq!(engine("get all from test_table then limit 5;"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 166 - assert_eq!(engine("get all from test_table then limit 5;"), true); [INFO] [stdout] 166 + assert!(engine("get all from test_table then limit 5;")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:167:5 [INFO] [stdout] | [INFO] [stdout] 167 | assert_eq!(engine("get all from test_table then limit it to 5;"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 167 - assert_eq!(engine("get all from test_table then limit it to 5;"), true); [INFO] [stdout] 167 + assert!(engine("get all from test_table then limit it to 5;")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:174:5 [INFO] [stdout] | [INFO] [stdout] 174 | assert_eq!(engine("get all from \"test_table\";"), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 174 - assert_eq!(engine("get all from \"test_table\";"), false); [INFO] [stdout] 174 + assert!(!engine("get all from \"test_table\";")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:175:5 [INFO] [stdout] | [INFO] [stdout] 175 | assert_eq!(engine("get all from test_table"), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 175 - assert_eq!(engine("get all from test_table"), false); [INFO] [stdout] 175 + assert!(!engine("get all from test_table")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:176:5 [INFO] [stdout] | [INFO] [stdout] 176 | assert_eq!(engine("get everything in test_table;"), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 176 - assert_eq!(engine("get everything in test_table;"), false); [INFO] [stdout] 176 + assert!(!engine("get everything in test_table;")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:179:5 [INFO] [stdout] | [INFO] [stdout] 179 | assert_eq!(engine("get me id and \"value\" from test_table."), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 179 - assert_eq!(engine("get me id and \"value\" from test_table."), false); [INFO] [stdout] 179 + assert!(!engine("get me id and \"value\" from test_table.")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:180:5 [INFO] [stdout] | [INFO] [stdout] 180 | assert_eq!(engine("get me id, price value from test_table!"), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 180 - assert_eq!(engine("get me id, price value from test_table!"), false); [INFO] [stdout] 180 + assert!(!engine("get me id, price value from test_table!")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:186:5 [INFO] [stdout] | [INFO] [stdout] 186 | assert_eq!(engine("get all from test_table where id = 3"), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 186 - assert_eq!(engine("get all from test_table where id = 3"), false); [INFO] [stdout] 186 + assert!(!engine("get all from test_table where id = 3")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:187:5 [INFO] [stdout] | [INFO] [stdout] 187 | / assert_eq!( [INFO] [stdout] 188 | | engine("get all from test_table where id is equal to 3;"), [INFO] [stdout] 189 | | false [INFO] [stdout] 190 | | ); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 187 ~ assert!( [INFO] [stdout] 188 ~ !engine("get all from test_table where id is equal to 3;") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:191:5 [INFO] [stdout] | [INFO] [stdout] 191 | assert_eq!(engine("get all from test_table where id <== 3;"), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 191 - assert_eq!(engine("get all from test_table where id <== 3;"), false); [INFO] [stdout] 191 + assert!(!engine("get all from test_table where id <== 3;")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:194:5 [INFO] [stdout] | [INFO] [stdout] 194 | / assert_eq!( [INFO] [stdout] 195 | | engine("get all from test_table where id = 3 or (price <= 2 and name is id)!"), [INFO] [stdout] 196 | | false [INFO] [stdout] 197 | | ); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 194 ~ assert!( [INFO] [stdout] 195 ~ !engine("get all from test_table where id = 3 or (price <= 2 and name is id)!") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:198:5 [INFO] [stdout] | [INFO] [stdout] 198 | / assert_eq!( [INFO] [stdout] 199 | | engine( [INFO] [stdout] 200 | | "get all from test_table where (price < 3 or name is \"test\" and (id = 3 or (value < 4 and time >= 5)))));" [INFO] [stdout] 201 | | ), [INFO] [stdout] 202 | | false [INFO] [stdout] 203 | | ); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 198 ~ assert!( [INFO] [stdout] 199 ~ !engine( [INFO] [stdout] 200 | "get all from test_table where (price < 3 or name is \"test\" and (id = 3 or (value < 4 and time >= 5)))));" [INFO] [stdout] 201 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:204:5 [INFO] [stdout] | [INFO] [stdout] 204 | / assert_eq!( [INFO] [stdout] 205 | | engine( [INFO] [stdout] 206 | | "get all from test_table where price < 3 or name is \"test\" and (id = 3 or (value < 4 and time >= 5)))));" [INFO] [stdout] 207 | | ), [INFO] [stdout] 208 | | false [INFO] [stdout] 209 | | ); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 204 ~ assert!( [INFO] [stdout] 205 ~ !engine( [INFO] [stdout] 206 | "get all from test_table where price < 3 or name is \"test\" and (id = 3 or (value < 4 and time >= 5)))));" [INFO] [stdout] 207 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:215:5 [INFO] [stdout] | [INFO] [stdout] 215 | assert_eq!(engine("get all from test_table then limit 5"), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 215 - assert_eq!(engine("get all from test_table then limit 5"), false); [INFO] [stdout] 215 + assert!(!engine("get all from test_table then limit 5")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:218:5 [INFO] [stdout] | [INFO] [stdout] 218 | assert_eq!(engine("get all from test_table afterwords is 5;"), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 218 - assert_eq!(engine("get all from test_table afterwords is 5;"), false); [INFO] [stdout] 218 + assert!(!engine("get all from test_table afterwords is 5;")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:221:5 [INFO] [stdout] | [INFO] [stdout] 221 | / assert_eq!( [INFO] [stdout] 222 | | engine( [INFO] [stdout] 223 | | "get all from test_table then limit 5 where id = 3 or (price <= 2 and name is \"3\")." [INFO] [stdout] 224 | | ), [INFO] [stdout] 225 | | false [INFO] [stdout] 226 | | ); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 221 ~ assert!( [INFO] [stdout] 222 ~ !engine( [INFO] [stdout] 223 | "get all from test_table then limit 5 where id = 3 or (price <= 2 and name is \"3\")." [INFO] [stdout] 224 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:232:5 [INFO] [stdout] | [INFO] [stdout] 232 | assert_eq!(engine("get all from test_table then limit = 5;"), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 232 - assert_eq!(engine("get all from test_table then limit = 5;"), false); [INFO] [stdout] 232 + assert!(!engine("get all from test_table then limit = 5;")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/validator_tests.rs:233:5 [INFO] [stdout] | [INFO] [stdout] 233 | assert_eq!(engine("get all from test_table then limit id;"), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 233 - assert_eq!(engine("get all from test_table then limit id;"), false); [INFO] [stdout] 233 + assert!(!engine("get all from test_table then limit id;")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.78s [INFO] running `Command { std: "docker" "inspect" "ecbc65c143345611a760519166545b0f64396e7678389000f65da5caf1495b2e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ecbc65c143345611a760519166545b0f64396e7678389000f65da5caf1495b2e", kill_on_drop: false }` [INFO] [stdout] ecbc65c143345611a760519166545b0f64396e7678389000f65da5caf1495b2e