[INFO] fetching crate cqlls 1.0.1... [INFO] linting cqlls-1.0.1 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate cqlls 1.0.1 into /workspace/builds/worker-1-tc1/source [INFO] started tweaking crates.io crate cqlls 1.0.1 [INFO] removed 0 missing tests [INFO] finished tweaking crates.io crate cqlls 1.0.1 [INFO] tweaked toml for crates.io crate cqlls 1.0.1 written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate cqlls 1.0.1 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 crates.io crate cqlls 1.0.1 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] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded rand_pcg v0.9.0 [INFO] [stderr] Downloaded scylla-macros v1.4.0 [INFO] [stderr] Downloaded lz4_flex v0.11.5 [INFO] [stderr] Downloaded cc v1.2.54 [INFO] [stderr] Downloaded scylla-cql v1.4.0 [INFO] [stderr] Downloaded tttx-tree-sitter-cql v0.1.1 [INFO] [stderr] Downloaded tree-sitter v0.25.10 [INFO] [stderr] Downloaded scylla v1.4.1 [INFO] [stderr] Downloaded fern v0.7.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 12deeda84d16c9d4b05025fb2642a6aa9f12701bb2c167ca02d49aebd578a656 [INFO] running `Command { std: "docker" "start" "-a" "12deeda84d16c9d4b05025fb2642a6aa9f12701bb2c167ca02d49aebd578a656", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "12deeda84d16c9d4b05025fb2642a6aa9f12701bb2c167ca02d49aebd578a656", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "12deeda84d16c9d4b05025fb2642a6aa9f12701bb2c167ca02d49aebd578a656", kill_on_drop: false }` [INFO] [stdout] 12deeda84d16c9d4b05025fb2642a6aa9f12701bb2c167ca02d49aebd578a656 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 5b7e5d8ec603d2983071c1b0ef9231e886296a42086176252c86c3a168b14edc [INFO] running `Command { std: "docker" "start" "-a" "5b7e5d8ec603d2983071c1b0ef9231e886296a42086176252c86c3a168b14edc", kill_on_drop: false }` [INFO] [stderr] Compiling zmij v1.0.16 [INFO] [stderr] Compiling proc-macro2 v1.0.106 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling libc v0.2.180 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking getrandom v0.3.4 [INFO] [stderr] Checking tracing-core v0.1.36 [INFO] [stderr] Checking regex-automata v0.4.13 [INFO] [stderr] Compiling bigdecimal v0.4.10 [INFO] [stderr] Compiling num-bigint v0.3.3 [INFO] [stderr] Compiling snap v1.1.1 [INFO] [stderr] Checking hashbrown v0.14.5 [INFO] [stderr] Checking deranged v0.5.5 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking twox-hash v2.1.2 [INFO] [stderr] Checking time-core v0.1.7 [INFO] [stderr] Checking rand_core v0.9.5 [INFO] [stderr] Checking lz4_flex v0.11.5 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Checking uuid v1.20.0 [INFO] [stderr] Checking itertools v0.14.0 [INFO] [stderr] Checking serde_json v1.0.149 [INFO] [stderr] Checking secrecy v0.8.0 [INFO] [stderr] Checking hashbrown v0.15.5 [INFO] [stderr] Checking dirs-sys v0.5.0 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking arc-swap v1.8.0 [INFO] [stderr] Checking rand_pcg v0.9.0 [INFO] [stderr] Checking tracing-log v0.2.0 [INFO] [stderr] Checking socket2 v0.5.10 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Checking chrono v0.4.43 [INFO] [stderr] Compiling quote v1.0.44 [INFO] [stderr] Checking dirs v6.0.0 [INFO] [stderr] Checking dashmap v6.1.0 [INFO] [stderr] Checking dashmap v5.5.3 [INFO] [stderr] Checking clap v4.5.54 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Checking rustls-pemfile v2.2.0 [INFO] [stderr] Checking fern v0.7.1 [INFO] [stderr] Compiling syn v2.0.114 [INFO] [stderr] Checking num-bigint v0.4.6 [INFO] [stderr] Checking time v0.3.45 [INFO] [stderr] Compiling jobserver v0.1.34 [INFO] [stderr] Compiling cc v1.2.54 [INFO] [stderr] Compiling cmake v0.1.57 [INFO] [stderr] Compiling tree-sitter v0.25.10 [INFO] [stderr] Compiling tttx-tree-sitter-cql v0.1.1 [INFO] [stderr] Compiling aws-lc-sys v0.36.0 [INFO] [stderr] Checking matchers v0.2.0 [INFO] [stderr] Checking regex v1.12.2 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling darling_core v0.20.11 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.1 [INFO] [stderr] Compiling zerovec-derive v0.11.2 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling tokio-macros v2.6.0 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling tracing-attributes v0.1.31 [INFO] [stderr] Compiling pin-project-internal v1.1.10 [INFO] [stderr] Compiling thiserror-impl v2.0.18 [INFO] [stderr] Compiling async-trait v0.1.89 [INFO] [stderr] Checking tokio v1.49.0 [INFO] [stderr] Compiling serde_repr v0.1.20 [INFO] [stderr] Compiling tower-lsp-macros v0.9.0 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Compiling auto_impl v1.3.0 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking pin-project v1.1.10 [INFO] [stderr] Checking yoke v0.8.1 [INFO] [stderr] Checking tracing v0.1.44 [INFO] [stderr] Checking zerovec v0.11.5 [INFO] [stderr] Checking zerotrie v0.2.3 [INFO] [stderr] Checking thiserror v2.0.18 [INFO] [stderr] Checking tracing-subscriber v0.3.22 [INFO] [stderr] Compiling darling_macro v0.20.11 [INFO] [stderr] Compiling darling v0.20.11 [INFO] [stderr] Checking tinystr v0.8.2 [INFO] [stderr] Checking potential_utf v0.1.4 [INFO] [stderr] Compiling scylla-macros v1.4.0 [INFO] [stderr] Checking icu_collections v2.1.1 [INFO] [stderr] Checking icu_locale_core v2.1.1 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking futures-executor v0.3.31 [INFO] [stderr] Checking tower v0.4.13 [INFO] [stderr] Checking futures v0.3.31 [INFO] [stderr] Checking icu_provider v2.1.1 [INFO] [stderr] Checking icu_normalizer v2.1.1 [INFO] [stderr] Checking icu_properties v2.1.2 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking url v2.5.8 [INFO] [stderr] Compiling aws-lc-rs v1.15.3 [INFO] [stderr] Compiling rustls v0.23.36 [INFO] [stderr] Checking lsp-types v0.94.1 [INFO] [stderr] Checking scylla-cql v1.4.0 [INFO] [stderr] Checking tokio-util v0.7.18 [INFO] [stderr] Checking rustls-webpki v0.103.8 [INFO] [stderr] Checking tokio-rustls v0.26.4 [INFO] [stderr] Checking scylla v1.4.1 [INFO] [stderr] Checking tower-lsp v0.20.0 [INFO] [stderr] Checking cqlls v1.0.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `rustls_pemfile` [INFO] [stdout] --> src/cqlsh.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | use rustls_pemfile; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::File` [INFO] [stdout] --> src/cqlsh.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | use std::fs::File; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::BufReader` [INFO] [stdout] --> src/cqlsh.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 39 | use std::io::BufReader; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around assigned value [INFO] [stdout] --> src/formatting.rs:116:29 [INFO] [stdout] | [INFO] [stdout] 116 | is_end_st = (line.trim().ends_with(";") || lines[pos + 1].trim().is_empty()); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 116 - is_end_st = (line.trim().ends_with(";") || lines[pos + 1].trim().is_empty()); [INFO] [stdout] 116 + is_end_st = line.trim().ends_with(";") || lines[pos + 1].trim().is_empty(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rustls_pemfile` [INFO] [stdout] --> src/cqlsh.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | use rustls_pemfile; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::File` [INFO] [stdout] --> src/cqlsh.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | use std::fs::File; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::BufReader` [INFO] [stdout] --> src/cqlsh.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 39 | use std::io::BufReader; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around assigned value [INFO] [stdout] --> src/formatting.rs:116:29 [INFO] [stdout] | [INFO] [stdout] 116 | is_end_st = (line.trim().ends_with(";") || lines[pos + 1].trim().is_empty()); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 116 - is_end_st = (line.trim().ends_with(";") || lines[pos + 1].trim().is_empty()); [INFO] [stdout] 116 + is_end_st = line.trim().ends_with(";") || lines[pos + 1].trim().is_empty(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Node` and `TreeCursor` [INFO] [stdout] --> src/tree_sitter.rs:26:19 [INFO] [stdout] | [INFO] [stdout] 26 | use tree_sitter::{Node, Parser, TreeCursor}; [INFO] [stdout] | ^^^^ ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Node` and `TreeCursor` [INFO] [stdout] --> src/tree_sitter.rs:26:19 [INFO] [stdout] | [INFO] [stdout] 26 | use tree_sitter::{Node, Parser, TreeCursor}; [INFO] [stdout] | ^^^^ ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/completions.rs:81:13 [INFO] [stdout] | [INFO] [stdout] 81 | let mut index: usize = 0; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `index` [INFO] [stdout] --> src/completions.rs:81:13 [INFO] [stdout] | [INFO] [stdout] 81 | let mut index: usize = 0; [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_index` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `line` [INFO] [stdout] --> src/completions.rs:521:51 [INFO] [stdout] | [INFO] [stdout] 521 | pub fn should_suggest_command_sequence(&self, line: &str, position: &Position) -> bool { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_line` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `position` [INFO] [stdout] --> src/completions.rs:521:63 [INFO] [stdout] | [INFO] [stdout] 521 | pub fn should_suggest_command_sequence(&self, line: &str, position: &Position) -> bool { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_position` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/completions.rs:863:13 [INFO] [stdout] | [INFO] [stdout] 863 | let mut result_str: String; [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/completions.rs:81:13 [INFO] [stdout] | [INFO] [stdout] 81 | let mut index: usize = 0; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `index` [INFO] [stdout] --> src/completions.rs:81:13 [INFO] [stdout] | [INFO] [stdout] 81 | let mut index: usize = 0; [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_index` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `line` [INFO] [stdout] --> src/completions.rs:1863:48 [INFO] [stdout] | [INFO] [stdout] 1863 | pub fn should_edit_select_statement(&self, line: &str, lines: &Vec) -> bool { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_line` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `lines` [INFO] [stdout] --> src/completions.rs:1863:60 [INFO] [stdout] | [INFO] [stdout] 1863 | pub fn should_edit_select_statement(&self, line: &str, lines: &Vec) -> bool { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_lines` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `line` [INFO] [stdout] --> src/completions.rs:521:51 [INFO] [stdout] | [INFO] [stdout] 521 | pub fn should_suggest_command_sequence(&self, line: &str, position: &Position) -> bool { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_line` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `position` [INFO] [stdout] --> src/completions.rs:521:63 [INFO] [stdout] | [INFO] [stdout] 521 | pub fn should_suggest_command_sequence(&self, line: &str, position: &Position) -> bool { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_position` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/completions.rs:863:13 [INFO] [stdout] | [INFO] [stdout] 863 | let mut result_str: String; [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `is_end_st` is never read [INFO] [stdout] --> src/formatting.rs:113:33 [INFO] [stdout] | [INFO] [stdout] 113 | let mut is_end_st = false; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `line` [INFO] [stdout] --> src/completions.rs:1863:48 [INFO] [stdout] | [INFO] [stdout] 1863 | pub fn should_edit_select_statement(&self, line: &str, lines: &Vec) -> bool { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_line` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `lines` [INFO] [stdout] --> src/completions.rs:1863:60 [INFO] [stdout] | [INFO] [stdout] 1863 | pub fn should_edit_select_statement(&self, line: &str, lines: &Vec) -> bool { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_lines` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `document_url` [INFO] [stdout] --> src/formatting.rs:969:9 [INFO] [stdout] | [INFO] [stdout] 969 | document_url: &Url, [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_document_url` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `is_end_st` is never read [INFO] [stdout] --> src/formatting.rs:113:33 [INFO] [stdout] | [INFO] [stdout] 113 | let mut is_end_st = false; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `document_url` [INFO] [stdout] --> src/formatting.rs:969:9 [INFO] [stdout] | [INFO] [stdout] 969 | document_url: &Url, [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_document_url` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/completions.rs:40:12 [INFO] [stdout] | [INFO] [stdout] 40 | if keyword.eq_ignore_ascii_case("use") == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!keyword.eq_ignore_ascii_case("use")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/completions.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 75 | / if let Some(semi_colon_pos) = line.find(&";") { [INFO] [stdout] 76 | | if position.character > semi_colon_pos as u32 { [INFO] [stdout] 77 | | return false; [INFO] [stdout] 78 | | } [INFO] [stdout] 79 | | } [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] 75 ~ if let Some(semi_colon_pos) = line.find(&";") [INFO] [stdout] 76 ~ && position.character > semi_colon_pos as u32 { [INFO] [stdout] 77 | return false; [INFO] [stdout] 78 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/completions.rs:75:49 [INFO] [stdout] | [INFO] [stdout] 75 | if let Some(semi_colon_pos) = line.find(&";") { [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_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/completions.rs:137:9 [INFO] [stdout] | [INFO] [stdout] 137 | / if let Some(ksp_index) = lw.rfind("keyspace") { [INFO] [stdout] 138 | | if position.character as usize <= ksp_index + 8 { [INFO] [stdout] 139 | | return false; [INFO] [stdout] 140 | | } [INFO] [stdout] 141 | | } [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] 137 ~ if let Some(ksp_index) = lw.rfind("keyspace") [INFO] [stdout] 138 ~ && position.character as usize <= ksp_index + 8 { [INFO] [stdout] 139 | return false; [INFO] [stdout] 140 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/completions.rs:173:9 [INFO] [stdout] | [INFO] [stdout] 173 | / if let Some(ksp_index) = lw.rfind("aggregate") { [INFO] [stdout] 174 | | if position.character as usize <= ksp_index + 8 { [INFO] [stdout] 175 | | return false; [INFO] [stdout] 176 | | } [INFO] [stdout] 177 | | } [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] 173 ~ if let Some(ksp_index) = lw.rfind("aggregate") [INFO] [stdout] 174 ~ && position.character as usize <= ksp_index + 8 { [INFO] [stdout] 175 | return false; [INFO] [stdout] 176 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/completions.rs:212:9 [INFO] [stdout] | [INFO] [stdout] 212 | / if let Some(ksp_function) = lw.rfind("function") { [INFO] [stdout] 213 | | if position.character as usize <= ksp_function + 8 { [INFO] [stdout] 214 | | return false; [INFO] [stdout] 215 | | } [INFO] [stdout] 216 | | } [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] 212 ~ if let Some(ksp_function) = lw.rfind("function") [INFO] [stdout] 213 ~ && position.character as usize <= ksp_function + 8 { [INFO] [stdout] 214 | return false; [INFO] [stdout] 215 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/completions.rs:248:9 [INFO] [stdout] | [INFO] [stdout] 248 | / if let Some(ksp_index) = lw.rfind("index") { [INFO] [stdout] 249 | | if position.character as usize <= ksp_index + 8 { [INFO] [stdout] 250 | | return false; [INFO] [stdout] 251 | | } [INFO] [stdout] 252 | | } [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] 248 ~ if let Some(ksp_index) = lw.rfind("index") [INFO] [stdout] 249 ~ && position.character as usize <= ksp_index + 8 { [INFO] [stdout] 250 | return false; [INFO] [stdout] 251 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/completions.rs:283:9 [INFO] [stdout] | [INFO] [stdout] 283 | / if let Some(ksp_type) = lw.rfind("type") { [INFO] [stdout] 284 | | if position.character as usize <= ksp_type + 8 { [INFO] [stdout] 285 | | return false; [INFO] [stdout] 286 | | } [INFO] [stdout] 287 | | } [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] 283 ~ if let Some(ksp_type) = lw.rfind("type") [INFO] [stdout] 284 ~ && position.character as usize <= ksp_type + 8 { [INFO] [stdout] 285 | return false; [INFO] [stdout] 286 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/completions.rs:318:9 [INFO] [stdout] | [INFO] [stdout] 318 | / if let Some(ksp_view) = lw.rfind("view") { [INFO] [stdout] 319 | | if position.character as usize <= ksp_view + 8 { [INFO] [stdout] 320 | | return false; [INFO] [stdout] 321 | | } [INFO] [stdout] 322 | | } [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] 318 ~ if let Some(ksp_view) = lw.rfind("view") [INFO] [stdout] 319 ~ && position.character as usize <= ksp_view + 8 { [INFO] [stdout] 320 | return false; [INFO] [stdout] 321 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/completions.rs:353:9 [INFO] [stdout] | [INFO] [stdout] 353 | / if let Some(ksp_index) = lw.rfind("table") { [INFO] [stdout] 354 | | if position.character as usize <= ksp_index + 8 { [INFO] [stdout] 355 | | return false; [INFO] [stdout] 356 | | } [INFO] [stdout] 357 | | } [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] 353 ~ if let Some(ksp_index) = lw.rfind("table") [INFO] [stdout] 354 ~ && position.character as usize <= ksp_index + 8 { [INFO] [stdout] 355 | return false; [INFO] [stdout] 356 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/completions.rs:783:9 [INFO] [stdout] | [INFO] [stdout] 783 | return true; [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] 783 - return true; [INFO] [stdout] 783 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/completions.rs:545:9 [INFO] [stdout] | [INFO] [stdout] 545 | / if let Some(semi_colon_pos) = line.find(&";") { [INFO] [stdout] 546 | | if position.character > semi_colon_pos as u32 { [INFO] [stdout] 547 | | return false; [INFO] [stdout] 548 | | } [INFO] [stdout] 549 | | } [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] 545 ~ if let Some(semi_colon_pos) = line.find(&";") [INFO] [stdout] 546 ~ && position.character > semi_colon_pos as u32 { [INFO] [stdout] 547 | return false; [INFO] [stdout] 548 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/completions.rs:545:49 [INFO] [stdout] | [INFO] [stdout] 545 | if let Some(semi_colon_pos) = line.find(&";") { [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_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/completions.rs:557:9 [INFO] [stdout] | [INFO] [stdout] 557 | / if lw.contains("select") && lw.contains("from") { [INFO] [stdout] 558 | | if let Some(from_pos) = line.find(&";") { [INFO] [stdout] 559 | | if position.character < (from_pos + 1) as u32 { [INFO] [stdout] 560 | | return false; [INFO] [stdout] ... | [INFO] [stdout] 563 | | } [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] 557 ~ if lw.contains("select") && lw.contains("from") [INFO] [stdout] 558 ~ && let Some(from_pos) = line.find(&";") { [INFO] [stdout] 559 | if position.character < (from_pos + 1) as u32 { [INFO] [stdout] 560 | return false; [INFO] [stdout] 561 | } [INFO] [stdout] 562 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/completions.rs:558:13 [INFO] [stdout] | [INFO] [stdout] 558 | / if let Some(from_pos) = line.find(&";") { [INFO] [stdout] 559 | | if position.character < (from_pos + 1) as u32 { [INFO] [stdout] 560 | | return false; [INFO] [stdout] 561 | | } [INFO] [stdout] 562 | | } [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] 558 ~ if let Some(from_pos) = line.find(&";") [INFO] [stdout] 559 ~ && position.character < (from_pos + 1) as u32 { [INFO] [stdout] 560 | return false; [INFO] [stdout] 561 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/completions.rs:558:47 [INFO] [stdout] | [INFO] [stdout] 558 | if let Some(from_pos) = line.find(&";") { [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_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/completions.rs:568:12 [INFO] [stdout] | [INFO] [stdout] 568 | if split.len() > 0 && split[split.len() - 1].contains(";") { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!split.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: the borrowed expression implements the required traits [INFO] [stdout] --> src/completions.rs:583:34 [INFO] [stdout] | [INFO] [stdout] 583 | let posx = line.find(&")").unwrap(); [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_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `pos` is used as a loop counter [INFO] [stdout] --> src/completions.rs:798:13 [INFO] [stdout] | [INFO] [stdout] 798 | for str in split { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using: `for (pos, str) in split.into_iter().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/completions.rs:801:24 [INFO] [stdout] | [INFO] [stdout] 801 | if keyspace_latest.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!keyspace_latest.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/completions.rs:816:16 [INFO] [stdout] | [INFO] [stdout] 816 | if keyspace_latest.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!keyspace_latest.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/completions.rs:907:75 [INFO] [stdout] | [INFO] [stdout] 907 | ... cqlsh::query_hard_scoped_fields(&self.config, &ksp, &tbl).await; [INFO] [stdout] | ^^^^ help: change this to: `ksp` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/completions.rs:907:81 [INFO] [stdout] | [INFO] [stdout] 907 | ... cqlsh::query_hard_scoped_fields(&self.config, &ksp, &tbl).await; [INFO] [stdout] | ^^^^ help: change this to: `tbl` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/completions.rs:908:25 [INFO] [stdout] | [INFO] [stdout] 908 | / match result { [INFO] [stdout] 909 | | Ok(mut r) => { [INFO] [stdout] 910 | | items.append(&mut r); [INFO] [stdout] ... | [INFO] [stdout] 913 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 908 ~ if let Ok(mut r) = result { [INFO] [stdout] 909 + items.append(&mut r); [INFO] [stdout] 910 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/completions.rs:923:90 [INFO] [stdout] | [INFO] [stdout] 923 | ... let text_edit_str = self.column_to_text_edit(&item, Some(&ksp)); [INFO] [stdout] | ^^^^ help: change this to: `ksp` [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: useless use of `format!` [INFO] [stdout] --> src/completions.rs:962:55 [INFO] [stdout] | [INFO] [stdout] 962 | ... insert_text: Some(format!("{}", item.column_name)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `item.column_name.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: comparison to empty slice [INFO] [stdout] --> src/completions.rs:984:16 [INFO] [stdout] | [INFO] [stdout] 984 | if tbl_name != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!tbl_name.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/completions.rs:987:17 [INFO] [stdout] | [INFO] [stdout] 987 | / match result { [INFO] [stdout] 988 | | Ok(mut r) => { [INFO] [stdout] 989 | | items.append(&mut r); [INFO] [stdout] ... | [INFO] [stdout] 992 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 987 ~ if let Ok(mut r) = result { [INFO] [stdout] 988 + items.append(&mut r); [INFO] [stdout] 989 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/completions.rs:1045:43 [INFO] [stdout] | [INFO] [stdout] 1045 | insert_text: Some(format!("{}", item.column_name)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `item.column_name.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/completions.rs:1117:39 [INFO] [stdout] | [INFO] [stdout] 1117 | insert_text: Some(format!("{}", item.column_name)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `item.column_name.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: length comparison to zero [INFO] [stdout] --> src/completions.rs:1156:12 [INFO] [stdout] | [INFO] [stdout] 1156 | if splitted.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!splitted.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/completions.rs:1270:9 [INFO] [stdout] | [INFO] [stdout] 1270 | return Ok(Some(CompletionResponse::Array(items))); [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] 1270 - return Ok(Some(CompletionResponse::Array(items))); [INFO] [stdout] 1270 + Ok(Some(CompletionResponse::Array(items))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/completions.rs:1216:54 [INFO] [stdout] | [INFO] [stdout] 1216 | if let Some(keyspace) = self.latest_keyspace(&position).await { [INFO] [stdout] | ^^^^^^^^^ help: change this to: `position` [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: useless use of `format!` [INFO] [stdout] --> src/completions.rs:1232:34 [INFO] [stdout] | [INFO] [stdout] 1232 | detail: Some(format!("{}", table.united())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `table.united().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/completions.rs:1233:39 [INFO] [stdout] | [INFO] [stdout] 1233 | insert_text: Some(format!(r#"{}"#, table.table_name)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `table.table_name.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/completions.rs:1243:34 [INFO] [stdout] | [INFO] [stdout] 1243 | detail: Some(format!("{}", tablex.united())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `tablex.united().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/completions.rs:1244:39 [INFO] [stdout] | [INFO] [stdout] 1244 | insert_text: Some(format!(r#"{}"#, tablex.united())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `tablex.united().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/completions.rs:1263:30 [INFO] [stdout] | [INFO] [stdout] 1263 | detail: Some(format!("{}", table.united())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `table.united().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/completions.rs:1264:35 [INFO] [stdout] | [INFO] [stdout] 1264 | insert_text: Some(format!(r#"{}"#, table.united())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `table.united().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: the loop variable `i` is only used to index `lines` [INFO] [stdout] --> src/completions.rs:1319:22 [INFO] [stdout] | [INFO] [stdout] 1319 | for i in (current_line + 1)..lines.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 1319 - for i in (current_line + 1)..lines.len() { [INFO] [stdout] 1319 + for in lines.iter().skip((current_line + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `lines` [INFO] [stdout] --> src/completions.rs:1372:22 [INFO] [stdout] | [INFO] [stdout] 1372 | for i in line_index..lines.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 1372 - for i in line_index..lines.len() { [INFO] [stdout] 1372 + for in lines.iter().skip(line_index) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `lines` [INFO] [stdout] --> src/completions.rs:1424:22 [INFO] [stdout] | [INFO] [stdout] 1424 | for i in line_index..lines.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 1424 - for i in line_index..lines.len() { [INFO] [stdout] 1424 + for in lines.iter().skip(line_index) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `lines` [INFO] [stdout] --> src/completions.rs:1486:22 [INFO] [stdout] | [INFO] [stdout] 1486 | for i in (current_line + 1)..lines.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 1486 - for i in (current_line + 1)..lines.len() { [INFO] [stdout] 1486 + for in lines.iter().skip((current_line + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `lines` [INFO] [stdout] --> src/completions.rs:1574:22 [INFO] [stdout] | [INFO] [stdout] 1574 | for i in (current_line + 1)..lines.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 1574 - for i in (current_line + 1)..lines.len() { [INFO] [stdout] 1574 + for in lines.iter().skip((current_line + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/completions.rs:1686:9 [INFO] [stdout] | [INFO] [stdout] 1686 | / if let Some(semi_colon_pos) = line.find(&";") { [INFO] [stdout] 1687 | | if position.character > semi_colon_pos as u32 { [INFO] [stdout] 1688 | | return false; [INFO] [stdout] 1689 | | } [INFO] [stdout] 1690 | | } [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] 1686 ~ if let Some(semi_colon_pos) = line.find(&";") [INFO] [stdout] 1687 ~ && position.character > semi_colon_pos as u32 { [INFO] [stdout] 1688 | return false; [INFO] [stdout] 1689 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/completions.rs:1686:49 [INFO] [stdout] | [INFO] [stdout] 1686 | if let Some(semi_colon_pos) = line.find(&";") { [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_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/completions.rs:1802:12 [INFO] [stdout] | [INFO] [stdout] 1802 | if split.len() < 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `split.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/completions.rs:1827:12 [INFO] [stdout] | [INFO] [stdout] 1827 | if split.len() < 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `split.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/completions.rs:1852:12 [INFO] [stdout] | [INFO] [stdout] 1852 | if split.len() < 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `split.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/completions.rs:1863:67 [INFO] [stdout] | [INFO] [stdout] 1863 | pub fn should_edit_select_statement(&self, line: &str, lines: &Vec) -> bool { [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] 1863 - pub fn should_edit_select_statement(&self, line: &str, lines: &Vec) -> bool { [INFO] [stdout] 1863 + pub fn should_edit_select_statement(&self, line: &str, lines: &[String]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/completions.rs:40:12 [INFO] [stdout] | [INFO] [stdout] 40 | if keyword.eq_ignore_ascii_case("use") == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!keyword.eq_ignore_ascii_case("use")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/completions.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 75 | / if let Some(semi_colon_pos) = line.find(&";") { [INFO] [stdout] 76 | | if position.character > semi_colon_pos as u32 { [INFO] [stdout] 77 | | return false; [INFO] [stdout] 78 | | } [INFO] [stdout] 79 | | } [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] 75 ~ if let Some(semi_colon_pos) = line.find(&";") [INFO] [stdout] 76 ~ && position.character > semi_colon_pos as u32 { [INFO] [stdout] 77 | return false; [INFO] [stdout] 78 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/completions.rs:75:49 [INFO] [stdout] | [INFO] [stdout] 75 | if let Some(semi_colon_pos) = line.find(&";") { [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_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/completions.rs:137:9 [INFO] [stdout] | [INFO] [stdout] 137 | / if let Some(ksp_index) = lw.rfind("keyspace") { [INFO] [stdout] 138 | | if position.character as usize <= ksp_index + 8 { [INFO] [stdout] 139 | | return false; [INFO] [stdout] 140 | | } [INFO] [stdout] 141 | | } [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] 137 ~ if let Some(ksp_index) = lw.rfind("keyspace") [INFO] [stdout] 138 ~ && position.character as usize <= ksp_index + 8 { [INFO] [stdout] 139 | return false; [INFO] [stdout] 140 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/completions.rs:173:9 [INFO] [stdout] | [INFO] [stdout] 173 | / if let Some(ksp_index) = lw.rfind("aggregate") { [INFO] [stdout] 174 | | if position.character as usize <= ksp_index + 8 { [INFO] [stdout] 175 | | return false; [INFO] [stdout] 176 | | } [INFO] [stdout] 177 | | } [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] 173 ~ if let Some(ksp_index) = lw.rfind("aggregate") [INFO] [stdout] 174 ~ && position.character as usize <= ksp_index + 8 { [INFO] [stdout] 175 | return false; [INFO] [stdout] 176 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/completions.rs:212:9 [INFO] [stdout] | [INFO] [stdout] 212 | / if let Some(ksp_function) = lw.rfind("function") { [INFO] [stdout] 213 | | if position.character as usize <= ksp_function + 8 { [INFO] [stdout] 214 | | return false; [INFO] [stdout] 215 | | } [INFO] [stdout] 216 | | } [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] 212 ~ if let Some(ksp_function) = lw.rfind("function") [INFO] [stdout] 213 ~ && position.character as usize <= ksp_function + 8 { [INFO] [stdout] 214 | return false; [INFO] [stdout] 215 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/completions.rs:248:9 [INFO] [stdout] | [INFO] [stdout] 248 | / if let Some(ksp_index) = lw.rfind("index") { [INFO] [stdout] 249 | | if position.character as usize <= ksp_index + 8 { [INFO] [stdout] 250 | | return false; [INFO] [stdout] 251 | | } [INFO] [stdout] 252 | | } [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] 248 ~ if let Some(ksp_index) = lw.rfind("index") [INFO] [stdout] 249 ~ && position.character as usize <= ksp_index + 8 { [INFO] [stdout] 250 | return false; [INFO] [stdout] 251 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/completions.rs:283:9 [INFO] [stdout] | [INFO] [stdout] 283 | / if let Some(ksp_type) = lw.rfind("type") { [INFO] [stdout] 284 | | if position.character as usize <= ksp_type + 8 { [INFO] [stdout] 285 | | return false; [INFO] [stdout] 286 | | } [INFO] [stdout] 287 | | } [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] 283 ~ if let Some(ksp_type) = lw.rfind("type") [INFO] [stdout] 284 ~ && position.character as usize <= ksp_type + 8 { [INFO] [stdout] 285 | return false; [INFO] [stdout] 286 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/completions.rs:318:9 [INFO] [stdout] | [INFO] [stdout] 318 | / if let Some(ksp_view) = lw.rfind("view") { [INFO] [stdout] 319 | | if position.character as usize <= ksp_view + 8 { [INFO] [stdout] 320 | | return false; [INFO] [stdout] 321 | | } [INFO] [stdout] 322 | | } [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] 318 ~ if let Some(ksp_view) = lw.rfind("view") [INFO] [stdout] 319 ~ && position.character as usize <= ksp_view + 8 { [INFO] [stdout] 320 | return false; [INFO] [stdout] 321 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/completions.rs:353:9 [INFO] [stdout] | [INFO] [stdout] 353 | / if let Some(ksp_index) = lw.rfind("table") { [INFO] [stdout] 354 | | if position.character as usize <= ksp_index + 8 { [INFO] [stdout] 355 | | return false; [INFO] [stdout] 356 | | } [INFO] [stdout] 357 | | } [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] 353 ~ if let Some(ksp_index) = lw.rfind("table") [INFO] [stdout] 354 ~ && position.character as usize <= ksp_index + 8 { [INFO] [stdout] 355 | return false; [INFO] [stdout] 356 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/completions.rs:783:9 [INFO] [stdout] | [INFO] [stdout] 783 | return true; [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] 783 - return true; [INFO] [stdout] 783 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/completions.rs:545:9 [INFO] [stdout] | [INFO] [stdout] 545 | / if let Some(semi_colon_pos) = line.find(&";") { [INFO] [stdout] 546 | | if position.character > semi_colon_pos as u32 { [INFO] [stdout] 547 | | return false; [INFO] [stdout] 548 | | } [INFO] [stdout] 549 | | } [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] 545 ~ if let Some(semi_colon_pos) = line.find(&";") [INFO] [stdout] 546 ~ && position.character > semi_colon_pos as u32 { [INFO] [stdout] 547 | return false; [INFO] [stdout] 548 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/completions.rs:545:49 [INFO] [stdout] | [INFO] [stdout] 545 | if let Some(semi_colon_pos) = line.find(&";") { [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_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/completions.rs:557:9 [INFO] [stdout] | [INFO] [stdout] 557 | / if lw.contains("select") && lw.contains("from") { [INFO] [stdout] 558 | | if let Some(from_pos) = line.find(&";") { [INFO] [stdout] 559 | | if position.character < (from_pos + 1) as u32 { [INFO] [stdout] 560 | | return false; [INFO] [stdout] ... | [INFO] [stdout] 563 | | } [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] 557 ~ if lw.contains("select") && lw.contains("from") [INFO] [stdout] 558 ~ && let Some(from_pos) = line.find(&";") { [INFO] [stdout] 559 | if position.character < (from_pos + 1) as u32 { [INFO] [stdout] 560 | return false; [INFO] [stdout] 561 | } [INFO] [stdout] 562 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/completions.rs:558:13 [INFO] [stdout] | [INFO] [stdout] 558 | / if let Some(from_pos) = line.find(&";") { [INFO] [stdout] 559 | | if position.character < (from_pos + 1) as u32 { [INFO] [stdout] 560 | | return false; [INFO] [stdout] 561 | | } [INFO] [stdout] 562 | | } [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] 558 ~ if let Some(from_pos) = line.find(&";") [INFO] [stdout] 559 ~ && position.character < (from_pos + 1) as u32 { [INFO] [stdout] 560 | return false; [INFO] [stdout] 561 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/completions.rs:558:47 [INFO] [stdout] | [INFO] [stdout] 558 | if let Some(from_pos) = line.find(&";") { [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_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/completions.rs:568:12 [INFO] [stdout] | [INFO] [stdout] 568 | if split.len() > 0 && split[split.len() - 1].contains(";") { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!split.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: the borrowed expression implements the required traits [INFO] [stdout] --> src/completions.rs:583:34 [INFO] [stdout] | [INFO] [stdout] 583 | let posx = line.find(&")").unwrap(); [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_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `CqlSettings` [INFO] [stdout] --> src/cqlsh.rs:136:5 [INFO] [stdout] | [INFO] [stdout] 136 | / pub fn new() -> Self { [INFO] [stdout] 137 | | Self { [INFO] [stdout] 138 | | url: String::from("127.0.0.1:9042"), [INFO] [stdout] 139 | | pswd: String::from("cassandra"), [INFO] [stdout] ... | [INFO] [stdout] 143 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 135 + impl Default for CqlSettings { [INFO] [stdout] 136 + fn default() -> Self { [INFO] [stdout] 137 + Self::new() [INFO] [stdout] 138 + } [INFO] [stdout] 139 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `pos` is used as a loop counter [INFO] [stdout] --> src/completions.rs:798:13 [INFO] [stdout] | [INFO] [stdout] 798 | for str in split { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using: `for (pos, str) in split.into_iter().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/completions.rs:801:24 [INFO] [stdout] | [INFO] [stdout] 801 | if keyspace_latest.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!keyspace_latest.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/completions.rs:816:16 [INFO] [stdout] | [INFO] [stdout] 816 | if keyspace_latest.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!keyspace_latest.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/completions.rs:907:75 [INFO] [stdout] | [INFO] [stdout] 907 | ... cqlsh::query_hard_scoped_fields(&self.config, &ksp, &tbl).await; [INFO] [stdout] | ^^^^ help: change this to: `ksp` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/completions.rs:907:81 [INFO] [stdout] | [INFO] [stdout] 907 | ... cqlsh::query_hard_scoped_fields(&self.config, &ksp, &tbl).await; [INFO] [stdout] | ^^^^ help: change this to: `tbl` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/completions.rs:908:25 [INFO] [stdout] | [INFO] [stdout] 908 | / match result { [INFO] [stdout] 909 | | Ok(mut r) => { [INFO] [stdout] 910 | | items.append(&mut r); [INFO] [stdout] ... | [INFO] [stdout] 913 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 908 ~ if let Ok(mut r) = result { [INFO] [stdout] 909 + items.append(&mut r); [INFO] [stdout] 910 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/completions.rs:923:90 [INFO] [stdout] | [INFO] [stdout] 923 | ... let text_edit_str = self.column_to_text_edit(&item, Some(&ksp)); [INFO] [stdout] | ^^^^ help: change this to: `ksp` [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: useless use of `format!` [INFO] [stdout] --> src/completions.rs:962:55 [INFO] [stdout] | [INFO] [stdout] 962 | ... insert_text: Some(format!("{}", item.column_name)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `item.column_name.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: comparison to empty slice [INFO] [stdout] --> src/completions.rs:984:16 [INFO] [stdout] | [INFO] [stdout] 984 | if tbl_name != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!tbl_name.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/completions.rs:987:17 [INFO] [stdout] | [INFO] [stdout] 987 | / match result { [INFO] [stdout] 988 | | Ok(mut r) => { [INFO] [stdout] 989 | | items.append(&mut r); [INFO] [stdout] ... | [INFO] [stdout] 992 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 987 ~ if let Ok(mut r) = result { [INFO] [stdout] 988 + items.append(&mut r); [INFO] [stdout] 989 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/completions.rs:1045:43 [INFO] [stdout] | [INFO] [stdout] 1045 | insert_text: Some(format!("{}", item.column_name)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `item.column_name.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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/cqlsh.rs:296:37 [INFO] [stdout] | [INFO] [stdout] 296 | let keyspaces = query_keyspaces(&config).await?; [INFO] [stdout] | ^^^^^^^ help: change this to: `config` [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: useless use of `format!` [INFO] [stdout] --> src/completions.rs:1117:39 [INFO] [stdout] | [INFO] [stdout] 1117 | insert_text: Some(format!("{}", item.column_name)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `item.column_name.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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/cqlsh.rs:300:55 [INFO] [stdout] | [INFO] [stdout] 300 | let mut tables = query_keyspace_scoped_tables(&config, &keyspace.keyspace_name).await?; [INFO] [stdout] | ^^^^^^^ help: change this to: `config` [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/completions.rs:1156:12 [INFO] [stdout] | [INFO] [stdout] 1156 | if splitted.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!splitted.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/completions.rs:1270:9 [INFO] [stdout] | [INFO] [stdout] 1270 | return Ok(Some(CompletionResponse::Array(items))); [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] 1270 - return Ok(Some(CompletionResponse::Array(items))); [INFO] [stdout] 1270 + Ok(Some(CompletionResponse::Array(items))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/completions.rs:1216:54 [INFO] [stdout] | [INFO] [stdout] 1216 | if let Some(keyspace) = self.latest_keyspace(&position).await { [INFO] [stdout] | ^^^^^^^^^ help: change this to: `position` [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: useless use of `format!` [INFO] [stdout] --> src/completions.rs:1232:34 [INFO] [stdout] | [INFO] [stdout] 1232 | detail: Some(format!("{}", table.united())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `table.united().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/completions.rs:1233:39 [INFO] [stdout] | [INFO] [stdout] 1233 | insert_text: Some(format!(r#"{}"#, table.table_name)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `table.table_name.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/cqlsh.rs:399:17 [INFO] [stdout] | [INFO] [stdout] 399 | let query = format!("SELECT keyspace_name, aggregate_name FROM system_schema.aggregates;"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"SELECT keyspace_name, aggregate_name FROM system_schema.aggregates;".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/completions.rs:1243:34 [INFO] [stdout] | [INFO] [stdout] 1243 | detail: Some(format!("{}", tablex.united())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `tablex.united().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/completions.rs:1244:39 [INFO] [stdout] | [INFO] [stdout] 1244 | insert_text: Some(format!(r#"{}"#, tablex.united())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `tablex.united().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/cqlsh.rs:435:17 [INFO] [stdout] | [INFO] [stdout] 435 | let query = format!("SELECT keyspace_name, function_name FROM system_schema.functions;"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"SELECT keyspace_name, function_name FROM system_schema.functions;".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/completions.rs:1263:30 [INFO] [stdout] | [INFO] [stdout] 1263 | detail: Some(format!("{}", table.united())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `table.united().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/completions.rs:1264:35 [INFO] [stdout] | [INFO] [stdout] 1264 | insert_text: Some(format!(r#"{}"#, table.united())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `table.united().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/cqlsh.rs:466:17 [INFO] [stdout] | [INFO] [stdout] 466 | let query = format!("SELECT keyspace_name, index_name FROM system_schema.indexes;"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"SELECT keyspace_name, index_name FROM system_schema.indexes;".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: the loop variable `i` is only used to index `lines` [INFO] [stdout] --> src/completions.rs:1319:22 [INFO] [stdout] | [INFO] [stdout] 1319 | for i in (current_line + 1)..lines.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 1319 - for i in (current_line + 1)..lines.len() { [INFO] [stdout] 1319 + for in lines.iter().skip((current_line + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/cqlsh.rs:496:17 [INFO] [stdout] | [INFO] [stdout] 496 | let query = format!("SELECT keyspace_name, type_name FROM system_schema.types;"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"SELECT keyspace_name, type_name FROM system_schema.types;".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: the loop variable `i` is only used to index `lines` [INFO] [stdout] --> src/completions.rs:1372:22 [INFO] [stdout] | [INFO] [stdout] 1372 | for i in line_index..lines.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 1372 - for i in line_index..lines.len() { [INFO] [stdout] 1372 + for in lines.iter().skip(line_index) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/cqlsh.rs:543:17 [INFO] [stdout] | [INFO] [stdout] 543 | let query = format!("SELECT keyspace_name, view_name FROM system_schema.views;"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"SELECT keyspace_name, view_name FROM system_schema.views;".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: the loop variable `i` is only used to index `lines` [INFO] [stdout] --> src/completions.rs:1424:22 [INFO] [stdout] | [INFO] [stdout] 1424 | for i in line_index..lines.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 1424 - for i in line_index..lines.len() { [INFO] [stdout] 1424 + for in lines.iter().skip(line_index) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `InsertStatement` [INFO] [stdout] --> src/formatting.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | / pub fn new() -> Self { [INFO] [stdout] 38 | | Self { [INFO] [stdout] 39 | | table_name: "".to_string(), [INFO] [stdout] 40 | | fields: Vec::new(), [INFO] [stdout] ... | [INFO] [stdout] 43 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 36 + impl Default for InsertStatement { [INFO] [stdout] 37 + fn default() -> Self { [INFO] [stdout] 38 + Self::new() [INFO] [stdout] 39 + } [INFO] [stdout] 40 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/formatting.rs:53:13 [INFO] [stdout] | [INFO] [stdout] 53 | / if current == ' ' { [INFO] [stdout] 54 | | if let Some(&&next) = iter.peek() { [INFO] [stdout] 55 | | if matches!(next, ' ' | ';' | ',' | ')' | '>') { [INFO] [stdout] 56 | | continue; [INFO] [stdout] ... | [INFO] [stdout] 59 | | } [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] 53 ~ if current == ' ' [INFO] [stdout] 54 ~ && let Some(&&next) = iter.peek() { [INFO] [stdout] 55 | if matches!(next, ' ' | ';' | ',' | ')' | '>') { [INFO] [stdout] 56 | continue; [INFO] [stdout] 57 | } [INFO] [stdout] 58 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/formatting.rs:54:17 [INFO] [stdout] | [INFO] [stdout] 54 | / if let Some(&&next) = iter.peek() { [INFO] [stdout] 55 | | if matches!(next, ' ' | ';' | ',' | ')' | '>') { [INFO] [stdout] 56 | | continue; [INFO] [stdout] 57 | | } [INFO] [stdout] 58 | | } [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] 54 ~ if let Some(&&next) = iter.peek() [INFO] [stdout] 55 ~ && matches!(next, ' ' | ';' | ',' | ')' | '>') { [INFO] [stdout] 56 | continue; [INFO] [stdout] 57 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `lines` [INFO] [stdout] --> src/completions.rs:1486:22 [INFO] [stdout] | [INFO] [stdout] 1486 | for i in (current_line + 1)..lines.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 1486 - for i in (current_line + 1)..lines.len() { [INFO] [stdout] 1486 + for in lines.iter().skip((current_line + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implicitly performing saturating subtraction [INFO] [stdout] --> src/formatting.rs:87:24 [INFO] [stdout] | [INFO] [stdout] 87 | } else if index > 0 { [INFO] [stdout] | ________________________^ [INFO] [stdout] 88 | | index -= 1; [INFO] [stdout] 89 | | } [INFO] [stdout] | |_________________^ help: try: `index = index.saturating_sub(1);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub [INFO] [stdout] = note: `#[warn(clippy::implicit_saturating_sub)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/formatting.rs:100:13 [INFO] [stdout] | [INFO] [stdout] 100 | return true; [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] 100 ~ true [INFO] [stdout] 101 | } else { [INFO] [stdout] 102 | return false; [INFO] [stdout] 103 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/formatting.rs:102:13 [INFO] [stdout] | [INFO] [stdout] 102 | return false; [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] 102 ~ false [INFO] [stdout] 103 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/formatting.rs:99:9 [INFO] [stdout] | [INFO] [stdout] 99 | / if line.trim().to_lowercase().starts_with("insert into") { [INFO] [stdout] 100 | | return true; [INFO] [stdout] 101 | | } else { [INFO] [stdout] 102 | | return false; [INFO] [stdout] 103 | | }; [INFO] [stdout] | |_________^ help: you can reduce it to: `return line.trim().to_lowercase().starts_with("insert into")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `lines` [INFO] [stdout] --> src/completions.rs:1574:22 [INFO] [stdout] | [INFO] [stdout] 1574 | for i in (current_line + 1)..lines.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 1574 - for i in (current_line + 1)..lines.len() { [INFO] [stdout] 1574 + for in lines.iter().skip((current_line + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/formatting.rs:371:54 [INFO] [stdout] | [INFO] [stdout] 371 | pub async fn add_tabs_to_cql_types(&self, lines: &mut Vec, document_url: &Url) { [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] 371 - pub async fn add_tabs_to_cql_types(&self, lines: &mut Vec, document_url: &Url) { [INFO] [stdout] 371 + pub async fn add_tabs_to_cql_types(&self, lines: &mut [String], document_url: &Url) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/formatting.rs:410:77 [INFO] [stdout] | [INFO] [stdout] 410 | ... .is_inside_multiline_comment_no_position(index, &document_url) [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `document_url` [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/formatting.rs:418:13 [INFO] [stdout] | [INFO] [stdout] 418 | / if let Some(typ) = found_type { [INFO] [stdout] 419 | | if let Some(offset) = line.find(typ) { [INFO] [stdout] 420 | | if offset > 0 { [INFO] [stdout] 421 | | if !line[..offset] [INFO] [stdout] ... | [INFO] [stdout] 431 | | } [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] 418 ~ if let Some(typ) = found_type [INFO] [stdout] 419 ~ && let Some(offset) = line.find(typ) { [INFO] [stdout] 420 | if offset > 0 { [INFO] [stdout] ... [INFO] [stdout] 429 | } [INFO] [stdout] 430 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/formatting.rs:419:17 [INFO] [stdout] | [INFO] [stdout] 419 | / if let Some(offset) = line.find(typ) { [INFO] [stdout] 420 | | if offset > 0 { [INFO] [stdout] 421 | | if !line[..offset] [INFO] [stdout] 422 | | .ends_with(&" ".repeat(self.formatting_config.type_alignment_offset)) [INFO] [stdout] ... | [INFO] [stdout] 430 | | } [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] 419 ~ if let Some(offset) = line.find(typ) [INFO] [stdout] 420 ~ && offset > 0 { [INFO] [stdout] 421 | if !line[..offset] [INFO] [stdout] ... [INFO] [stdout] 428 | } [INFO] [stdout] 429 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/formatting.rs:420:21 [INFO] [stdout] | [INFO] [stdout] 420 | / if offset > 0 { [INFO] [stdout] 421 | | if !line[..offset] [INFO] [stdout] 422 | | .ends_with(&" ".repeat(self.formatting_config.type_alignment_offset)) [INFO] [stdout] ... | [INFO] [stdout] 429 | | } [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] 420 ~ if offset > 0 [INFO] [stdout] 421 ~ && !line[..offset] [INFO] [stdout] 422 | .ends_with(&" ".repeat(self.formatting_config.type_alignment_offset)) [INFO] [stdout] ... [INFO] [stdout] 427 | ); [INFO] [stdout] 428 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/formatting.rs:437:62 [INFO] [stdout] | [INFO] [stdout] 437 | pub async fn add_tabs_to_function_keywords(&self, lines: &mut Vec, document_url: &Url) { [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] 437 - pub async fn add_tabs_to_function_keywords(&self, lines: &mut Vec, document_url: &Url) { [INFO] [stdout] 437 + pub async fn add_tabs_to_function_keywords(&self, lines: &mut [String], document_url: &Url) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/formatting.rs:457:69 [INFO] [stdout] | [INFO] [stdout] 457 | .is_inside_multiline_comment_no_position(index, &document_url) [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `document_url` [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/completions.rs:1686:9 [INFO] [stdout] | [INFO] [stdout] 1686 | / if let Some(semi_colon_pos) = line.find(&";") { [INFO] [stdout] 1687 | | if position.character > semi_colon_pos as u32 { [INFO] [stdout] 1688 | | return false; [INFO] [stdout] 1689 | | } [INFO] [stdout] 1690 | | } [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] 1686 ~ if let Some(semi_colon_pos) = line.find(&";") [INFO] [stdout] 1687 ~ && position.character > semi_colon_pos as u32 { [INFO] [stdout] 1688 | return false; [INFO] [stdout] 1689 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/completions.rs:1686:49 [INFO] [stdout] | [INFO] [stdout] 1686 | if let Some(semi_colon_pos) = line.find(&";") { [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_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/formatting.rs:599:46 [INFO] [stdout] | [INFO] [stdout] 599 | pub fn fix_string_literals(&self, lines: &mut Vec) { [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] 599 - pub fn fix_string_literals(&self, lines: &mut Vec) { [INFO] [stdout] 599 + pub fn fix_string_literals(&self, lines: &mut [String]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/formatting.rs:631:41 [INFO] [stdout] | [INFO] [stdout] 631 | pub fn fix_semi_colon(&self, lines: &mut Vec) { [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] 631 - pub fn fix_semi_colon(&self, lines: &mut Vec) { [INFO] [stdout] 631 + pub fn fix_semi_colon(&self, lines: &mut [String]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implicitly performing saturating subtraction [INFO] [stdout] --> src/formatting.rs:659:24 [INFO] [stdout] | [INFO] [stdout] 659 | } else if index > 0 { [INFO] [stdout] | ________________________^ [INFO] [stdout] 660 | | index -= 1; [INFO] [stdout] 661 | | } [INFO] [stdout] | |_________________^ help: try: `index = index.saturating_sub(1);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implicitly performing saturating subtraction [INFO] [stdout] --> src/formatting.rs:687:24 [INFO] [stdout] | [INFO] [stdout] 687 | } else if index > 0 { [INFO] [stdout] | ________________________^ [INFO] [stdout] 688 | | index -= 1; [INFO] [stdout] 689 | | } [INFO] [stdout] | |_________________^ help: try: `index = index.saturating_sub(1);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/formatting.rs:706:33 [INFO] [stdout] | [INFO] [stdout] 706 | if last_new_line && lines[index].len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `lines[index].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implicitly performing saturating subtraction [INFO] [stdout] --> src/formatting.rs:710:24 [INFO] [stdout] | [INFO] [stdout] 710 | } else if index > 0 { [INFO] [stdout] | ________________________^ [INFO] [stdout] 711 | | index -= 1; [INFO] [stdout] 712 | | } [INFO] [stdout] | |_________________^ help: try: `index = index.saturating_sub(1);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/formatting.rs:715:32 [INFO] [stdout] | [INFO] [stdout] 715 | if last_bracket && lines[index].len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `lines[index].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implicitly performing saturating subtraction [INFO] [stdout] --> src/formatting.rs:719:24 [INFO] [stdout] | [INFO] [stdout] 719 | } else if index > 0 { [INFO] [stdout] | ________________________^ [INFO] [stdout] 720 | | index -= 1; [INFO] [stdout] 721 | | } [INFO] [stdout] | |_________________^ help: try: `index = index.saturating_sub(1);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/formatting.rs:724:13 [INFO] [stdout] | [INFO] [stdout] 724 | / if lines[index].len() == 0 [INFO] [stdout] 725 | | && !self.is_line_in_multiline_comment(&lines[index], index, lines) [INFO] [stdout] 726 | | { [INFO] [stdout] 727 | | last_new_line = true; [INFO] [stdout] 728 | | } else { [INFO] [stdout] 729 | | last_new_line = false; [INFO] [stdout] 730 | | } [INFO] [stdout] | |_____________^ help: you can reduce it to: `last_new_line = lines[index].len() == 0 && !self.is_line_in_multiline_comment(&lines[index], index, lines);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] = note: `#[warn(clippy::needless_bool_assign)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/formatting.rs:724:16 [INFO] [stdout] | [INFO] [stdout] 724 | if lines[index].len() == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `lines[index].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/formatting.rs:732:13 [INFO] [stdout] | [INFO] [stdout] 732 | / if lines[index].contains("(") { [INFO] [stdout] 733 | | last_bracket = true; [INFO] [stdout] 734 | | } else { [INFO] [stdout] 735 | | last_bracket = false [INFO] [stdout] 736 | | } [INFO] [stdout] | |_____________^ help: you can reduce it to: `last_bracket = lines[index].contains("(");` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/formatting.rs:752:38 [INFO] [stdout] | [INFO] [stdout] 752 | if !inside_code_block && line.len() > 0 && !line.contains(";") { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/formatting.rs:761:20 [INFO] [stdout] | [INFO] [stdout] 761 | && line.len() == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implicitly performing saturating subtraction [INFO] [stdout] --> src/formatting.rs:767:24 [INFO] [stdout] | [INFO] [stdout] 767 | } else if index > 0 { [INFO] [stdout] | ________________________^ [INFO] [stdout] 768 | | index -= 1; [INFO] [stdout] 769 | | } [INFO] [stdout] | |_________________^ help: try: `index = index.saturating_sub(1);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/completions.rs:1802:12 [INFO] [stdout] | [INFO] [stdout] 1802 | if split.len() < 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `split.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/completions.rs:1827:12 [INFO] [stdout] | [INFO] [stdout] 1827 | if split.len() < 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `split.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/completions.rs:1852:12 [INFO] [stdout] | [INFO] [stdout] 1852 | if split.len() < 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `split.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/completions.rs:1863:67 [INFO] [stdout] | [INFO] [stdout] 1863 | pub fn should_edit_select_statement(&self, line: &str, lines: &Vec) -> bool { [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] 1863 - pub fn should_edit_select_statement(&self, line: &str, lines: &Vec) -> bool { [INFO] [stdout] 1863 + pub fn should_edit_select_statement(&self, line: &str, lines: &[String]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/formatting.rs:789:20 [INFO] [stdout] | [INFO] [stdout] 789 | && line.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/formatting.rs:802:20 [INFO] [stdout] | [INFO] [stdout] 802 | if lines[index + 1].to_lowercase().len() == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `lines[index + 1].to_lowercase().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/formatting.rs:810:20 [INFO] [stdout] | [INFO] [stdout] 810 | && line.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/formatting.rs:834:20 [INFO] [stdout] | [INFO] [stdout] 834 | && lines[index + 1].len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!lines[index + 1].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/formatting.rs:866:50 [INFO] [stdout] | [INFO] [stdout] 866 | pub fn add_spacing_after_comma(&self, lines: &mut Vec) { [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] 866 - pub fn add_spacing_after_comma(&self, lines: &mut Vec) { [INFO] [stdout] 866 + pub fn add_spacing_after_comma(&self, lines: &mut [String]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `start_idx` is used as a loop counter [INFO] [stdout] --> src/formatting.rs:941:17 [INFO] [stdout] | [INFO] [stdout] 941 | for kw in working_buf.iter_mut() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (start_idx, kw) in (index + 1..).zip(working_buf.iter_mut())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/formatting.rs:968:16 [INFO] [stdout] | [INFO] [stdout] 968 | lines: &mut Vec, [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] 968 - lines: &mut Vec, [INFO] [stdout] 968 + lines: &mut [String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/formatting.rs:1087:50 [INFO] [stdout] | [INFO] [stdout] 1087 | let mut working_vec: Vec = lines.into_iter().map(|s| s.to_string()).collect(); [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: the loop variable `index` is only used to index `working_vec` [INFO] [stdout] --> src/formatting.rs:1089:22 [INFO] [stdout] | [INFO] [stdout] 1089 | for index in 0..working_vec.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 1089 - for index in 0..working_vec.len() { [INFO] [stdout] 1089 + for in &mut working_vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/handlers.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 36 | / if let Some(prefix) = line.get(..position.character as usize) { [INFO] [stdout] 37 | | if let Some(quote_pos) = prefix.rfind(|c| c == '"' || c == '\'') { [INFO] [stdout] 38 | | let quote_char = prefix.chars().nth(quote_pos).unwrap_or('"'); [INFO] [stdout] 39 | | let typed_prefix = prefix.get(quote_pos + 1..).unwrap_or(""); [INFO] [stdout] ... | [INFO] [stdout] 102 | | } [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] 36 ~ if let Some(prefix) = line.get(..position.character as usize) [INFO] [stdout] 37 ~ && let Some(quote_pos) = prefix.rfind(|c| c == '"' || c == '\'') { [INFO] [stdout] 38 | let quote_char = prefix.chars().nth(quote_pos).unwrap_or('"'); [INFO] [stdout] ... [INFO] [stdout] 100 | } [INFO] [stdout] 101 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/handlers.rs:37:51 [INFO] [stdout] | [INFO] [stdout] 37 | if let Some(quote_pos) = prefix.rfind(|c| c == '"' || c == '\'') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['"', '\'']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] = note: `#[warn(clippy::manual_pattern_char_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/handlers.rs:59:49 [INFO] [stdout] | [INFO] [stdout] 59 | if has_closing_quote && has_semicolon == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `!has_semicolon` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:199:9 [INFO] [stdout] | [INFO] [stdout] 199 | / return Ok(Some(CompletionResponse::Array( [INFO] [stdout] 200 | | KEYWORDS.iter().cloned().collect(), [INFO] [stdout] 201 | | ))); [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] 199 ~ Ok(Some(CompletionResponse::Array( [INFO] [stdout] 200 + KEYWORDS.iter().cloned().collect(), [INFO] [stdout] 201 ~ ))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:207:9 [INFO] [stdout] | [INFO] [stdout] 207 | / return Ok(Some(CompletionResponse::Array( [INFO] [stdout] 208 | | TYPES.iter().cloned().collect(), [INFO] [stdout] 209 | | ))); [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] 207 ~ Ok(Some(CompletionResponse::Array( [INFO] [stdout] 208 + TYPES.iter().cloned().collect(), [INFO] [stdout] 209 ~ ))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:239:9 [INFO] [stdout] | [INFO] [stdout] 239 | / return Ok(Some(CompletionResponse::Array(vec![ [INFO] [stdout] 240 | | CompletionItem { [INFO] [stdout] 241 | | label: "PRIMARY KEY".to_string(), [INFO] [stdout] 242 | | kind: Some(CompletionItemKind::KEYWORD), [INFO] [stdout] ... | [INFO] [stdout] 279 | | }, [INFO] [stdout] 280 | | ]))); [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] 239 ~ Ok(Some(CompletionResponse::Array(vec![ [INFO] [stdout] 240 + CompletionItem { [INFO] [stdout] 241 + label: "PRIMARY KEY".to_string(), [INFO] [stdout] 242 + kind: Some(CompletionItemKind::KEYWORD), [INFO] [stdout] 243 + detail: Some("Upper case PRIMARY KEY type modifier".to_string()), [INFO] [stdout] 244 + documentation: Some(Documentation::String( [INFO] [stdout] 245 + "PRIMARY KEY type modifier".to_string(), [INFO] [stdout] 246 + )), [INFO] [stdout] 247 + insert_text: Some(r#"PRIMARY KEY"#.to_string()), [INFO] [stdout] 248 + insert_text_format: Some(InsertTextFormat::SNIPPET), [INFO] [stdout] 249 + ..Default::default() [INFO] [stdout] 250 + }, [INFO] [stdout] 251 + CompletionItem { [INFO] [stdout] 252 + label: "primary key".to_string(), [INFO] [stdout] 253 + kind: Some(CompletionItemKind::KEYWORD), [INFO] [stdout] 254 + detail: Some("Lower case primary key type modifier".to_string()), [INFO] [stdout] 255 + documentation: Some(Documentation::String( [INFO] [stdout] 256 + "primary key type modifier".to_string(), [INFO] [stdout] 257 + )), [INFO] [stdout] 258 + insert_text: Some(r#"primary key"#.to_string()), [INFO] [stdout] 259 + insert_text_format: Some(InsertTextFormat::SNIPPET), [INFO] [stdout] 260 + ..Default::default() [INFO] [stdout] 261 + }, [INFO] [stdout] 262 + CompletionItem { [INFO] [stdout] 263 + label: "STATIC".to_string(), [INFO] [stdout] 264 + kind: Some(CompletionItemKind::KEYWORD), [INFO] [stdout] 265 + detail: Some("Upper case STATIC type modifier".to_string()), [INFO] [stdout] 266 + documentation: Some(Documentation::String("STATIC type modifier".to_string())), [INFO] [stdout] 267 + insert_text: Some(r#"STATIC"#.to_string()), [INFO] [stdout] 268 + insert_text_format: Some(InsertTextFormat::SNIPPET), [INFO] [stdout] 269 + ..Default::default() [INFO] [stdout] 270 + }, [INFO] [stdout] 271 + CompletionItem { [INFO] [stdout] 272 + label: "static".to_string(), [INFO] [stdout] 273 + kind: Some(CompletionItemKind::KEYWORD), [INFO] [stdout] 274 + detail: Some("Lower case static type modifier".to_string()), [INFO] [stdout] 275 + documentation: Some(Documentation::String("static type modifier".to_string())), [INFO] [stdout] 276 + insert_text: Some(r#"static"#.to_string()), [INFO] [stdout] 277 + insert_text_format: Some(InsertTextFormat::SNIPPET), [INFO] [stdout] 278 + ..Default::default() [INFO] [stdout] 279 + }, [INFO] [stdout] 280 ~ ]))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:296:9 [INFO] [stdout] | [INFO] [stdout] 296 | return Ok(Some(CompletionResponse::Array(vec![]))); [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] 296 - return Ok(Some(CompletionResponse::Array(vec![]))); [INFO] [stdout] 296 + Ok(Some(CompletionResponse::Array(vec![]))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:300:9 [INFO] [stdout] | [INFO] [stdout] 300 | / return Ok(Some(CompletionResponse::Array(vec![ [INFO] [stdout] 301 | | CompletionItem { [INFO] [stdout] 302 | | label: "FROM".to_string(), [INFO] [stdout] 303 | | kind: Some(CompletionItemKind::KEYWORD), [INFO] [stdout] ... | [INFO] [stdout] 318 | | }, [INFO] [stdout] 319 | | ]))); [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] 300 ~ Ok(Some(CompletionResponse::Array(vec![ [INFO] [stdout] 301 + CompletionItem { [INFO] [stdout] 302 + label: "FROM".to_string(), [INFO] [stdout] 303 + kind: Some(CompletionItemKind::KEYWORD), [INFO] [stdout] 304 + detail: Some("Upper case FROM keyword".to_string()), [INFO] [stdout] 305 + documentation: Some(Documentation::String("FROM keyword".to_string())), [INFO] [stdout] 306 + insert_text: Some(r#"FROM $0"#.to_string()), [INFO] [stdout] 307 + insert_text_format: Some(InsertTextFormat::SNIPPET), [INFO] [stdout] 308 + ..Default::default() [INFO] [stdout] 309 + }, [INFO] [stdout] 310 + CompletionItem { [INFO] [stdout] 311 + label: "from".to_string(), [INFO] [stdout] 312 + kind: Some(CompletionItemKind::KEYWORD), [INFO] [stdout] 313 + detail: Some("Lower case from keyword".to_string()), [INFO] [stdout] 314 + documentation: Some(Documentation::String("FROM keyword".to_string())), [INFO] [stdout] 315 + insert_text: Some(r#"from $0"#.to_string()), [INFO] [stdout] 316 + insert_text_format: Some(InsertTextFormat::SNIPPET), [INFO] [stdout] 317 + ..Default::default() [INFO] [stdout] 318 + }, [INFO] [stdout] 319 ~ ]))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:351:9 [INFO] [stdout] | [INFO] [stdout] 351 | return Ok(Some(CompletionResponse::Array(items))); [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] 351 - return Ok(Some(CompletionResponse::Array(items))); [INFO] [stdout] 351 + Ok(Some(CompletionResponse::Array(items))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/handlers.rs:359:9 [INFO] [stdout] | [INFO] [stdout] 359 | / if let Some(prefix) = line.get(..position.character as usize) { [INFO] [stdout] 360 | | if let Some(quote_pos) = prefix.rfind(|c| c == '"' || c == '\'') { [INFO] [stdout] 361 | | let quote_char = prefix.chars().nth(quote_pos).unwrap_or('"'); [INFO] [stdout] 362 | | let typed_prefix = prefix.get(quote_pos + 1..).unwrap_or(""); [INFO] [stdout] ... | [INFO] [stdout] 425 | | } [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] 359 ~ if let Some(prefix) = line.get(..position.character as usize) [INFO] [stdout] 360 ~ && let Some(quote_pos) = prefix.rfind(|c| c == '"' || c == '\'') { [INFO] [stdout] 361 | let quote_char = prefix.chars().nth(quote_pos).unwrap_or('"'); [INFO] [stdout] ... [INFO] [stdout] 423 | } [INFO] [stdout] 424 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/handlers.rs:360:51 [INFO] [stdout] | [INFO] [stdout] 360 | if let Some(quote_pos) = prefix.rfind(|c| c == '"' || c == '\'') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['"', '\'']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/handlers.rs:382:49 [INFO] [stdout] | [INFO] [stdout] 382 | if has_closing_quote && has_semicolon == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `!has_semicolon` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:1082:17 [INFO] [stdout] | [INFO] [stdout] 1082 | return Ok(Some(CompletionResponse::Array(items))); [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] 1082 - return Ok(Some(CompletionResponse::Array(items))); [INFO] [stdout] 1082 + Ok(Some(CompletionResponse::Array(items))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:1085:23 [INFO] [stdout] | [INFO] [stdout] 1085 | Err(_) => return Ok(Some(CompletionResponse::Array(vec![]))), [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] 1085 - Err(_) => return Ok(Some(CompletionResponse::Array(vec![]))), [INFO] [stdout] 1085 + Err(_) => Ok(Some(CompletionResponse::Array(vec![]))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:1108:17 [INFO] [stdout] | [INFO] [stdout] 1108 | return Ok(Some(CompletionResponse::Array(items))); [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] 1108 - return Ok(Some(CompletionResponse::Array(items))); [INFO] [stdout] 1108 + Ok(Some(CompletionResponse::Array(items))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:1111:23 [INFO] [stdout] | [INFO] [stdout] 1111 | Err(_) => return Ok(Some(CompletionResponse::Array(vec![]))), [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] 1111 - Err(_) => return Ok(Some(CompletionResponse::Array(vec![]))), [INFO] [stdout] 1111 + Err(_) => Ok(Some(CompletionResponse::Array(vec![]))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:1134:17 [INFO] [stdout] | [INFO] [stdout] 1134 | return Ok(Some(CompletionResponse::Array(items))); [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] 1134 - return Ok(Some(CompletionResponse::Array(items))); [INFO] [stdout] 1134 + Ok(Some(CompletionResponse::Array(items))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:1137:23 [INFO] [stdout] | [INFO] [stdout] 1137 | Err(_) => return Ok(Some(CompletionResponse::Array(vec![]))), [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] 1137 - Err(_) => return Ok(Some(CompletionResponse::Array(vec![]))), [INFO] [stdout] 1137 + Err(_) => Ok(Some(CompletionResponse::Array(vec![]))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:1160:17 [INFO] [stdout] | [INFO] [stdout] 1160 | return Ok(Some(CompletionResponse::Array(items))); [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] 1160 - return Ok(Some(CompletionResponse::Array(items))); [INFO] [stdout] 1160 + Ok(Some(CompletionResponse::Array(items))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:1163:23 [INFO] [stdout] | [INFO] [stdout] 1163 | Err(_) => return Ok(Some(CompletionResponse::Array(vec![]))), [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] 1163 - Err(_) => return Ok(Some(CompletionResponse::Array(vec![]))), [INFO] [stdout] 1163 + Err(_) => Ok(Some(CompletionResponse::Array(vec![]))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:1186:17 [INFO] [stdout] | [INFO] [stdout] 1186 | return Ok(Some(CompletionResponse::Array(items))); [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] 1186 - return Ok(Some(CompletionResponse::Array(items))); [INFO] [stdout] 1186 + Ok(Some(CompletionResponse::Array(items))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:1189:23 [INFO] [stdout] | [INFO] [stdout] 1189 | Err(_) => return Ok(Some(CompletionResponse::Array(vec![]))), [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] 1189 - Err(_) => return Ok(Some(CompletionResponse::Array(vec![]))), [INFO] [stdout] 1189 + Err(_) => Ok(Some(CompletionResponse::Array(vec![]))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/setup.rs:74:13 [INFO] [stdout] | [INFO] [stdout] 74 | "cassandara", "cassandara", "127.0.0.1" [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal [INFO] [stdout] = note: `#[warn(clippy::write_literal)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 73 - "[db_context]\npassword = \"{}\"\nuser = \"{}\"\nip = \"{}\"\n", [INFO] [stdout] 74 - "cassandara", "cassandara", "127.0.0.1" [INFO] [stdout] 73 + "[db_context]\npassword = \"cassandara\"\nuser = \"cassandara\"\nip = \"127.0.0.1\"\n" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `CqlSettings` [INFO] [stdout] --> src/cqlsh.rs:136:5 [INFO] [stdout] | [INFO] [stdout] 136 | / pub fn new() -> Self { [INFO] [stdout] 137 | | Self { [INFO] [stdout] 138 | | url: String::from("127.0.0.1:9042"), [INFO] [stdout] 139 | | pswd: String::from("cassandra"), [INFO] [stdout] ... | [INFO] [stdout] 143 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 135 + impl Default for CqlSettings { [INFO] [stdout] 136 + fn default() -> Self { [INFO] [stdout] 137 + Self::new() [INFO] [stdout] 138 + } [INFO] [stdout] 139 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | return is_type; [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] 82 - return is_type; [INFO] [stdout] 82 + is_type [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `info!` args [INFO] [stdout] --> src/utils.rs:76:48 [INFO] [stdout] | [INFO] [stdout] 76 | info!("{} ^^", w.to_lowercase().to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` 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/utils.rs:98:77 [INFO] [stdout] | [INFO] [stdout] 98 | pub fn is_line_inside_selectors(&self, line: &str, index: usize, lines: &Vec) -> bool { [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] 98 - pub fn is_line_inside_selectors(&self, line: &str, index: usize, lines: &Vec) -> bool { [INFO] [stdout] 98 + pub fn is_line_inside_selectors(&self, line: &str, index: usize, lines: &[String]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/utils.rs:99:69 [INFO] [stdout] | [INFO] [stdout] 99 | if self.line_contains_cql_kw(line) || line.contains(";") || line.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/utils.rs:170:16 [INFO] [stdout] | [INFO] [stdout] 170 | lines: &Vec<&str>, [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] 170 - lines: &Vec<&str>, [INFO] [stdout] 170 + lines: &[&str], [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/utils.rs:232:16 [INFO] [stdout] | [INFO] [stdout] 232 | lines: &Vec, [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] 232 - lines: &Vec, [INFO] [stdout] 232 + lines: &[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/utils.rs:290:77 [INFO] [stdout] | [INFO] [stdout] 290 | pub fn is_line_inside_init_args(&self, line: &str, index: usize, lines: &Vec) -> bool { [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] 290 - pub fn is_line_inside_init_args(&self, line: &str, index: usize, lines: &Vec) -> bool { [INFO] [stdout] 290 + pub fn is_line_inside_init_args(&self, line: &str, index: usize, lines: &[String]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/cqlsh.rs:296:37 [INFO] [stdout] | [INFO] [stdout] 296 | let keyspaces = query_keyspaces(&config).await?; [INFO] [stdout] | ^^^^^^^ help: change this to: `config` [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/cqlsh.rs:300:55 [INFO] [stdout] | [INFO] [stdout] 300 | let mut tables = query_keyspace_scoped_tables(&config, &keyspace.keyspace_name).await?; [INFO] [stdout] | ^^^^^^^ help: change this to: `config` [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: useless use of `format!` [INFO] [stdout] --> src/cqlsh.rs:399:17 [INFO] [stdout] | [INFO] [stdout] 399 | let query = format!("SELECT keyspace_name, aggregate_name FROM system_schema.aggregates;"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"SELECT keyspace_name, aggregate_name FROM system_schema.aggregates;".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/cqlsh.rs:435:17 [INFO] [stdout] | [INFO] [stdout] 435 | let query = format!("SELECT keyspace_name, function_name FROM system_schema.functions;"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"SELECT keyspace_name, function_name FROM system_schema.functions;".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/cqlsh.rs:466:17 [INFO] [stdout] | [INFO] [stdout] 466 | let query = format!("SELECT keyspace_name, index_name FROM system_schema.indexes;"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"SELECT keyspace_name, index_name FROM system_schema.indexes;".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/cqlsh.rs:496:17 [INFO] [stdout] | [INFO] [stdout] 496 | let query = format!("SELECT keyspace_name, type_name FROM system_schema.types;"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"SELECT keyspace_name, type_name FROM system_schema.types;".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/cqlsh.rs:543:17 [INFO] [stdout] | [INFO] [stdout] 543 | let query = format!("SELECT keyspace_name, view_name FROM system_schema.views;"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"SELECT keyspace_name, view_name FROM system_schema.views;".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: you should consider adding a `Default` implementation for `InsertStatement` [INFO] [stdout] --> src/formatting.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | / pub fn new() -> Self { [INFO] [stdout] 38 | | Self { [INFO] [stdout] 39 | | table_name: "".to_string(), [INFO] [stdout] 40 | | fields: Vec::new(), [INFO] [stdout] ... | [INFO] [stdout] 43 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 36 + impl Default for InsertStatement { [INFO] [stdout] 37 + fn default() -> Self { [INFO] [stdout] 38 + Self::new() [INFO] [stdout] 39 + } [INFO] [stdout] 40 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/formatting.rs:53:13 [INFO] [stdout] | [INFO] [stdout] 53 | / if current == ' ' { [INFO] [stdout] 54 | | if let Some(&&next) = iter.peek() { [INFO] [stdout] 55 | | if matches!(next, ' ' | ';' | ',' | ')' | '>') { [INFO] [stdout] 56 | | continue; [INFO] [stdout] ... | [INFO] [stdout] 59 | | } [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] 53 ~ if current == ' ' [INFO] [stdout] 54 ~ && let Some(&&next) = iter.peek() { [INFO] [stdout] 55 | if matches!(next, ' ' | ';' | ',' | ')' | '>') { [INFO] [stdout] 56 | continue; [INFO] [stdout] 57 | } [INFO] [stdout] 58 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/formatting.rs:54:17 [INFO] [stdout] | [INFO] [stdout] 54 | / if let Some(&&next) = iter.peek() { [INFO] [stdout] 55 | | if matches!(next, ' ' | ';' | ',' | ')' | '>') { [INFO] [stdout] 56 | | continue; [INFO] [stdout] 57 | | } [INFO] [stdout] 58 | | } [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] 54 ~ if let Some(&&next) = iter.peek() [INFO] [stdout] 55 ~ && matches!(next, ' ' | ';' | ',' | ')' | '>') { [INFO] [stdout] 56 | continue; [INFO] [stdout] 57 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implicitly performing saturating subtraction [INFO] [stdout] --> src/formatting.rs:87:24 [INFO] [stdout] | [INFO] [stdout] 87 | } else if index > 0 { [INFO] [stdout] | ________________________^ [INFO] [stdout] 88 | | index -= 1; [INFO] [stdout] 89 | | } [INFO] [stdout] | |_________________^ help: try: `index = index.saturating_sub(1);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub [INFO] [stdout] = note: `#[warn(clippy::implicit_saturating_sub)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/formatting.rs:100:13 [INFO] [stdout] | [INFO] [stdout] 100 | return true; [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] 100 ~ true [INFO] [stdout] 101 | } else { [INFO] [stdout] 102 | return false; [INFO] [stdout] 103 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/formatting.rs:102:13 [INFO] [stdout] | [INFO] [stdout] 102 | return false; [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] 102 ~ false [INFO] [stdout] 103 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/formatting.rs:99:9 [INFO] [stdout] | [INFO] [stdout] 99 | / if line.trim().to_lowercase().starts_with("insert into") { [INFO] [stdout] 100 | | return true; [INFO] [stdout] 101 | | } else { [INFO] [stdout] 102 | | return false; [INFO] [stdout] 103 | | }; [INFO] [stdout] | |_________^ help: you can reduce it to: `return line.trim().to_lowercase().starts_with("insert into")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/formatting.rs:371:54 [INFO] [stdout] | [INFO] [stdout] 371 | pub async fn add_tabs_to_cql_types(&self, lines: &mut Vec, document_url: &Url) { [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] 371 - pub async fn add_tabs_to_cql_types(&self, lines: &mut Vec, document_url: &Url) { [INFO] [stdout] 371 + pub async fn add_tabs_to_cql_types(&self, lines: &mut [String], document_url: &Url) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/formatting.rs:410:77 [INFO] [stdout] | [INFO] [stdout] 410 | ... .is_inside_multiline_comment_no_position(index, &document_url) [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `document_url` [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/formatting.rs:418:13 [INFO] [stdout] | [INFO] [stdout] 418 | / if let Some(typ) = found_type { [INFO] [stdout] 419 | | if let Some(offset) = line.find(typ) { [INFO] [stdout] 420 | | if offset > 0 { [INFO] [stdout] 421 | | if !line[..offset] [INFO] [stdout] ... | [INFO] [stdout] 431 | | } [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] 418 ~ if let Some(typ) = found_type [INFO] [stdout] 419 ~ && let Some(offset) = line.find(typ) { [INFO] [stdout] 420 | if offset > 0 { [INFO] [stdout] ... [INFO] [stdout] 429 | } [INFO] [stdout] 430 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/formatting.rs:419:17 [INFO] [stdout] | [INFO] [stdout] 419 | / if let Some(offset) = line.find(typ) { [INFO] [stdout] 420 | | if offset > 0 { [INFO] [stdout] 421 | | if !line[..offset] [INFO] [stdout] 422 | | .ends_with(&" ".repeat(self.formatting_config.type_alignment_offset)) [INFO] [stdout] ... | [INFO] [stdout] 430 | | } [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] 419 ~ if let Some(offset) = line.find(typ) [INFO] [stdout] 420 ~ && offset > 0 { [INFO] [stdout] 421 | if !line[..offset] [INFO] [stdout] ... [INFO] [stdout] 428 | } [INFO] [stdout] 429 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/formatting.rs:420:21 [INFO] [stdout] | [INFO] [stdout] 420 | / if offset > 0 { [INFO] [stdout] 421 | | if !line[..offset] [INFO] [stdout] 422 | | .ends_with(&" ".repeat(self.formatting_config.type_alignment_offset)) [INFO] [stdout] ... | [INFO] [stdout] 429 | | } [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] 420 ~ if offset > 0 [INFO] [stdout] 421 ~ && !line[..offset] [INFO] [stdout] 422 | .ends_with(&" ".repeat(self.formatting_config.type_alignment_offset)) [INFO] [stdout] ... [INFO] [stdout] 427 | ); [INFO] [stdout] 428 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/formatting.rs:437:62 [INFO] [stdout] | [INFO] [stdout] 437 | pub async fn add_tabs_to_function_keywords(&self, lines: &mut Vec, document_url: &Url) { [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] 437 - pub async fn add_tabs_to_function_keywords(&self, lines: &mut Vec, document_url: &Url) { [INFO] [stdout] 437 + pub async fn add_tabs_to_function_keywords(&self, lines: &mut [String], document_url: &Url) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/formatting.rs:457:69 [INFO] [stdout] | [INFO] [stdout] 457 | .is_inside_multiline_comment_no_position(index, &document_url) [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `document_url` [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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/formatting.rs:599:46 [INFO] [stdout] | [INFO] [stdout] 599 | pub fn fix_string_literals(&self, lines: &mut Vec) { [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] 599 - pub fn fix_string_literals(&self, lines: &mut Vec) { [INFO] [stdout] 599 + pub fn fix_string_literals(&self, lines: &mut [String]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/formatting.rs:631:41 [INFO] [stdout] | [INFO] [stdout] 631 | pub fn fix_semi_colon(&self, lines: &mut Vec) { [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] 631 - pub fn fix_semi_colon(&self, lines: &mut Vec) { [INFO] [stdout] 631 + pub fn fix_semi_colon(&self, lines: &mut [String]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implicitly performing saturating subtraction [INFO] [stdout] --> src/formatting.rs:659:24 [INFO] [stdout] | [INFO] [stdout] 659 | } else if index > 0 { [INFO] [stdout] | ________________________^ [INFO] [stdout] 660 | | index -= 1; [INFO] [stdout] 661 | | } [INFO] [stdout] | |_________________^ help: try: `index = index.saturating_sub(1);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implicitly performing saturating subtraction [INFO] [stdout] --> src/formatting.rs:687:24 [INFO] [stdout] | [INFO] [stdout] 687 | } else if index > 0 { [INFO] [stdout] | ________________________^ [INFO] [stdout] 688 | | index -= 1; [INFO] [stdout] 689 | | } [INFO] [stdout] | |_________________^ help: try: `index = index.saturating_sub(1);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/formatting.rs:706:33 [INFO] [stdout] | [INFO] [stdout] 706 | if last_new_line && lines[index].len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `lines[index].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implicitly performing saturating subtraction [INFO] [stdout] --> src/formatting.rs:710:24 [INFO] [stdout] | [INFO] [stdout] 710 | } else if index > 0 { [INFO] [stdout] | ________________________^ [INFO] [stdout] 711 | | index -= 1; [INFO] [stdout] 712 | | } [INFO] [stdout] | |_________________^ help: try: `index = index.saturating_sub(1);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/formatting.rs:715:32 [INFO] [stdout] | [INFO] [stdout] 715 | if last_bracket && lines[index].len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `lines[index].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implicitly performing saturating subtraction [INFO] [stdout] --> src/formatting.rs:719:24 [INFO] [stdout] | [INFO] [stdout] 719 | } else if index > 0 { [INFO] [stdout] | ________________________^ [INFO] [stdout] 720 | | index -= 1; [INFO] [stdout] 721 | | } [INFO] [stdout] | |_________________^ help: try: `index = index.saturating_sub(1);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/formatting.rs:724:13 [INFO] [stdout] | [INFO] [stdout] 724 | / if lines[index].len() == 0 [INFO] [stdout] 725 | | && !self.is_line_in_multiline_comment(&lines[index], index, lines) [INFO] [stdout] 726 | | { [INFO] [stdout] 727 | | last_new_line = true; [INFO] [stdout] 728 | | } else { [INFO] [stdout] 729 | | last_new_line = false; [INFO] [stdout] 730 | | } [INFO] [stdout] | |_____________^ help: you can reduce it to: `last_new_line = lines[index].len() == 0 && !self.is_line_in_multiline_comment(&lines[index], index, lines);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] = note: `#[warn(clippy::needless_bool_assign)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/formatting.rs:724:16 [INFO] [stdout] | [INFO] [stdout] 724 | if lines[index].len() == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `lines[index].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/formatting.rs:732:13 [INFO] [stdout] | [INFO] [stdout] 732 | / if lines[index].contains("(") { [INFO] [stdout] 733 | | last_bracket = true; [INFO] [stdout] 734 | | } else { [INFO] [stdout] 735 | | last_bracket = false [INFO] [stdout] 736 | | } [INFO] [stdout] | |_____________^ help: you can reduce it to: `last_bracket = lines[index].contains("(");` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/formatting.rs:752:38 [INFO] [stdout] | [INFO] [stdout] 752 | if !inside_code_block && line.len() > 0 && !line.contains(";") { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/formatting.rs:761:20 [INFO] [stdout] | [INFO] [stdout] 761 | && line.len() == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implicitly performing saturating subtraction [INFO] [stdout] --> src/formatting.rs:767:24 [INFO] [stdout] | [INFO] [stdout] 767 | } else if index > 0 { [INFO] [stdout] | ________________________^ [INFO] [stdout] 768 | | index -= 1; [INFO] [stdout] 769 | | } [INFO] [stdout] | |_________________^ help: try: `index = index.saturating_sub(1);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/formatting.rs:789:20 [INFO] [stdout] | [INFO] [stdout] 789 | && line.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/formatting.rs:802:20 [INFO] [stdout] | [INFO] [stdout] 802 | if lines[index + 1].to_lowercase().len() == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `lines[index + 1].to_lowercase().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/formatting.rs:810:20 [INFO] [stdout] | [INFO] [stdout] 810 | && line.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/formatting.rs:834:20 [INFO] [stdout] | [INFO] [stdout] 834 | && lines[index + 1].len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!lines[index + 1].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/formatting.rs:866:50 [INFO] [stdout] | [INFO] [stdout] 866 | pub fn add_spacing_after_comma(&self, lines: &mut Vec) { [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] 866 - pub fn add_spacing_after_comma(&self, lines: &mut Vec) { [INFO] [stdout] 866 + pub fn add_spacing_after_comma(&self, lines: &mut [String]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `start_idx` is used as a loop counter [INFO] [stdout] --> src/formatting.rs:941:17 [INFO] [stdout] | [INFO] [stdout] 941 | for kw in working_buf.iter_mut() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (start_idx, kw) in (index + 1..).zip(working_buf.iter_mut())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/formatting.rs:968:16 [INFO] [stdout] | [INFO] [stdout] 968 | lines: &mut Vec, [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] 968 - lines: &mut Vec, [INFO] [stdout] 968 + lines: &mut [String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/formatting.rs:1087:50 [INFO] [stdout] | [INFO] [stdout] 1087 | let mut working_vec: Vec = lines.into_iter().map(|s| s.to_string()).collect(); [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: the loop variable `index` is only used to index `working_vec` [INFO] [stdout] --> src/formatting.rs:1089:22 [INFO] [stdout] | [INFO] [stdout] 1089 | for index in 0..working_vec.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 1089 - for index in 0..working_vec.len() { [INFO] [stdout] 1089 + for in &mut working_vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/handlers.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 36 | / if let Some(prefix) = line.get(..position.character as usize) { [INFO] [stdout] 37 | | if let Some(quote_pos) = prefix.rfind(|c| c == '"' || c == '\'') { [INFO] [stdout] 38 | | let quote_char = prefix.chars().nth(quote_pos).unwrap_or('"'); [INFO] [stdout] 39 | | let typed_prefix = prefix.get(quote_pos + 1..).unwrap_or(""); [INFO] [stdout] ... | [INFO] [stdout] 102 | | } [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] 36 ~ if let Some(prefix) = line.get(..position.character as usize) [INFO] [stdout] 37 ~ && let Some(quote_pos) = prefix.rfind(|c| c == '"' || c == '\'') { [INFO] [stdout] 38 | let quote_char = prefix.chars().nth(quote_pos).unwrap_or('"'); [INFO] [stdout] ... [INFO] [stdout] 100 | } [INFO] [stdout] 101 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/handlers.rs:37:51 [INFO] [stdout] | [INFO] [stdout] 37 | if let Some(quote_pos) = prefix.rfind(|c| c == '"' || c == '\'') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['"', '\'']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] = note: `#[warn(clippy::manual_pattern_char_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/handlers.rs:59:49 [INFO] [stdout] | [INFO] [stdout] 59 | if has_closing_quote && has_semicolon == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `!has_semicolon` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:199:9 [INFO] [stdout] | [INFO] [stdout] 199 | / return Ok(Some(CompletionResponse::Array( [INFO] [stdout] 200 | | KEYWORDS.iter().cloned().collect(), [INFO] [stdout] 201 | | ))); [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] 199 ~ Ok(Some(CompletionResponse::Array( [INFO] [stdout] 200 + KEYWORDS.iter().cloned().collect(), [INFO] [stdout] 201 ~ ))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:207:9 [INFO] [stdout] | [INFO] [stdout] 207 | / return Ok(Some(CompletionResponse::Array( [INFO] [stdout] 208 | | TYPES.iter().cloned().collect(), [INFO] [stdout] 209 | | ))); [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] 207 ~ Ok(Some(CompletionResponse::Array( [INFO] [stdout] 208 + TYPES.iter().cloned().collect(), [INFO] [stdout] 209 ~ ))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:239:9 [INFO] [stdout] | [INFO] [stdout] 239 | / return Ok(Some(CompletionResponse::Array(vec![ [INFO] [stdout] 240 | | CompletionItem { [INFO] [stdout] 241 | | label: "PRIMARY KEY".to_string(), [INFO] [stdout] 242 | | kind: Some(CompletionItemKind::KEYWORD), [INFO] [stdout] ... | [INFO] [stdout] 279 | | }, [INFO] [stdout] 280 | | ]))); [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] 239 ~ Ok(Some(CompletionResponse::Array(vec![ [INFO] [stdout] 240 + CompletionItem { [INFO] [stdout] 241 + label: "PRIMARY KEY".to_string(), [INFO] [stdout] 242 + kind: Some(CompletionItemKind::KEYWORD), [INFO] [stdout] 243 + detail: Some("Upper case PRIMARY KEY type modifier".to_string()), [INFO] [stdout] 244 + documentation: Some(Documentation::String( [INFO] [stdout] 245 + "PRIMARY KEY type modifier".to_string(), [INFO] [stdout] 246 + )), [INFO] [stdout] 247 + insert_text: Some(r#"PRIMARY KEY"#.to_string()), [INFO] [stdout] 248 + insert_text_format: Some(InsertTextFormat::SNIPPET), [INFO] [stdout] 249 + ..Default::default() [INFO] [stdout] 250 + }, [INFO] [stdout] 251 + CompletionItem { [INFO] [stdout] 252 + label: "primary key".to_string(), [INFO] [stdout] 253 + kind: Some(CompletionItemKind::KEYWORD), [INFO] [stdout] 254 + detail: Some("Lower case primary key type modifier".to_string()), [INFO] [stdout] 255 + documentation: Some(Documentation::String( [INFO] [stdout] 256 + "primary key type modifier".to_string(), [INFO] [stdout] 257 + )), [INFO] [stdout] 258 + insert_text: Some(r#"primary key"#.to_string()), [INFO] [stdout] 259 + insert_text_format: Some(InsertTextFormat::SNIPPET), [INFO] [stdout] 260 + ..Default::default() [INFO] [stdout] 261 + }, [INFO] [stdout] 262 + CompletionItem { [INFO] [stdout] 263 + label: "STATIC".to_string(), [INFO] [stdout] 264 + kind: Some(CompletionItemKind::KEYWORD), [INFO] [stdout] 265 + detail: Some("Upper case STATIC type modifier".to_string()), [INFO] [stdout] 266 + documentation: Some(Documentation::String("STATIC type modifier".to_string())), [INFO] [stdout] 267 + insert_text: Some(r#"STATIC"#.to_string()), [INFO] [stdout] 268 + insert_text_format: Some(InsertTextFormat::SNIPPET), [INFO] [stdout] 269 + ..Default::default() [INFO] [stdout] 270 + }, [INFO] [stdout] 271 + CompletionItem { [INFO] [stdout] 272 + label: "static".to_string(), [INFO] [stdout] 273 + kind: Some(CompletionItemKind::KEYWORD), [INFO] [stdout] 274 + detail: Some("Lower case static type modifier".to_string()), [INFO] [stdout] 275 + documentation: Some(Documentation::String("static type modifier".to_string())), [INFO] [stdout] 276 + insert_text: Some(r#"static"#.to_string()), [INFO] [stdout] 277 + insert_text_format: Some(InsertTextFormat::SNIPPET), [INFO] [stdout] 278 + ..Default::default() [INFO] [stdout] 279 + }, [INFO] [stdout] 280 ~ ]))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:296:9 [INFO] [stdout] | [INFO] [stdout] 296 | return Ok(Some(CompletionResponse::Array(vec![]))); [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] 296 - return Ok(Some(CompletionResponse::Array(vec![]))); [INFO] [stdout] 296 + Ok(Some(CompletionResponse::Array(vec![]))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:300:9 [INFO] [stdout] | [INFO] [stdout] 300 | / return Ok(Some(CompletionResponse::Array(vec![ [INFO] [stdout] 301 | | CompletionItem { [INFO] [stdout] 302 | | label: "FROM".to_string(), [INFO] [stdout] 303 | | kind: Some(CompletionItemKind::KEYWORD), [INFO] [stdout] ... | [INFO] [stdout] 318 | | }, [INFO] [stdout] 319 | | ]))); [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] 300 ~ Ok(Some(CompletionResponse::Array(vec![ [INFO] [stdout] 301 + CompletionItem { [INFO] [stdout] 302 + label: "FROM".to_string(), [INFO] [stdout] 303 + kind: Some(CompletionItemKind::KEYWORD), [INFO] [stdout] 304 + detail: Some("Upper case FROM keyword".to_string()), [INFO] [stdout] 305 + documentation: Some(Documentation::String("FROM keyword".to_string())), [INFO] [stdout] 306 + insert_text: Some(r#"FROM $0"#.to_string()), [INFO] [stdout] 307 + insert_text_format: Some(InsertTextFormat::SNIPPET), [INFO] [stdout] 308 + ..Default::default() [INFO] [stdout] 309 + }, [INFO] [stdout] 310 + CompletionItem { [INFO] [stdout] 311 + label: "from".to_string(), [INFO] [stdout] 312 + kind: Some(CompletionItemKind::KEYWORD), [INFO] [stdout] 313 + detail: Some("Lower case from keyword".to_string()), [INFO] [stdout] 314 + documentation: Some(Documentation::String("FROM keyword".to_string())), [INFO] [stdout] 315 + insert_text: Some(r#"from $0"#.to_string()), [INFO] [stdout] 316 + insert_text_format: Some(InsertTextFormat::SNIPPET), [INFO] [stdout] 317 + ..Default::default() [INFO] [stdout] 318 + }, [INFO] [stdout] 319 ~ ]))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:351:9 [INFO] [stdout] | [INFO] [stdout] 351 | return Ok(Some(CompletionResponse::Array(items))); [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] 351 - return Ok(Some(CompletionResponse::Array(items))); [INFO] [stdout] 351 + Ok(Some(CompletionResponse::Array(items))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/handlers.rs:359:9 [INFO] [stdout] | [INFO] [stdout] 359 | / if let Some(prefix) = line.get(..position.character as usize) { [INFO] [stdout] 360 | | if let Some(quote_pos) = prefix.rfind(|c| c == '"' || c == '\'') { [INFO] [stdout] 361 | | let quote_char = prefix.chars().nth(quote_pos).unwrap_or('"'); [INFO] [stdout] 362 | | let typed_prefix = prefix.get(quote_pos + 1..).unwrap_or(""); [INFO] [stdout] ... | [INFO] [stdout] 425 | | } [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] 359 ~ if let Some(prefix) = line.get(..position.character as usize) [INFO] [stdout] 360 ~ && let Some(quote_pos) = prefix.rfind(|c| c == '"' || c == '\'') { [INFO] [stdout] 361 | let quote_char = prefix.chars().nth(quote_pos).unwrap_or('"'); [INFO] [stdout] ... [INFO] [stdout] 423 | } [INFO] [stdout] 424 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/handlers.rs:360:51 [INFO] [stdout] | [INFO] [stdout] 360 | if let Some(quote_pos) = prefix.rfind(|c| c == '"' || c == '\'') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['"', '\'']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/handlers.rs:382:49 [INFO] [stdout] | [INFO] [stdout] 382 | if has_closing_quote && has_semicolon == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `!has_semicolon` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:1082:17 [INFO] [stdout] | [INFO] [stdout] 1082 | return Ok(Some(CompletionResponse::Array(items))); [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] 1082 - return Ok(Some(CompletionResponse::Array(items))); [INFO] [stdout] 1082 + Ok(Some(CompletionResponse::Array(items))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:1085:23 [INFO] [stdout] | [INFO] [stdout] 1085 | Err(_) => return Ok(Some(CompletionResponse::Array(vec![]))), [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] 1085 - Err(_) => return Ok(Some(CompletionResponse::Array(vec![]))), [INFO] [stdout] 1085 + Err(_) => Ok(Some(CompletionResponse::Array(vec![]))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:1108:17 [INFO] [stdout] | [INFO] [stdout] 1108 | return Ok(Some(CompletionResponse::Array(items))); [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] 1108 - return Ok(Some(CompletionResponse::Array(items))); [INFO] [stdout] 1108 + Ok(Some(CompletionResponse::Array(items))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:1111:23 [INFO] [stdout] | [INFO] [stdout] 1111 | Err(_) => return Ok(Some(CompletionResponse::Array(vec![]))), [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] 1111 - Err(_) => return Ok(Some(CompletionResponse::Array(vec![]))), [INFO] [stdout] 1111 + Err(_) => Ok(Some(CompletionResponse::Array(vec![]))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:1134:17 [INFO] [stdout] | [INFO] [stdout] 1134 | return Ok(Some(CompletionResponse::Array(items))); [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] 1134 - return Ok(Some(CompletionResponse::Array(items))); [INFO] [stdout] 1134 + Ok(Some(CompletionResponse::Array(items))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:1137:23 [INFO] [stdout] | [INFO] [stdout] 1137 | Err(_) => return Ok(Some(CompletionResponse::Array(vec![]))), [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] 1137 - Err(_) => return Ok(Some(CompletionResponse::Array(vec![]))), [INFO] [stdout] 1137 + Err(_) => Ok(Some(CompletionResponse::Array(vec![]))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:1160:17 [INFO] [stdout] | [INFO] [stdout] 1160 | return Ok(Some(CompletionResponse::Array(items))); [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] 1160 - return Ok(Some(CompletionResponse::Array(items))); [INFO] [stdout] 1160 + Ok(Some(CompletionResponse::Array(items))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:1163:23 [INFO] [stdout] | [INFO] [stdout] 1163 | Err(_) => return Ok(Some(CompletionResponse::Array(vec![]))), [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] 1163 - Err(_) => return Ok(Some(CompletionResponse::Array(vec![]))), [INFO] [stdout] 1163 + Err(_) => Ok(Some(CompletionResponse::Array(vec![]))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:1186:17 [INFO] [stdout] | [INFO] [stdout] 1186 | return Ok(Some(CompletionResponse::Array(items))); [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] 1186 - return Ok(Some(CompletionResponse::Array(items))); [INFO] [stdout] 1186 + Ok(Some(CompletionResponse::Array(items))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handlers.rs:1189:23 [INFO] [stdout] | [INFO] [stdout] 1189 | Err(_) => return Ok(Some(CompletionResponse::Array(vec![]))), [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] 1189 - Err(_) => return Ok(Some(CompletionResponse::Array(vec![]))), [INFO] [stdout] 1189 + Err(_) => Ok(Some(CompletionResponse::Array(vec![]))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/setup.rs:74:13 [INFO] [stdout] | [INFO] [stdout] 74 | "cassandara", "cassandara", "127.0.0.1" [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal [INFO] [stdout] = note: `#[warn(clippy::write_literal)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 73 - "[db_context]\npassword = \"{}\"\nuser = \"{}\"\nip = \"{}\"\n", [INFO] [stdout] 74 - "cassandara", "cassandara", "127.0.0.1" [INFO] [stdout] 73 + "[db_context]\npassword = \"cassandara\"\nuser = \"cassandara\"\nip = \"127.0.0.1\"\n" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | return is_type; [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] 82 - return is_type; [INFO] [stdout] 82 + is_type [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `info!` args [INFO] [stdout] --> src/utils.rs:76:48 [INFO] [stdout] | [INFO] [stdout] 76 | info!("{} ^^", w.to_lowercase().to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` 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/utils.rs:98:77 [INFO] [stdout] | [INFO] [stdout] 98 | pub fn is_line_inside_selectors(&self, line: &str, index: usize, lines: &Vec) -> bool { [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] 98 - pub fn is_line_inside_selectors(&self, line: &str, index: usize, lines: &Vec) -> bool { [INFO] [stdout] 98 + pub fn is_line_inside_selectors(&self, line: &str, index: usize, lines: &[String]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/utils.rs:99:69 [INFO] [stdout] | [INFO] [stdout] 99 | if self.line_contains_cql_kw(line) || line.contains(";") || line.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/utils.rs:170:16 [INFO] [stdout] | [INFO] [stdout] 170 | lines: &Vec<&str>, [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] 170 - lines: &Vec<&str>, [INFO] [stdout] 170 + lines: &[&str], [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/utils.rs:232:16 [INFO] [stdout] | [INFO] [stdout] 232 | lines: &Vec, [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] 232 - lines: &Vec, [INFO] [stdout] 232 + lines: &[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/utils.rs:290:77 [INFO] [stdout] | [INFO] [stdout] 290 | pub fn is_line_inside_init_args(&self, line: &str, index: usize, lines: &Vec) -> bool { [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] 290 - pub fn is_line_inside_init_args(&self, line: &str, index: usize, lines: &Vec) -> bool { [INFO] [stdout] 290 + pub fn is_line_inside_init_args(&self, line: &str, index: usize, lines: &[String]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:83:8 [INFO] [stdout] | [INFO] [stdout] 83 | if !exists(&ca_cert_file).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `exists(&ca_cert_file).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:83:8 [INFO] [stdout] | [INFO] [stdout] 83 | if !exists(&ca_cert_file).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `exists(&ca_cert_file).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/main.rs:104:13 [INFO] [stdout] | [INFO] [stdout] 103 | let settings = CqlSettings::from_env(&url, &pswd, &user).with_tls(ca_cert_path); [INFO] [stdout] | -------------------------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 104 | settings [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 103 ~ [INFO] [stdout] 104 ~ CqlSettings::from_env(&url, &pswd, &user).with_tls(ca_cert_path) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/main.rs:108:13 [INFO] [stdout] | [INFO] [stdout] 107 | let settings = CqlSettings::from_env(&url, &pswd, &user); [INFO] [stdout] | --------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 108 | settings [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 107 ~ [INFO] [stdout] 108 ~ CqlSettings::from_env(&url, &pswd, &user) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/main.rs:104:13 [INFO] [stdout] | [INFO] [stdout] 103 | let settings = CqlSettings::from_env(&url, &pswd, &user).with_tls(ca_cert_path); [INFO] [stdout] | -------------------------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 104 | settings [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 103 ~ [INFO] [stdout] 104 ~ CqlSettings::from_env(&url, &pswd, &user).with_tls(ca_cert_path) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/main.rs:108:13 [INFO] [stdout] | [INFO] [stdout] 107 | let settings = CqlSettings::from_env(&url, &pswd, &user); [INFO] [stdout] | --------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 108 | settings [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 107 ~ [INFO] [stdout] 108 ~ CqlSettings::from_env(&url, &pswd, &user) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SCYLLA_HOST` is never used [INFO] [stdout] --> tests/scylla_tls.rs:3:7 [INFO] [stdout] | [INFO] [stdout] 3 | const SCYLLA_HOST: &str = "127.0.0.1:9042"; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> tests/scylla_tls.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | / match &session { [INFO] [stdout] 12 | | Ok(s) => { [INFO] [stdout] 13 | | println!("Keyspaces: {:?}", s); [INFO] [stdout] ... | [INFO] [stdout] 16 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 11 ~ if let Ok(s) = &session { [INFO] [stdout] 12 + println!("Keyspaces: {:?}", s); [INFO] [stdout] 13 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 12s [INFO] running `Command { std: "docker" "inspect" "5b7e5d8ec603d2983071c1b0ef9231e886296a42086176252c86c3a168b14edc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5b7e5d8ec603d2983071c1b0ef9231e886296a42086176252c86c3a168b14edc", kill_on_drop: false }` [INFO] [stdout] 5b7e5d8ec603d2983071c1b0ef9231e886296a42086176252c86c3a168b14edc