[INFO] fetching crate mdbook-embedify 0.3.2... [INFO] linting mdbook-embedify-0.3.2 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate mdbook-embedify 0.3.2 into /workspace/builds/worker-1-tc1/source [INFO] started tweaking crates.io crate mdbook-embedify 0.3.2 [INFO] finished tweaking crates.io crate mdbook-embedify 0.3.2 [INFO] tweaked toml for crates.io crate mdbook-embedify 0.3.2 written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate mdbook-embedify 0.3.2 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 mdbook-embedify 0.3.2 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 rust-embed-impl v8.11.0 [INFO] [stderr] Downloaded rust-embed-utils v8.11.0 [INFO] [stderr] Downloaded mdbook-preprocessor v0.5.2 [INFO] [stderr] Downloaded mdbook-core v0.5.2 [INFO] [stderr] Downloaded dircmp v0.2.0 [INFO] [stderr] Downloaded rust-embed v8.11.0 [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] e35fe506c43e8e33dadd4aa14f4a2121de2617896102aa2c2f99e0d3db007b41 [INFO] running `Command { std: "docker" "start" "-a" "e35fe506c43e8e33dadd4aa14f4a2121de2617896102aa2c2f99e0d3db007b41", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e35fe506c43e8e33dadd4aa14f4a2121de2617896102aa2c2f99e0d3db007b41", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e35fe506c43e8e33dadd4aa14f4a2121de2617896102aa2c2f99e0d3db007b41", kill_on_drop: false }` [INFO] [stdout] e35fe506c43e8e33dadd4aa14f4a2121de2617896102aa2c2f99e0d3db007b41 [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] 135fb6fe0a935fef13dda680e6ff3a3c6ad483186085cbaac9f068d362982575 [INFO] running `Command { std: "docker" "start" "-a" "135fb6fe0a935fef13dda680e6ff3a3c6ad483186085cbaac9f068d362982575", kill_on_drop: false }` [INFO] [stderr] Checking regex-automata v0.4.14 [INFO] [stderr] Compiling pest v2.8.5 [INFO] [stderr] Checking serde_json v1.0.149 [INFO] [stderr] Compiling syn v2.0.114 [INFO] [stderr] Checking toml v0.9.11+spec-1.1.0 [INFO] [stderr] Compiling pulldown-cmark v0.13.0 [INFO] [stderr] Checking getopts v0.2.24 [INFO] [stderr] Checking clap_builder v4.5.57 [INFO] [stderr] Checking pulldown-cmark-escape v0.11.0 [INFO] [stderr] Compiling rust-embed-utils v8.11.0 [INFO] [stderr] Compiling pest_meta v2.8.5 [INFO] [stderr] Checking clap v4.5.57 [INFO] [stderr] Checking regex v1.12.3 [INFO] [stderr] Compiling pest_generator v2.8.5 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling tracing-attributes v0.1.31 [INFO] [stderr] Compiling rust-embed-impl v8.11.0 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling pest_derive v2.8.5 [INFO] [stderr] Checking rust-embed v8.11.0 [INFO] [stderr] Checking tracing v0.1.44 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking dircmp v0.2.0 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking mdbook-core v0.5.2 [INFO] [stderr] Checking serde_yaml v0.9.34+deprecated [INFO] [stderr] Checking mdbook-preprocessor v0.5.2 [INFO] [stderr] Checking mdbook-embedify v0.3.2 (/opt/rustwide/workdir) [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Cli` [INFO] [stdout] --> src/cli.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | / pub fn new() -> Self { [INFO] [stdout] 14 | | let cmd = Command::new("mdbook-embedify") [INFO] [stdout] 15 | | .version(env!("CARGO_PKG_VERSION")) [INFO] [stdout] 16 | | .about("A mdbook embed preprocessor that embeds app to your book") [INFO] [stdout] ... | [INFO] [stdout] 31 | | Self { matches } [INFO] [stdout] 32 | | } [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] 12 + impl Default for Cli { [INFO] [stdout] 13 + fn default() -> Self { [INFO] [stdout] 14 + Self::new() [INFO] [stdout] 15 + } [INFO] [stdout] 16 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/detect_lang.rs:57:13 [INFO] [stdout] | [INFO] [stdout] 57 | / if !pattern.contains('*') && !pattern.contains('?') { [INFO] [stdout] 58 | | if pattern == filename { [INFO] [stdout] 59 | | return true; [INFO] [stdout] 60 | | } [INFO] [stdout] 61 | | } [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] 57 ~ if !pattern.contains('*') && !pattern.contains('?') [INFO] [stdout] 58 ~ && pattern == filename { [INFO] [stdout] 59 | return true; [INFO] [stdout] 60 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Embed` [INFO] [stdout] --> src/embed.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | / pub fn new() -> Embed { [INFO] [stdout] 28 | | Embed [INFO] [stdout] 29 | | } [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] 26 + impl Default for Embed { [INFO] [stdout] 27 + fn default() -> Self { [INFO] [stdout] 28 + Self::new() [INFO] [stdout] 29 + } [INFO] [stdout] 30 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `found` after checking its variant with `is_some` [INFO] [stdout] --> src/embed.rs:106:17 [INFO] [stdout] | [INFO] [stdout] 105 | let mut value = if found.is_some() && !found.unwrap().value.is_empty() { [INFO] [stdout] | --------------- the check is happening here [INFO] [stdout] 106 | found.unwrap().value.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [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 `if` statement can be collapsed [INFO] [stdout] --> src/embed.rs:97:13 [INFO] [stdout] | [INFO] [stdout] 97 | / if placeholder.default.is_empty() { [INFO] [stdout] 98 | | if found.is_none() || found.unwrap().value.is_empty() { [INFO] [stdout] 99 | | should_exit = true; [INFO] [stdout] 100 | | return input.to_string(); [INFO] [stdout] 101 | | } [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] 97 ~ if placeholder.default.is_empty() [INFO] [stdout] 98 ~ && (found.is_none() || found.unwrap().value.is_empty()) { [INFO] [stdout] 99 | should_exit = true; [INFO] [stdout] 100 | return input.to_string(); [INFO] [stdout] 101 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/embed.rs:172:16 [INFO] [stdout] | [INFO] [stdout] 172 | if !rendered.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `rendered.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: useless use of `format!` [INFO] [stdout] --> src/embed.rs:197:17 [INFO] [stdout] | [INFO] [stdout] 197 | format!("{}", json_parts.join(" ")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `json_parts.join(" ").to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/parser.rs:95:29 [INFO] [stdout] | [INFO] [stdout] 95 | / ... match option_pair.as_rule() { [INFO] [stdout] 96 | | ... Rule::embed_option => { [INFO] [stdout] 97 | | ... let mut option = EmbedAppOption { [INFO] [stdout] 98 | | ... name: String::new(), [INFO] [stdout] ... | [INFO] [stdout] 120 | | ... _ => {} [INFO] [stdout] 121 | | ... } [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] 95 ~ if option_pair.as_rule() == Rule::embed_option { [INFO] [stdout] 96 + let mut option = EmbedAppOption { [INFO] [stdout] 97 + name: String::new(), [INFO] [stdout] 98 + value: String::new(), [INFO] [stdout] 99 + }; [INFO] [stdout] 100 + [INFO] [stdout] 101 + for opt_pair in option_pair.into_inner() { [INFO] [stdout] 102 + match opt_pair.as_rule() { [INFO] [stdout] 103 + Rule::embed_option_name => { [INFO] [stdout] 104 + option.name = opt_pair.as_str().to_string(); [INFO] [stdout] 105 + } [INFO] [stdout] 106 + Rule::embed_option_value => { [INFO] [stdout] 107 + option.value = opt_pair [INFO] [stdout] 108 + .as_str() [INFO] [stdout] 109 + .trim_matches('"') [INFO] [stdout] 110 + .trim_matches('\'') [INFO] [stdout] 111 + .to_string(); [INFO] [stdout] 112 + } [INFO] [stdout] 113 + _ => {} [INFO] [stdout] 114 + } [INFO] [stdout] 115 + } [INFO] [stdout] 116 + [INFO] [stdout] 117 + app.options.push(option); [INFO] [stdout] 118 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Cli` [INFO] [stdout] --> src/cli.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | / pub fn new() -> Self { [INFO] [stdout] 14 | | let cmd = Command::new("mdbook-embedify") [INFO] [stdout] 15 | | .version(env!("CARGO_PKG_VERSION")) [INFO] [stdout] 16 | | .about("A mdbook embed preprocessor that embeds app to your book") [INFO] [stdout] ... | [INFO] [stdout] 31 | | Self { matches } [INFO] [stdout] 32 | | } [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] 12 + impl Default for Cli { [INFO] [stdout] 13 + fn default() -> Self { [INFO] [stdout] 14 + Self::new() [INFO] [stdout] 15 + } [INFO] [stdout] 16 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/detect_lang.rs:57:13 [INFO] [stdout] | [INFO] [stdout] 57 | / if !pattern.contains('*') && !pattern.contains('?') { [INFO] [stdout] 58 | | if pattern == filename { [INFO] [stdout] 59 | | return true; [INFO] [stdout] 60 | | } [INFO] [stdout] 61 | | } [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] 57 ~ if !pattern.contains('*') && !pattern.contains('?') [INFO] [stdout] 58 ~ && pattern == filename { [INFO] [stdout] 59 | return true; [INFO] [stdout] 60 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Embed` [INFO] [stdout] --> src/embed.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | / pub fn new() -> Embed { [INFO] [stdout] 28 | | Embed [INFO] [stdout] 29 | | } [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] 26 + impl Default for Embed { [INFO] [stdout] 27 + fn default() -> Self { [INFO] [stdout] 28 + Self::new() [INFO] [stdout] 29 + } [INFO] [stdout] 30 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `found` after checking its variant with `is_some` [INFO] [stdout] --> src/embed.rs:106:17 [INFO] [stdout] | [INFO] [stdout] 105 | let mut value = if found.is_some() && !found.unwrap().value.is_empty() { [INFO] [stdout] | --------------- the check is happening here [INFO] [stdout] 106 | found.unwrap().value.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [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 `if` statement can be collapsed [INFO] [stdout] --> src/embed.rs:97:13 [INFO] [stdout] | [INFO] [stdout] 97 | / if placeholder.default.is_empty() { [INFO] [stdout] 98 | | if found.is_none() || found.unwrap().value.is_empty() { [INFO] [stdout] 99 | | should_exit = true; [INFO] [stdout] 100 | | return input.to_string(); [INFO] [stdout] 101 | | } [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] 97 ~ if placeholder.default.is_empty() [INFO] [stdout] 98 ~ && (found.is_none() || found.unwrap().value.is_empty()) { [INFO] [stdout] 99 | should_exit = true; [INFO] [stdout] 100 | return input.to_string(); [INFO] [stdout] 101 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/embed.rs:172:16 [INFO] [stdout] | [INFO] [stdout] 172 | if !rendered.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `rendered.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: useless use of `format!` [INFO] [stdout] --> src/embed.rs:197:17 [INFO] [stdout] | [INFO] [stdout] 197 | format!("{}", json_parts.join(" ")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `json_parts.join(" ").to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/parser.rs:95:29 [INFO] [stdout] | [INFO] [stdout] 95 | / ... match option_pair.as_rule() { [INFO] [stdout] 96 | | ... Rule::embed_option => { [INFO] [stdout] 97 | | ... let mut option = EmbedAppOption { [INFO] [stdout] 98 | | ... name: String::new(), [INFO] [stdout] ... | [INFO] [stdout] 120 | | ... _ => {} [INFO] [stdout] 121 | | ... } [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] 95 ~ if option_pair.as_rule() == Rule::embed_option { [INFO] [stdout] 96 + let mut option = EmbedAppOption { [INFO] [stdout] 97 + name: String::new(), [INFO] [stdout] 98 + value: String::new(), [INFO] [stdout] 99 + }; [INFO] [stdout] 100 + [INFO] [stdout] 101 + for opt_pair in option_pair.into_inner() { [INFO] [stdout] 102 + match opt_pair.as_rule() { [INFO] [stdout] 103 + Rule::embed_option_name => { [INFO] [stdout] 104 + option.name = opt_pair.as_str().to_string(); [INFO] [stdout] 105 + } [INFO] [stdout] 106 + Rule::embed_option_value => { [INFO] [stdout] 107 + option.value = opt_pair [INFO] [stdout] 108 + .as_str() [INFO] [stdout] 109 + .trim_matches('"') [INFO] [stdout] 110 + .trim_matches('\'') [INFO] [stdout] 111 + .to_string(); [INFO] [stdout] 112 + } [INFO] [stdout] 113 + _ => {} [INFO] [stdout] 114 + } [INFO] [stdout] 115 + } [INFO] [stdout] 116 + [INFO] [stdout] 117 + app.options.push(option); [INFO] [stdout] 118 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/utils.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | use pulldown_cmark; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/utils.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | use pulldown_cmark; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/detect_lang.rs:57:13 [INFO] [stdout] | [INFO] [stdout] 57 | / if !pattern.contains('*') && !pattern.contains('?') { [INFO] [stdout] 58 | | if pattern == filename { [INFO] [stdout] 59 | | return true; [INFO] [stdout] 60 | | } [INFO] [stdout] 61 | | } [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] 57 ~ if !pattern.contains('*') && !pattern.contains('?') [INFO] [stdout] 58 ~ && pattern == filename { [INFO] [stdout] 59 | return true; [INFO] [stdout] 60 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `found` after checking its variant with `is_some` [INFO] [stdout] --> src/embed.rs:106:17 [INFO] [stdout] | [INFO] [stdout] 105 | let mut value = if found.is_some() && !found.unwrap().value.is_empty() { [INFO] [stdout] | --------------- the check is happening here [INFO] [stdout] 106 | found.unwrap().value.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [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 `if` statement can be collapsed [INFO] [stdout] --> src/embed.rs:97:13 [INFO] [stdout] | [INFO] [stdout] 97 | / if placeholder.default.is_empty() { [INFO] [stdout] 98 | | if found.is_none() || found.unwrap().value.is_empty() { [INFO] [stdout] 99 | | should_exit = true; [INFO] [stdout] 100 | | return input.to_string(); [INFO] [stdout] 101 | | } [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] 97 ~ if placeholder.default.is_empty() [INFO] [stdout] 98 ~ && (found.is_none() || found.unwrap().value.is_empty()) { [INFO] [stdout] 99 | should_exit = true; [INFO] [stdout] 100 | return input.to_string(); [INFO] [stdout] 101 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/embed.rs:172:16 [INFO] [stdout] | [INFO] [stdout] 172 | if !rendered.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `rendered.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: useless use of `format!` [INFO] [stdout] --> src/embed.rs:197:17 [INFO] [stdout] | [INFO] [stdout] 197 | format!("{}", json_parts.join(" ")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `json_parts.join(" ").to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/detect_lang.rs:57:13 [INFO] [stdout] | [INFO] [stdout] 57 | / if !pattern.contains('*') && !pattern.contains('?') { [INFO] [stdout] 58 | | if pattern == filename { [INFO] [stdout] 59 | | return true; [INFO] [stdout] 60 | | } [INFO] [stdout] 61 | | } [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] 57 ~ if !pattern.contains('*') && !pattern.contains('?') [INFO] [stdout] 58 ~ && pattern == filename { [INFO] [stdout] 59 | return true; [INFO] [stdout] 60 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/parser.rs:95:29 [INFO] [stdout] | [INFO] [stdout] 95 | / ... match option_pair.as_rule() { [INFO] [stdout] 96 | | ... Rule::embed_option => { [INFO] [stdout] 97 | | ... let mut option = EmbedAppOption { [INFO] [stdout] 98 | | ... name: String::new(), [INFO] [stdout] ... | [INFO] [stdout] 120 | | ... _ => {} [INFO] [stdout] 121 | | ... } [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] 95 ~ if option_pair.as_rule() == Rule::embed_option { [INFO] [stdout] 96 + let mut option = EmbedAppOption { [INFO] [stdout] 97 + name: String::new(), [INFO] [stdout] 98 + value: String::new(), [INFO] [stdout] 99 + }; [INFO] [stdout] 100 + [INFO] [stdout] 101 + for opt_pair in option_pair.into_inner() { [INFO] [stdout] 102 + match opt_pair.as_rule() { [INFO] [stdout] 103 + Rule::embed_option_name => { [INFO] [stdout] 104 + option.name = opt_pair.as_str().to_string(); [INFO] [stdout] 105 + } [INFO] [stdout] 106 + Rule::embed_option_value => { [INFO] [stdout] 107 + option.value = opt_pair [INFO] [stdout] 108 + .as_str() [INFO] [stdout] 109 + .trim_matches('"') [INFO] [stdout] 110 + .trim_matches('\'') [INFO] [stdout] 111 + .to_string(); [INFO] [stdout] 112 + } [INFO] [stdout] 113 + _ => {} [INFO] [stdout] 114 + } [INFO] [stdout] 115 + } [INFO] [stdout] 116 + [INFO] [stdout] 117 + app.options.push(option); [INFO] [stdout] 118 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `found` after checking its variant with `is_some` [INFO] [stdout] --> src/embed.rs:106:17 [INFO] [stdout] | [INFO] [stdout] 105 | let mut value = if found.is_some() && !found.unwrap().value.is_empty() { [INFO] [stdout] | --------------- the check is happening here [INFO] [stdout] 106 | found.unwrap().value.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [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 `if` statement can be collapsed [INFO] [stdout] --> src/embed.rs:97:13 [INFO] [stdout] | [INFO] [stdout] 97 | / if placeholder.default.is_empty() { [INFO] [stdout] 98 | | if found.is_none() || found.unwrap().value.is_empty() { [INFO] [stdout] 99 | | should_exit = true; [INFO] [stdout] 100 | | return input.to_string(); [INFO] [stdout] 101 | | } [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] 97 ~ if placeholder.default.is_empty() [INFO] [stdout] 98 ~ && (found.is_none() || found.unwrap().value.is_empty()) { [INFO] [stdout] 99 | should_exit = true; [INFO] [stdout] 100 | return input.to_string(); [INFO] [stdout] 101 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/embed.rs:172:16 [INFO] [stdout] | [INFO] [stdout] 172 | if !rendered.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `rendered.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: useless use of `format!` [INFO] [stdout] --> src/embed.rs:197:17 [INFO] [stdout] | [INFO] [stdout] 197 | format!("{}", json_parts.join(" ")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `json_parts.join(" ").to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/parser.rs:95:29 [INFO] [stdout] | [INFO] [stdout] 95 | / ... match option_pair.as_rule() { [INFO] [stdout] 96 | | ... Rule::embed_option => { [INFO] [stdout] 97 | | ... let mut option = EmbedAppOption { [INFO] [stdout] 98 | | ... name: String::new(), [INFO] [stdout] ... | [INFO] [stdout] 120 | | ... _ => {} [INFO] [stdout] 121 | | ... } [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] 95 ~ if option_pair.as_rule() == Rule::embed_option { [INFO] [stdout] 96 + let mut option = EmbedAppOption { [INFO] [stdout] 97 + name: String::new(), [INFO] [stdout] 98 + value: String::new(), [INFO] [stdout] 99 + }; [INFO] [stdout] 100 + [INFO] [stdout] 101 + for opt_pair in option_pair.into_inner() { [INFO] [stdout] 102 + match opt_pair.as_rule() { [INFO] [stdout] 103 + Rule::embed_option_name => { [INFO] [stdout] 104 + option.name = opt_pair.as_str().to_string(); [INFO] [stdout] 105 + } [INFO] [stdout] 106 + Rule::embed_option_value => { [INFO] [stdout] 107 + option.value = opt_pair [INFO] [stdout] 108 + .as_str() [INFO] [stdout] 109 + .trim_matches('"') [INFO] [stdout] 110 + .trim_matches('\'') [INFO] [stdout] 111 + .to_string(); [INFO] [stdout] 112 + } [INFO] [stdout] 113 + _ => {} [INFO] [stdout] 114 + } [INFO] [stdout] 115 + } [INFO] [stdout] 116 + [INFO] [stdout] 117 + app.options.push(option); [INFO] [stdout] 118 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 18.22s [INFO] running `Command { std: "docker" "inspect" "135fb6fe0a935fef13dda680e6ff3a3c6ad483186085cbaac9f068d362982575", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "135fb6fe0a935fef13dda680e6ff3a3c6ad483186085cbaac9f068d362982575", kill_on_drop: false }` [INFO] [stdout] 135fb6fe0a935fef13dda680e6ff3a3c6ad483186085cbaac9f068d362982575