[INFO] cloning repository https://github.com/j4ger/systemd-parser [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/j4ger/systemd-parser" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fj4ger%2Fsystemd-parser", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fj4ger%2Fsystemd-parser'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 367daa8b965a5c5734604db3f92920f35e6d6513 [INFO] linting j4ger/systemd-parser against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fj4ger%2Fsystemd-parser" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/j4ger/systemd-parser [INFO] finished tweaking git repo https://github.com/j4ger/systemd-parser [INFO] tweaked toml for git repo https://github.com/j4ger/systemd-parser written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/j4ger/systemd-parser on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/j4ger/systemd-parser 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] warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"` [INFO] [stderr] | [INFO] [stderr] = note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest [INFO] [stderr] = note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest [INFO] [stderr] = note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded chrono-tz-build v0.2.0 [INFO] [stderr] Downloaded os-release v0.1.0 [INFO] [stderr] Downloaded serde v1.0.179 [INFO] [stderr] Downloaded serde_json v1.0.104 [INFO] [stderr] Downloaded serde_derive v1.0.179 [INFO] [stderr] Downloaded chrono-tz v0.8.3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 22712d2bd16d92f4a612e8d398d6a60910d40c76cd76fc8e175266ed92cbdbc5 [INFO] running `Command { std: "docker" "start" "-a" "22712d2bd16d92f4a612e8d398d6a60910d40c76cd76fc8e175266ed92cbdbc5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "22712d2bd16d92f4a612e8d398d6a60910d40c76cd76fc8e175266ed92cbdbc5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "22712d2bd16d92f4a612e8d398d6a60910d40c76cd76fc8e175266ed92cbdbc5", kill_on_drop: false }` [INFO] [stdout] 22712d2bd16d92f4a612e8d398d6a60910d40c76cd76fc8e175266ed92cbdbc5 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] a566aee164c3c67f8cdd7ece218a0f4261b07237181360362ed54d49cc5d1cde [INFO] running `Command { std: "docker" "start" "-a" "a566aee164c3c67f8cdd7ece218a0f4261b07237181360362ed54d49cc5d1cde", kill_on_drop: false }` [INFO] [stderr] warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"` [INFO] [stderr] | [INFO] [stderr] = note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest [INFO] [stderr] = note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest [INFO] [stderr] = note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions [INFO] [stderr] Compiling proc-macro2 v1.0.64 [INFO] [stderr] Compiling quote v1.0.29 [INFO] [stderr] Compiling unicode-ident v1.0.10 [INFO] [stderr] Compiling thiserror v1.0.43 [INFO] [stderr] Compiling regex-syntax v0.7.4 [INFO] [stderr] Compiling crossbeam-utils v0.8.16 [INFO] [stderr] Compiling serde v1.0.179 [INFO] [stderr] Compiling ucd-trie v0.1.6 [INFO] [stderr] Compiling serde_derive v1.0.179 [INFO] [stderr] Compiling phf_shared v0.11.2 [INFO] [stderr] Compiling num-traits v0.2.16 [INFO] [stderr] Compiling memoffset v0.9.0 [INFO] [stderr] Compiling crossbeam-epoch v0.9.15 [INFO] [stderr] Compiling rayon-core v1.11.0 [INFO] [stderr] Checking either v1.9.0 [INFO] [stderr] Compiling serde_json v1.0.104 [INFO] [stderr] Checking time v0.1.45 [INFO] [stderr] Checking num_cpus v1.16.0 [INFO] [stderr] Compiling phf_generator v0.11.2 [INFO] [stderr] Compiling phf v0.11.2 [INFO] [stderr] Checking ciborium-io v0.2.1 [INFO] [stderr] Checking half v1.8.2 [INFO] [stderr] Compiling phf_codegen v0.11.2 [INFO] [stderr] Checking os_str_bytes v6.5.1 [INFO] [stderr] Checking itertools v0.10.5 [INFO] [stderr] Checking textwrap v0.16.0 [INFO] [stderr] Checking os-release v0.1.0 [INFO] [stderr] Checking nix v0.24.3 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking log v0.4.19 [INFO] [stderr] Checking ciborium-ll v0.2.1 [INFO] [stderr] Checking clap_lex v0.2.4 [INFO] [stderr] Checking crossbeam-channel v0.5.8 [INFO] [stderr] Checking clap v3.2.25 [INFO] [stderr] Checking crossbeam-deque v0.8.3 [INFO] [stderr] Compiling syn v2.0.25 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Checking chrono v0.4.26 [INFO] [stderr] Checking plotters v0.3.5 [INFO] [stderr] Checking criterion-plot v0.5.0 [INFO] [stderr] Checking rayon v1.7.0 [INFO] [stderr] Compiling regex-automata v0.3.4 [INFO] [stderr] Checking ciborium v0.2.1 [INFO] [stderr] Checking regex v1.9.1 [INFO] [stderr] Checking unit_parser_macro v0.1.0 (/opt/rustwide/workdir/macro) [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> macro/src/attribute.rs:13:1 [INFO] [stdout] | [INFO] [stdout] 13 | / impl Default for SectionAttributes { [INFO] [stdout] 14 | | fn default() -> Self { [INFO] [stdout] 15 | | Self { [INFO] [stdout] 16 | | default: false, [INFO] [stdout] ... | [INFO] [stdout] 21 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 7 + #[derive(Default)] [INFO] [stdout] 8 | pub(crate) struct SectionAttributes { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> macro/src/attribute.rs:72:1 [INFO] [stdout] | [INFO] [stdout] 72 | / impl Default for EntryAttributes { [INFO] [stdout] 73 | | fn default() -> Self { [INFO] [stdout] 74 | | Self { [INFO] [stdout] 75 | | default: None, [INFO] [stdout] ... | [INFO] [stdout] 82 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 64 + #[derive(Default)] [INFO] [stdout] 65 | pub(crate) struct EntryAttributes { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> macro/src/attribute.rs:137:33 [INFO] [stdout] | [INFO] [stdout] 137 | if (!result.must) & (!result.default.is_some()) & (!result.multiple) & (!is_option(ty)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `result.default.is_none()` [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 `impl` can be derived [INFO] [stdout] --> macro/src/attribute.rs:159:1 [INFO] [stdout] | [INFO] [stdout] 159 | / impl Default for UnitAttributes { [INFO] [stdout] 160 | | fn default() -> Self { [INFO] [stdout] 161 | | Self { suffix: None } [INFO] [stdout] 162 | | } [INFO] [stdout] 163 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 155 + #[derive(Default)] [INFO] [stdout] 156 | pub(crate) struct UnitAttributes { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> macro/src/attribute.rs:167:36 [INFO] [stdout] | [INFO] [stdout] 167 | pub(crate) fn parse_vec(input: &Vec) -> syn::Result { [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] 167 - pub(crate) fn parse_vec(input: &Vec) -> syn::Result { [INFO] [stdout] 167 + pub(crate) fn parse_vec(input: &[Attribute]) -> syn::Result { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling thiserror-impl v1.0.43 [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> macro/src/section.rs:26:48 [INFO] [stdout] | [INFO] [stdout] 26 | entry_patches.push(gen_entry_patch(&entry)?); [INFO] [stdout] | ^^^^^^ help: change this to: `entry` [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: the borrowed expression implements the required traits [INFO] [stdout] --> macro/src/section.rs:29:17 [INFO] [stdout] | [INFO] [stdout] 29 | &entry, [INFO] [stdout] | ^^^^^^ help: change this to: `entry` [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] [stderr] Compiling snafu-derive v0.7.5 [INFO] [stdout] warning: useless conversion to the same type: `syn::punctuated::Iter<'_, syn::PathSegment>` [INFO] [stdout] --> macro/src/type_transform.rs:59:30 [INFO] [stdout] | [INFO] [stdout] 59 | let idents_of_path = path [INFO] [stdout] | ______________________________^ [INFO] [stdout] 60 | | .segments [INFO] [stdout] 61 | | .iter() [INFO] [stdout] 62 | | .into_iter() [INFO] [stdout] | |________________________^ [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] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 59 ~ let idents_of_path = path [INFO] [stdout] 60 + .segments [INFO] [stdout] 61 + .iter() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> macro/src/type_transform.rs:70:23 [INFO] [stdout] | [INFO] [stdout] 70 | .find(|s| &idents_of_path == *s) [INFO] [stdout] | ---------------^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `idents_of_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `syn::punctuated::Iter<'_, syn::PathSegment>` [INFO] [stdout] --> macro/src/type_transform.rs:105:30 [INFO] [stdout] | [INFO] [stdout] 105 | let idents_of_path = path [INFO] [stdout] | ______________________________^ [INFO] [stdout] 106 | | .segments [INFO] [stdout] 107 | | .iter() [INFO] [stdout] 108 | | .into_iter() [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 105 ~ let idents_of_path = path [INFO] [stdout] 106 + .segments [INFO] [stdout] 107 + .iter() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> macro/src/type_transform.rs:116:23 [INFO] [stdout] | [INFO] [stdout] 116 | .find(|s| &idents_of_path == *s) [INFO] [stdout] | ---------------^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `idents_of_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> macro/src/unit.rs:24:53 [INFO] [stdout] | [INFO] [stdout] 24 | section_ensures.push(gen_section_ensure(&entry)?); [INFO] [stdout] | ^^^^^^ help: change this to: `entry` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> macro/src/unit.rs:25:49 [INFO] [stdout] | [INFO] [stdout] 25 | section_inits.push(gen_section_init(&entry)?); [INFO] [stdout] | ^^^^^^ help: change this to: `entry` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> macro/src/unit.rs:26:52 [INFO] [stdout] | [INFO] [stdout] 26 | section_parsers.push(gen_section_parse(&entry)?); [INFO] [stdout] | ^^^^^^ help: change this to: `entry` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> macro/src/unit.rs:27:57 [INFO] [stdout] | [INFO] [stdout] 27 | section_finalizes.push(gen_section_finalize(&entry)?); [INFO] [stdout] | ^^^^^^ help: change this to: `entry` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> macro/src/unit.rs:28:54 [INFO] [stdout] | [INFO] [stdout] 28 | section_patches.push(gen_section_patches(&entry)?); [INFO] [stdout] | ^^^^^^ help: change this to: `entry` [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: the borrowed expression implements the required traits [INFO] [stdout] --> macro/src/unit.rs:30:17 [INFO] [stdout] | [INFO] [stdout] 30 | &entry, [INFO] [stdout] | ^^^^^^ help: change this to: `entry` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> macro/src/attribute.rs:13:1 [INFO] [stdout] | [INFO] [stdout] 13 | / impl Default for SectionAttributes { [INFO] [stdout] 14 | | fn default() -> Self { [INFO] [stdout] 15 | | Self { [INFO] [stdout] 16 | | default: false, [INFO] [stdout] ... | [INFO] [stdout] 21 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 7 + #[derive(Default)] [INFO] [stdout] 8 | pub(crate) struct SectionAttributes { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> macro/src/attribute.rs:72:1 [INFO] [stdout] | [INFO] [stdout] 72 | / impl Default for EntryAttributes { [INFO] [stdout] 73 | | fn default() -> Self { [INFO] [stdout] 74 | | Self { [INFO] [stdout] 75 | | default: None, [INFO] [stdout] ... | [INFO] [stdout] 82 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 64 + #[derive(Default)] [INFO] [stdout] 65 | pub(crate) struct EntryAttributes { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> macro/src/attribute.rs:137:33 [INFO] [stdout] | [INFO] [stdout] 137 | if (!result.must) & (!result.default.is_some()) & (!result.multiple) & (!is_option(ty)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `result.default.is_none()` [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 `impl` can be derived [INFO] [stdout] --> macro/src/attribute.rs:159:1 [INFO] [stdout] | [INFO] [stdout] 159 | / impl Default for UnitAttributes { [INFO] [stdout] 160 | | fn default() -> Self { [INFO] [stdout] 161 | | Self { suffix: None } [INFO] [stdout] 162 | | } [INFO] [stdout] 163 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 155 + #[derive(Default)] [INFO] [stdout] 156 | pub(crate) struct UnitAttributes { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> macro/src/attribute.rs:167:36 [INFO] [stdout] | [INFO] [stdout] 167 | pub(crate) fn parse_vec(input: &Vec) -> syn::Result { [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] 167 - pub(crate) fn parse_vec(input: &Vec) -> syn::Result { [INFO] [stdout] 167 + pub(crate) fn parse_vec(input: &[Attribute]) -> syn::Result { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> macro/src/section.rs:26:48 [INFO] [stdout] | [INFO] [stdout] 26 | entry_patches.push(gen_entry_patch(&entry)?); [INFO] [stdout] | ^^^^^^ help: change this to: `entry` [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: the borrowed expression implements the required traits [INFO] [stdout] --> macro/src/section.rs:29:17 [INFO] [stdout] | [INFO] [stdout] 29 | &entry, [INFO] [stdout] | ^^^^^^ help: change this to: `entry` [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: useless conversion to the same type: `syn::punctuated::Iter<'_, syn::PathSegment>` [INFO] [stdout] --> macro/src/type_transform.rs:59:30 [INFO] [stdout] | [INFO] [stdout] 59 | let idents_of_path = path [INFO] [stdout] | ______________________________^ [INFO] [stdout] 60 | | .segments [INFO] [stdout] 61 | | .iter() [INFO] [stdout] 62 | | .into_iter() [INFO] [stdout] | |________________________^ [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] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 59 ~ let idents_of_path = path [INFO] [stdout] 60 + .segments [INFO] [stdout] 61 + .iter() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> macro/src/type_transform.rs:70:23 [INFO] [stdout] | [INFO] [stdout] 70 | .find(|s| &idents_of_path == *s) [INFO] [stdout] | ---------------^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `idents_of_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `syn::punctuated::Iter<'_, syn::PathSegment>` [INFO] [stdout] --> macro/src/type_transform.rs:105:30 [INFO] [stdout] | [INFO] [stdout] 105 | let idents_of_path = path [INFO] [stdout] | ______________________________^ [INFO] [stdout] 106 | | .segments [INFO] [stdout] 107 | | .iter() [INFO] [stdout] 108 | | .into_iter() [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 105 ~ let idents_of_path = path [INFO] [stdout] 106 + .segments [INFO] [stdout] 107 + .iter() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> macro/src/type_transform.rs:116:23 [INFO] [stdout] | [INFO] [stdout] 116 | .find(|s| &idents_of_path == *s) [INFO] [stdout] | ---------------^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `idents_of_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> macro/src/unit.rs:24:53 [INFO] [stdout] | [INFO] [stdout] 24 | section_ensures.push(gen_section_ensure(&entry)?); [INFO] [stdout] | ^^^^^^ help: change this to: `entry` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> macro/src/unit.rs:25:49 [INFO] [stdout] | [INFO] [stdout] 25 | section_inits.push(gen_section_init(&entry)?); [INFO] [stdout] | ^^^^^^ help: change this to: `entry` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> macro/src/unit.rs:26:52 [INFO] [stdout] | [INFO] [stdout] 26 | section_parsers.push(gen_section_parse(&entry)?); [INFO] [stdout] | ^^^^^^ help: change this to: `entry` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> macro/src/unit.rs:27:57 [INFO] [stdout] | [INFO] [stdout] 27 | section_finalizes.push(gen_section_finalize(&entry)?); [INFO] [stdout] | ^^^^^^ help: change this to: `entry` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> macro/src/unit.rs:28:54 [INFO] [stdout] | [INFO] [stdout] 28 | section_patches.push(gen_section_patches(&entry)?); [INFO] [stdout] | ^^^^^^ help: change this to: `entry` [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: the borrowed expression implements the required traits [INFO] [stdout] --> macro/src/unit.rs:30:17 [INFO] [stdout] | [INFO] [stdout] 30 | &entry, [INFO] [stdout] | ^^^^^^ help: change this to: `entry` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> macro/src/attribute.rs:13:1 [INFO] [stdout] | [INFO] [stdout] 13 | / impl Default for SectionAttributes { [INFO] [stdout] 14 | | fn default() -> Self { [INFO] [stdout] 15 | | Self { [INFO] [stdout] 16 | | default: false, [INFO] [stdout] ... | [INFO] [stdout] 21 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 7 + #[derive(Default)] [INFO] [stdout] 8 | pub(crate) struct SectionAttributes { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> macro/src/attribute.rs:72:1 [INFO] [stdout] | [INFO] [stdout] 72 | / impl Default for EntryAttributes { [INFO] [stdout] 73 | | fn default() -> Self { [INFO] [stdout] 74 | | Self { [INFO] [stdout] 75 | | default: None, [INFO] [stdout] ... | [INFO] [stdout] 82 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 64 + #[derive(Default)] [INFO] [stdout] 65 | pub(crate) struct EntryAttributes { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> macro/src/attribute.rs:137:33 [INFO] [stdout] | [INFO] [stdout] 137 | if (!result.must) & (!result.default.is_some()) & (!result.multiple) & (!is_option(ty)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `result.default.is_none()` [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 `impl` can be derived [INFO] [stdout] --> macro/src/attribute.rs:159:1 [INFO] [stdout] | [INFO] [stdout] 159 | / impl Default for UnitAttributes { [INFO] [stdout] 160 | | fn default() -> Self { [INFO] [stdout] 161 | | Self { suffix: None } [INFO] [stdout] 162 | | } [INFO] [stdout] 163 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 155 + #[derive(Default)] [INFO] [stdout] 156 | pub(crate) struct UnitAttributes { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> macro/src/attribute.rs:167:36 [INFO] [stdout] | [INFO] [stdout] 167 | pub(crate) fn parse_vec(input: &Vec) -> syn::Result { [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] 167 - pub(crate) fn parse_vec(input: &Vec) -> syn::Result { [INFO] [stdout] 167 + pub(crate) fn parse_vec(input: &[Attribute]) -> syn::Result { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> macro/src/section.rs:26:48 [INFO] [stdout] | [INFO] [stdout] 26 | entry_patches.push(gen_entry_patch(&entry)?); [INFO] [stdout] | ^^^^^^ help: change this to: `entry` [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: the borrowed expression implements the required traits [INFO] [stdout] --> macro/src/section.rs:29:17 [INFO] [stdout] | [INFO] [stdout] 29 | &entry, [INFO] [stdout] | ^^^^^^ help: change this to: `entry` [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] [stderr] Compiling parse-zoneinfo v0.3.0 [INFO] [stdout] warning: useless conversion to the same type: `syn::punctuated::Iter<'_, syn::PathSegment>` [INFO] [stdout] --> macro/src/type_transform.rs:59:30 [INFO] [stdout] | [INFO] [stdout] 59 | let idents_of_path = path [INFO] [stdout] | ______________________________^ [INFO] [stdout] 60 | | .segments [INFO] [stdout] 61 | | .iter() [INFO] [stdout] 62 | | .into_iter() [INFO] [stdout] | |________________________^ [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] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 59 ~ let idents_of_path = path [INFO] [stdout] 60 + .segments [INFO] [stdout] 61 + .iter() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> macro/src/type_transform.rs:70:23 [INFO] [stdout] | [INFO] [stdout] 70 | .find(|s| &idents_of_path == *s) [INFO] [stdout] | ---------------^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `idents_of_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `syn::punctuated::Iter<'_, syn::PathSegment>` [INFO] [stdout] --> macro/src/type_transform.rs:105:30 [INFO] [stdout] | [INFO] [stdout] 105 | let idents_of_path = path [INFO] [stdout] | ______________________________^ [INFO] [stdout] 106 | | .segments [INFO] [stdout] 107 | | .iter() [INFO] [stdout] 108 | | .into_iter() [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 105 ~ let idents_of_path = path [INFO] [stdout] 106 + .segments [INFO] [stdout] 107 + .iter() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> macro/src/type_transform.rs:116:23 [INFO] [stdout] | [INFO] [stdout] 116 | .find(|s| &idents_of_path == *s) [INFO] [stdout] | ---------------^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `idents_of_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> macro/src/unit.rs:24:53 [INFO] [stdout] | [INFO] [stdout] 24 | section_ensures.push(gen_section_ensure(&entry)?); [INFO] [stdout] | ^^^^^^ help: change this to: `entry` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> macro/src/unit.rs:25:49 [INFO] [stdout] | [INFO] [stdout] 25 | section_inits.push(gen_section_init(&entry)?); [INFO] [stdout] | ^^^^^^ help: change this to: `entry` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> macro/src/unit.rs:26:52 [INFO] [stdout] | [INFO] [stdout] 26 | section_parsers.push(gen_section_parse(&entry)?); [INFO] [stdout] | ^^^^^^ help: change this to: `entry` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> macro/src/unit.rs:27:57 [INFO] [stdout] | [INFO] [stdout] 27 | section_finalizes.push(gen_section_finalize(&entry)?); [INFO] [stdout] | ^^^^^^ help: change this to: `entry` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> macro/src/unit.rs:28:54 [INFO] [stdout] | [INFO] [stdout] 28 | section_patches.push(gen_section_patches(&entry)?); [INFO] [stdout] | ^^^^^^ help: change this to: `entry` [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: the borrowed expression implements the required traits [INFO] [stdout] --> macro/src/unit.rs:30:17 [INFO] [stdout] | [INFO] [stdout] 30 | &entry, [INFO] [stdout] | ^^^^^^ help: change this to: `entry` [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] [stderr] Checking tinytemplate v1.2.1 [INFO] [stderr] Checking criterion v0.4.0 [INFO] [stderr] Checking pest v2.7.0 [INFO] [stderr] Compiling chrono-tz-build v0.2.0 [INFO] [stderr] Compiling chrono-tz v0.8.3 [INFO] [stderr] Checking snafu v0.7.5 [INFO] [stderr] Compiling pest_meta v2.7.0 [INFO] [stderr] Compiling pest_generator v2.7.0 [INFO] [stderr] Compiling pest_derive v2.7.0 [INFO] [stderr] Checking unit_parser v0.1.0 (/opt/rustwide/workdir/lib) [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> lib/src/template.rs:4:14 [INFO] [stdout] | [INFO] [stdout] 4 | Template(&'a str), // template name [INFO] [stdout] | -------- ^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 4 - Template(&'a str), // template name [INFO] [stdout] 4 + Template(()), // template name [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> lib/src/template.rs:6:13 [INFO] [stdout] | [INFO] [stdout] 6 | Regular(&'a str), // unit name [INFO] [stdout] | ------- ^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 6 - Regular(&'a str), // unit name [INFO] [stdout] 6 + Regular(()), // unit name [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> lib/src/config.rs:26:46 [INFO] [stdout] | [INFO] [stdout] 26 | fn __parse_unit(__source: UnitParser) -> Result; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: lib/src/error.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | ParsingError { source: RuleError }, [INFO] [stdout] | ---------------------------------- the largest variant contains at least 184 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::Error`, 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: the `Err`-variant returned from this function is very large [INFO] [stdout] --> lib/src/config.rs:27:65 [INFO] [stdout] | [INFO] [stdout] 27 | fn __patch_unit(__source: UnitParser, __from: &mut Self) -> Result<()>; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: lib/src/error.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | ParsingError { source: RuleError }, [INFO] [stdout] | ---------------------------------- the largest variant contains at least 184 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::Error`, 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] --> lib/src/config.rs:34:10 [INFO] [stdout] | [INFO] [stdout] 34 | ) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: lib/src/error.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | ParsingError { source: RuleError }, [INFO] [stdout] | ---------------------------------- the largest variant contains at least 184 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::Error`, 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] --> lib/src/config.rs:53:10 [INFO] [stdout] | [INFO] [stdout] 53 | ) -> Result<()> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: lib/src/error.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | ParsingError { source: RuleError }, [INFO] [stdout] | ---------------------------------- the largest variant contains at least 184 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::Error`, 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] --> lib/src/config.rs:66:53 [INFO] [stdout] | [INFO] [stdout] 66 | fn load>(path: S, root: bool) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: lib/src/error.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | ParsingError { source: RuleError }, [INFO] [stdout] | ---------------------------------- the largest variant contains at least 184 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::Error`, 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] --> lib/src/config.rs:84:10 [INFO] [stdout] | [INFO] [stdout] 84 | ) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: lib/src/error.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | ParsingError { source: RuleError }, [INFO] [stdout] | ---------------------------------- the largest variant contains at least 184 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::Error`, 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: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> lib/src/config.rs:142:25 [INFO] [stdout] | [INFO] [stdout] 142 | / for item in dir_entries { [INFO] [stdout] 143 | | if let Ok(entry) = item { [INFO] [stdout] 144 | | if let Ok(meta) = entry.metadata() { [INFO] [stdout] 145 | | if meta.is_file() [INFO] [stdout] ... | [INFO] [stdout] 161 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> lib/src/config.rs:143:29 [INFO] [stdout] | [INFO] [stdout] 143 | / ... if let Ok(entry) = item { [INFO] [stdout] 144 | | ... if let Ok(meta) = entry.metadata() { [INFO] [stdout] 145 | | ... if meta.is_file() [INFO] [stdout] 146 | | ... && entry.path().extension().is_some_and(|x| x == "conf") [INFO] [stdout] ... | [INFO] [stdout] 160 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 142 ~ for entry in dir_entries.flatten() { [INFO] [stdout] 143 + if let Ok(meta) = entry.metadata() { [INFO] [stdout] 144 + if meta.is_file() [INFO] [stdout] 145 + && entry.path().extension().is_some_and(|x| x == "conf") [INFO] [stdout] 146 + { [INFO] [stdout] 147 + let paths = Rc::clone(&paths_rc); [INFO] [stdout] 148 + if let Err(err) = Self::__patch( [INFO] [stdout] 149 + entry.path(), [INFO] [stdout] 150 + paths, [INFO] [stdout] 151 + fullname.as_str(), [INFO] [stdout] 152 + &mut result, [INFO] [stdout] 153 + root, [INFO] [stdout] 154 + ) { [INFO] [stdout] 155 + log::warn!("Failed to patch unit {}: {})", name, err); [INFO] [stdout] 156 + } [INFO] [stdout] 157 + } [INFO] [stdout] 158 + } [INFO] [stdout] 159 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> lib/src/config.rs:172:52 [INFO] [stdout] | [INFO] [stdout] 172 | fn __parse_section(__source: SectionParser) -> Result>; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: lib/src/error.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | ParsingError { source: RuleError }, [INFO] [stdout] | ---------------------------------- the largest variant contains at least 184 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::Error`, 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] --> lib/src/config.rs:173:71 [INFO] [stdout] | [INFO] [stdout] 173 | fn __patch_section(__source: SectionParser, __from: &mut Self) -> Result<()>; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: lib/src/error.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | ParsingError { source: RuleError }, [INFO] [stdout] | ---------------------------------- the largest variant contains at least 184 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::Error`, 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] --> lib/src/parser.rs:31:10 [INFO] [stdout] | [INFO] [stdout] 31 | ) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: lib/src/error.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | ParsingError { source: RuleError }, [INFO] [stdout] | ---------------------------------- the largest variant contains at least 184 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::Error`, 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 call to `as_ref` does nothing [INFO] [stdout] --> lib/src/parser.rs:33:52 [INFO] [stdout] | [INFO] [stdout] 33 | UnitFileParser::parse(Rule::unit_file, input.as_ref()).context(ParsingSnafu {})?; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] = note: `#[warn(clippy::useless_asref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> lib/src/parser.rs:143:13 [INFO] [stdout] | [INFO] [stdout] 143 | return Some(Ok((key, value))); [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] 143 - return Some(Ok((key, value))); [INFO] [stdout] 143 + Some(Ok((key, value))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> lib/src/parser.rs:145:13 [INFO] [stdout] | [INFO] [stdout] 145 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 145 - return None; [INFO] [stdout] 145 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> lib/src/parser.rs:172:17 [INFO] [stdout] | [INFO] [stdout] 172 | / for item in read_res { [INFO] [stdout] 173 | | if let Ok(entry) = item { [INFO] [stdout] 174 | | if let Ok(meta) = entry.metadata() { [INFO] [stdout] 175 | | if meta.is_symlink() { [INFO] [stdout] ... | [INFO] [stdout] 180 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> lib/src/parser.rs:173:21 [INFO] [stdout] | [INFO] [stdout] 173 | / if let Ok(entry) = item { [INFO] [stdout] 174 | | if let Ok(meta) = entry.metadata() { [INFO] [stdout] 175 | | if meta.is_symlink() { [INFO] [stdout] 176 | | result.push(entry.file_name().to_string_lossy().to_string()); [INFO] [stdout] ... | [INFO] [stdout] 179 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 172 ~ for entry in read_res.flatten() { [INFO] [stdout] 173 + if let Ok(meta) = entry.metadata() { [INFO] [stdout] 174 + if meta.is_symlink() { [INFO] [stdout] 175 + result.push(entry.file_name().to_string_lossy().to_string()); [INFO] [stdout] 176 + } [INFO] [stdout] 177 + } [INFO] [stdout] 178 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> lib/src/specifiers.rs:22:43 [INFO] [stdout] | [INFO] [stdout] 22 | static CURRENT_UID: Lazy = Lazy::new(|| Uid::current()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Uid::current` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> lib/src/specifiers.rs:23:43 [INFO] [stdout] | [INFO] [stdout] 23 | static CURRENT_GID: Lazy = Lazy::new(|| Gid::current()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Gid::current` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> lib/src/specifiers.rs:32:6 [INFO] [stdout] | [INFO] [stdout] 32 | ) -> Result<(), Error> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: lib/src/error.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | ParsingError { source: RuleError }, [INFO] [stdout] | ---------------------------------- the largest variant contains at least 184 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::Error`, 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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> lib/src/specifiers.rs:91:17 [INFO] [stdout] | [INFO] [stdout] 91 | result.push_str("0"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('0')` [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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> lib/src/specifiers.rs:103:21 [INFO] [stdout] | [INFO] [stdout] 103 | result.push_str("~"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('~')` [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: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> lib/src/specifiers.rs:124:41 [INFO] [stdout] | [INFO] [stdout] 124 | result.push_str(&escape(instance_name.split('-').last().unwrap())); [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] 124 - result.push_str(&escape(instance_name.split('-').last().unwrap())); [INFO] [stdout] 124 + result.push_str(&escape(instance_name.split('-').next_back().unwrap())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> lib/src/specifiers.rs:127:21 [INFO] [stdout] | [INFO] [stdout] 127 | / filename [INFO] [stdout] 128 | | .split('.') [INFO] [stdout] 129 | | .nth(0) [INFO] [stdout] 130 | | .unwrap() [INFO] [stdout] 131 | | .split('-') [INFO] [stdout] 132 | | .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] help: try [INFO] [stdout] | [INFO] [stdout] 132 - .last() [INFO] [stdout] 132 + .next_back() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> lib/src/specifiers.rs:127:21 [INFO] [stdout] | [INFO] [stdout] 127 | / filename [INFO] [stdout] 128 | | .split('.') [INFO] [stdout] 129 | | .nth(0) [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] help: try calling `.next()` instead of `.nth(0)` [INFO] [stdout] | [INFO] [stdout] 127 ~ filename [INFO] [stdout] 128 + .split('.').next() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> lib/src/specifiers.rs:139:33 [INFO] [stdout] | [INFO] [stdout] 139 | result.push_str(instance_name.split('-').last().unwrap()); [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] 139 - result.push_str(instance_name.split('-').last().unwrap()); [INFO] [stdout] 139 + result.push_str(instance_name.split('-').next_back().unwrap()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> lib/src/specifiers.rs:142:21 [INFO] [stdout] | [INFO] [stdout] 142 | / filename [INFO] [stdout] 143 | | .split('.') [INFO] [stdout] 144 | | .nth(0) [INFO] [stdout] 145 | | .unwrap() [INFO] [stdout] 146 | | .split('-') [INFO] [stdout] 147 | | .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] help: try [INFO] [stdout] | [INFO] [stdout] 147 - .last() [INFO] [stdout] 147 + .next_back() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> lib/src/specifiers.rs:142:21 [INFO] [stdout] | [INFO] [stdout] 142 | / filename [INFO] [stdout] 143 | | .split('.') [INFO] [stdout] 144 | | .nth(0) [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] help: try calling `.next()` instead of `.nth(0)` [INFO] [stdout] | [INFO] [stdout] 142 ~ filename [INFO] [stdout] 143 + .split('.').next() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> lib/src/specifiers.rs:153:13 [INFO] [stdout] | [INFO] [stdout] 153 | / UTS_NAME [INFO] [stdout] 154 | | .nodename() [INFO] [stdout] 155 | | .to_string_lossy() [INFO] [stdout] 156 | | .split('.') [INFO] [stdout] 157 | | .nth(0) [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] help: try calling `.next()` instead of `.nth(0)` [INFO] [stdout] | [INFO] [stdout] 153 ~ UTS_NAME [INFO] [stdout] 154 + .nodename() [INFO] [stdout] 155 + .to_string_lossy() [INFO] [stdout] 156 + .split('.').next() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> lib/src/specifiers.rs:175:33 [INFO] [stdout] | [INFO] [stdout] 175 | result.push_str(&res) [INFO] [stdout] | ^^^^ help: change this to: `res` [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: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> lib/src/specifiers.rs:179:40 [INFO] [stdout] | [INFO] [stdout] 179 | 'N' => result.push_str(&escape(filename.split(".").nth(0).unwrap())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `filename.split(".").next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> lib/src/specifiers.rs:185:41 [INFO] [stdout] | [INFO] [stdout] 185 | result.push_str(&escape(filename.split('.').nth(0).unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `filename.split('.').next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> lib/src/specifiers.rs:192:33 [INFO] [stdout] | [INFO] [stdout] 192 | result.push_str(filename.split('.').nth(0).unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `filename.split('.').next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> lib/src/specifiers.rs:196:13 [INFO] [stdout] | [INFO] [stdout] 196 | / UTS_NAME [INFO] [stdout] 197 | | .nodename() [INFO] [stdout] 198 | | .to_string_lossy() [INFO] [stdout] 199 | | .split('.') [INFO] [stdout] 200 | | .nth(0) [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] help: try calling `.next()` instead of `.nth(0)` [INFO] [stdout] | [INFO] [stdout] 196 ~ UTS_NAME [INFO] [stdout] 197 + .nodename() [INFO] [stdout] 198 + .to_string_lossy() [INFO] [stdout] 199 + .split('.').next() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> lib/src/specifiers.rs:267:33 [INFO] [stdout] | [INFO] [stdout] 267 | result.push_str(&res); [INFO] [stdout] | ^^^^ help: change this to: `res` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> lib/src/specifiers.rs:272:33 [INFO] [stdout] | [INFO] [stdout] 272 | result.push_str(&res) [INFO] [stdout] | ^^^^ help: change this to: `res` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> lib/src/specifiers.rs:277:33 [INFO] [stdout] | [INFO] [stdout] 277 | result.push_str(&res) [INFO] [stdout] | ^^^^ help: change this to: `res` [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: the `Err`-variant returned from this function is very large [INFO] [stdout] --> lib/src/template.rs:9:51 [INFO] [stdout] | [INFO] [stdout] 9 | pub(crate) fn unit_type<'a>(filename: &'a str) -> Result> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: lib/src/error.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | ParsingError { source: RuleError }, [INFO] [stdout] | ---------------------------------- the largest variant contains at least 184 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::Error`, 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: accessing first element with `split.get(0)` [INFO] [stdout] --> lib/src/template.rs:15:39 [INFO] [stdout] | [INFO] [stdout] 15 | Ok(UnitType::Template(split.get(0).unwrap())) [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `split.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> lib/src/template.rs:18:37 [INFO] [stdout] | [INFO] [stdout] 18 | let template_name = sub_split.nth(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `sub_split.next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> lib/src/template.rs:19:30 [INFO] [stdout] | [INFO] [stdout] 19 | let suffix = sub_split.last().unwrap(); [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] 19 - let suffix = sub_split.last().unwrap(); [INFO] [stdout] 19 + let suffix = sub_split.next_back().unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `split.get(0)` [INFO] [stdout] --> lib/src/template.rs:21:21 [INFO] [stdout] | [INFO] [stdout] 21 | split.get(0).unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `split.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unescape_path` is never used [INFO] [stdout] --> lib/src/escape.rs:28:15 [INFO] [stdout] | [INFO] [stdout] 28 | pub(crate) fn unescape_path>(input: S) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unescape_non_path` is never used [INFO] [stdout] --> lib/src/escape.rs:32:15 [INFO] [stdout] | [INFO] [stdout] 32 | pub(crate) fn unescape_non_path>(input: S) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> lib/src/template.rs:4:14 [INFO] [stdout] | [INFO] [stdout] 4 | Template(&'a str), // template name [INFO] [stdout] | -------- ^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 4 - Template(&'a str), // template name [INFO] [stdout] 4 + Template(()), // template name [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> lib/src/template.rs:6:13 [INFO] [stdout] | [INFO] [stdout] 6 | Regular(&'a str), // unit name [INFO] [stdout] | ------- ^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 6 - Regular(&'a str), // unit name [INFO] [stdout] 6 + Regular(()), // unit name [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> lib/src/config.rs:26:46 [INFO] [stdout] | [INFO] [stdout] 26 | fn __parse_unit(__source: UnitParser) -> Result; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: lib/src/error.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | ParsingError { source: RuleError }, [INFO] [stdout] | ---------------------------------- the largest variant contains at least 184 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::Error`, 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: the `Err`-variant returned from this function is very large [INFO] [stdout] --> lib/src/config.rs:27:65 [INFO] [stdout] | [INFO] [stdout] 27 | fn __patch_unit(__source: UnitParser, __from: &mut Self) -> Result<()>; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: lib/src/error.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | ParsingError { source: RuleError }, [INFO] [stdout] | ---------------------------------- the largest variant contains at least 184 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::Error`, 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] --> lib/src/config.rs:34:10 [INFO] [stdout] | [INFO] [stdout] 34 | ) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: lib/src/error.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | ParsingError { source: RuleError }, [INFO] [stdout] | ---------------------------------- the largest variant contains at least 184 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::Error`, 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] --> lib/src/config.rs:53:10 [INFO] [stdout] | [INFO] [stdout] 53 | ) -> Result<()> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: lib/src/error.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | ParsingError { source: RuleError }, [INFO] [stdout] | ---------------------------------- the largest variant contains at least 184 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::Error`, 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] --> lib/src/config.rs:66:53 [INFO] [stdout] | [INFO] [stdout] 66 | fn load>(path: S, root: bool) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: lib/src/error.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | ParsingError { source: RuleError }, [INFO] [stdout] | ---------------------------------- the largest variant contains at least 184 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::Error`, 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] --> lib/src/config.rs:84:10 [INFO] [stdout] | [INFO] [stdout] 84 | ) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: lib/src/error.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | ParsingError { source: RuleError }, [INFO] [stdout] | ---------------------------------- the largest variant contains at least 184 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::Error`, 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: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> lib/src/config.rs:142:25 [INFO] [stdout] | [INFO] [stdout] 142 | / for item in dir_entries { [INFO] [stdout] 143 | | if let Ok(entry) = item { [INFO] [stdout] 144 | | if let Ok(meta) = entry.metadata() { [INFO] [stdout] 145 | | if meta.is_file() [INFO] [stdout] ... | [INFO] [stdout] 161 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> lib/src/config.rs:143:29 [INFO] [stdout] | [INFO] [stdout] 143 | / ... if let Ok(entry) = item { [INFO] [stdout] 144 | | ... if let Ok(meta) = entry.metadata() { [INFO] [stdout] 145 | | ... if meta.is_file() [INFO] [stdout] 146 | | ... && entry.path().extension().is_some_and(|x| x == "conf") [INFO] [stdout] ... | [INFO] [stdout] 160 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 142 ~ for entry in dir_entries.flatten() { [INFO] [stdout] 143 + if let Ok(meta) = entry.metadata() { [INFO] [stdout] 144 + if meta.is_file() [INFO] [stdout] 145 + && entry.path().extension().is_some_and(|x| x == "conf") [INFO] [stdout] 146 + { [INFO] [stdout] 147 + let paths = Rc::clone(&paths_rc); [INFO] [stdout] 148 + if let Err(err) = Self::__patch( [INFO] [stdout] 149 + entry.path(), [INFO] [stdout] 150 + paths, [INFO] [stdout] 151 + fullname.as_str(), [INFO] [stdout] 152 + &mut result, [INFO] [stdout] 153 + root, [INFO] [stdout] 154 + ) { [INFO] [stdout] 155 + log::warn!("Failed to patch unit {}: {})", name, err); [INFO] [stdout] 156 + } [INFO] [stdout] 157 + } [INFO] [stdout] 158 + } [INFO] [stdout] 159 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> lib/src/config.rs:172:52 [INFO] [stdout] | [INFO] [stdout] 172 | fn __parse_section(__source: SectionParser) -> Result>; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: lib/src/error.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | ParsingError { source: RuleError }, [INFO] [stdout] | ---------------------------------- the largest variant contains at least 184 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::Error`, 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] --> lib/src/config.rs:173:71 [INFO] [stdout] | [INFO] [stdout] 173 | fn __patch_section(__source: SectionParser, __from: &mut Self) -> Result<()>; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: lib/src/error.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | ParsingError { source: RuleError }, [INFO] [stdout] | ---------------------------------- the largest variant contains at least 184 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::Error`, 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] --> lib/src/duration.rs:18:6 [INFO] [stdout] | [INFO] [stdout] 18 | ) -> std::result::Result> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 184 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `pest::error::Error`, 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] --> lib/src/parser.rs:31:10 [INFO] [stdout] | [INFO] [stdout] 31 | ) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: lib/src/error.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | ParsingError { source: RuleError }, [INFO] [stdout] | ---------------------------------- the largest variant contains at least 184 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::Error`, 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 call to `as_ref` does nothing [INFO] [stdout] --> lib/src/parser.rs:33:52 [INFO] [stdout] | [INFO] [stdout] 33 | UnitFileParser::parse(Rule::unit_file, input.as_ref()).context(ParsingSnafu {})?; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] = note: `#[warn(clippy::useless_asref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> lib/src/parser.rs:143:13 [INFO] [stdout] | [INFO] [stdout] 143 | return Some(Ok((key, value))); [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] 143 - return Some(Ok((key, value))); [INFO] [stdout] 143 + Some(Ok((key, value))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> lib/src/parser.rs:145:13 [INFO] [stdout] | [INFO] [stdout] 145 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 145 - return None; [INFO] [stdout] 145 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> lib/src/parser.rs:172:17 [INFO] [stdout] | [INFO] [stdout] 172 | / for item in read_res { [INFO] [stdout] 173 | | if let Ok(entry) = item { [INFO] [stdout] 174 | | if let Ok(meta) = entry.metadata() { [INFO] [stdout] 175 | | if meta.is_symlink() { [INFO] [stdout] ... | [INFO] [stdout] 180 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> lib/src/parser.rs:173:21 [INFO] [stdout] | [INFO] [stdout] 173 | / if let Ok(entry) = item { [INFO] [stdout] 174 | | if let Ok(meta) = entry.metadata() { [INFO] [stdout] 175 | | if meta.is_symlink() { [INFO] [stdout] 176 | | result.push(entry.file_name().to_string_lossy().to_string()); [INFO] [stdout] ... | [INFO] [stdout] 179 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 172 ~ for entry in read_res.flatten() { [INFO] [stdout] 173 + if let Ok(meta) = entry.metadata() { [INFO] [stdout] 174 + if meta.is_symlink() { [INFO] [stdout] 175 + result.push(entry.file_name().to_string_lossy().to_string()); [INFO] [stdout] 176 + } [INFO] [stdout] 177 + } [INFO] [stdout] 178 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> lib/src/specifiers.rs:22:43 [INFO] [stdout] | [INFO] [stdout] 22 | static CURRENT_UID: Lazy = Lazy::new(|| Uid::current()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Uid::current` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> lib/src/specifiers.rs:23:43 [INFO] [stdout] | [INFO] [stdout] 23 | static CURRENT_GID: Lazy = Lazy::new(|| Gid::current()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Gid::current` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> lib/src/specifiers.rs:32:6 [INFO] [stdout] | [INFO] [stdout] 32 | ) -> Result<(), Error> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: lib/src/error.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | ParsingError { source: RuleError }, [INFO] [stdout] | ---------------------------------- the largest variant contains at least 184 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::Error`, 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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> lib/src/specifiers.rs:91:17 [INFO] [stdout] | [INFO] [stdout] 91 | result.push_str("0"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('0')` [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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> lib/src/specifiers.rs:103:21 [INFO] [stdout] | [INFO] [stdout] 103 | result.push_str("~"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('~')` [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: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> lib/src/specifiers.rs:124:41 [INFO] [stdout] | [INFO] [stdout] 124 | result.push_str(&escape(instance_name.split('-').last().unwrap())); [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] 124 - result.push_str(&escape(instance_name.split('-').last().unwrap())); [INFO] [stdout] 124 + result.push_str(&escape(instance_name.split('-').next_back().unwrap())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> lib/src/specifiers.rs:127:21 [INFO] [stdout] | [INFO] [stdout] 127 | / filename [INFO] [stdout] 128 | | .split('.') [INFO] [stdout] 129 | | .nth(0) [INFO] [stdout] 130 | | .unwrap() [INFO] [stdout] 131 | | .split('-') [INFO] [stdout] 132 | | .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] help: try [INFO] [stdout] | [INFO] [stdout] 132 - .last() [INFO] [stdout] 132 + .next_back() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> lib/src/specifiers.rs:127:21 [INFO] [stdout] | [INFO] [stdout] 127 | / filename [INFO] [stdout] 128 | | .split('.') [INFO] [stdout] 129 | | .nth(0) [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] help: try calling `.next()` instead of `.nth(0)` [INFO] [stdout] | [INFO] [stdout] 127 ~ filename [INFO] [stdout] 128 + .split('.').next() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> lib/src/specifiers.rs:139:33 [INFO] [stdout] | [INFO] [stdout] 139 | result.push_str(instance_name.split('-').last().unwrap()); [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] 139 - result.push_str(instance_name.split('-').last().unwrap()); [INFO] [stdout] 139 + result.push_str(instance_name.split('-').next_back().unwrap()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> lib/src/specifiers.rs:142:21 [INFO] [stdout] | [INFO] [stdout] 142 | / filename [INFO] [stdout] 143 | | .split('.') [INFO] [stdout] 144 | | .nth(0) [INFO] [stdout] 145 | | .unwrap() [INFO] [stdout] 146 | | .split('-') [INFO] [stdout] 147 | | .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] help: try [INFO] [stdout] | [INFO] [stdout] 147 - .last() [INFO] [stdout] 147 + .next_back() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> lib/src/specifiers.rs:142:21 [INFO] [stdout] | [INFO] [stdout] 142 | / filename [INFO] [stdout] 143 | | .split('.') [INFO] [stdout] 144 | | .nth(0) [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] help: try calling `.next()` instead of `.nth(0)` [INFO] [stdout] | [INFO] [stdout] 142 ~ filename [INFO] [stdout] 143 + .split('.').next() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> lib/src/specifiers.rs:153:13 [INFO] [stdout] | [INFO] [stdout] 153 | / UTS_NAME [INFO] [stdout] 154 | | .nodename() [INFO] [stdout] 155 | | .to_string_lossy() [INFO] [stdout] 156 | | .split('.') [INFO] [stdout] 157 | | .nth(0) [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] help: try calling `.next()` instead of `.nth(0)` [INFO] [stdout] | [INFO] [stdout] 153 ~ UTS_NAME [INFO] [stdout] 154 + .nodename() [INFO] [stdout] 155 + .to_string_lossy() [INFO] [stdout] 156 + .split('.').next() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> lib/src/specifiers.rs:175:33 [INFO] [stdout] | [INFO] [stdout] 175 | result.push_str(&res) [INFO] [stdout] | ^^^^ help: change this to: `res` [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: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> lib/src/specifiers.rs:179:40 [INFO] [stdout] | [INFO] [stdout] 179 | 'N' => result.push_str(&escape(filename.split(".").nth(0).unwrap())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `filename.split(".").next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> lib/src/specifiers.rs:185:41 [INFO] [stdout] | [INFO] [stdout] 185 | result.push_str(&escape(filename.split('.').nth(0).unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `filename.split('.').next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> lib/src/specifiers.rs:192:33 [INFO] [stdout] | [INFO] [stdout] 192 | result.push_str(filename.split('.').nth(0).unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `filename.split('.').next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> lib/src/specifiers.rs:196:13 [INFO] [stdout] | [INFO] [stdout] 196 | / UTS_NAME [INFO] [stdout] 197 | | .nodename() [INFO] [stdout] 198 | | .to_string_lossy() [INFO] [stdout] 199 | | .split('.') [INFO] [stdout] 200 | | .nth(0) [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] help: try calling `.next()` instead of `.nth(0)` [INFO] [stdout] | [INFO] [stdout] 196 ~ UTS_NAME [INFO] [stdout] 197 + .nodename() [INFO] [stdout] 198 + .to_string_lossy() [INFO] [stdout] 199 + .split('.').next() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> lib/src/specifiers.rs:267:33 [INFO] [stdout] | [INFO] [stdout] 267 | result.push_str(&res); [INFO] [stdout] | ^^^^ help: change this to: `res` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> lib/src/specifiers.rs:272:33 [INFO] [stdout] | [INFO] [stdout] 272 | result.push_str(&res) [INFO] [stdout] | ^^^^ help: change this to: `res` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> lib/src/specifiers.rs:277:33 [INFO] [stdout] | [INFO] [stdout] 277 | result.push_str(&res) [INFO] [stdout] | ^^^^ help: change this to: `res` [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: the `Err`-variant returned from this function is very large [INFO] [stdout] --> lib/src/template.rs:9:51 [INFO] [stdout] | [INFO] [stdout] 9 | pub(crate) fn unit_type<'a>(filename: &'a str) -> Result> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: lib/src/error.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | ParsingError { source: RuleError }, [INFO] [stdout] | ---------------------------------- the largest variant contains at least 184 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `error::Error`, 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: accessing first element with `split.get(0)` [INFO] [stdout] --> lib/src/template.rs:15:39 [INFO] [stdout] | [INFO] [stdout] 15 | Ok(UnitType::Template(split.get(0).unwrap())) [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `split.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> lib/src/template.rs:18:37 [INFO] [stdout] | [INFO] [stdout] 18 | let template_name = sub_split.nth(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `sub_split.next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> lib/src/template.rs:19:30 [INFO] [stdout] | [INFO] [stdout] 19 | let suffix = sub_split.last().unwrap(); [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] 19 - let suffix = sub_split.last().unwrap(); [INFO] [stdout] 19 + let suffix = sub_split.next_back().unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `split.get(0)` [INFO] [stdout] --> lib/src/template.rs:21:21 [INFO] [stdout] | [INFO] [stdout] 21 | split.get(0).unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `split.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> lib/src/duration.rs:18:6 [INFO] [stdout] | [INFO] [stdout] 18 | ) -> std::result::Result> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 184 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `pest::error::Error`, 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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 24.40s [INFO] running `Command { std: "docker" "inspect" "a566aee164c3c67f8cdd7ece218a0f4261b07237181360362ed54d49cc5d1cde", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a566aee164c3c67f8cdd7ece218a0f4261b07237181360362ed54d49cc5d1cde", kill_on_drop: false }` [INFO] [stdout] a566aee164c3c67f8cdd7ece218a0f4261b07237181360362ed54d49cc5d1cde