[INFO] fetching crate mercust-spec-reader 0.0.1... [INFO] linting mercust-spec-reader-0.0.1 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate mercust-spec-reader 0.0.1 into /workspace/builds/worker-1-tc1/source [INFO] started tweaking crates.io crate mercust-spec-reader 0.0.1 [INFO] finished tweaking crates.io crate mercust-spec-reader 0.0.1 [INFO] tweaked toml for crates.io crate mercust-spec-reader 0.0.1 written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate mercust-spec-reader 0.0.1 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Locking 24 packages to latest compatible versions [INFO] [stderr] Adding mercust v0.0.0 (available: v0.0.1) [INFO] [stderr] Adding phf v0.11.3 (available: v0.13.1) [INFO] [stderr] Adding roxmltree v0.18.1 (available: v0.21.1) [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded xmlparser v0.13.6 [INFO] [stderr] Downloaded roxmltree v0.18.1 [INFO] [stderr] Downloaded mercust v0.0.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 474b27c73b8cbb8bffdaf207977ad5b5dea7412bb7867417b5de010801f6fb8e [INFO] running `Command { std: "docker" "start" "-a" "474b27c73b8cbb8bffdaf207977ad5b5dea7412bb7867417b5de010801f6fb8e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "474b27c73b8cbb8bffdaf207977ad5b5dea7412bb7867417b5de010801f6fb8e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "474b27c73b8cbb8bffdaf207977ad5b5dea7412bb7867417b5de010801f6fb8e", kill_on_drop: false }` [INFO] [stdout] 474b27c73b8cbb8bffdaf207977ad5b5dea7412bb7867417b5de010801f6fb8e [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] 8c909dbc61e187f0b427e2c01d87d38069365cb9c831533506987ce13070ae71 [INFO] running `Command { std: "docker" "start" "-a" "8c909dbc61e187f0b427e2c01d87d38069365cb9c831533506987ce13070ae71", kill_on_drop: false }` [INFO] [stderr] Compiling serde_core v1.0.228 [INFO] [stderr] Compiling rand_core v0.6.4 [INFO] [stderr] Compiling siphasher v1.0.2 [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Checking regex-syntax v0.8.10 [INFO] [stderr] Checking xmlparser v0.13.6 [INFO] [stderr] Checking maplit v1.0.2 [INFO] [stderr] Checking aho-corasick v1.1.4 [INFO] [stderr] Compiling syn v2.0.117 [INFO] [stderr] Compiling rand v0.8.5 [INFO] [stderr] Checking phf_shared v0.11.3 [INFO] [stderr] Checking roxmltree v0.18.1 [INFO] [stderr] Compiling phf_generator v0.11.3 [INFO] [stderr] Checking regex-automata v0.4.14 [INFO] [stderr] Checking regex v1.12.3 [INFO] [stderr] Compiling phf_macros v0.11.3 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Checking phf v0.11.3 [INFO] [stderr] Checking mercust v0.0.0 [INFO] [stderr] Checking mercust-spec-reader v0.0.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: derefed type is same as origin [INFO] [stdout] --> src/manifest.rs:46:26 [INFO] [stdout] | [INFO] [stdout] 46 | let string = string.as_deref().ok_or(())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `string` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_option_as_deref [INFO] [stdout] = note: `#[warn(clippy::needless_option_as_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: derefed type is same as origin [INFO] [stdout] --> src/manifest.rs:61:26 [INFO] [stdout] | [INFO] [stdout] 61 | let string = string.as_deref().ok_or(())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `string` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_option_as_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: derefed type is same as origin [INFO] [stdout] --> src/manifest.rs:70:26 [INFO] [stdout] | [INFO] [stdout] 70 | let string = string.as_deref().ok_or(())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `string` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_option_as_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/manifest.rs:123:20 [INFO] [stdout] | [INFO] [stdout] 123 | if string.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `string.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/manifest.rs:146:51 [INFO] [stdout] | [INFO] [stdout] 146 | if n_child_elements(element) != 0 || (element.text().unwrap_or("").trim().len() != 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!element.text().unwrap_or("").trim().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/manifest.rs:152:51 [INFO] [stdout] | [INFO] [stdout] 152 | if n_child_elements(element) != 0 || (element.text().unwrap_or("").trim().len() != 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!element.text().unwrap_or("").trim().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/manifest.rs:158:51 [INFO] [stdout] | [INFO] [stdout] 158 | if n_child_elements(element) != 0 || (element.text().unwrap_or("").trim().len() != 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!element.text().unwrap_or("").trim().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/manifest.rs:164:51 [INFO] [stdout] | [INFO] [stdout] 164 | if n_child_elements(element) != 0 || (element.text().unwrap_or("").trim().len() != 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!element.text().unwrap_or("").trim().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/manifest.rs:276:1 [INFO] [stdout] | [INFO] [stdout] 276 | pub fn manifest_element_from_spec_xml(spec_xml: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] = note: `#[warn(clippy::result_unit_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/filter.rs:144:1 [INFO] [stdout] | [INFO] [stdout] 144 | pub fn filter_element_from_spec_xml(spec_xml: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/filter.rs:163:46 [INFO] [stdout] | [INFO] [stdout] 163 | if n_child_elements(element) != 0 || element.text().unwrap_or("").trim().len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!element.text().unwrap_or("").trim().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: derefed type is same as origin [INFO] [stdout] --> src/filter.rs:224:26 [INFO] [stdout] | [INFO] [stdout] 224 | let string = string.as_deref().ok_or(())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `string` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_option_as_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: derefed type is same as origin [INFO] [stdout] --> src/filter.rs:240:26 [INFO] [stdout] | [INFO] [stdout] 240 | let string = string.as_deref().ok_or(())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `string` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_option_as_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: derefed type is same as origin [INFO] [stdout] --> src/filter.rs:249:26 [INFO] [stdout] | [INFO] [stdout] 249 | let string = string.as_deref().ok_or(())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `string` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_option_as_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/filter.rs:302:20 [INFO] [stdout] | [INFO] [stdout] 302 | if string.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `string.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/filter.rs:325:51 [INFO] [stdout] | [INFO] [stdout] 325 | if n_child_elements(element) != 0 || (element.text().unwrap_or("").trim().len() != 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!element.text().unwrap_or("").trim().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/filter.rs:331:51 [INFO] [stdout] | [INFO] [stdout] 331 | if n_child_elements(element) != 0 || (element.text().unwrap_or("").trim().len() != 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!element.text().unwrap_or("").trim().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/filter.rs:337:51 [INFO] [stdout] | [INFO] [stdout] 337 | if n_child_elements(element) != 0 || (element.text().unwrap_or("").trim().len() != 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!element.text().unwrap_or("").trim().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/filter.rs:343:51 [INFO] [stdout] | [INFO] [stdout] 343 | if n_child_elements(element) != 0 || (element.text().unwrap_or("").trim().len() != 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!element.text().unwrap_or("").trim().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/filter.rs:362:33 [INFO] [stdout] | [INFO] [stdout] 362 | if n_child_elements(&element) != 0 { [INFO] [stdout] | ^^^^^^^^ help: change this to: `element` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tags.rs:32:81 [INFO] [stdout] | [INFO] [stdout] 32 | let cleaned_str: String = s.chars().filter(|ch| !IGNORE_CHARACTERS.contains(&ch)).collect(); [INFO] [stdout] | ^^^ help: change this to: `ch` [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: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/tags.rs:166:9 [INFO] [stdout] | [INFO] [stdout] 166 | Ok(current.ok_or(())?) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 166 - Ok(current.ok_or(())?) [INFO] [stdout] 166 + current.ok_or(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/tags.rs:89:66 [INFO] [stdout] | [INFO] [stdout] 89 | current = Some(NamespaceOperator(current.map(|x| Box::new(x)))); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Box::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/tags.rs:92:70 [INFO] [stdout] | [INFO] [stdout] 92 | current = Some(ConcatenationOperator(current.map(|x| Box::new(x)))); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Box::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/tags.rs:95:93 [INFO] [stdout] | [INFO] [stdout] 95 | current = Some(ComponentName { name: name.to_owned(), next: current.map(|x| Box::new(x)) }) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Box::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/tags.rs:125:33 [INFO] [stdout] | [INFO] [stdout] 125 | / ... if depth == 1 { [INFO] [stdout] 126 | | ... // end of current child [INFO] [stdout] 127 | | ... current_item_tokens.pop(); [INFO] [stdout] 128 | | ... current_item_tokens.reverse(); [INFO] [stdout] 129 | | ... collection_items_tokens.push(current_item_tokens); [INFO] [stdout] 130 | | ... current_item_tokens = Vec::new(); [INFO] [stdout] 131 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 124 ~ Token::ParallelSeparator [INFO] [stdout] 125 ~ if depth == 1 => { [INFO] [stdout] 126 | // end of current child [INFO] [stdout] ... [INFO] [stdout] 130 | current_item_tokens = Vec::new(); [INFO] [stdout] 131 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/tags.rs:156:30 [INFO] [stdout] | [INFO] [stdout] 156 | .map(|tokens| parse_tokens(tokens)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_tokens` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/tags.rs:197:37 [INFO] [stdout] | [INFO] [stdout] 197 | children.iter().all(|x| check_validity(x)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `check_validity` [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: derefed type is same as origin [INFO] [stdout] --> src/manifest.rs:46:26 [INFO] [stdout] | [INFO] [stdout] 46 | let string = string.as_deref().ok_or(())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `string` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_option_as_deref [INFO] [stdout] = note: `#[warn(clippy::needless_option_as_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: derefed type is same as origin [INFO] [stdout] --> src/manifest.rs:61:26 [INFO] [stdout] | [INFO] [stdout] 61 | let string = string.as_deref().ok_or(())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `string` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_option_as_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: derefed type is same as origin [INFO] [stdout] --> src/manifest.rs:70:26 [INFO] [stdout] | [INFO] [stdout] 70 | let string = string.as_deref().ok_or(())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `string` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_option_as_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/manifest.rs:123:20 [INFO] [stdout] | [INFO] [stdout] 123 | if string.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `string.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/manifest.rs:146:51 [INFO] [stdout] | [INFO] [stdout] 146 | if n_child_elements(element) != 0 || (element.text().unwrap_or("").trim().len() != 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!element.text().unwrap_or("").trim().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/manifest.rs:152:51 [INFO] [stdout] | [INFO] [stdout] 152 | if n_child_elements(element) != 0 || (element.text().unwrap_or("").trim().len() != 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!element.text().unwrap_or("").trim().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/manifest.rs:158:51 [INFO] [stdout] | [INFO] [stdout] 158 | if n_child_elements(element) != 0 || (element.text().unwrap_or("").trim().len() != 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!element.text().unwrap_or("").trim().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/manifest.rs:164:51 [INFO] [stdout] | [INFO] [stdout] 164 | if n_child_elements(element) != 0 || (element.text().unwrap_or("").trim().len() != 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!element.text().unwrap_or("").trim().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/manifest.rs:276:1 [INFO] [stdout] | [INFO] [stdout] 276 | pub fn manifest_element_from_spec_xml(spec_xml: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] = note: `#[warn(clippy::result_unit_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/filter.rs:144:1 [INFO] [stdout] | [INFO] [stdout] 144 | pub fn filter_element_from_spec_xml(spec_xml: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/filter.rs:163:46 [INFO] [stdout] | [INFO] [stdout] 163 | if n_child_elements(element) != 0 || element.text().unwrap_or("").trim().len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!element.text().unwrap_or("").trim().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: derefed type is same as origin [INFO] [stdout] --> src/filter.rs:224:26 [INFO] [stdout] | [INFO] [stdout] 224 | let string = string.as_deref().ok_or(())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `string` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_option_as_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: derefed type is same as origin [INFO] [stdout] --> src/filter.rs:240:26 [INFO] [stdout] | [INFO] [stdout] 240 | let string = string.as_deref().ok_or(())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `string` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_option_as_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: derefed type is same as origin [INFO] [stdout] --> src/filter.rs:249:26 [INFO] [stdout] | [INFO] [stdout] 249 | let string = string.as_deref().ok_or(())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `string` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_option_as_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/filter.rs:302:20 [INFO] [stdout] | [INFO] [stdout] 302 | if string.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `string.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/filter.rs:325:51 [INFO] [stdout] | [INFO] [stdout] 325 | if n_child_elements(element) != 0 || (element.text().unwrap_or("").trim().len() != 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!element.text().unwrap_or("").trim().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/filter.rs:331:51 [INFO] [stdout] | [INFO] [stdout] 331 | if n_child_elements(element) != 0 || (element.text().unwrap_or("").trim().len() != 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!element.text().unwrap_or("").trim().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/filter.rs:337:51 [INFO] [stdout] | [INFO] [stdout] 337 | if n_child_elements(element) != 0 || (element.text().unwrap_or("").trim().len() != 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!element.text().unwrap_or("").trim().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/filter.rs:343:51 [INFO] [stdout] | [INFO] [stdout] 343 | if n_child_elements(element) != 0 || (element.text().unwrap_or("").trim().len() != 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!element.text().unwrap_or("").trim().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/filter.rs:362:33 [INFO] [stdout] | [INFO] [stdout] 362 | if n_child_elements(&element) != 0 { [INFO] [stdout] | ^^^^^^^^ help: change this to: `element` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tags.rs:32:81 [INFO] [stdout] | [INFO] [stdout] 32 | let cleaned_str: String = s.chars().filter(|ch| !IGNORE_CHARACTERS.contains(&ch)).collect(); [INFO] [stdout] | ^^^ help: change this to: `ch` [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: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/tags.rs:166:9 [INFO] [stdout] | [INFO] [stdout] 166 | Ok(current.ok_or(())?) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 166 - Ok(current.ok_or(())?) [INFO] [stdout] 166 + current.ok_or(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/tags.rs:89:66 [INFO] [stdout] | [INFO] [stdout] 89 | current = Some(NamespaceOperator(current.map(|x| Box::new(x)))); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Box::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/tags.rs:92:70 [INFO] [stdout] | [INFO] [stdout] 92 | current = Some(ConcatenationOperator(current.map(|x| Box::new(x)))); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Box::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/tags.rs:95:93 [INFO] [stdout] | [INFO] [stdout] 95 | current = Some(ComponentName { name: name.to_owned(), next: current.map(|x| Box::new(x)) }) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Box::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/tags.rs:125:33 [INFO] [stdout] | [INFO] [stdout] 125 | / ... if depth == 1 { [INFO] [stdout] 126 | | ... // end of current child [INFO] [stdout] 127 | | ... current_item_tokens.pop(); [INFO] [stdout] 128 | | ... current_item_tokens.reverse(); [INFO] [stdout] 129 | | ... collection_items_tokens.push(current_item_tokens); [INFO] [stdout] 130 | | ... current_item_tokens = Vec::new(); [INFO] [stdout] 131 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 124 ~ Token::ParallelSeparator [INFO] [stdout] 125 ~ if depth == 1 => { [INFO] [stdout] 126 | // end of current child [INFO] [stdout] ... [INFO] [stdout] 130 | current_item_tokens = Vec::new(); [INFO] [stdout] 131 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/tags.rs:156:30 [INFO] [stdout] | [INFO] [stdout] 156 | .map(|tokens| parse_tokens(tokens)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_tokens` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/tags.rs:197:37 [INFO] [stdout] | [INFO] [stdout] 197 | children.iter().all(|x| check_validity(x)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `check_validity` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/tags.rs:360:21 [INFO] [stdout] | [INFO] [stdout] 360 | assert!(!_tag_token_tree_from_spec_str("cloud-deployed::cloud-deployed").is_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `_tag_token_tree_from_spec_str("cloud-deployed::cloud-deployed").is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/tags.rs:365:21 [INFO] [stdout] | [INFO] [stdout] 365 | assert!(!_tag_token_tree_from_spec_str("{cloud-deployed, locally-deployed}").is_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `_tag_token_tree_from_spec_str("{cloud-deployed, locally-deployed}").is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 14.48s [INFO] running `Command { std: "docker" "inspect" "8c909dbc61e187f0b427e2c01d87d38069365cb9c831533506987ce13070ae71", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8c909dbc61e187f0b427e2c01d87d38069365cb9c831533506987ce13070ae71", kill_on_drop: false }` [INFO] [stdout] 8c909dbc61e187f0b427e2c01d87d38069365cb9c831533506987ce13070ae71