[INFO] fetching crate phlow-runtime 0.4.2... [INFO] linting phlow-runtime-0.4.2 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate phlow-runtime 0.4.2 into /workspace/builds/worker-0-tc1/source [INFO] started tweaking crates.io crate phlow-runtime 0.4.2 [INFO] removed 0 missing tests [INFO] finished tweaking crates.io crate phlow-runtime 0.4.2 [INFO] tweaked toml for crates.io crate phlow-runtime 0.4.2 written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate phlow-runtime 0.4.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 phlow-runtime 0.4.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 liblzma v0.4.5 [INFO] [stderr] Downloaded jemallocator v0.5.4 [INFO] [stderr] Downloaded valu3 v0.9.6 [INFO] [stderr] Downloaded opentelemetry-stdout v0.31.0 [INFO] [stderr] Downloaded valu3-derive v0.9.6 [INFO] [stderr] Downloaded phlow-engine v0.4.2 [INFO] [stderr] Downloaded phs v0.4.2 [INFO] [stderr] Downloaded pest_derive v2.8.4 [INFO] [stderr] Downloaded zip v4.6.1 [INFO] [stderr] Downloaded tracing-opentelemetry v0.32.0 [INFO] [stderr] Downloaded pest_meta v2.8.4 [INFO] [stderr] Downloaded libz-rs-sys v0.5.3 [INFO] [stderr] Downloaded pest_generator v2.8.4 [INFO] [stderr] Downloaded zlib-rs v0.5.3 [INFO] [stderr] Downloaded ppmd-rust v1.3.0 [INFO] [stderr] Downloaded git2 v0.20.3 [INFO] [stderr] Downloaded rhai v1.23.6 [INFO] [stderr] Downloaded jemalloc-sys v0.5.4+5.3.0-patched [INFO] [stderr] Downloaded rhai_codegen v3.1.0 [INFO] [stderr] Downloaded liblzma-sys v0.4.4 [INFO] [stderr] Downloaded libgit2-sys v0.18.3+1.9.2 [INFO] [stderr] Downloaded phlow-sdk v0.4.2 [INFO] [stderr] Downloaded openssl-src v300.5.4+3.5.4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] ba0576b301d1517e6025d6891f8184d65910430802f2c1d8d1f61493490c6fc3 [INFO] running `Command { std: "docker" "start" "-a" "ba0576b301d1517e6025d6891f8184d65910430802f2c1d8d1f61493490c6fc3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "ba0576b301d1517e6025d6891f8184d65910430802f2c1d8d1f61493490c6fc3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ba0576b301d1517e6025d6891f8184d65910430802f2c1d8d1f61493490c6fc3", kill_on_drop: false }` [INFO] [stdout] ba0576b301d1517e6025d6891f8184d65910430802f2c1d8d1f61493490c6fc3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 35e4c06d22818a0da4825955eb4719fa66d2354632e1ed9e8e3390c1a85b4d46 [INFO] running `Command { std: "docker" "start" "-a" "35e4c06d22818a0da4825955eb4719fa66d2354632e1ed9e8e3390c1a85b4d46", kill_on_drop: false }` [INFO] [stderr] Compiling syn v2.0.111 [INFO] [stderr] Compiling find-msvc-tools v0.1.5 [INFO] [stderr] Compiling portable-atomic v1.11.1 [INFO] [stderr] Checking bytes v1.11.0 [INFO] [stderr] Checking slab v0.4.11 [INFO] [stderr] Compiling libc v0.2.178 [INFO] [stderr] Checking mio v1.1.1 [INFO] [stderr] Checking signal-hook-registry v1.4.7 [INFO] [stderr] Checking socket2 v0.6.1 [INFO] [stderr] Checking indexmap v2.12.1 [INFO] [stderr] Compiling zerocopy v0.8.31 [INFO] [stderr] Checking generic-array v0.14.7 [INFO] [stderr] Compiling thiserror v2.0.17 [INFO] [stderr] Checking getrandom v0.2.16 [INFO] [stderr] Compiling openssl v0.10.75 [INFO] [stderr] Compiling crunchy v0.2.4 [INFO] [stderr] Compiling rustls v0.23.35 [INFO] [stderr] Compiling native-tls v0.2.14 [INFO] [stderr] Checking aho-corasick v1.1.4 [INFO] [stderr] Compiling memchr v2.7.6 [INFO] [stderr] Compiling ucd-trie v0.1.7 [INFO] [stderr] Compiling tiny-keccak v2.0.2 [INFO] [stderr] Compiling anyhow v1.0.100 [INFO] [stderr] Compiling once_cell v1.21.3 [INFO] [stderr] Compiling smartstring v1.0.1 [INFO] [stderr] Checking http v1.4.0 [INFO] [stderr] Compiling ahash v0.8.12 [INFO] [stderr] Checking iri-string v0.7.9 [INFO] [stderr] Checking is_terminal_polyfill v1.70.2 [INFO] [stderr] Checking anstyle-query v1.1.5 [INFO] [stderr] Checking bytemuck v1.24.0 [INFO] [stderr] Checking crypto-common v0.1.7 [INFO] [stderr] Checking block-buffer v0.10.4 [INFO] [stderr] Checking anstream v0.6.21 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking serde_json v1.0.145 [INFO] [stderr] Compiling rustix v1.1.2 [INFO] [stderr] Checking atomic v0.6.1 [INFO] [stderr] Checking pest v2.8.4 [INFO] [stderr] Compiling zstd-safe v7.2.4 [INFO] [stderr] Checking simd-adler32 v0.3.8 [INFO] [stderr] Checking md-5 v0.10.6 [INFO] [stderr] Checking inout v0.1.4 [INFO] [stderr] Checking jiff v0.2.16 [INFO] [stderr] Checking tracing-core v0.1.35 [INFO] [stderr] Checking uuid v1.19.0 [INFO] [stderr] Checking zlib-rs v0.5.3 [INFO] [stderr] Checking deranged v0.5.5 [INFO] [stderr] Compiling jobserver v0.1.34 [INFO] [stderr] Checking http-body v1.0.1 [INFO] [stderr] Checking http-body-util v0.1.3 [INFO] [stderr] Compiling cc v1.2.49 [INFO] [stderr] Compiling const-random-macro v0.1.16 [INFO] [stderr] Checking miniz_oxide v0.8.9 [INFO] [stderr] Checking cipher v0.4.4 [INFO] [stderr] Checking regex-automata v0.4.13 [INFO] [stderr] Checking hmac v0.12.1 [INFO] [stderr] Checking tracing-log v0.2.0 [INFO] [stderr] Checking time-core v0.1.6 [INFO] [stderr] Checking opentelemetry-semantic-conventions v0.31.0 [INFO] [stderr] Checking libbz2-rs-sys v0.2.2 [INFO] [stderr] Checking const-random v0.1.18 [INFO] [stderr] Checking bumpalo v3.19.0 [INFO] [stderr] Checking clap_builder v4.5.53 [INFO] [stderr] Checking pbkdf2 v0.12.2 [INFO] [stderr] Checking aes v0.8.4 [INFO] [stderr] Checking zopfli v0.8.3 [INFO] [stderr] Checking sha1 v0.10.6 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking bzip2 v0.6.1 [INFO] [stderr] Checking filetime v0.2.26 [INFO] [stderr] Compiling openssl-src v300.5.4+3.5.4 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking deflate64 v0.1.10 [INFO] [stderr] Checking ppmd-rust v1.3.0 [INFO] [stderr] Checking libloading v0.9.0 [INFO] [stderr] Checking time v0.3.44 [INFO] [stderr] Compiling pest_meta v2.8.4 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Checking libz-rs-sys v0.5.3 [INFO] [stderr] Checking flate2 v1.1.5 [INFO] [stderr] Compiling openssl-sys v0.9.111 [INFO] [stderr] Compiling ring v0.17.14 [INFO] [stderr] Compiling libz-sys v1.1.23 [INFO] [stderr] Compiling zstd-sys v2.0.16+zstd.1.5.7 [INFO] [stderr] Compiling libssh2-sys v0.3.1 [INFO] [stderr] Compiling liblzma-sys v0.4.4 [INFO] [stderr] Compiling libgit2-sys v0.18.3+1.9.2 [INFO] [stderr] Checking xattr v1.6.1 [INFO] [stderr] Checking tar v0.4.44 [INFO] [stderr] Checking regex v1.12.2 [INFO] [stderr] Checking clap v4.5.53 [INFO] [stderr] Checking env_filter v0.1.4 [INFO] [stderr] Checking env_logger v0.11.8 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling pest_generator v2.8.4 [INFO] [stderr] Checking liblzma v0.4.5 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling tokio-macros v2.6.0 [INFO] [stderr] Compiling tracing-attributes v0.1.31 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.1 [INFO] [stderr] Compiling zerovec-derive v0.11.2 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling zeroize_derive v1.4.2 [INFO] [stderr] Compiling thiserror-impl v2.0.17 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Compiling pin-project-internal v1.1.10 [INFO] [stderr] Compiling async-trait v0.1.89 [INFO] [stderr] Compiling prost-derive v0.14.1 [INFO] [stderr] Checking zeroize v1.8.2 [INFO] [stderr] Compiling pest_derive v2.8.4 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking rustls-pki-types v1.13.1 [INFO] [stderr] Compiling rhai_codegen v3.1.0 [INFO] [stderr] Compiling valu3-derive v0.9.6 [INFO] [stderr] Checking rustls-webpki v0.103.8 [INFO] [stderr] Checking webpki-roots v1.0.4 [INFO] [stderr] Checking tracing v0.1.43 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking pin-project v1.1.10 [INFO] [stderr] Checking yoke v0.8.1 [INFO] [stderr] Checking opentelemetry v0.31.0 [INFO] [stderr] Checking prost v0.14.1 [INFO] [stderr] Checking zerovec v0.11.5 [INFO] [stderr] Checking zerotrie v0.2.3 [INFO] [stderr] Checking tinystr v0.8.2 [INFO] [stderr] Checking potential_utf v0.1.4 [INFO] [stderr] Checking icu_locale_core v2.1.1 [INFO] [stderr] Checking icu_collections v2.1.1 [INFO] [stderr] Checking zstd v0.13.3 [INFO] [stderr] Checking zip v4.6.1 [INFO] [stderr] Checking icu_provider v2.1.1 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking icu_properties v2.1.1 [INFO] [stderr] Checking futures-executor v0.3.31 [INFO] [stderr] Checking opentelemetry_sdk v0.31.0 [INFO] [stderr] Checking futures v0.3.31 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking chrono v0.4.42 [INFO] [stderr] Checking thin-vec v0.2.14 [INFO] [stderr] Checking serde_yaml v0.9.34+deprecated [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking icu_normalizer v2.1.1 [INFO] [stderr] Checking tracing-subscriber v0.3.22 [INFO] [stderr] Checking rhai v1.23.6 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Checking tokio v1.48.0 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking tracing-opentelemetry v0.32.0 [INFO] [stderr] Checking url v2.5.7 [INFO] [stderr] Checking valu3 v0.9.6 [INFO] [stderr] Checking opentelemetry-stdout v0.31.0 [INFO] [stderr] Checking tokio-util v0.7.17 [INFO] [stderr] Checking tokio-rustls v0.26.4 [INFO] [stderr] Checking tokio-stream v0.1.17 [INFO] [stderr] Checking h2 v0.4.12 [INFO] [stderr] Checking tower v0.5.2 [INFO] [stderr] Checking tower-http v0.6.8 [INFO] [stderr] Checking hyper v1.8.1 [INFO] [stderr] Checking hyper-util v0.1.19 [INFO] [stderr] Checking hyper-timeout v0.5.2 [INFO] [stderr] Checking hyper-rustls v0.27.7 [INFO] [stderr] Checking tonic v0.14.2 [INFO] [stderr] Checking tonic-prost v0.14.2 [INFO] [stderr] Checking opentelemetry-proto v0.31.0 [INFO] [stderr] Checking phs v0.4.2 [INFO] [stderr] Checking git2 v0.20.3 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking hyper-tls v0.6.0 [INFO] [stderr] Checking reqwest v0.12.24 [INFO] [stderr] Checking opentelemetry-http v0.31.0 [INFO] [stderr] Checking opentelemetry-otlp v0.31.0 [INFO] [stderr] Checking phlow-sdk v0.4.2 [INFO] [stderr] Checking phlow-engine v0.4.2 [INFO] [stderr] Checking phlow-runtime v0.4.2 (/opt/rustwide/workdir) [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/analyzer.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | / if self.files || self.all { [INFO] [stdout] 67 | | if let Some(files) = result.get("files") { [INFO] [stdout] 68 | | println!("Files:"); [INFO] [stdout] 69 | | if let Some(arr) = files.as_array() { [INFO] [stdout] ... | [INFO] [stdout] 75 | | } [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] 66 ~ if (self.files || self.all) { [INFO] [stdout] 67 ~ && let Some(files) = result.get("files") { [INFO] [stdout] 68 | println!("Files:"); [INFO] [stdout] ... [INFO] [stdout] 73 | } [INFO] [stdout] 74 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/analyzer.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 77 | / if self.modules || self.all { [INFO] [stdout] 78 | | if let Some(mods) = result.get("modules") { [INFO] [stdout] 79 | | println!("Modules:"); [INFO] [stdout] 80 | | if let Some(arr) = mods.as_array() { [INFO] [stdout] ... | [INFO] [stdout] 92 | | } [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] 77 ~ if (self.modules || self.all) { [INFO] [stdout] 78 ~ && let Some(mods) = result.get("modules") { [INFO] [stdout] 79 | println!("Modules:"); [INFO] [stdout] ... [INFO] [stdout] 90 | } [INFO] [stdout] 91 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/analyzer.rs:94:9 [INFO] [stdout] | [INFO] [stdout] 94 | / if self.total_steps || self.all { [INFO] [stdout] 95 | | if let Some(ts) = result.get("total_steps") { [INFO] [stdout] 96 | | println!("Total steps: {}", ts.to_string()); [INFO] [stdout] 97 | | } [INFO] [stdout] 98 | | } [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] 94 ~ if (self.total_steps || self.all) { [INFO] [stdout] 95 ~ && let Some(ts) = result.get("total_steps") { [INFO] [stdout] 96 | println!("Total steps: {}", ts.to_string()); [INFO] [stdout] 97 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> src/analyzer.rs:96:47 [INFO] [stdout] | [INFO] [stdout] 96 | println!("Total steps: {}", ts.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: this `if` statement can be collapsed [INFO] [stdout] --> src/analyzer.rs:100:9 [INFO] [stdout] | [INFO] [stdout] 100 | / if self.total_pipelines || self.all { [INFO] [stdout] 101 | | if let Some(tp) = result.get("total_pipelines") { [INFO] [stdout] 102 | | println!("Total pipelines: {}", tp.to_string()); [INFO] [stdout] 103 | | } [INFO] [stdout] 104 | | } [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] 100 ~ if (self.total_pipelines || self.all) { [INFO] [stdout] 101 ~ && let Some(tp) = result.get("total_pipelines") { [INFO] [stdout] 102 | println!("Total pipelines: {}", tp.to_string()); [INFO] [stdout] 103 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> src/analyzer.rs:102:51 [INFO] [stdout] | [INFO] [stdout] 102 | println!("Total pipelines: {}", tp.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] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/analyzer.rs:161:9 [INFO] [stdout] | [INFO] [stdout] 161 | module_name[10..].to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/analyzer.rs:160:5 [INFO] [stdout] | [INFO] [stdout] 160 | if module_name.starts_with("./modules/") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 160 ~ if let Some() = module_name.strip_prefix("./modules/") { [INFO] [stdout] 161 ~ .to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/analyzer.rs:163:9 [INFO] [stdout] | [INFO] [stdout] 163 | / module_name [INFO] [stdout] 164 | | .split('/') [INFO] [stdout] 165 | | .last() [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] = note: `#[warn(clippy::double_ended_iterator_last)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 165 - .last() [INFO] [stdout] 165 + .next_back() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/analyzer.rs:317:13 [INFO] [stdout] | [INFO] [stdout] 317 | &main_path.parent().unwrap_or(Path::new(".")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `main_path.parent().unwrap_or(Path::new("."))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/analyzer.rs:331:21 [INFO] [stdout] | [INFO] [stdout] 331 | / if include_modules { [INFO] [stdout] 332 | | if let Some(mods) = root.get("modules").and_then(|v| v.as_array()) { [INFO] [stdout] 333 | | for module in &mods.values { [INFO] [stdout] ... | [INFO] [stdout] 467 | | } [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] 331 ~ if include_modules [INFO] [stdout] 332 ~ && let Some(mods) = root.get("modules").and_then(|v| v.as_array()) { [INFO] [stdout] 333 | for module in &mods.values { [INFO] [stdout] ... [INFO] [stdout] 465 | } [INFO] [stdout] 466 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/analyzer.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | / if self.files || self.all { [INFO] [stdout] 67 | | if let Some(files) = result.get("files") { [INFO] [stdout] 68 | | println!("Files:"); [INFO] [stdout] 69 | | if let Some(arr) = files.as_array() { [INFO] [stdout] ... | [INFO] [stdout] 75 | | } [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] 66 ~ if (self.files || self.all) { [INFO] [stdout] 67 ~ && let Some(files) = result.get("files") { [INFO] [stdout] 68 | println!("Files:"); [INFO] [stdout] ... [INFO] [stdout] 73 | } [INFO] [stdout] 74 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/analyzer.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 77 | / if self.modules || self.all { [INFO] [stdout] 78 | | if let Some(mods) = result.get("modules") { [INFO] [stdout] 79 | | println!("Modules:"); [INFO] [stdout] 80 | | if let Some(arr) = mods.as_array() { [INFO] [stdout] ... | [INFO] [stdout] 92 | | } [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] 77 ~ if (self.modules || self.all) { [INFO] [stdout] 78 ~ && let Some(mods) = result.get("modules") { [INFO] [stdout] 79 | println!("Modules:"); [INFO] [stdout] ... [INFO] [stdout] 90 | } [INFO] [stdout] 91 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/analyzer.rs:413:37 [INFO] [stdout] | [INFO] [stdout] 413 | / ... if candidate.exists() { [INFO] [stdout] 414 | | ... if let Some(fname) = [INFO] [stdout] 415 | | ... candidate.file_name().and_then(|s| s.to_str()) [INFO] [stdout] ... | [INFO] [stdout] 463 | | ... } [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] 413 ~ if candidate.exists() [INFO] [stdout] 414 ~ && let Some(fname) = [INFO] [stdout] 415 | candidate.file_name().and_then(|s| s.to_str()) [INFO] [stdout] ... [INFO] [stdout] 461 | } [INFO] [stdout] 462 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/analyzer.rs:94:9 [INFO] [stdout] | [INFO] [stdout] 94 | / if self.total_steps || self.all { [INFO] [stdout] 95 | | if let Some(ts) = result.get("total_steps") { [INFO] [stdout] 96 | | println!("Total steps: {}", ts.to_string()); [INFO] [stdout] 97 | | } [INFO] [stdout] 98 | | } [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] 94 ~ if (self.total_steps || self.all) { [INFO] [stdout] 95 ~ && let Some(ts) = result.get("total_steps") { [INFO] [stdout] 96 | println!("Total steps: {}", ts.to_string()); [INFO] [stdout] 97 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> src/analyzer.rs:96:47 [INFO] [stdout] | [INFO] [stdout] 96 | println!("Total steps: {}", ts.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: this `if` statement can be collapsed [INFO] [stdout] --> src/analyzer.rs:414:41 [INFO] [stdout] | [INFO] [stdout] 414 | / ... if let Some(fname) = [INFO] [stdout] 415 | | ... candidate.file_name().and_then(|s| s.to_str()) [INFO] [stdout] 416 | | ... { [INFO] [stdout] 417 | | ... if fname == "main.phlow" { [INFO] [stdout] ... | [INFO] [stdout] 462 | | ... } [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] 415 ~ candidate.file_name().and_then(|s| s.to_str()) [INFO] [stdout] 416 ~ && fname == "main.phlow" { [INFO] [stdout] 417 | if let Ok(nested) = analyze_internal( [INFO] [stdout] ... [INFO] [stdout] 459 | } [INFO] [stdout] 460 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/analyzer.rs:417:45 [INFO] [stdout] | [INFO] [stdout] 417 | / ... if fname == "main.phlow" { [INFO] [stdout] 418 | | ... if let Ok(nested) = analyze_internal( [INFO] [stdout] 419 | | ... &candidate.to_string_lossy(), [INFO] [stdout] 420 | | ... include_files, [INFO] [stdout] ... | [INFO] [stdout] 461 | | ... } [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] 417 ~ if fname == "main.phlow" [INFO] [stdout] 418 ~ && let Ok(nested) = analyze_internal( [INFO] [stdout] 419 | &candidate.to_string_lossy(), [INFO] [stdout] ... [INFO] [stdout] 459 | } [INFO] [stdout] 460 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/analyzer.rs:445:53 [INFO] [stdout] | [INFO] [stdout] 445 | / ... if let Some(ns) = nested.get("total_steps") { [INFO] [stdout] 446 | | ... if let Ok(nv) = [INFO] [stdout] 447 | | ... ns.to_string().parse::() [INFO] [stdout] ... | [INFO] [stdout] 451 | | ... } [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] 445 ~ if let Some(ns) = nested.get("total_steps") [INFO] [stdout] 446 ~ && let Ok(nv) = [INFO] [stdout] 447 | ns.to_string().parse::() [INFO] [stdout] 448 | { [INFO] [stdout] 449 | total_steps += nv; [INFO] [stdout] 450 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/analyzer.rs:452:53 [INFO] [stdout] | [INFO] [stdout] 452 | / ... if let Some(np) = nested.get("total_pipelines") [INFO] [stdout] 453 | | ... { [INFO] [stdout] 454 | | ... if let Ok(nv) = [INFO] [stdout] 455 | | ... np.to_string().parse::() [INFO] [stdout] ... | [INFO] [stdout] 459 | | ... } [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] 452 ~ if let Some(np) = nested.get("total_pipelines") [INFO] [stdout] 453 ~ && let Ok(nv) = [INFO] [stdout] 454 | np.to_string().parse::() [INFO] [stdout] 455 | { [INFO] [stdout] 456 | total_pipelines += nv; [INFO] [stdout] 457 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/analyzer.rs:469:21 [INFO] [stdout] | [INFO] [stdout] 469 | / if include_total_pipelines || include_total_steps { [INFO] [stdout] 470 | | if let Some(steps_val) = root.get("steps") { [INFO] [stdout] 471 | | // add the pipelines/steps from the main root to any totals already accumulated from nested modules [INFO] [stdout] 472 | | total_pipelines += count_pipelines_recursive(steps_val); [INFO] [stdout] ... | [INFO] [stdout] 475 | | } [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] 469 ~ if (include_total_pipelines || include_total_steps) { [INFO] [stdout] 470 ~ && let Some(steps_val) = root.get("steps") { [INFO] [stdout] 471 | // add the pipelines/steps from the main root to any totals already accumulated from nested modules [INFO] [stdout] 472 | total_pipelines += count_pipelines_recursive(steps_val); [INFO] [stdout] 473 | total_steps += count_steps_recursive(steps_val); [INFO] [stdout] 474 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/analyzer.rs:100:9 [INFO] [stdout] | [INFO] [stdout] 100 | / if self.total_pipelines || self.all { [INFO] [stdout] 101 | | if let Some(tp) = result.get("total_pipelines") { [INFO] [stdout] 102 | | println!("Total pipelines: {}", tp.to_string()); [INFO] [stdout] 103 | | } [INFO] [stdout] 104 | | } [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] 100 ~ if (self.total_pipelines || self.all) { [INFO] [stdout] 101 ~ && let Some(tp) = result.get("total_pipelines") { [INFO] [stdout] 102 | println!("Total pipelines: {}", tp.to_string()); [INFO] [stdout] 103 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> src/analyzer.rs:102:51 [INFO] [stdout] | [INFO] [stdout] 102 | println!("Total pipelines: {}", tp.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] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/analyzer.rs:161:9 [INFO] [stdout] | [INFO] [stdout] 161 | module_name[10..].to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/analyzer.rs:160:5 [INFO] [stdout] | [INFO] [stdout] 160 | if module_name.starts_with("./modules/") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 160 ~ if let Some() = module_name.strip_prefix("./modules/") { [INFO] [stdout] 161 ~ .to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/analyzer.rs:163:9 [INFO] [stdout] | [INFO] [stdout] 163 | / module_name [INFO] [stdout] 164 | | .split('/') [INFO] [stdout] 165 | | .last() [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] = note: `#[warn(clippy::double_ended_iterator_last)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 165 - .last() [INFO] [stdout] 165 + .next_back() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/analyzer.rs:566:13 [INFO] [stdout] | [INFO] [stdout] 566 | / if include_total_pipelines || include_total_steps { [INFO] [stdout] 567 | | if content.contains("steps:") { [INFO] [stdout] 568 | | let parts: Vec<&str> = content.splitn(2, "steps:").collect(); [INFO] [stdout] 569 | | if parts.len() > 1 { [INFO] [stdout] ... | [INFO] [stdout] 576 | | } [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] 566 ~ if (include_total_pipelines || include_total_steps) { [INFO] [stdout] 567 ~ && content.contains("steps:") { [INFO] [stdout] 568 | let parts: Vec<&str> = content.splitn(2, "steps:").collect(); [INFO] [stdout] ... [INFO] [stdout] 574 | } [INFO] [stdout] 575 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/analyzer.rs:317:13 [INFO] [stdout] | [INFO] [stdout] 317 | &main_path.parent().unwrap_or(Path::new(".")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `main_path.parent().unwrap_or(Path::new("."))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/analyzer.rs:331:21 [INFO] [stdout] | [INFO] [stdout] 331 | / if include_modules { [INFO] [stdout] 332 | | if let Some(mods) = root.get("modules").and_then(|v| v.as_array()) { [INFO] [stdout] 333 | | for module in &mods.values { [INFO] [stdout] ... | [INFO] [stdout] 467 | | } [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] 331 ~ if include_modules [INFO] [stdout] 332 ~ && let Some(mods) = root.get("modules").and_then(|v| v.as_array()) { [INFO] [stdout] 333 | for module in &mods.values { [INFO] [stdout] ... [INFO] [stdout] 465 | } [INFO] [stdout] 466 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/analyzer.rs:413:37 [INFO] [stdout] | [INFO] [stdout] 413 | / ... if candidate.exists() { [INFO] [stdout] 414 | | ... if let Some(fname) = [INFO] [stdout] 415 | | ... candidate.file_name().and_then(|s| s.to_str()) [INFO] [stdout] ... | [INFO] [stdout] 463 | | ... } [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] 413 ~ if candidate.exists() [INFO] [stdout] 414 ~ && let Some(fname) = [INFO] [stdout] 415 | candidate.file_name().and_then(|s| s.to_str()) [INFO] [stdout] ... [INFO] [stdout] 461 | } [INFO] [stdout] 462 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/analyzer.rs:414:41 [INFO] [stdout] | [INFO] [stdout] 414 | / ... if let Some(fname) = [INFO] [stdout] 415 | | ... candidate.file_name().and_then(|s| s.to_str()) [INFO] [stdout] 416 | | ... { [INFO] [stdout] 417 | | ... if fname == "main.phlow" { [INFO] [stdout] ... | [INFO] [stdout] 462 | | ... } [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] 415 ~ candidate.file_name().and_then(|s| s.to_str()) [INFO] [stdout] 416 ~ && fname == "main.phlow" { [INFO] [stdout] 417 | if let Ok(nested) = analyze_internal( [INFO] [stdout] ... [INFO] [stdout] 459 | } [INFO] [stdout] 460 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/analyzer.rs:417:45 [INFO] [stdout] | [INFO] [stdout] 417 | / ... if fname == "main.phlow" { [INFO] [stdout] 418 | | ... if let Ok(nested) = analyze_internal( [INFO] [stdout] 419 | | ... &candidate.to_string_lossy(), [INFO] [stdout] 420 | | ... include_files, [INFO] [stdout] ... | [INFO] [stdout] 461 | | ... } [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] 417 ~ if fname == "main.phlow" [INFO] [stdout] 418 ~ && let Ok(nested) = analyze_internal( [INFO] [stdout] 419 | &candidate.to_string_lossy(), [INFO] [stdout] ... [INFO] [stdout] 459 | } [INFO] [stdout] 460 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/analyzer.rs:445:53 [INFO] [stdout] | [INFO] [stdout] 445 | / ... if let Some(ns) = nested.get("total_steps") { [INFO] [stdout] 446 | | ... if let Ok(nv) = [INFO] [stdout] 447 | | ... ns.to_string().parse::() [INFO] [stdout] ... | [INFO] [stdout] 451 | | ... } [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] 445 ~ if let Some(ns) = nested.get("total_steps") [INFO] [stdout] 446 ~ && let Ok(nv) = [INFO] [stdout] 447 | ns.to_string().parse::() [INFO] [stdout] 448 | { [INFO] [stdout] 449 | total_steps += nv; [INFO] [stdout] 450 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/analyzer.rs:452:53 [INFO] [stdout] | [INFO] [stdout] 452 | / ... if let Some(np) = nested.get("total_pipelines") [INFO] [stdout] 453 | | ... { [INFO] [stdout] 454 | | ... if let Ok(nv) = [INFO] [stdout] 455 | | ... np.to_string().parse::() [INFO] [stdout] ... | [INFO] [stdout] 459 | | ... } [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] 452 ~ if let Some(np) = nested.get("total_pipelines") [INFO] [stdout] 453 ~ && let Ok(nv) = [INFO] [stdout] 454 | np.to_string().parse::() [INFO] [stdout] 455 | { [INFO] [stdout] 456 | total_pipelines += nv; [INFO] [stdout] 457 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/analyzer.rs:469:21 [INFO] [stdout] | [INFO] [stdout] 469 | / if include_total_pipelines || include_total_steps { [INFO] [stdout] 470 | | if let Some(steps_val) = root.get("steps") { [INFO] [stdout] 471 | | // add the pipelines/steps from the main root to any totals already accumulated from nested modules [INFO] [stdout] 472 | | total_pipelines += count_pipelines_recursive(steps_val); [INFO] [stdout] ... | [INFO] [stdout] 475 | | } [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] 469 ~ if (include_total_pipelines || include_total_steps) { [INFO] [stdout] 470 ~ && let Some(steps_val) = root.get("steps") { [INFO] [stdout] 471 | // add the pipelines/steps from the main root to any totals already accumulated from nested modules [INFO] [stdout] 472 | total_pipelines += count_pipelines_recursive(steps_val); [INFO] [stdout] 473 | total_steps += count_steps_recursive(steps_val); [INFO] [stdout] 474 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/analyzer.rs:566:13 [INFO] [stdout] | [INFO] [stdout] 566 | / if include_total_pipelines || include_total_steps { [INFO] [stdout] 567 | | if content.contains("steps:") { [INFO] [stdout] 568 | | let parts: Vec<&str> = content.splitn(2, "steps:").collect(); [INFO] [stdout] 569 | | if parts.len() > 1 { [INFO] [stdout] ... | [INFO] [stdout] 576 | | } [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] 566 ~ if (include_total_pipelines || include_total_steps) { [INFO] [stdout] 567 ~ && content.contains("steps:") { [INFO] [stdout] 568 | let parts: Vec<&str> = content.splitn(2, "steps:").collect(); [INFO] [stdout] ... [INFO] [stdout] 574 | } [INFO] [stdout] 575 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/loader/mod.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub mod loader; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/loader/loader.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | / if let Some(a) = analyzer { [INFO] [stdout] 48 | | if a.enabled { [INFO] [stdout] 49 | | // run analyzer but ignore errors (we don't want to fail loading because of analyzer) [INFO] [stdout] 50 | | match a.run().await { [INFO] [stdout] ... | [INFO] [stdout] 59 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 47 ~ if let Some(a) = analyzer [INFO] [stdout] 48 ~ && a.enabled { [INFO] [stdout] 49 | // run analyzer but ignore errors (we don't want to fail loading because of analyzer) [INFO] [stdout] ... [INFO] [stdout] 57 | } [INFO] [stdout] 58 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/loader/loader.rs:198:5 [INFO] [stdout] | [INFO] [stdout] 198 | / if Archive::new(GzDecoder::new(Cursor::new(bytes.clone()))) [INFO] [stdout] 199 | | .unpack(&remote_path) [INFO] [stdout] 200 | | .is_err() [INFO] [stdout] ... | [INFO] [stdout] 207 | | }; [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] 200 ~ .is_err() [INFO] [stdout] 201 ~ && let Ok(mut archive) = ZipArchive::new(Cursor::new(bytes.clone())) { [INFO] [stdout] 202 | archive [INFO] [stdout] 203 | .extract(&remote_path) [INFO] [stdout] 204 | .map_err(Error::ZipErrorError)?; [INFO] [stdout] 205 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/loader/loader.rs:292:26 [INFO] [stdout] | [INFO] [stdout] 292 | preprocessor(&file, script_path, print_yaml, print_output).map_err(|errors| { [INFO] [stdout] | ^^^^^ help: change this to: `file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/loader/mod.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub mod loader; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/loader/loader.rs:301:9 [INFO] [stdout] | [INFO] [stdout] 301 | / if let Ok(yaml_show) = std::env::var("PHLOW_SCRIPT_SHOW") { [INFO] [stdout] 302 | | if yaml_show == "true" { [INFO] [stdout] 303 | | println!("YAML: {}", script); [INFO] [stdout] 304 | | } [INFO] [stdout] 305 | | } [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] 301 ~ if let Ok(yaml_show) = std::env::var("PHLOW_SCRIPT_SHOW") [INFO] [stdout] 302 ~ && yaml_show == "true" { [INFO] [stdout] 303 | println!("YAML: {}", script); [INFO] [stdout] 304 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/loader/loader.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | / if let Some(a) = analyzer { [INFO] [stdout] 48 | | if a.enabled { [INFO] [stdout] 49 | | // run analyzer but ignore errors (we don't want to fail loading because of analyzer) [INFO] [stdout] 50 | | match a.run().await { [INFO] [stdout] ... | [INFO] [stdout] 59 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 47 ~ if let Some(a) = analyzer [INFO] [stdout] 48 ~ && a.enabled { [INFO] [stdout] 49 | // run analyzer but ignore errors (we don't want to fail loading because of analyzer) [INFO] [stdout] ... [INFO] [stdout] 57 | } [INFO] [stdout] 58 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/loader/loader.rs:360:13 [INFO] [stdout] | [INFO] [stdout] 360 | / if let serde_yaml::Value::Mapping(input) = input { [INFO] [stdout] 361 | | if let Some(serde_yaml::Value::String(input_type)) = input.get("type") { [INFO] [stdout] 362 | | if input_type == "object" { [INFO] [stdout] 363 | | if let Some(serde_yaml::Value::Mapping(properties)) = [INFO] [stdout] ... | [INFO] [stdout] 374 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/loader/loader.rs:359:21 [INFO] [stdout] | [INFO] [stdout] 359 | if let Some(input) = value.get("input") { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 360 | if let serde_yaml::Value::Mapping(input) = input { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/loader/loader.rs:359:9 [INFO] [stdout] | [INFO] [stdout] 359 | / if let Some(input) = value.get("input") { [INFO] [stdout] 360 | | if let serde_yaml::Value::Mapping(input) = input { [INFO] [stdout] 361 | | if let Some(serde_yaml::Value::String(input_type)) = input.get("type") { [INFO] [stdout] 362 | | if input_type == "object" { [INFO] [stdout] ... | [INFO] [stdout] 375 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 359 ~ if let Some(input) = value.get("input") [INFO] [stdout] 360 ~ && let serde_yaml::Value::Mapping(input) = input { [INFO] [stdout] 361 | if let Some(serde_yaml::Value::String(input_type)) = input.get("type") { [INFO] [stdout] ... [INFO] [stdout] 373 | } [INFO] [stdout] 374 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/loader/loader.rs:360:13 [INFO] [stdout] | [INFO] [stdout] 360 | / if let serde_yaml::Value::Mapping(input) = input { [INFO] [stdout] 361 | | if let Some(serde_yaml::Value::String(input_type)) = input.get("type") { [INFO] [stdout] 362 | | if input_type == "object" { [INFO] [stdout] 363 | | if let Some(serde_yaml::Value::Mapping(properties)) = [INFO] [stdout] ... | [INFO] [stdout] 374 | | } [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] 360 ~ if let serde_yaml::Value::Mapping(input) = input [INFO] [stdout] 361 ~ && let Some(serde_yaml::Value::String(input_type)) = input.get("type") { [INFO] [stdout] 362 | if input_type == "object" { [INFO] [stdout] ... [INFO] [stdout] 372 | } [INFO] [stdout] 373 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/loader/loader.rs:361:17 [INFO] [stdout] | [INFO] [stdout] 361 | / if let Some(serde_yaml::Value::String(input_type)) = input.get("type") { [INFO] [stdout] 362 | | if input_type == "object" { [INFO] [stdout] 363 | | if let Some(serde_yaml::Value::Mapping(properties)) = [INFO] [stdout] 364 | | input.get(&serde_yaml::Value::String("properties".to_string())) [INFO] [stdout] ... | [INFO] [stdout] 373 | | } [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] 361 ~ if let Some(serde_yaml::Value::String(input_type)) = input.get("type") [INFO] [stdout] 362 ~ && input_type == "object" { [INFO] [stdout] 363 | if let Some(serde_yaml::Value::Mapping(properties)) = [INFO] [stdout] ... [INFO] [stdout] 371 | } [INFO] [stdout] 372 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/loader/loader.rs:362:21 [INFO] [stdout] | [INFO] [stdout] 362 | / if input_type == "object" { [INFO] [stdout] 363 | | if let Some(serde_yaml::Value::Mapping(properties)) = [INFO] [stdout] 364 | | input.get(&serde_yaml::Value::String("properties".to_string())) [INFO] [stdout] ... | [INFO] [stdout] 372 | | } [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] 362 ~ if input_type == "object" [INFO] [stdout] 363 ~ && let Some(serde_yaml::Value::Mapping(properties)) = [INFO] [stdout] 364 | input.get(&serde_yaml::Value::String("properties".to_string())) [INFO] [stdout] ... [INFO] [stdout] 370 | } [INFO] [stdout] 371 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/loader/loader.rs:364:39 [INFO] [stdout] | [INFO] [stdout] 364 | ... input.get(&serde_yaml::Value::String("properties".to_string())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `serde_yaml::Value::String("properties".to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/loader/loader.rs:425:13 [INFO] [stdout] | [INFO] [stdout] 425 | / if let serde_yaml::Value::Mapping(input) = input { [INFO] [stdout] 426 | | if let Some(serde_yaml::Value::String(input_type)) = input.get("type") { [INFO] [stdout] 427 | | if input_type == "object" { [INFO] [stdout] 428 | | if let Some(serde_yaml::Value::Mapping(properties)) = [INFO] [stdout] ... | [INFO] [stdout] 439 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/loader/loader.rs:424:21 [INFO] [stdout] | [INFO] [stdout] 424 | if let Some(input) = value.get("input") { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 425 | if let serde_yaml::Value::Mapping(input) = input { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/loader/loader.rs:424:9 [INFO] [stdout] | [INFO] [stdout] 424 | / if let Some(input) = value.get("input") { [INFO] [stdout] 425 | | if let serde_yaml::Value::Mapping(input) = input { [INFO] [stdout] 426 | | if let Some(serde_yaml::Value::String(input_type)) = input.get("type") { [INFO] [stdout] 427 | | if input_type == "object" { [INFO] [stdout] ... | [INFO] [stdout] 440 | | } [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] 424 ~ if let Some(input) = value.get("input") [INFO] [stdout] 425 ~ && let serde_yaml::Value::Mapping(input) = input { [INFO] [stdout] 426 | if let Some(serde_yaml::Value::String(input_type)) = input.get("type") { [INFO] [stdout] ... [INFO] [stdout] 438 | } [INFO] [stdout] 439 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/loader/loader.rs:425:13 [INFO] [stdout] | [INFO] [stdout] 425 | / if let serde_yaml::Value::Mapping(input) = input { [INFO] [stdout] 426 | | if let Some(serde_yaml::Value::String(input_type)) = input.get("type") { [INFO] [stdout] 427 | | if input_type == "object" { [INFO] [stdout] 428 | | if let Some(serde_yaml::Value::Mapping(properties)) = [INFO] [stdout] ... | [INFO] [stdout] 439 | | } [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] 425 ~ if let serde_yaml::Value::Mapping(input) = input [INFO] [stdout] 426 ~ && let Some(serde_yaml::Value::String(input_type)) = input.get("type") { [INFO] [stdout] 427 | if input_type == "object" { [INFO] [stdout] ... [INFO] [stdout] 437 | } [INFO] [stdout] 438 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/loader/loader.rs:426:17 [INFO] [stdout] | [INFO] [stdout] 426 | / if let Some(serde_yaml::Value::String(input_type)) = input.get("type") { [INFO] [stdout] 427 | | if input_type == "object" { [INFO] [stdout] 428 | | if let Some(serde_yaml::Value::Mapping(properties)) = [INFO] [stdout] 429 | | input.get(&serde_yaml::Value::String("properties".to_string())) [INFO] [stdout] ... | [INFO] [stdout] 438 | | } [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] 426 ~ if let Some(serde_yaml::Value::String(input_type)) = input.get("type") [INFO] [stdout] 427 ~ && input_type == "object" { [INFO] [stdout] 428 | if let Some(serde_yaml::Value::Mapping(properties)) = [INFO] [stdout] ... [INFO] [stdout] 436 | } [INFO] [stdout] 437 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/loader/loader.rs:427:21 [INFO] [stdout] | [INFO] [stdout] 427 | / if input_type == "object" { [INFO] [stdout] 428 | | if let Some(serde_yaml::Value::Mapping(properties)) = [INFO] [stdout] 429 | | input.get(&serde_yaml::Value::String("properties".to_string())) [INFO] [stdout] ... | [INFO] [stdout] 437 | | } [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] 427 ~ if input_type == "object" [INFO] [stdout] 428 ~ && let Some(serde_yaml::Value::Mapping(properties)) = [INFO] [stdout] 429 | input.get(&serde_yaml::Value::String("properties".to_string())) [INFO] [stdout] ... [INFO] [stdout] 435 | } [INFO] [stdout] 436 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/loader/loader.rs:429:39 [INFO] [stdout] | [INFO] [stdout] 429 | ... input.get(&serde_yaml::Value::String("properties".to_string())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `serde_yaml::Value::String("properties".to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/loader/loader.rs:461:28 [INFO] [stdout] | [INFO] [stdout] 461 | fn find_default_file(base: &PathBuf) -> Option { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 461 ~ fn find_default_file(base: &Path) -> Option { [INFO] [stdout] 462 | if base.is_file() { [INFO] [stdout] ... [INFO] [stdout] 467 | { [INFO] [stdout] 468 ~ let mut base_path = base.to_path_buf(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/loader/loader.rs:198:5 [INFO] [stdout] | [INFO] [stdout] 198 | / if Archive::new(GzDecoder::new(Cursor::new(bytes.clone()))) [INFO] [stdout] 199 | | .unpack(&remote_path) [INFO] [stdout] 200 | | .is_err() [INFO] [stdout] ... | [INFO] [stdout] 207 | | }; [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] 200 ~ .is_err() [INFO] [stdout] 201 ~ && let Ok(mut archive) = ZipArchive::new(Cursor::new(bytes.clone())) { [INFO] [stdout] 202 | archive [INFO] [stdout] 203 | .extract(&remote_path) [INFO] [stdout] 204 | .map_err(Error::ZipErrorError)?; [INFO] [stdout] 205 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/loader/mod.rs:94:33 [INFO] [stdout] | [INFO] [stdout] 94 | let main_name = match script.get("main") { [INFO] [stdout] | _________________________________^ [INFO] [stdout] 95 | | Some(main) => Some(main.to_string()), [INFO] [stdout] 96 | | None => None, [INFO] [stdout] 97 | | }; [INFO] [stdout] | |_________________^ help: try: `script.get("main").map(|main| main.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] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/loader/loader.rs:292:26 [INFO] [stdout] | [INFO] [stdout] 292 | preprocessor(&file, script_path, print_yaml, print_output).map_err(|errors| { [INFO] [stdout] | ^^^^^ help: change this to: `file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/loader/loader.rs:301:9 [INFO] [stdout] | [INFO] [stdout] 301 | / if let Ok(yaml_show) = std::env::var("PHLOW_SCRIPT_SHOW") { [INFO] [stdout] 302 | | if yaml_show == "true" { [INFO] [stdout] 303 | | println!("YAML: {}", script); [INFO] [stdout] 304 | | } [INFO] [stdout] 305 | | } [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] 301 ~ if let Ok(yaml_show) = std::env::var("PHLOW_SCRIPT_SHOW") [INFO] [stdout] 302 ~ && yaml_show == "true" { [INFO] [stdout] 303 | println!("YAML: {}", script); [INFO] [stdout] 304 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/loader/loader.rs:360:13 [INFO] [stdout] | [INFO] [stdout] 360 | / if let serde_yaml::Value::Mapping(input) = input { [INFO] [stdout] 361 | | if let Some(serde_yaml::Value::String(input_type)) = input.get("type") { [INFO] [stdout] 362 | | if input_type == "object" { [INFO] [stdout] 363 | | if let Some(serde_yaml::Value::Mapping(properties)) = [INFO] [stdout] ... | [INFO] [stdout] 374 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/loader/loader.rs:359:21 [INFO] [stdout] | [INFO] [stdout] 359 | if let Some(input) = value.get("input") { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 360 | if let serde_yaml::Value::Mapping(input) = input { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/loader/loader.rs:359:9 [INFO] [stdout] | [INFO] [stdout] 359 | / if let Some(input) = value.get("input") { [INFO] [stdout] 360 | | if let serde_yaml::Value::Mapping(input) = input { [INFO] [stdout] 361 | | if let Some(serde_yaml::Value::String(input_type)) = input.get("type") { [INFO] [stdout] 362 | | if input_type == "object" { [INFO] [stdout] ... | [INFO] [stdout] 375 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 359 ~ if let Some(input) = value.get("input") [INFO] [stdout] 360 ~ && let serde_yaml::Value::Mapping(input) = input { [INFO] [stdout] 361 | if let Some(serde_yaml::Value::String(input_type)) = input.get("type") { [INFO] [stdout] ... [INFO] [stdout] 373 | } [INFO] [stdout] 374 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/loader/loader.rs:360:13 [INFO] [stdout] | [INFO] [stdout] 360 | / if let serde_yaml::Value::Mapping(input) = input { [INFO] [stdout] 361 | | if let Some(serde_yaml::Value::String(input_type)) = input.get("type") { [INFO] [stdout] 362 | | if input_type == "object" { [INFO] [stdout] 363 | | if let Some(serde_yaml::Value::Mapping(properties)) = [INFO] [stdout] ... | [INFO] [stdout] 374 | | } [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] 360 ~ if let serde_yaml::Value::Mapping(input) = input [INFO] [stdout] 361 ~ && let Some(serde_yaml::Value::String(input_type)) = input.get("type") { [INFO] [stdout] 362 | if input_type == "object" { [INFO] [stdout] ... [INFO] [stdout] 372 | } [INFO] [stdout] 373 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/loader/loader.rs:361:17 [INFO] [stdout] | [INFO] [stdout] 361 | / if let Some(serde_yaml::Value::String(input_type)) = input.get("type") { [INFO] [stdout] 362 | | if input_type == "object" { [INFO] [stdout] 363 | | if let Some(serde_yaml::Value::Mapping(properties)) = [INFO] [stdout] 364 | | input.get(&serde_yaml::Value::String("properties".to_string())) [INFO] [stdout] ... | [INFO] [stdout] 373 | | } [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] 361 ~ if let Some(serde_yaml::Value::String(input_type)) = input.get("type") [INFO] [stdout] 362 ~ && input_type == "object" { [INFO] [stdout] 363 | if let Some(serde_yaml::Value::Mapping(properties)) = [INFO] [stdout] ... [INFO] [stdout] 371 | } [INFO] [stdout] 372 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/loader/loader.rs:362:21 [INFO] [stdout] | [INFO] [stdout] 362 | / if input_type == "object" { [INFO] [stdout] 363 | | if let Some(serde_yaml::Value::Mapping(properties)) = [INFO] [stdout] 364 | | input.get(&serde_yaml::Value::String("properties".to_string())) [INFO] [stdout] ... | [INFO] [stdout] 372 | | } [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] 362 ~ if input_type == "object" [INFO] [stdout] 363 ~ && let Some(serde_yaml::Value::Mapping(properties)) = [INFO] [stdout] 364 | input.get(&serde_yaml::Value::String("properties".to_string())) [INFO] [stdout] ... [INFO] [stdout] 370 | } [INFO] [stdout] 371 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/loader/loader.rs:364:39 [INFO] [stdout] | [INFO] [stdout] 364 | ... input.get(&serde_yaml::Value::String("properties".to_string())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `serde_yaml::Value::String("properties".to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/loader/loader.rs:425:13 [INFO] [stdout] | [INFO] [stdout] 425 | / if let serde_yaml::Value::Mapping(input) = input { [INFO] [stdout] 426 | | if let Some(serde_yaml::Value::String(input_type)) = input.get("type") { [INFO] [stdout] 427 | | if input_type == "object" { [INFO] [stdout] 428 | | if let Some(serde_yaml::Value::Mapping(properties)) = [INFO] [stdout] ... | [INFO] [stdout] 439 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/loader/loader.rs:424:21 [INFO] [stdout] | [INFO] [stdout] 424 | if let Some(input) = value.get("input") { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 425 | if let serde_yaml::Value::Mapping(input) = input { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/loader/mod.rs:247:24 [INFO] [stdout] | [INFO] [stdout] 247 | if regex::Regex::new(r"^(https?://|\.git|.*@.*)") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/loader/mod.rs:221:9 [INFO] [stdout] | [INFO] [stdout] 221 | for module in &self.modules { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] = note: `#[warn(clippy::regex_creation_in_loops)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/loader/loader.rs:424:9 [INFO] [stdout] | [INFO] [stdout] 424 | / if let Some(input) = value.get("input") { [INFO] [stdout] 425 | | if let serde_yaml::Value::Mapping(input) = input { [INFO] [stdout] 426 | | if let Some(serde_yaml::Value::String(input_type)) = input.get("type") { [INFO] [stdout] 427 | | if input_type == "object" { [INFO] [stdout] ... | [INFO] [stdout] 440 | | } [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] 424 ~ if let Some(input) = value.get("input") [INFO] [stdout] 425 ~ && let serde_yaml::Value::Mapping(input) = input { [INFO] [stdout] 426 | if let Some(serde_yaml::Value::String(input_type)) = input.get("type") { [INFO] [stdout] ... [INFO] [stdout] 438 | } [INFO] [stdout] 439 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/loader/loader.rs:425:13 [INFO] [stdout] | [INFO] [stdout] 425 | / if let serde_yaml::Value::Mapping(input) = input { [INFO] [stdout] 426 | | if let Some(serde_yaml::Value::String(input_type)) = input.get("type") { [INFO] [stdout] 427 | | if input_type == "object" { [INFO] [stdout] 428 | | if let Some(serde_yaml::Value::Mapping(properties)) = [INFO] [stdout] ... | [INFO] [stdout] 439 | | } [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] 425 ~ if let serde_yaml::Value::Mapping(input) = input [INFO] [stdout] 426 ~ && let Some(serde_yaml::Value::String(input_type)) = input.get("type") { [INFO] [stdout] 427 | if input_type == "object" { [INFO] [stdout] ... [INFO] [stdout] 437 | } [INFO] [stdout] 438 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/loader/loader.rs:426:17 [INFO] [stdout] | [INFO] [stdout] 426 | / if let Some(serde_yaml::Value::String(input_type)) = input.get("type") { [INFO] [stdout] 427 | | if input_type == "object" { [INFO] [stdout] 428 | | if let Some(serde_yaml::Value::Mapping(properties)) = [INFO] [stdout] 429 | | input.get(&serde_yaml::Value::String("properties".to_string())) [INFO] [stdout] ... | [INFO] [stdout] 438 | | } [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] 426 ~ if let Some(serde_yaml::Value::String(input_type)) = input.get("type") [INFO] [stdout] 427 ~ && input_type == "object" { [INFO] [stdout] 428 | if let Some(serde_yaml::Value::Mapping(properties)) = [INFO] [stdout] ... [INFO] [stdout] 436 | } [INFO] [stdout] 437 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/loader/loader.rs:427:21 [INFO] [stdout] | [INFO] [stdout] 427 | / if input_type == "object" { [INFO] [stdout] 428 | | if let Some(serde_yaml::Value::Mapping(properties)) = [INFO] [stdout] 429 | | input.get(&serde_yaml::Value::String("properties".to_string())) [INFO] [stdout] ... | [INFO] [stdout] 437 | | } [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] 427 ~ if input_type == "object" [INFO] [stdout] 428 ~ && let Some(serde_yaml::Value::Mapping(properties)) = [INFO] [stdout] 429 | input.get(&serde_yaml::Value::String("properties".to_string())) [INFO] [stdout] ... [INFO] [stdout] 435 | } [INFO] [stdout] 436 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/loader/loader.rs:429:39 [INFO] [stdout] | [INFO] [stdout] 429 | ... input.get(&serde_yaml::Value::String("properties".to_string())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `serde_yaml::Value::String("properties".to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/loader/loader.rs:461:28 [INFO] [stdout] | [INFO] [stdout] 461 | fn find_default_file(base: &PathBuf) -> Option { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 461 ~ fn find_default_file(base: &Path) -> Option { [INFO] [stdout] 462 | if base.is_file() { [INFO] [stdout] ... [INFO] [stdout] 467 | { [INFO] [stdout] 468 ~ let mut base_path = base.to_path_buf(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/loader/mod.rs:304:13 [INFO] [stdout] | [INFO] [stdout] 304 | / if let Err(err) = result { [INFO] [stdout] 305 | | return Err(err); [INFO] [stdout] 306 | | } [INFO] [stdout] | |_____________^ help: replace it with: `result?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/loader/mod.rs:94:33 [INFO] [stdout] | [INFO] [stdout] 94 | let main_name = match script.get("main") { [INFO] [stdout] | _________________________________^ [INFO] [stdout] 95 | | Some(main) => Some(main.to_string()), [INFO] [stdout] 96 | | None => None, [INFO] [stdout] 97 | | }; [INFO] [stdout] | |_________________^ help: try: `script.get("main").map(|main| main.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] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/loader/mod.rs:247:24 [INFO] [stdout] | [INFO] [stdout] 247 | if regex::Regex::new(r"^(https?://|\.git|.*@.*)") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/loader/mod.rs:221:9 [INFO] [stdout] | [INFO] [stdout] 221 | for module in &self.modules { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] = note: `#[warn(clippy::regex_creation_in_loops)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/loader/mod.rs:304:13 [INFO] [stdout] | [INFO] [stdout] 304 | / if let Err(err) = result { [INFO] [stdout] 305 | | return Err(err); [INFO] [stdout] 306 | | } [INFO] [stdout] | |_____________^ help: replace it with: `result?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/preprocessor.rs:37:17 [INFO] [stdout] | [INFO] [stdout] 37 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/preprocessor.rs:42:17 [INFO] [stdout] | [INFO] [stdout] 42 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/preprocessor.rs:83:63 [INFO] [stdout] | [INFO] [stdout] 83 | let with_block_includes = include_block_regex.replace_all(&phlow, |caps: ®ex::Captures| { [INFO] [stdout] | ^^^^^^ help: change this to: `phlow` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/preprocessor.rs:167:25 [INFO] [stdout] | [INFO] [stdout] 167 | format!(r#"{}"#, content) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `content.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 boolean expression can be simplified [INFO] [stdout] --> src/preprocessor.rs:200:20 [INFO] [stdout] | [INFO] [stdout] 200 | if !(starts_with_brace && value.ends_with('}')) [INFO] [stdout] | ____________________^ [INFO] [stdout] 201 | | && !(starts_with_bracket && value.ends_with(']')) [INFO] [stdout] | |_____________________________________________________________________^ help: try: `!(starts_with_brace && value.ends_with('}') || starts_with_bracket && value.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 loop could be written as a `for` loop [INFO] [stdout] --> src/preprocessor.rs:204:21 [INFO] [stdout] | [INFO] [stdout] 204 | while let Some(next_line) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for next_line in lines.by_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/preprocessor.rs:221:9 [INFO] [stdout] | [INFO] [stdout] 221 | result.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/preprocessor.rs:254:18 [INFO] [stdout] | [INFO] [stdout] 254 | .trim() [INFO] [stdout] | __________________^ [INFO] [stdout] 255 | | .split_whitespace() [INFO] [stdout] | |_________________^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/preprocessor.rs:264:17 [INFO] [stdout] | [INFO] [stdout] 264 | result.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/preprocessor.rs:290:30 [INFO] [stdout] | [INFO] [stdout] 290 | let after_dash = trimmed_line[1..].trim_start(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/preprocessor.rs:289:16 [INFO] [stdout] | [INFO] [stdout] 289 | } else if trimmed_line.starts_with("-") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 289 ~ } else if let Some() = trimmed_line.strip_prefix("-") { [INFO] [stdout] 290 ~ let after_dash = .trim_start(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/preprocessor.rs:304:17 [INFO] [stdout] | [INFO] [stdout] 304 | result.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/preprocessor.rs:329:9 [INFO] [stdout] | [INFO] [stdout] 329 | result.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/preprocessor.rs:395:47 [INFO] [stdout] | [INFO] [stdout] 395 | } else if let Some(end_pos) = after_eval[3..].find("```") { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/preprocessor.rs:384:13 [INFO] [stdout] | [INFO] [stdout] 384 | if after_eval.starts_with("```") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 384 ~ if let Some() = after_eval.strip_prefix("```") { [INFO] [stdout] 385 | // Bloco markdown-style interpretado como string literal [INFO] [stdout] ... [INFO] [stdout] 394 | } [INFO] [stdout] 395 ~ } else if let Some(end_pos) = .find("```") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/preprocessor.rs:389:21 [INFO] [stdout] | [INFO] [stdout] 389 | while let Some(next_line) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for next_line in lines.by_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/preprocessor.rs:37:17 [INFO] [stdout] | [INFO] [stdout] 37 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/preprocessor.rs:42:17 [INFO] [stdout] | [INFO] [stdout] 42 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/preprocessor.rs:83:63 [INFO] [stdout] | [INFO] [stdout] 83 | let with_block_includes = include_block_regex.replace_all(&phlow, |caps: ®ex::Captures| { [INFO] [stdout] | ^^^^^^ help: change this to: `phlow` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/preprocessor.rs:563:30 [INFO] [stdout] | [INFO] [stdout] 563 | let after_dash = trimmed_line[1..].trim_start(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/preprocessor.rs:561:9 [INFO] [stdout] | [INFO] [stdout] 561 | if trimmed_line.starts_with('-') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 561 ~ if let Some() = trimmed_line.strip_prefix('-') { [INFO] [stdout] 562 | // Caso: item de lista - ``` ... ``` [INFO] [stdout] 563 ~ let after_dash = .trim_start(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/preprocessor.rs:575:47 [INFO] [stdout] | [INFO] [stdout] 575 | } else if let Some(end_pos) = after_dash[3..].find("```") { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/preprocessor.rs:564:13 [INFO] [stdout] | [INFO] [stdout] 564 | if after_dash.starts_with("```") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 564 ~ if let Some() = after_dash.strip_prefix("```") { [INFO] [stdout] 565 | let indent = &line[..line.len() - trimmed_line.len()]; [INFO] [stdout] ... [INFO] [stdout] 574 | } [INFO] [stdout] 575 ~ } else if let Some(end_pos) = .find("```") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/preprocessor.rs:167:25 [INFO] [stdout] | [INFO] [stdout] 167 | format!(r#"{}"#, content) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `content.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 loop could be written as a `for` loop [INFO] [stdout] --> src/preprocessor.rs:569:21 [INFO] [stdout] | [INFO] [stdout] 569 | while let Some(next_line) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for next_line in lines.by_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/preprocessor.rs:200:20 [INFO] [stdout] | [INFO] [stdout] 200 | if !(starts_with_brace && value.ends_with('}')) [INFO] [stdout] | ____________________^ [INFO] [stdout] 201 | | && !(starts_with_bracket && value.ends_with(']')) [INFO] [stdout] | |_____________________________________________________________________^ help: try: `!(starts_with_brace && value.ends_with('}') || starts_with_bracket && value.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 loop could be written as a `for` loop [INFO] [stdout] --> src/preprocessor.rs:586:21 [INFO] [stdout] | [INFO] [stdout] 586 | while let Some(next_line) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for next_line in lines.by_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/preprocessor.rs:614:47 [INFO] [stdout] | [INFO] [stdout] 614 | } else if let Some(end_pos) = value[3..].find("```") { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/preprocessor.rs:603:13 [INFO] [stdout] | [INFO] [stdout] 603 | if value.starts_with("```") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 603 ~ if let Some() = value.strip_prefix("```") { [INFO] [stdout] 604 | let indent = &line[..line.len() - trimmed_line.len()]; [INFO] [stdout] ... [INFO] [stdout] 613 | } [INFO] [stdout] 614 ~ } else if let Some(end_pos) = .find("```") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/preprocessor.rs:608:21 [INFO] [stdout] | [INFO] [stdout] 608 | while let Some(next_line) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for next_line in lines.by_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/preprocessor.rs:204:21 [INFO] [stdout] | [INFO] [stdout] 204 | while let Some(next_line) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for next_line in lines.by_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/preprocessor.rs:626:21 [INFO] [stdout] | [INFO] [stdout] 626 | while let Some(next_line) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for next_line in lines.by_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/preprocessor.rs:221:9 [INFO] [stdout] | [INFO] [stdout] 221 | result.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/preprocessor.rs:254:18 [INFO] [stdout] | [INFO] [stdout] 254 | .trim() [INFO] [stdout] | __________________^ [INFO] [stdout] 255 | | .split_whitespace() [INFO] [stdout] | |_________________^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/preprocessor.rs:726:5 [INFO] [stdout] | [INFO] [stdout] 726 | / if let Some(ext) = original_extension { [INFO] [stdout] 727 | | if ext != "phlow" { [INFO] [stdout] 728 | | return Ok(with_args); [INFO] [stdout] 729 | | } [INFO] [stdout] 730 | | } [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] 726 ~ if let Some(ext) = original_extension [INFO] [stdout] 727 ~ && ext != "phlow" { [INFO] [stdout] 728 | return Ok(with_args); [INFO] [stdout] 729 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/preprocessor.rs:264:17 [INFO] [stdout] | [INFO] [stdout] 264 | result.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/preprocessor.rs:757:5 [INFO] [stdout] | [INFO] [stdout] 757 | / if let Some(modules) = parsed.get("modules") { [INFO] [stdout] 758 | | if let Some(modules_array) = modules.as_sequence() { [INFO] [stdout] 759 | | for module in modules_array { [INFO] [stdout] 760 | | if let Some(module_map) = module.as_mapping() { [INFO] [stdout] ... | [INFO] [stdout] 781 | | } [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] 757 ~ if let Some(modules) = parsed.get("modules") [INFO] [stdout] 758 ~ && let Some(modules_array) = modules.as_sequence() { [INFO] [stdout] 759 | for module in modules_array { [INFO] [stdout] ... [INFO] [stdout] 779 | } [INFO] [stdout] 780 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/preprocessor.rs:769:29 [INFO] [stdout] | [INFO] [stdout] 769 | ... &module_name[10..] // Remove "./modules/" [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/preprocessor.rs:768:42 [INFO] [stdout] | [INFO] [stdout] 768 | let clean_name = if module_name.starts_with("./modules/") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 768 ~ let clean_name = if let Some() = module_name.strip_prefix("./modules/") { [INFO] [stdout] 769 ~ // Remove "./modules/" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/preprocessor.rs:772:29 [INFO] [stdout] | [INFO] [stdout] 772 | ... module_name.split('/').last().unwrap_or(module_name) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 772 - module_name.split('/').last().unwrap_or(module_name) [INFO] [stdout] 772 + module_name.split('/').next_back().unwrap_or(module_name) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/preprocessor.rs:290:30 [INFO] [stdout] | [INFO] [stdout] 290 | let after_dash = trimmed_line[1..].trim_start(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/preprocessor.rs:289:16 [INFO] [stdout] | [INFO] [stdout] 289 | } else if trimmed_line.starts_with("-") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 289 ~ } else if let Some() = trimmed_line.strip_prefix("-") { [INFO] [stdout] 290 ~ let after_dash = .trim_start(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/preprocessor.rs:304:17 [INFO] [stdout] | [INFO] [stdout] 304 | result.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/preprocessor.rs:840:38 [INFO] [stdout] | [INFO] [stdout] 840 | let mut transformations: Vec<(Value, Value, Option<(String, Vec)>)> = [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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/preprocessor.rs:329:9 [INFO] [stdout] | [INFO] [stdout] 329 | result.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/preprocessor.rs:395:47 [INFO] [stdout] | [INFO] [stdout] 395 | } else if let Some(end_pos) = after_eval[3..].find("```") { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/preprocessor.rs:384:13 [INFO] [stdout] | [INFO] [stdout] 384 | if after_eval.starts_with("```") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 384 ~ if let Some() = after_eval.strip_prefix("```") { [INFO] [stdout] 385 | // Bloco markdown-style interpretado como string literal [INFO] [stdout] ... [INFO] [stdout] 394 | } [INFO] [stdout] 395 ~ } else if let Some(end_pos) = .find("```") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/preprocessor.rs:389:21 [INFO] [stdout] | [INFO] [stdout] 389 | while let Some(next_line) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for next_line in lines.by_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/preprocessor.rs:996:5 [INFO] [stdout] | [INFO] [stdout] 988 | / let result = regex [INFO] [stdout] 989 | | .replace_all(yaml, |caps: ®ex::Captures| { [INFO] [stdout] 990 | | let prefix = &caps[1]; [INFO] [stdout] 991 | | let exclamation_value = &caps[2]; [INFO] [stdout] 992 | | format!(r#"{} "__PHLOW_ESCAPE__{}""#, prefix, exclamation_value) [INFO] [stdout] 993 | | }) [INFO] [stdout] 994 | | .to_string(); [INFO] [stdout] | |_____________________- unnecessary `let` binding [INFO] [stdout] 995 | [INFO] [stdout] 996 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 988 ~ [INFO] [stdout] 989 | [INFO] [stdout] 990 ~ regex [INFO] [stdout] 991 + .replace_all(yaml, |caps: ®ex::Captures| { [INFO] [stdout] 992 + let prefix = &caps[1]; [INFO] [stdout] 993 + let exclamation_value = &caps[2]; [INFO] [stdout] 994 + format!(r#"{} "__PHLOW_ESCAPE__{}""#, prefix, exclamation_value) [INFO] [stdout] 995 + }) [INFO] [stdout] 996 + .to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/preprocessor.rs:1013:5 [INFO] [stdout] | [INFO] [stdout] 1006 | / let result = regex [INFO] [stdout] 1007 | | .replace_all(yaml, |caps: ®ex::Captures| { [INFO] [stdout] 1008 | | let exclamation_value = &caps[1]; [INFO] [stdout] 1009 | | exclamation_value.to_string() [INFO] [stdout] 1010 | | }) [INFO] [stdout] 1011 | | .to_string(); [INFO] [stdout] | |_____________________- unnecessary `let` binding [INFO] [stdout] 1012 | [INFO] [stdout] 1013 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 1006 ~ [INFO] [stdout] 1007 | [INFO] [stdout] 1008 ~ regex [INFO] [stdout] 1009 + .replace_all(yaml, |caps: ®ex::Captures| { [INFO] [stdout] 1010 + let exclamation_value = &caps[1]; [INFO] [stdout] 1011 + exclamation_value.to_string() [INFO] [stdout] 1012 + }) [INFO] [stdout] 1013 + .to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/runtime.rs:43:48 [INFO] [stdout] | [INFO] [stdout] 26 | ModuleWithError(ScriptError), [INFO] [stdout] | ---------------------------- the largest variant contains at least 160 bytes [INFO] [stdout] ... [INFO] [stdout] 43 | fn parse_cli_value(flag: &str, value: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `runtime::RuntimeError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] = note: `#[warn(clippy::result_large_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/runtime.rs:105:30 [INFO] [stdout] | [INFO] [stdout] 105 | let loader_main_id = loader.main.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `loader.main` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/preprocessor.rs:563:30 [INFO] [stdout] | [INFO] [stdout] 563 | let after_dash = trimmed_line[1..].trim_start(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/preprocessor.rs:561:9 [INFO] [stdout] | [INFO] [stdout] 561 | if trimmed_line.starts_with('-') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 561 ~ if let Some() = trimmed_line.strip_prefix('-') { [INFO] [stdout] 562 | // Caso: item de lista - ``` ... ``` [INFO] [stdout] 563 ~ let after_dash = .trim_start(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/preprocessor.rs:575:47 [INFO] [stdout] | [INFO] [stdout] 575 | } else if let Some(end_pos) = after_dash[3..].find("```") { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/preprocessor.rs:564:13 [INFO] [stdout] | [INFO] [stdout] 564 | if after_dash.starts_with("```") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 564 ~ if let Some() = after_dash.strip_prefix("```") { [INFO] [stdout] 565 | let indent = &line[..line.len() - trimmed_line.len()]; [INFO] [stdout] ... [INFO] [stdout] 574 | } [INFO] [stdout] 575 ~ } else if let Some(end_pos) = .find("```") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/preprocessor.rs:569:21 [INFO] [stdout] | [INFO] [stdout] 569 | while let Some(next_line) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for next_line in lines.by_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/runtime.rs:128:30 [INFO] [stdout] | [INFO] [stdout] 128 | .map_err(|err| RuntimeError::ModuleWithError(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `RuntimeError::ModuleWithError` [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: this loop could be written as a `for` loop [INFO] [stdout] --> src/preprocessor.rs:586:21 [INFO] [stdout] | [INFO] [stdout] 586 | while let Some(next_line) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for next_line in lines.by_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/preprocessor.rs:614:47 [INFO] [stdout] | [INFO] [stdout] 614 | } else if let Some(end_pos) = value[3..].find("```") { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/preprocessor.rs:603:13 [INFO] [stdout] | [INFO] [stdout] 603 | if value.starts_with("```") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 603 ~ if let Some() = value.strip_prefix("```") { [INFO] [stdout] 604 | let indent = &line[..line.len() - trimmed_line.len()]; [INFO] [stdout] ... [INFO] [stdout] 613 | } [INFO] [stdout] 614 ~ } else if let Some(end_pos) = .find("```") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/preprocessor.rs:608:21 [INFO] [stdout] | [INFO] [stdout] 608 | while let Some(next_line) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for next_line in lines.by_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/preprocessor.rs:626:21 [INFO] [stdout] | [INFO] [stdout] 626 | while let Some(next_line) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for next_line in lines.by_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/preprocessor.rs:726:5 [INFO] [stdout] | [INFO] [stdout] 726 | / if let Some(ext) = original_extension { [INFO] [stdout] 727 | | if ext != "phlow" { [INFO] [stdout] 728 | | return Ok(with_args); [INFO] [stdout] 729 | | } [INFO] [stdout] 730 | | } [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] 726 ~ if let Some(ext) = original_extension [INFO] [stdout] 727 ~ && ext != "phlow" { [INFO] [stdout] 728 | return Ok(with_args); [INFO] [stdout] 729 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/preprocessor.rs:757:5 [INFO] [stdout] | [INFO] [stdout] 757 | / if let Some(modules) = parsed.get("modules") { [INFO] [stdout] 758 | | if let Some(modules_array) = modules.as_sequence() { [INFO] [stdout] 759 | | for module in modules_array { [INFO] [stdout] 760 | | if let Some(module_map) = module.as_mapping() { [INFO] [stdout] ... | [INFO] [stdout] 781 | | } [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] 757 ~ if let Some(modules) = parsed.get("modules") [INFO] [stdout] 758 ~ && let Some(modules_array) = modules.as_sequence() { [INFO] [stdout] 759 | for module in modules_array { [INFO] [stdout] ... [INFO] [stdout] 779 | } [INFO] [stdout] 780 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/preprocessor.rs:769:29 [INFO] [stdout] | [INFO] [stdout] 769 | ... &module_name[10..] // Remove "./modules/" [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/preprocessor.rs:768:42 [INFO] [stdout] | [INFO] [stdout] 768 | let clean_name = if module_name.starts_with("./modules/") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 768 ~ let clean_name = if let Some() = module_name.strip_prefix("./modules/") { [INFO] [stdout] 769 ~ // Remove "./modules/" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/preprocessor.rs:772:29 [INFO] [stdout] | [INFO] [stdout] 772 | ... module_name.split('/').last().unwrap_or(module_name) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 772 - module_name.split('/').last().unwrap_or(module_name) [INFO] [stdout] 772 + module_name.split('/').next_back().unwrap_or(module_name) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/preprocessor.rs:840:38 [INFO] [stdout] | [INFO] [stdout] 840 | let mut transformations: Vec<(Value, Value, Option<(String, Vec)>)> = [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: returning the result of a `let` binding from a block [INFO] [stdout] --> src/preprocessor.rs:996:5 [INFO] [stdout] | [INFO] [stdout] 988 | / let result = regex [INFO] [stdout] 989 | | .replace_all(yaml, |caps: ®ex::Captures| { [INFO] [stdout] 990 | | let prefix = &caps[1]; [INFO] [stdout] 991 | | let exclamation_value = &caps[2]; [INFO] [stdout] 992 | | format!(r#"{} "__PHLOW_ESCAPE__{}""#, prefix, exclamation_value) [INFO] [stdout] 993 | | }) [INFO] [stdout] 994 | | .to_string(); [INFO] [stdout] | |_____________________- unnecessary `let` binding [INFO] [stdout] 995 | [INFO] [stdout] 996 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 988 ~ [INFO] [stdout] 989 | [INFO] [stdout] 990 ~ regex [INFO] [stdout] 991 + .replace_all(yaml, |caps: ®ex::Captures| { [INFO] [stdout] 992 + let prefix = &caps[1]; [INFO] [stdout] 993 + let exclamation_value = &caps[2]; [INFO] [stdout] 994 + format!(r#"{} "__PHLOW_ESCAPE__{}""#, prefix, exclamation_value) [INFO] [stdout] 995 + }) [INFO] [stdout] 996 + .to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/preprocessor.rs:1013:5 [INFO] [stdout] | [INFO] [stdout] 1006 | / let result = regex [INFO] [stdout] 1007 | | .replace_all(yaml, |caps: ®ex::Captures| { [INFO] [stdout] 1008 | | let exclamation_value = &caps[1]; [INFO] [stdout] 1009 | | exclamation_value.to_string() [INFO] [stdout] 1010 | | }) [INFO] [stdout] 1011 | | .to_string(); [INFO] [stdout] | |_____________________- unnecessary `let` binding [INFO] [stdout] 1012 | [INFO] [stdout] 1013 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 1006 ~ [INFO] [stdout] 1007 | [INFO] [stdout] 1008 ~ regex [INFO] [stdout] 1009 + .replace_all(yaml, |caps: ®ex::Captures| { [INFO] [stdout] 1010 + let exclamation_value = &caps[1]; [INFO] [stdout] 1011 + exclamation_value.to_string() [INFO] [stdout] 1012 + }) [INFO] [stdout] 1013 + .to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/scripts.rs:123:13 [INFO] [stdout] | [INFO] [stdout] 123 | return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 122 - tracing::error!("Error creating runtime"); [INFO] [stdout] 123 - return; [INFO] [stdout] 122 + tracing::error!("Error creating runtime"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/scripts.rs:26:21 [INFO] [stdout] | [INFO] [stdout] 26 | &path, [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_path_buf` [INFO] [stdout] --> src/preprocessor.rs:1299:13 [INFO] [stdout] | [INFO] [stdout] 1299 | &Path::new(".").to_path_buf(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `Path::new(".")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_path_buf` [INFO] [stdout] --> src/preprocessor.rs:1452:13 [INFO] [stdout] | [INFO] [stdout] 1452 | &Path::new(".").to_path_buf(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `Path::new(".")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/runtime.rs:43:48 [INFO] [stdout] | [INFO] [stdout] 26 | ModuleWithError(ScriptError), [INFO] [stdout] | ---------------------------- the largest variant contains at least 160 bytes [INFO] [stdout] ... [INFO] [stdout] 43 | fn parse_cli_value(flag: &str, value: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `runtime::RuntimeError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] = note: `#[warn(clippy::result_large_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/settings/cli.rs:222:20 [INFO] [stdout] | [INFO] [stdout] 222 | let main = match matches.get_one::("main_path") { [INFO] [stdout] | ____________________^ [INFO] [stdout] 223 | | Some(target) => Some(target.clone()), [INFO] [stdout] 224 | | None => None, [INFO] [stdout] 225 | | }; [INFO] [stdout] | |_________^ help: try: `matches.get_one::("main_path").map(|target| target.clone())` [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: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/runtime.rs:105:30 [INFO] [stdout] | [INFO] [stdout] 105 | let loader_main_id = loader.main.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `loader.main` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/runtime.rs:128:30 [INFO] [stdout] | [INFO] [stdout] 128 | .map_err(|err| RuntimeError::ModuleWithError(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `RuntimeError::ModuleWithError` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/test_runner.rs:90:68 [INFO] [stdout] | [INFO] [stdout] 90 | fn count_leafs(items: &Value, filter: Option<&str>, ancestors: &Vec) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 90 ~ fn count_leafs(items: &Value, filter: Option<&str>, ancestors: &[String]) -> usize { [INFO] [stdout] 91 | let mut count = 0usize; [INFO] [stdout] ... [INFO] [stdout] 94 | if is_group(item) { [INFO] [stdout] 95 ~ let mut new_path = ancestors.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/test_runner.rs:99:42 [INFO] [stdout] | [INFO] [stdout] 99 | count += count_leafs(&item.get("tests").unwrap(), filter, &new_path); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `item.get("tests").unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or_else` to construct default value [INFO] [stdout] --> src/test_runner.rs:102:50 [INFO] [stdout] | [INFO] [stdout] 102 | let title = leaf_title(item).unwrap_or_else(|| "".to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/scripts.rs:123:13 [INFO] [stdout] | [INFO] [stdout] 123 | return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 122 - tracing::error!("Error creating runtime"); [INFO] [stdout] 123 - return; [INFO] [stdout] 122 + tracing::error!("Error creating runtime"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/scripts.rs:26:21 [INFO] [stdout] | [INFO] [stdout] 26 | &path, [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or_else` to construct default value [INFO] [stdout] --> src/test_runner.rs:203:67 [INFO] [stdout] | [INFO] [stdout] 203 | ... let title = leaf_title(x).unwrap_or_else(|| "".to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/test_runner.rs:231:35 [INFO] [stdout] | [INFO] [stdout] 231 | build_actions(&item.get("tests").unwrap(), filter, path, depth + 1, out); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `item.get("tests").unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/test_runner.rs:240:21 [INFO] [stdout] | [INFO] [stdout] 240 | / if let Some(f) = filter { [INFO] [stdout] 241 | | if !full.contains(f) { [INFO] [stdout] 242 | | continue; [INFO] [stdout] 243 | | } [INFO] [stdout] 244 | | } [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] 240 ~ if let Some(f) = filter [INFO] [stdout] 241 ~ && !full.contains(f) { [INFO] [stdout] 242 | continue; [INFO] [stdout] 243 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/test_runner.rs:342:19 [INFO] [stdout] | [INFO] [stdout] 342 | path: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 342 ~ path: &[String], [INFO] [stdout] 343 | ) -> Vec<&'a Value> { [INFO] [stdout] ... [INFO] [stdout] 347 | if is_group(item) { [INFO] [stdout] 348 ~ let mut p = path.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/test_runner.rs:354:54 [INFO] [stdout] | [INFO] [stdout] 354 | ... collect_visible_children(&item.get("tests").unwrap(), filter, &p); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `item.get("tests").unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or_else` to construct default value [INFO] [stdout] --> src/test_runner.rs:359:54 [INFO] [stdout] | [INFO] [stdout] 359 | let title = leaf_title(item).unwrap_or_else(|| "".to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/test_runner.rs:365:25 [INFO] [stdout] | [INFO] [stdout] 365 | / if let Some(f) = filter { [INFO] [stdout] 366 | | if !full.contains(f) { [INFO] [stdout] 367 | | continue; [INFO] [stdout] 368 | | } [INFO] [stdout] 369 | | } [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] 365 ~ if let Some(f) = filter [INFO] [stdout] 366 ~ && !full.contains(f) { [INFO] [stdout] 367 | continue; [INFO] [stdout] 368 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/test_runner.rs:398:25 [INFO] [stdout] | [INFO] [stdout] 398 | &node.get("tests").unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `node.get("tests").unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/settings/cli.rs:222:20 [INFO] [stdout] | [INFO] [stdout] 222 | let main = match matches.get_one::("main_path") { [INFO] [stdout] | ____________________^ [INFO] [stdout] 223 | | Some(target) => Some(target.clone()), [INFO] [stdout] 224 | | None => None, [INFO] [stdout] 225 | | }; [INFO] [stdout] | |_________^ help: try: `matches.get_one::("main_path").map(|target| target.clone())` [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: `phlow_sdk::prelude::Value` [INFO] [stdout] --> src/test_runner.rs:505:54 [INFO] [stdout] | [INFO] [stdout] 505 | match Script::try_build(engine.clone(), &Value::from(data)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider removing `Value::from()`: `data` [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: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/runtime_api.rs:204:6 [INFO] [stdout] | [INFO] [stdout] 163 | RuntimeError(RuntimeError), [INFO] [stdout] | -------------------------- the largest variant contains at least 160 bytes [INFO] [stdout] ... [INFO] [stdout] 204 | ) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `runtime_api::PhlowRuntimeError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/test_runner.rs:90:68 [INFO] [stdout] | [INFO] [stdout] 90 | fn count_leafs(items: &Value, filter: Option<&str>, ancestors: &Vec) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 90 ~ fn count_leafs(items: &Value, filter: Option<&str>, ancestors: &[String]) -> usize { [INFO] [stdout] 91 | let mut count = 0usize; [INFO] [stdout] ... [INFO] [stdout] 94 | if is_group(item) { [INFO] [stdout] 95 ~ let mut new_path = ancestors.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/test_runner.rs:99:42 [INFO] [stdout] | [INFO] [stdout] 99 | count += count_leafs(&item.get("tests").unwrap(), filter, &new_path); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `item.get("tests").unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or_else` to construct default value [INFO] [stdout] --> src/test_runner.rs:102:50 [INFO] [stdout] | [INFO] [stdout] 102 | let title = leaf_title(item).unwrap_or_else(|| "".to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/runtime_api.rs:296:54 [INFO] [stdout] | [INFO] [stdout] 163 | RuntimeError(RuntimeError), [INFO] [stdout] | -------------------------- the largest variant contains at least 160 bytes [INFO] [stdout] ... [INFO] [stdout] 296 | pub fn preprocess_string(&self, script: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `runtime_api::PhlowRuntimeError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or_else` to construct default value [INFO] [stdout] --> src/test_runner.rs:203:67 [INFO] [stdout] | [INFO] [stdout] 203 | ... let title = leaf_title(x).unwrap_or_else(|| "".to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/test_runner.rs:231:35 [INFO] [stdout] | [INFO] [stdout] 231 | build_actions(&item.get("tests").unwrap(), filter, path, depth + 1, out); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `item.get("tests").unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/test_runner.rs:240:21 [INFO] [stdout] | [INFO] [stdout] 240 | / if let Some(f) = filter { [INFO] [stdout] 241 | | if !full.contains(f) { [INFO] [stdout] 242 | | continue; [INFO] [stdout] 243 | | } [INFO] [stdout] 244 | | } [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] 240 ~ if let Some(f) = filter [INFO] [stdout] 241 ~ && !full.contains(f) { [INFO] [stdout] 242 | continue; [INFO] [stdout] 243 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or_else` to construct default value [INFO] [stdout] --> src/runtime_api.rs:446:44 [INFO] [stdout] | [INFO] [stdout] 446 | let context = self.context.clone().unwrap_or_else(Context::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/test_runner.rs:342:19 [INFO] [stdout] | [INFO] [stdout] 342 | path: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 342 ~ path: &[String], [INFO] [stdout] 343 | ) -> Vec<&'a Value> { [INFO] [stdout] ... [INFO] [stdout] 347 | if is_group(item) { [INFO] [stdout] 348 ~ let mut p = path.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/test_runner.rs:354:54 [INFO] [stdout] | [INFO] [stdout] 354 | ... collect_visible_children(&item.get("tests").unwrap(), filter, &p); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `item.get("tests").unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or_else` to construct default value [INFO] [stdout] --> src/test_runner.rs:359:54 [INFO] [stdout] | [INFO] [stdout] 359 | let title = leaf_title(item).unwrap_or_else(|| "".to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/test_runner.rs:365:25 [INFO] [stdout] | [INFO] [stdout] 365 | / if let Some(f) = filter { [INFO] [stdout] 366 | | if !full.contains(f) { [INFO] [stdout] 367 | | continue; [INFO] [stdout] 368 | | } [INFO] [stdout] 369 | | } [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] 365 ~ if let Some(f) = filter [INFO] [stdout] 366 ~ && !full.contains(f) { [INFO] [stdout] 367 | continue; [INFO] [stdout] 368 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/runtime_api.rs:627:54 [INFO] [stdout] | [INFO] [stdout] 163 | RuntimeError(RuntimeError), [INFO] [stdout] | -------------------------- the largest variant contains at least 160 bytes [INFO] [stdout] ... [INFO] [stdout] 627 | pub fn preprocess_string(&self, script: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `runtime_api::PhlowRuntimeError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/test_runner.rs:398:25 [INFO] [stdout] | [INFO] [stdout] 398 | &node.get("tests").unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `node.get("tests").unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `phlow_sdk::prelude::Value` [INFO] [stdout] --> src/test_runner.rs:505:54 [INFO] [stdout] | [INFO] [stdout] 505 | match Script::try_build(engine.clone(), &Value::from(data)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider removing `Value::from()`: `data` [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: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/runtime_api.rs:204:6 [INFO] [stdout] | [INFO] [stdout] 163 | RuntimeError(RuntimeError), [INFO] [stdout] | -------------------------- the largest variant contains at least 160 bytes [INFO] [stdout] ... [INFO] [stdout] 204 | ) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `runtime_api::PhlowRuntimeError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/runtime_api.rs:296:54 [INFO] [stdout] | [INFO] [stdout] 163 | RuntimeError(RuntimeError), [INFO] [stdout] | -------------------------- the largest variant contains at least 160 bytes [INFO] [stdout] ... [INFO] [stdout] 296 | pub fn preprocess_string(&self, script: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `runtime_api::PhlowRuntimeError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or_else` to construct default value [INFO] [stdout] --> src/runtime_api.rs:446:44 [INFO] [stdout] | [INFO] [stdout] 446 | let context = self.context.clone().unwrap_or_else(Context::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/runtime_api.rs:627:54 [INFO] [stdout] | [INFO] [stdout] 163 | RuntimeError(RuntimeError), [INFO] [stdout] | -------------------------- the largest variant contains at least 160 bytes [INFO] [stdout] ... [INFO] [stdout] 627 | pub fn preprocess_string(&self, script: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `runtime_api::PhlowRuntimeError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:92:9 [INFO] [stdout] | [INFO] [stdout] 92 | / if settings.download { [INFO] [stdout] 93 | | if let Err(err) = loader [INFO] [stdout] 94 | | .download(&settings.default_package_repository_url) [INFO] [stdout] 95 | | .await [INFO] [stdout] ... | [INFO] [stdout] 100 | | } [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] 92 ~ if settings.download [INFO] [stdout] 93 ~ && let Err(err) = loader [INFO] [stdout] 94 | .download(&settings.default_package_repository_url) [INFO] [stdout] ... [INFO] [stdout] 98 | return; [INFO] [stdout] 99 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:92:9 [INFO] [stdout] | [INFO] [stdout] 92 | / if settings.download { [INFO] [stdout] 93 | | if let Err(err) = loader [INFO] [stdout] 94 | | .download(&settings.default_package_repository_url) [INFO] [stdout] 95 | | .await [INFO] [stdout] ... | [INFO] [stdout] 100 | | } [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] 92 ~ if settings.download [INFO] [stdout] 93 ~ && let Err(err) = loader [INFO] [stdout] 94 | .download(&settings.default_package_repository_url) [INFO] [stdout] ... [INFO] [stdout] 98 | return; [INFO] [stdout] 99 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2m 42s [INFO] running `Command { std: "docker" "inspect" "35e4c06d22818a0da4825955eb4719fa66d2354632e1ed9e8e3390c1a85b4d46", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "35e4c06d22818a0da4825955eb4719fa66d2354632e1ed9e8e3390c1a85b4d46", kill_on_drop: false }` [INFO] [stdout] 35e4c06d22818a0da4825955eb4719fa66d2354632e1ed9e8e3390c1a85b4d46