[INFO] fetching crate nom-sql 0.0.11... [INFO] linting nom-sql-0.0.11 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate nom-sql 0.0.11 into /workspace/builds/worker-1-tc1/source [INFO] started tweaking crates.io crate nom-sql 0.0.11 [INFO] finished tweaking crates.io crate nom-sql 0.0.11 [INFO] tweaked toml for crates.io crate nom-sql 0.0.11 written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate nom-sql 0.0.11 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] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Locking 22 packages to latest compatible versions [INFO] [stderr] Adding nom v5.1.3 (available: v8.0.0) [INFO] [stderr] Adding pretty_assertions v0.5.1 (available: v1.4.1) [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] warning: `package.edition` is unspecified, defaulting to `2015` while the latest is `2024` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded arrayvec v0.5.2 [INFO] [stderr] Downloaded pretty_assertions v0.5.1 [INFO] [stderr] Downloaded difference v2.0.0 [INFO] [stderr] Downloaded lexical-core v0.7.6 [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] ced3d6cb0b12dcea80d6edccc934f6a8e51fdc37ae833db3593ad9f1b0923de3 [INFO] running `Command { std: "docker" "start" "-a" "ced3d6cb0b12dcea80d6edccc934f6a8e51fdc37ae833db3593ad9f1b0923de3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "ced3d6cb0b12dcea80d6edccc934f6a8e51fdc37ae833db3593ad9f1b0923de3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ced3d6cb0b12dcea80d6edccc934f6a8e51fdc37ae833db3593ad9f1b0923de3", kill_on_drop: false }` [INFO] [stdout] ced3d6cb0b12dcea80d6edccc934f6a8e51fdc37ae833db3593ad9f1b0923de3 [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] 1269bd0eb7f8572330e38c8d3a2b3eb06c7828b8f3d1b1eeb8b8854b96528a8d [INFO] running `Command { std: "docker" "start" "-a" "1269bd0eb7f8572330e38c8d3a2b3eb06c7828b8f3d1b1eeb8b8854b96528a8d", kill_on_drop: false }` [INFO] [stderr] warning: `package.edition` is unspecified, defaulting to `2015` while the latest is `2024` [INFO] [stderr] Compiling lexical-core v0.7.6 [INFO] [stderr] Checking static_assertions v1.1.0 [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Checking arrayvec v0.5.2 [INFO] [stderr] Checking memchr v2.8.0 [INFO] [stderr] Checking ansi_term v0.11.0 [INFO] [stderr] Checking difference v2.0.0 [INFO] [stderr] Compiling nom v5.1.3 [INFO] [stderr] Compiling syn v2.0.117 [INFO] [stderr] Checking pretty_assertions v0.5.1 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Checking nom-sql v0.0.11 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/parser.rs:47:23 [INFO] [stdout] | [INFO] [stdout] 47 | map(creation, |c| SqlQuery::CreateTable(c)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `SqlQuery::CreateTable` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/parser.rs:48:24 [INFO] [stdout] | [INFO] [stdout] 48 | map(insertion, |i| SqlQuery::Insert(i)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `SqlQuery::Insert` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/parser.rs:49:33 [INFO] [stdout] | [INFO] [stdout] 49 | map(compound_selection, |cs| SqlQuery::CompoundSelect(cs)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `SqlQuery::CompoundSelect` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/parser.rs:50:24 [INFO] [stdout] | [INFO] [stdout] 50 | map(selection, |s| SqlQuery::Select(s)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `SqlQuery::Select` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/parser.rs:51:23 [INFO] [stdout] | [INFO] [stdout] 51 | map(deletion, |d| SqlQuery::Delete(d)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `SqlQuery::Delete` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/parser.rs:52:25 [INFO] [stdout] | [INFO] [stdout] 52 | map(drop_table, |dt| SqlQuery::DropTable(dt)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `SqlQuery::DropTable` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/parser.rs:53:23 [INFO] [stdout] | [INFO] [stdout] 53 | map(updating, |u| SqlQuery::Update(u)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `SqlQuery::Update` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/parser.rs:54:18 [INFO] [stdout] | [INFO] [stdout] 54 | map(set, |s| SqlQuery::Set(s)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `SqlQuery::Set` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/parser.rs:55:28 [INFO] [stdout] | [INFO] [stdout] 55 | map(view_creation, |vc| SqlQuery::CreateView(vc)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `SqlQuery::CreateView` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/arithmetic.rs:119:30 [INFO] [stdout] | [INFO] [stdout] 119 | map(integer_literal, |il| ArithmeticBase::Scalar(il)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `ArithmeticBase::Scalar` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/arithmetic.rs:120:41 [INFO] [stdout] | [INFO] [stdout] 120 | map(column_identifier_no_alias, |ci| ArithmeticBase::Column(ci)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `ArithmeticBase::Column` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/arithmetic.rs:136:17 [INFO] [stdout] | [INFO] [stdout] 136 | let alias = match opt_alias { [INFO] [stdout] | _________________^ [INFO] [stdout] 137 | | None => None, [INFO] [stdout] 138 | | Some(a) => Some(String::from(a)), [INFO] [stdout] 139 | | }; [INFO] [stdout] | |_____^ help: try: `opt_alias.map(String::from)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/case.rs:65:34 [INFO] [stdout] | [INFO] [stdout] 65 | let else_expr = else_val.map(|v| ColumnOrLiteral::Literal(v)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `ColumnOrLiteral::Literal` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/column.rs:87:6 [INFO] [stdout] | [INFO] [stdout] 87 | impl<'a> From<&'a str> for Column { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 87 - impl<'a> From<&'a str> for Column { [INFO] [stdout] 87 + impl From<&str> for Column { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/column.rs:119:1 [INFO] [stdout] | [INFO] [stdout] 119 | / impl PartialOrd for Column { [INFO] [stdout] 120 | | fn partial_cmp(&self, other: &Column) -> Option { [INFO] [stdout] 121 | | if self.table.is_some() && other.table.is_some() { [INFO] [stdout] 122 | | match self.table.cmp(&other.table) { [INFO] [stdout] ... | [INFO] [stdout] 132 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 120 - fn partial_cmp(&self, other: &Column) -> Option { [INFO] [stdout] 121 - if self.table.is_some() && other.table.is_some() { [INFO] [stdout] 122 - match self.table.cmp(&other.table) { [INFO] [stdout] 123 - Ordering::Equal => Some(self.name.cmp(&other.name)), [INFO] [stdout] 124 - x => Some(x), [INFO] [stdout] 125 - } [INFO] [stdout] 126 - } else if self.table.is_none() && other.table.is_none() { [INFO] [stdout] 127 - Some(self.name.cmp(&other.name)) [INFO] [stdout] 128 - } else { [INFO] [stdout] 129 - None [INFO] [stdout] 130 - } [INFO] [stdout] 131 - } [INFO] [stdout] 120 + fn partial_cmp(&self, other: &Column) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct implementation of `ToString` [INFO] [stdout] --> src/common.rs:142:1 [INFO] [stdout] | [INFO] [stdout] 142 | / impl ToString for Literal { [INFO] [stdout] 143 | | fn to_string(&self) -> String { [INFO] [stdout] 144 | | match *self { [INFO] [stdout] 145 | | Literal::Null => "NULL".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 163 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] = note: `#[warn(clippy::to_string_trait_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/common.rs:150:38 [INFO] [stdout] | [INFO] [stdout] 150 | Literal::Blob(ref bv) => format!( [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 151 | | "{}", [INFO] [stdout] 152 | | bv.iter() [INFO] [stdout] 153 | | .map(|v| format!("{:x}", v)) [INFO] [stdout] 154 | | .collect::>() [INFO] [stdout] 155 | | .join(" ") [INFO] [stdout] 156 | | ), [INFO] [stdout] | |_____________^ [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] help: consider using `.to_string()` [INFO] [stdout] | [INFO] [stdout] 150 ~ Literal::Blob(ref bv) => bv.iter() [INFO] [stdout] 151 + .map(|v| format!("{:x}", v)) [INFO] [stdout] 152 + .collect::>() [INFO] [stdout] 153 ~ .join(" ").to_string(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/common.rs:317:1 [INFO] [stdout] | [INFO] [stdout] 317 | / impl Default for FieldDefinitionExpression { [INFO] [stdout] 318 | | fn default() -> FieldDefinitionExpression { [INFO] [stdout] 319 | | FieldDefinitionExpression::All [INFO] [stdout] 320 | | } [INFO] [stdout] 321 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 297 + #[derive(Default)] [INFO] [stdout] 298 | pub enum FieldDefinitionExpression { [INFO] [stdout] 299 ~ #[default] [INFO] [stdout] 300 ~ All, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/common.rs:340:36 [INFO] [stdout] | [INFO] [stdout] 340 | is_alphanumeric(chr) || chr == '_' as u8 || chr == '@' as u8 [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'_'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] = note: `#[warn(clippy::char_lit_as_u8)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/common.rs:340:56 [INFO] [stdout] | [INFO] [stdout] 340 | is_alphanumeric(chr) || chr == '_' as u8 || chr == '@' as u8 [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'@'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/common.rs:393:54 [INFO] [stdout] | [INFO] [stdout] 393 | SqlType::UnsignedTinyint(len.map(|l| len_as_u16(l)).unwrap_or(1)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `len_as_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/common.rs:398:46 [INFO] [stdout] | [INFO] [stdout] 398 | SqlType::Tinyint(len.map(|l| len_as_u16(l)).unwrap_or(1)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `len_as_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/common.rs:404:38 [INFO] [stdout] | [INFO] [stdout] 404 | SqlType::Tinyint(len.map(|l| len_as_u16(l)).unwrap_or(1)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `len_as_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/common.rs:427:53 [INFO] [stdout] | [INFO] [stdout] 427 | SqlType::UnsignedBigint(len.map(|l| len_as_u16(l)).unwrap_or(1)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `len_as_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/common.rs:432:45 [INFO] [stdout] | [INFO] [stdout] 432 | SqlType::Bigint(len.map(|l| len_as_u16(l)).unwrap_or(1)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `len_as_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/common.rs:438:37 [INFO] [stdout] | [INFO] [stdout] 438 | SqlType::Bigint(len.map(|l| len_as_u16(l)).unwrap_or(1)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `len_as_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/common.rs:465:50 [INFO] [stdout] | [INFO] [stdout] 465 | SqlType::UnsignedInt(len.map(|l| len_as_u16(l)).unwrap_or(32)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `len_as_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/common.rs:470:42 [INFO] [stdout] | [INFO] [stdout] 470 | SqlType::Int(len.map(|l| len_as_u16(l)).unwrap_or(32)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `len_as_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/common.rs:476:34 [INFO] [stdout] | [INFO] [stdout] 476 | SqlType::Int(len.map(|l| len_as_u16(l)).unwrap_or(32)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `len_as_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/common.rs:516:25 [INFO] [stdout] | [INFO] [stdout] 516 | None => 0 as u16, [INFO] [stdout] | ^^^^^^^^ help: try: `0_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/common.rs:532:13 [INFO] [stdout] | [INFO] [stdout] 532 | |v| SqlType::Enum(v), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `SqlType::Enum` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/common.rs:595:31 [INFO] [stdout] | [INFO] [stdout] 595 | map(case_when_column, |cw| FunctionArguments::Conditional(cw)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `FunctionArguments::Conditional` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/common.rs:596:41 [INFO] [stdout] | [INFO] [stdout] 596 | map(column_identifier_no_alias, |c| FunctionArguments::Column(c)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `FunctionArguments::Column` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/common.rs:668:20 [INFO] [stdout] | [INFO] [stdout] 668 | table: match tup.0 { [INFO] [stdout] | ____________________^ [INFO] [stdout] 669 | | None => None, [INFO] [stdout] 670 | | Some(t) => Some(str::from_utf8(t).unwrap().to_string()), [INFO] [stdout] 671 | | }, [INFO] [stdout] | |_____________^ help: try: `tup.0.map(|t| str::from_utf8(t).unwrap().to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/common.rs:684:16 [INFO] [stdout] | [INFO] [stdout] 684 | alias: match tup.1 { [INFO] [stdout] | ________________^ [INFO] [stdout] 685 | | None => None, [INFO] [stdout] 686 | | Some(a) => Some(String::from(a)), [INFO] [stdout] 687 | | }, [INFO] [stdout] | |_________^ help: try: `tup.1.map(String::from)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/common.rs:699:20 [INFO] [stdout] | [INFO] [stdout] 699 | alias: match tup.2 { [INFO] [stdout] | ____________________^ [INFO] [stdout] 700 | | None => None, [INFO] [stdout] 701 | | Some(a) => Some(String::from(a)), [INFO] [stdout] 702 | | }, [INFO] [stdout] | |_____________^ help: try: `tup.2.map(String::from)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/common.rs:703:20 [INFO] [stdout] | [INFO] [stdout] 703 | table: match tup.0 { [INFO] [stdout] | ____________________^ [INFO] [stdout] 704 | | None => None, [INFO] [stdout] 705 | | Some(t) => Some(str::from_utf8(t).unwrap().to_string()), [INFO] [stdout] 706 | | }, [INFO] [stdout] | |_____________^ help: try: `tup.0.map(|t| str::from_utf8(t).unwrap().to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `common::Literal` [INFO] [stdout] --> src/common.rs:777:24 [INFO] [stdout] | [INFO] [stdout] 777 | value: l.into(), [INFO] [stdout] | ^^^^^^^^ help: consider removing `.into()`: `l` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/common.rs:832:36 [INFO] [stdout] | [INFO] [stdout] 832 | map(column_identifier, |col| FieldDefinitionExpression::Col(col)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `FieldDefinitionExpression::Col` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/common.rs:864:17 [INFO] [stdout] | [INFO] [stdout] 864 | -1 * unpack(tup.1) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using: `-unpack(tup.1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/common.rs:868:25 [INFO] [stdout] | [INFO] [stdout] 868 | fractional: unpack(tup.3) as i32, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `unpack(tup.3)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/common.rs:967:16 [INFO] [stdout] | [INFO] [stdout] 967 | alias: match tup.1 { [INFO] [stdout] | ________________^ [INFO] [stdout] 968 | | Some(a) => Some(String::from(a)), [INFO] [stdout] 969 | | None => None, [INFO] [stdout] 970 | | }, [INFO] [stdout] | |_________^ help: try: `tup.1.map(String::from)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.order` after checking its variant with `is_some` [INFO] [stdout] --> src/compound_select.rs:50:30 [INFO] [stdout] | [INFO] [stdout] 49 | if self.order.is_some() { [INFO] [stdout] | ----------------------- help: try: `if let Some() = &self.order` [INFO] [stdout] 50 | write!(f, " {}", self.order.as_ref().unwrap())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/condition.rs:57:24 [INFO] [stdout] | [INFO] [stdout] 57 | while let Some(ref ct) = q.pop_front() { [INFO] [stdout] | ^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 57 - while let Some(ref ct) = q.pop_front() { [INFO] [stdout] 57 + while let Some(ct) = q.pop_front() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/create.rs:59:1 [INFO] [stdout] | [INFO] [stdout] 59 | / pub enum SelectSpecification { [INFO] [stdout] 60 | | Compound(CompoundSelectStatement), [INFO] [stdout] | | --------------------------------- the second-largest variant contains at least 72 bytes [INFO] [stdout] 61 | | Simple(SelectStatement), [INFO] [stdout] | | ----------------------- the largest variant contains at least 312 bytes [INFO] [stdout] 62 | | } [INFO] [stdout] | |_^ the entire enum is at least 312 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 61 - Simple(SelectStatement), [INFO] [stdout] 61 + Simple(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/create.rs:102:36 [INFO] [stdout] | [INFO] [stdout] 102 | pub fn index_col_name(i: &[u8]) -> IResult<&[u8], (Column, Option, Option)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `filter_map` with an identity function [INFO] [stdout] --> src/create.rs:236:50 [INFO] [stdout] | [INFO] [stdout] 236 | constraints: constraints.into_iter().filter_map(|m| m).collect(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity [INFO] [stdout] = note: `#[warn(clippy::filter_map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/create.rs:380:16 [INFO] [stdout] | [INFO] [stdout] 380 | let keys = keys_list.and_then(|ks| { [INFO] [stdout] | ________________^ [INFO] [stdout] 381 | | Some( [INFO] [stdout] 382 | | ks.into_iter() [INFO] [stdout] 383 | | .map(|key| { [INFO] [stdout] ... | [INFO] [stdout] 409 | | }); [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 380 ~ let keys = keys_list.map(|ks| ks.into_iter() [INFO] [stdout] 381 + .map(|key| { [INFO] [stdout] 382 + let attach_names = |columns: Vec| { [INFO] [stdout] 383 + columns [INFO] [stdout] 384 + .into_iter() [INFO] [stdout] 385 + .map(|column| Column { [INFO] [stdout] 386 + table: Some(table.name.clone()), [INFO] [stdout] 387 + ..column [INFO] [stdout] 388 + }) [INFO] [stdout] 389 + .collect() [INFO] [stdout] 390 + }; [INFO] [stdout] 391 + [INFO] [stdout] 392 + match key { [INFO] [stdout] 393 + TableKey::PrimaryKey(columns) => { [INFO] [stdout] 394 + TableKey::PrimaryKey(attach_names(columns)) [INFO] [stdout] 395 + } [INFO] [stdout] 396 + TableKey::UniqueKey(name, columns) => { [INFO] [stdout] 397 + TableKey::UniqueKey(name, attach_names(columns)) [INFO] [stdout] 398 + } [INFO] [stdout] 399 + TableKey::FulltextKey(name, columns) => { [INFO] [stdout] 400 + TableKey::FulltextKey(name, attach_names(columns)) [INFO] [stdout] 401 + } [INFO] [stdout] 402 + TableKey::Key(name, columns) => TableKey::Key(name, attach_names(columns)), [INFO] [stdout] 403 + } [INFO] [stdout] 404 + }) [INFO] [stdout] 405 ~ .collect()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/create.rs:433:37 [INFO] [stdout] | [INFO] [stdout] 433 | map(compound_selection, |s| SelectSpecification::Compound(s)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `SelectSpecification::Compound` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/create.rs:434:35 [INFO] [stdout] | [INFO] [stdout] 434 | map(nested_selection, |s| SelectSpecification::Simple(s)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `SelectSpecification::Simple` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/insert.rs:36:27 [INFO] [stdout] | [INFO] [stdout] 36 | .map(|ref col| col.name.to_owned()) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 36 - .map(|ref col| col.name.to_owned()) [INFO] [stdout] 36 + .map(|col| col.name.to_owned()) [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/insert.rs:49:26 [INFO] [stdout] | [INFO] [stdout] 49 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/order.rs:43:23 [INFO] [stdout] | [INFO] [stdout] 43 | .map(|&(ref c, ref o)| format!("{} {}", escape_if_keyword(&c.name), o)) [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 43 - .map(|&(ref c, ref o)| format!("{} {}", escape_if_keyword(&c.name), o)) [INFO] [stdout] 43 + .map(|(c, o)| format!("{} {}", escape_if_keyword(&c.name), o)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/select.rs:107:12 [INFO] [stdout] | [INFO] [stdout] 107 | if self.tables.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.tables.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: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/select.rs:183:18 [INFO] [stdout] | [INFO] [stdout] 183 | let offset = match opt_offset { [INFO] [stdout] | __________________^ [INFO] [stdout] 184 | | None => 0, [INFO] [stdout] 185 | | Some(v) => v, [INFO] [stdout] 186 | | }; [INFO] [stdout] | |_____^ help: ascribe the type u64 and replace your expression with: `opt_offset.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/select.rs:252:38 [INFO] [stdout] | [INFO] [stdout] 252 | let table = map(table_reference, |t| JoinRightSide::Table(t)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `JoinRightSide::Table` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/table.rs:22:6 [INFO] [stdout] | [INFO] [stdout] 22 | impl<'a> From<&'a str> for Table { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 22 - impl<'a> From<&'a str> for Table { [INFO] [stdout] 22 + impl From<&str> for Table { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/update.rs:25:17 [INFO] [stdout] | [INFO] [stdout] 25 | assert!(self.fields.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.fields.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: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/update.rs:31:23 [INFO] [stdout] | [INFO] [stdout] 31 | .map(|&(ref col, ref literal)| format!("{} = {}", col, literal.to_string())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 31 - .map(|&(ref col, ref literal)| format!("{} = {}", col, literal.to_string())) [INFO] [stdout] 31 + .map(|(col, literal)| format!("{} = {}", col, literal.to_string())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/update.rs:31:79 [INFO] [stdout] | [INFO] [stdout] 31 | .map(|&(ref col, ref literal)| format!("{} = {}", col, literal.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: panic message is not a string literal [INFO] [stdout] --> src/common.rs:348:30 [INFO] [stdout] | [INFO] [stdout] 348 | Err(e) => panic!(e), [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021 [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(non_fmt_panics)]` (part of `#[warn(rust_2021_compatibility)]`) on by default [INFO] [stdout] help: add a "{}" format string to `Display` the message [INFO] [stdout] | [INFO] [stdout] 348 | Err(e) => panic!("{}", e), [INFO] [stdout] | +++++ [INFO] [stdout] help: or use std::panic::panic_any instead [INFO] [stdout] | [INFO] [stdout] 348 - Err(e) => panic!(e), [INFO] [stdout] 348 + Err(e) => std::panic::panic_any(e), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: panic message is not a string literal [INFO] [stdout] --> src/common.rs:350:26 [INFO] [stdout] | [INFO] [stdout] 350 | Err(e) => panic!(e), [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021 [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: add a "{}" format string to `Display` the message [INFO] [stdout] | [INFO] [stdout] 350 | Err(e) => panic!("{}", e), [INFO] [stdout] | +++++ [INFO] [stdout] help: or use std::panic::panic_any instead [INFO] [stdout] | [INFO] [stdout] 350 - Err(e) => panic!(e), [INFO] [stdout] 350 + Err(e) => std::panic::panic_any(e), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/parser.rs:47:23 [INFO] [stdout] | [INFO] [stdout] 47 | map(creation, |c| SqlQuery::CreateTable(c)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `SqlQuery::CreateTable` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/parser.rs:48:24 [INFO] [stdout] | [INFO] [stdout] 48 | map(insertion, |i| SqlQuery::Insert(i)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `SqlQuery::Insert` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/parser.rs:49:33 [INFO] [stdout] | [INFO] [stdout] 49 | map(compound_selection, |cs| SqlQuery::CompoundSelect(cs)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `SqlQuery::CompoundSelect` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/parser.rs:50:24 [INFO] [stdout] | [INFO] [stdout] 50 | map(selection, |s| SqlQuery::Select(s)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `SqlQuery::Select` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/parser.rs:51:23 [INFO] [stdout] | [INFO] [stdout] 51 | map(deletion, |d| SqlQuery::Delete(d)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `SqlQuery::Delete` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/parser.rs:52:25 [INFO] [stdout] | [INFO] [stdout] 52 | map(drop_table, |dt| SqlQuery::DropTable(dt)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `SqlQuery::DropTable` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/parser.rs:53:23 [INFO] [stdout] | [INFO] [stdout] 53 | map(updating, |u| SqlQuery::Update(u)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `SqlQuery::Update` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/parser.rs:54:18 [INFO] [stdout] | [INFO] [stdout] 54 | map(set, |s| SqlQuery::Set(s)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `SqlQuery::Set` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/parser.rs:55:28 [INFO] [stdout] | [INFO] [stdout] 55 | map(view_creation, |vc| SqlQuery::CreateView(vc)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `SqlQuery::CreateView` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/lib.rs:12:44 [INFO] [stdout] | [INFO] [stdout] 12 | match nom_sql::parser::parse_query(&query) { [INFO] [stdout] | ^^^^^^ help: change this to: `query` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_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 boolean expression can be simplified [INFO] [stdout] --> tests/lib.rs:43:13 [INFO] [stdout] | [INFO] [stdout] 43 | / !l.is_empty() [INFO] [stdout] 44 | | && !l.starts_with("#") [INFO] [stdout] 45 | | && !l.starts_with("--") [INFO] [stdout] 46 | | && !(l.starts_with("/*") && l.ends_with("*/;")) [INFO] [stdout] | |_______________________________________________________________^ help: try: `!(l.is_empty() || l.starts_with("#") || l.starts_with("--") || l.starts_with("/*") && l.ends_with("*/;"))` [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] --> tests/lib.rs:77:13 [INFO] [stdout] | [INFO] [stdout] 77 | / !l.is_empty() [INFO] [stdout] 78 | | && !l.starts_with("#") [INFO] [stdout] 79 | | && !l.starts_with("--") [INFO] [stdout] 80 | | && !l.starts_with("DROP") [INFO] [stdout] 81 | | && !(l.starts_with("/*") && l.ends_with("*/;")) [INFO] [stdout] | |_______________________________________________________________^ help: try: `!(l.is_empty() || l.starts_with("#") || l.starts_with("--") || l.starts_with("DROP") || l.starts_with("/*") && l.ends_with("*/;"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/arithmetic.rs:119:30 [INFO] [stdout] | [INFO] [stdout] 119 | map(integer_literal, |il| ArithmeticBase::Scalar(il)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `ArithmeticBase::Scalar` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/arithmetic.rs:120:41 [INFO] [stdout] | [INFO] [stdout] 120 | map(column_identifier_no_alias, |ci| ArithmeticBase::Column(ci)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `ArithmeticBase::Column` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/arithmetic.rs:136:17 [INFO] [stdout] | [INFO] [stdout] 136 | let alias = match opt_alias { [INFO] [stdout] | _________________^ [INFO] [stdout] 137 | | None => None, [INFO] [stdout] 138 | | Some(a) => Some(String::from(a)), [INFO] [stdout] 139 | | }; [INFO] [stdout] | |_____^ help: try: `opt_alias.map(String::from)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/case.rs:65:34 [INFO] [stdout] | [INFO] [stdout] 65 | let else_expr = else_val.map(|v| ColumnOrLiteral::Literal(v)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `ColumnOrLiteral::Literal` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/column.rs:87:6 [INFO] [stdout] | [INFO] [stdout] 87 | impl<'a> From<&'a str> for Column { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 87 - impl<'a> From<&'a str> for Column { [INFO] [stdout] 87 + impl From<&str> for Column { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/column.rs:119:1 [INFO] [stdout] | [INFO] [stdout] 119 | / impl PartialOrd for Column { [INFO] [stdout] 120 | | fn partial_cmp(&self, other: &Column) -> Option { [INFO] [stdout] 121 | | if self.table.is_some() && other.table.is_some() { [INFO] [stdout] 122 | | match self.table.cmp(&other.table) { [INFO] [stdout] ... | [INFO] [stdout] 132 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 120 - fn partial_cmp(&self, other: &Column) -> Option { [INFO] [stdout] 121 - if self.table.is_some() && other.table.is_some() { [INFO] [stdout] 122 - match self.table.cmp(&other.table) { [INFO] [stdout] 123 - Ordering::Equal => Some(self.name.cmp(&other.name)), [INFO] [stdout] 124 - x => Some(x), [INFO] [stdout] 125 - } [INFO] [stdout] 126 - } else if self.table.is_none() && other.table.is_none() { [INFO] [stdout] 127 - Some(self.name.cmp(&other.name)) [INFO] [stdout] 128 - } else { [INFO] [stdout] 129 - None [INFO] [stdout] 130 - } [INFO] [stdout] 131 - } [INFO] [stdout] 120 + fn partial_cmp(&self, other: &Column) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct implementation of `ToString` [INFO] [stdout] --> src/common.rs:142:1 [INFO] [stdout] | [INFO] [stdout] 142 | / impl ToString for Literal { [INFO] [stdout] 143 | | fn to_string(&self) -> String { [INFO] [stdout] 144 | | match *self { [INFO] [stdout] 145 | | Literal::Null => "NULL".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 163 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] = note: `#[warn(clippy::to_string_trait_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/common.rs:150:38 [INFO] [stdout] | [INFO] [stdout] 150 | Literal::Blob(ref bv) => format!( [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 151 | | "{}", [INFO] [stdout] 152 | | bv.iter() [INFO] [stdout] 153 | | .map(|v| format!("{:x}", v)) [INFO] [stdout] 154 | | .collect::>() [INFO] [stdout] 155 | | .join(" ") [INFO] [stdout] 156 | | ), [INFO] [stdout] | |_____________^ [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] help: consider using `.to_string()` [INFO] [stdout] | [INFO] [stdout] 150 ~ Literal::Blob(ref bv) => bv.iter() [INFO] [stdout] 151 + .map(|v| format!("{:x}", v)) [INFO] [stdout] 152 + .collect::>() [INFO] [stdout] 153 ~ .join(" ").to_string(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/common.rs:317:1 [INFO] [stdout] | [INFO] [stdout] 317 | / impl Default for FieldDefinitionExpression { [INFO] [stdout] 318 | | fn default() -> FieldDefinitionExpression { [INFO] [stdout] 319 | | FieldDefinitionExpression::All [INFO] [stdout] 320 | | } [INFO] [stdout] 321 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 297 + #[derive(Default)] [INFO] [stdout] 298 | pub enum FieldDefinitionExpression { [INFO] [stdout] 299 ~ #[default] [INFO] [stdout] 300 ~ All, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/common.rs:340:36 [INFO] [stdout] | [INFO] [stdout] 340 | is_alphanumeric(chr) || chr == '_' as u8 || chr == '@' as u8 [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'_'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] = note: `#[warn(clippy::char_lit_as_u8)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/common.rs:340:56 [INFO] [stdout] | [INFO] [stdout] 340 | is_alphanumeric(chr) || chr == '_' as u8 || chr == '@' as u8 [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'@'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/common.rs:393:54 [INFO] [stdout] | [INFO] [stdout] 393 | SqlType::UnsignedTinyint(len.map(|l| len_as_u16(l)).unwrap_or(1)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `len_as_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/common.rs:398:46 [INFO] [stdout] | [INFO] [stdout] 398 | SqlType::Tinyint(len.map(|l| len_as_u16(l)).unwrap_or(1)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `len_as_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/common.rs:404:38 [INFO] [stdout] | [INFO] [stdout] 404 | SqlType::Tinyint(len.map(|l| len_as_u16(l)).unwrap_or(1)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `len_as_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/common.rs:427:53 [INFO] [stdout] | [INFO] [stdout] 427 | SqlType::UnsignedBigint(len.map(|l| len_as_u16(l)).unwrap_or(1)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `len_as_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/common.rs:432:45 [INFO] [stdout] | [INFO] [stdout] 432 | SqlType::Bigint(len.map(|l| len_as_u16(l)).unwrap_or(1)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `len_as_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/common.rs:438:37 [INFO] [stdout] | [INFO] [stdout] 438 | SqlType::Bigint(len.map(|l| len_as_u16(l)).unwrap_or(1)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `len_as_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/common.rs:465:50 [INFO] [stdout] | [INFO] [stdout] 465 | SqlType::UnsignedInt(len.map(|l| len_as_u16(l)).unwrap_or(32)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `len_as_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/common.rs:470:42 [INFO] [stdout] | [INFO] [stdout] 470 | SqlType::Int(len.map(|l| len_as_u16(l)).unwrap_or(32)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `len_as_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/common.rs:476:34 [INFO] [stdout] | [INFO] [stdout] 476 | SqlType::Int(len.map(|l| len_as_u16(l)).unwrap_or(32)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `len_as_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/common.rs:516:25 [INFO] [stdout] | [INFO] [stdout] 516 | None => 0 as u16, [INFO] [stdout] | ^^^^^^^^ help: try: `0_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/common.rs:532:13 [INFO] [stdout] | [INFO] [stdout] 532 | |v| SqlType::Enum(v), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `SqlType::Enum` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/common.rs:595:31 [INFO] [stdout] | [INFO] [stdout] 595 | map(case_when_column, |cw| FunctionArguments::Conditional(cw)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `FunctionArguments::Conditional` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/common.rs:596:41 [INFO] [stdout] | [INFO] [stdout] 596 | map(column_identifier_no_alias, |c| FunctionArguments::Column(c)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `FunctionArguments::Column` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/common.rs:668:20 [INFO] [stdout] | [INFO] [stdout] 668 | table: match tup.0 { [INFO] [stdout] | ____________________^ [INFO] [stdout] 669 | | None => None, [INFO] [stdout] 670 | | Some(t) => Some(str::from_utf8(t).unwrap().to_string()), [INFO] [stdout] 671 | | }, [INFO] [stdout] | |_____________^ help: try: `tup.0.map(|t| str::from_utf8(t).unwrap().to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/common.rs:684:16 [INFO] [stdout] | [INFO] [stdout] 684 | alias: match tup.1 { [INFO] [stdout] | ________________^ [INFO] [stdout] 685 | | None => None, [INFO] [stdout] 686 | | Some(a) => Some(String::from(a)), [INFO] [stdout] 687 | | }, [INFO] [stdout] | |_________^ help: try: `tup.1.map(String::from)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/common.rs:699:20 [INFO] [stdout] | [INFO] [stdout] 699 | alias: match tup.2 { [INFO] [stdout] | ____________________^ [INFO] [stdout] 700 | | None => None, [INFO] [stdout] 701 | | Some(a) => Some(String::from(a)), [INFO] [stdout] 702 | | }, [INFO] [stdout] | |_____________^ help: try: `tup.2.map(String::from)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/common.rs:703:20 [INFO] [stdout] | [INFO] [stdout] 703 | table: match tup.0 { [INFO] [stdout] | ____________________^ [INFO] [stdout] 704 | | None => None, [INFO] [stdout] 705 | | Some(t) => Some(str::from_utf8(t).unwrap().to_string()), [INFO] [stdout] 706 | | }, [INFO] [stdout] | |_____________^ help: try: `tup.0.map(|t| str::from_utf8(t).unwrap().to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `common::Literal` [INFO] [stdout] --> src/common.rs:777:24 [INFO] [stdout] | [INFO] [stdout] 777 | value: l.into(), [INFO] [stdout] | ^^^^^^^^ help: consider removing `.into()`: `l` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/common.rs:832:36 [INFO] [stdout] | [INFO] [stdout] 832 | map(column_identifier, |col| FieldDefinitionExpression::Col(col)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `FieldDefinitionExpression::Col` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/common.rs:864:17 [INFO] [stdout] | [INFO] [stdout] 864 | -1 * unpack(tup.1) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using: `-unpack(tup.1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/common.rs:868:25 [INFO] [stdout] | [INFO] [stdout] 868 | fractional: unpack(tup.3) as i32, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `unpack(tup.3)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/common.rs:967:16 [INFO] [stdout] | [INFO] [stdout] 967 | alias: match tup.1 { [INFO] [stdout] | ________________^ [INFO] [stdout] 968 | | Some(a) => Some(String::from(a)), [INFO] [stdout] 969 | | None => None, [INFO] [stdout] 970 | | }, [INFO] [stdout] | |_________^ help: try: `tup.1.map(String::from)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/common.rs:1025:48 [INFO] [stdout] | [INFO] [stdout] 1025 | assert!(res_not_ok.into_iter().all(|r| r == false)); [INFO] [stdout] | ^^^^^^^^^^ help: try: `!r` [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: called `unwrap` on `self.order` after checking its variant with `is_some` [INFO] [stdout] --> src/compound_select.rs:50:30 [INFO] [stdout] | [INFO] [stdout] 49 | if self.order.is_some() { [INFO] [stdout] | ----------------------- help: try: `if let Some() = &self.order` [INFO] [stdout] 50 | write!(f, " {}", self.order.as_ref().unwrap())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/condition.rs:57:24 [INFO] [stdout] | [INFO] [stdout] 57 | while let Some(ref ct) = q.pop_front() { [INFO] [stdout] | ^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 57 - while let Some(ref ct) = q.pop_front() { [INFO] [stdout] 57 + while let Some(ct) = q.pop_front() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `i64` is unnecessary [INFO] [stdout] --> src/condition.rs:510:57 [INFO] [stdout] | [INFO] [stdout] 510 | ConditionBase::Literal(Literal::Integer(42 as i64)) [INFO] [stdout] | ^^^^^^^^^ help: try: `42_i64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `i64` is unnecessary [INFO] [stdout] --> src/condition.rs:536:57 [INFO] [stdout] | [INFO] [stdout] 536 | ConditionBase::Literal(Literal::Integer(42 as i64)) [INFO] [stdout] | ^^^^^^^^^ help: try: `42_i64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `i64` is unnecessary [INFO] [stdout] --> src/condition.rs:546:57 [INFO] [stdout] | [INFO] [stdout] 546 | ConditionBase::Literal(Literal::Integer(5 as i64)) [INFO] [stdout] | ^^^^^^^^ help: try: `5_i64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/create.rs:59:1 [INFO] [stdout] | [INFO] [stdout] 59 | / pub enum SelectSpecification { [INFO] [stdout] 60 | | Compound(CompoundSelectStatement), [INFO] [stdout] | | --------------------------------- the second-largest variant contains at least 72 bytes [INFO] [stdout] 61 | | Simple(SelectStatement), [INFO] [stdout] | | ----------------------- the largest variant contains at least 312 bytes [INFO] [stdout] 62 | | } [INFO] [stdout] | |_^ the entire enum is at least 312 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 61 - Simple(SelectStatement), [INFO] [stdout] 61 + Simple(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/create.rs:102:36 [INFO] [stdout] | [INFO] [stdout] 102 | pub fn index_col_name(i: &[u8]) -> IResult<&[u8], (Column, Option, Option)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `filter_map` with an identity function [INFO] [stdout] --> src/create.rs:236:50 [INFO] [stdout] | [INFO] [stdout] 236 | constraints: constraints.into_iter().filter_map(|m| m).collect(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity [INFO] [stdout] = note: `#[warn(clippy::filter_map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/create.rs:380:16 [INFO] [stdout] | [INFO] [stdout] 380 | let keys = keys_list.and_then(|ks| { [INFO] [stdout] | ________________^ [INFO] [stdout] 381 | | Some( [INFO] [stdout] 382 | | ks.into_iter() [INFO] [stdout] 383 | | .map(|key| { [INFO] [stdout] ... | [INFO] [stdout] 409 | | }); [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 380 ~ let keys = keys_list.map(|ks| ks.into_iter() [INFO] [stdout] 381 + .map(|key| { [INFO] [stdout] 382 + let attach_names = |columns: Vec| { [INFO] [stdout] 383 + columns [INFO] [stdout] 384 + .into_iter() [INFO] [stdout] 385 + .map(|column| Column { [INFO] [stdout] 386 + table: Some(table.name.clone()), [INFO] [stdout] 387 + ..column [INFO] [stdout] 388 + }) [INFO] [stdout] 389 + .collect() [INFO] [stdout] 390 + }; [INFO] [stdout] 391 + [INFO] [stdout] 392 + match key { [INFO] [stdout] 393 + TableKey::PrimaryKey(columns) => { [INFO] [stdout] 394 + TableKey::PrimaryKey(attach_names(columns)) [INFO] [stdout] 395 + } [INFO] [stdout] 396 + TableKey::UniqueKey(name, columns) => { [INFO] [stdout] 397 + TableKey::UniqueKey(name, attach_names(columns)) [INFO] [stdout] 398 + } [INFO] [stdout] 399 + TableKey::FulltextKey(name, columns) => { [INFO] [stdout] 400 + TableKey::FulltextKey(name, attach_names(columns)) [INFO] [stdout] 401 + } [INFO] [stdout] 402 + TableKey::Key(name, columns) => TableKey::Key(name, attach_names(columns)), [INFO] [stdout] 403 + } [INFO] [stdout] 404 + }) [INFO] [stdout] 405 ~ .collect()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/create.rs:433:37 [INFO] [stdout] | [INFO] [stdout] 433 | map(compound_selection, |s| SelectSpecification::Compound(s)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `SelectSpecification::Compound` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/create.rs:434:35 [INFO] [stdout] | [INFO] [stdout] 434 | map(nested_selection, |s| SelectSpecification::Simple(s)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `SelectSpecification::Simple` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct update has no effect, all the fields in the struct have already been specified [INFO] [stdout] --> src/create.rs:634:19 [INFO] [stdout] | [INFO] [stdout] 634 | ..Default::default() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update [INFO] [stdout] = note: `#[warn(clippy::needless_update)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct update has no effect, all the fields in the struct have already been specified [INFO] [stdout] --> src/create.rs:656:19 [INFO] [stdout] | [INFO] [stdout] 656 | ..Default::default() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct update has no effect, all the fields in the struct have already been specified [INFO] [stdout] --> src/delete.rs:88:19 [INFO] [stdout] | [INFO] [stdout] 88 | ..Default::default() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/insert.rs:36:27 [INFO] [stdout] | [INFO] [stdout] 36 | .map(|ref col| col.name.to_owned()) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 36 - .map(|ref col| col.name.to_owned()) [INFO] [stdout] 36 + .map(|col| col.name.to_owned()) [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/insert.rs:49:26 [INFO] [stdout] | [INFO] [stdout] 49 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/order.rs:43:23 [INFO] [stdout] | [INFO] [stdout] 43 | .map(|&(ref c, ref o)| format!("{} {}", escape_if_keyword(&c.name), o)) [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 43 - .map(|&(ref c, ref o)| format!("{} {}", escape_if_keyword(&c.name), o)) [INFO] [stdout] 43 + .map(|(c, o)| format!("{} {}", escape_if_keyword(&c.name), o)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/select.rs:107:12 [INFO] [stdout] | [INFO] [stdout] 107 | if self.tables.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.tables.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: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/select.rs:183:18 [INFO] [stdout] | [INFO] [stdout] 183 | let offset = match opt_offset { [INFO] [stdout] | __________________^ [INFO] [stdout] 184 | | None => 0, [INFO] [stdout] 185 | | Some(v) => v, [INFO] [stdout] 186 | | }; [INFO] [stdout] | |_____^ help: ascribe the type u64 and replace your expression with: `opt_offset.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/select.rs:252:38 [INFO] [stdout] | [INFO] [stdout] 252 | let table = map(table_reference, |t| JoinRightSide::Table(t)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `JoinRightSide::Table` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/table.rs:22:6 [INFO] [stdout] | [INFO] [stdout] 22 | impl<'a> From<&'a str> for Table { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 22 - impl<'a> From<&'a str> for Table { [INFO] [stdout] 22 + impl From<&str> for Table { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/update.rs:25:17 [INFO] [stdout] | [INFO] [stdout] 25 | assert!(self.fields.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.fields.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: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/update.rs:31:23 [INFO] [stdout] | [INFO] [stdout] 31 | .map(|&(ref col, ref literal)| format!("{} = {}", col, literal.to_string())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 31 - .map(|&(ref col, ref literal)| format!("{} = {}", col, literal.to_string())) [INFO] [stdout] 31 + .map(|(col, literal)| format!("{} = {}", col, literal.to_string())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/update.rs:31:79 [INFO] [stdout] | [INFO] [stdout] 31 | .map(|&(ref col, ref literal)| format!("{} = {}", col, literal.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: struct update has no effect, all the fields in the struct have already been specified [INFO] [stdout] --> src/update.rs:131:19 [INFO] [stdout] | [INFO] [stdout] 131 | ..Default::default() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct update has no effect, all the fields in the struct have already been specified [INFO] [stdout] --> src/update.rs:169:19 [INFO] [stdout] | [INFO] [stdout] 169 | ..Default::default() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct update has no effect, all the fields in the struct have already been specified [INFO] [stdout] --> src/update.rs:199:19 [INFO] [stdout] | [INFO] [stdout] 199 | ..Default::default() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: panic message is not a string literal [INFO] [stdout] --> src/common.rs:348:30 [INFO] [stdout] | [INFO] [stdout] 348 | Err(e) => panic!(e), [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021 [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(non_fmt_panics)]` (part of `#[warn(rust_2021_compatibility)]`) on by default [INFO] [stdout] help: add a "{}" format string to `Display` the message [INFO] [stdout] | [INFO] [stdout] 348 | Err(e) => panic!("{}", e), [INFO] [stdout] | +++++ [INFO] [stdout] help: or use std::panic::panic_any instead [INFO] [stdout] | [INFO] [stdout] 348 - Err(e) => panic!(e), [INFO] [stdout] 348 + Err(e) => std::panic::panic_any(e), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: panic message is not a string literal [INFO] [stdout] --> src/common.rs:350:26 [INFO] [stdout] | [INFO] [stdout] 350 | Err(e) => panic!(e), [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021 [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: add a "{}" format string to `Display` the message [INFO] [stdout] | [INFO] [stdout] 350 | Err(e) => panic!("{}", e), [INFO] [stdout] | +++++ [INFO] [stdout] help: or use std::panic::panic_any instead [INFO] [stdout] | [INFO] [stdout] 350 - Err(e) => panic!(e), [INFO] [stdout] 350 + Err(e) => std::panic::panic_any(e), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 11.44s [INFO] running `Command { std: "docker" "inspect" "1269bd0eb7f8572330e38c8d3a2b3eb06c7828b8f3d1b1eeb8b8854b96528a8d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1269bd0eb7f8572330e38c8d3a2b3eb06c7828b8f3d1b1eeb8b8854b96528a8d", kill_on_drop: false }` [INFO] [stdout] 1269bd0eb7f8572330e38c8d3a2b3eb06c7828b8f3d1b1eeb8b8854b96528a8d