[INFO] fetching crate rustylink 2.0.0... [INFO] linting rustylink-2.0.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate rustylink 2.0.0 into /workspace/builds/worker-3-tc1/source [INFO] started tweaking crates.io crate rustylink 2.0.0 [INFO] removed 0 missing examples [INFO] removed 0 missing tests [INFO] finished tweaking crates.io crate rustylink 2.0.0 [INFO] tweaked toml for crates.io crate rustylink 2.0.0 written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate rustylink 2.0.0 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate rustylink 2.0.0 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] Downloading crates ... [INFO] [stderr] Downloaded emath v0.33.2 [INFO] [stderr] Downloaded utf8-width v0.1.7 [INFO] [stderr] Downloaded ecolor v0.33.2 [INFO] [stderr] Downloaded gethostname v1.0.2 [INFO] [stderr] Downloaded egui_glow v0.33.2 [INFO] [stderr] Downloaded clap_derive v4.5.47 [INFO] [stderr] Downloaded half v2.7.0 [INFO] [stderr] Downloaded clap v4.5.48 [INFO] [stderr] Downloaded eframe v0.33.2 [INFO] [stderr] Downloaded epaint v0.33.2 [INFO] [stderr] Downloaded quick-xml v0.38.3 [INFO] [stderr] Downloaded toml_edit v0.23.7 [INFO] [stderr] Downloaded clap_builder v4.5.48 [INFO] [stderr] Downloaded moxcms v0.7.6 [INFO] [stderr] Downloaded wayland-protocols-plasma v0.3.9 [INFO] [stderr] Downloaded egui-wgpu v0.33.2 [INFO] [stderr] Downloaded egui-winit v0.33.2 [INFO] [stderr] Downloaded image v0.25.8 [INFO] [stderr] Downloaded egui v0.33.2 [INFO] [stderr] Downloaded syntect v4.6.0 [INFO] [stderr] Downloaded epaint_default_fonts v0.33.2 [INFO] [stderr] Downloaded pxfm v0.1.25 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 09414805e583de173d37e13fb6cc42aa8efe65f6e363e7d1635ed0c0d2b31280 [INFO] running `Command { std: "docker" "start" "-a" "09414805e583de173d37e13fb6cc42aa8efe65f6e363e7d1635ed0c0d2b31280", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "09414805e583de173d37e13fb6cc42aa8efe65f6e363e7d1635ed0c0d2b31280", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "09414805e583de173d37e13fb6cc42aa8efe65f6e363e7d1635ed0c0d2b31280", kill_on_drop: false }` [INFO] [stdout] 09414805e583de173d37e13fb6cc42aa8efe65f6e363e7d1635ed0c0d2b31280 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 00c9ab8164f399627f1eeaeed1834b0f03c5bbabad355a4de1398a67f79c18a9 [INFO] running `Command { std: "docker" "start" "-a" "00c9ab8164f399627f1eeaeed1834b0f03c5bbabad355a4de1398a67f79c18a9", kill_on_drop: false }` [INFO] [stderr] Compiling camino v1.2.1 [INFO] [stderr] Compiling libc v0.2.177 [INFO] [stderr] Checking clap_lex v0.7.5 [INFO] [stderr] Checking anstream v0.6.21 [INFO] [stderr] Checking crc32fast v1.5.0 [INFO] [stderr] Compiling serde_json v1.0.145 [INFO] [stderr] Checking utf8-width v0.1.7 [INFO] [stderr] Compiling syn v2.0.106 [INFO] [stderr] Compiling rustix v1.1.2 [INFO] [stderr] Checking indexmap v2.11.4 [INFO] [stderr] Checking quick-xml v0.38.3 [INFO] [stderr] Checking bitflags v2.9.4 [INFO] [stderr] Checking roxmltree v0.20.0 [INFO] [stderr] Checking html-escape v0.2.13 [INFO] [stderr] Checking flate2 v1.1.4 [INFO] [stderr] Checking clap_builder v4.5.48 [INFO] [stderr] Checking zip v0.6.6 [INFO] [stderr] Checking getrandom v0.3.3 [INFO] [stderr] Checking tempfile v3.23.0 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling clap_derive v4.5.47 [INFO] [stderr] Checking clap v4.5.48 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking bincode v2.0.1 [INFO] [stderr] Checking rustylink v2.0.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block.rs:161:21 [INFO] [stdout] | [INFO] [stdout] 161 | / if to.has_tag_name("Option") { [INFO] [stdout] 162 | | if let Some(t) = to.text() { [INFO] [stdout] 163 | | type_options.push(t.to_string()); [INFO] [stdout] 164 | | } [INFO] [stdout] 165 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 161 ~ if to.has_tag_name("Option") [INFO] [stdout] 162 ~ && let Some(t) = to.text() { [INFO] [stdout] 163 | type_options.push(t.to_string()); [INFO] [stdout] 164 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/block.rs:452:29 [INFO] [stdout] | [INFO] [stdout] 452 | / ... if value == "MATLAB Function" { [INFO] [stdout] 453 | | ... is_matlab_function = true; [INFO] [stdout] 454 | | ... } [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] 451 ~ "SFBlockType" [INFO] [stdout] 452 ~ if value == "MATLAB Function" => { [INFO] [stdout] 453 | is_matlab_function = true; [INFO] [stdout] 454 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/label_place.rs:205:43 [INFO] [stdout] | [INFO] [stdout] 205 | let off_x = base_off_x * (1 + k as i32) as f32; [INFO] [stdout] | ^^^^^^^^ help: try: `k` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/label_place.rs:206:43 [INFO] [stdout] | [INFO] [stdout] 206 | let off_y = base_off_y * (1 + k as i32) as f32; [INFO] [stdout] | ^^^^^^^^ help: try: `k` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block.rs:161:21 [INFO] [stdout] | [INFO] [stdout] 161 | / if to.has_tag_name("Option") { [INFO] [stdout] 162 | | if let Some(t) = to.text() { [INFO] [stdout] 163 | | type_options.push(t.to_string()); [INFO] [stdout] 164 | | } [INFO] [stdout] 165 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 161 ~ if to.has_tag_name("Option") [INFO] [stdout] 162 ~ && let Some(t) = to.text() { [INFO] [stdout] 163 | type_options.push(t.to_string()); [INFO] [stdout] 164 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/block.rs:452:29 [INFO] [stdout] | [INFO] [stdout] 452 | / ... if value == "MATLAB Function" { [INFO] [stdout] 453 | | ... is_matlab_function = true; [INFO] [stdout] 454 | | ... } [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] 451 ~ "SFBlockType" [INFO] [stdout] 452 ~ if value == "MATLAB Function" => { [INFO] [stdout] 453 | is_matlab_function = true; [INFO] [stdout] 454 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/model.rs:237:1 [INFO] [stdout] | [INFO] [stdout] 237 | / impl Default for NameLocation { [INFO] [stdout] 238 | | fn default() -> Self { [INFO] [stdout] 239 | | NameLocation::Bottom [INFO] [stdout] 240 | | } [INFO] [stdout] 241 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 230 + #[derive(Default)] [INFO] [stdout] 231 | pub enum NameLocation { [INFO] [stdout] 232 | Top, [INFO] [stdout] 233 ~ #[default] [INFO] [stdout] 234 ~ Bottom, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/label_place.rs:205:43 [INFO] [stdout] | [INFO] [stdout] 205 | let off_x = base_off_x * (1 + k as i32) as f32; [INFO] [stdout] | ^^^^^^^^ help: try: `k` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/label_place.rs:206:43 [INFO] [stdout] | [INFO] [stdout] 206 | let off_y = base_off_y * (1 + k as i32) as f32; [INFO] [stdout] | ^^^^^^^^ help: try: `k` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/model.rs:237:1 [INFO] [stdout] | [INFO] [stdout] 237 | / impl Default for NameLocation { [INFO] [stdout] 238 | | fn default() -> Self { [INFO] [stdout] 239 | | NameLocation::Bottom [INFO] [stdout] 240 | | } [INFO] [stdout] 241 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 230 + #[derive(Default)] [INFO] [stdout] 231 | pub enum NameLocation { [INFO] [stdout] 232 | Top, [INFO] [stdout] 233 ~ #[default] [INFO] [stdout] 234 ~ Bottom, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/model.rs:440:1 [INFO] [stdout] | [INFO] [stdout] 440 | / impl Default for ValueKind { [INFO] [stdout] 441 | | fn default() -> Self { [INFO] [stdout] 442 | | ValueKind::Unknown [INFO] [stdout] 443 | | } [INFO] [stdout] 444 | | } [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 and mark the default variant [INFO] [stdout] | [INFO] [stdout] 433 + #[derive(Default)] [INFO] [stdout] 434 | pub enum ValueKind { [INFO] [stdout] 435 ~ #[default] [INFO] [stdout] 436 ~ Unknown, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/model.rs:522:1 [INFO] [stdout] | [INFO] [stdout] 522 | / pub enum SlxContent { [INFO] [stdout] 523 | | /// Raw bytes for files that are preserved verbatim. [INFO] [stdout] 524 | | Raw(Vec), [INFO] [stdout] | | ------------ the second-largest variant contains at least 24 bytes [INFO] [stdout] 525 | | /// A parsed system XML file that will be regenerated from the [`System`] model. [INFO] [stdout] 526 | | SystemXml(System), [INFO] [stdout] | | ----------------- the largest variant contains at least 296 bytes [INFO] [stdout] 527 | | } [INFO] [stdout] | |_^ the entire enum is at least 296 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 526 - SystemXml(System), [INFO] [stdout] 526 + SystemXml(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/chart.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | / if let Some(eml) = st [INFO] [stdout] 49 | | .children() [INFO] [stdout] 50 | | .find(|c| c.is_element() && c.has_tag_name("eml")) [INFO] [stdout] ... | [INFO] [stdout] 62 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 50 ~ .find(|c| c.is_element() && c.has_tag_name("eml")) [INFO] [stdout] 51 ~ && let Some(scr) = eml [INFO] [stdout] 52 | .children() [INFO] [stdout] ... [INFO] [stdout] 59 | break; [INFO] [stdout] 60 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/chart.rs:142:33 [INFO] [stdout] | [INFO] [stdout] 142 | / ... if pp.has_tag_name("P") { [INFO] [stdout] 143 | | ... if let Some(nm) = pp.attribute("Name") { [INFO] [stdout] 144 | | ... let val = pp.text().unwrap_or("").to_string(); [INFO] [stdout] 145 | | ... match nm { [INFO] [stdout] ... | [INFO] [stdout] 151 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 142 ~ if pp.has_tag_name("P") [INFO] [stdout] 143 ~ && let Some(nm) = pp.attribute("Name") { [INFO] [stdout] 144 | let val = pp.text().unwrap_or("").to_string(); [INFO] [stdout] ... [INFO] [stdout] 149 | } [INFO] [stdout] 150 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/helpers.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | / if let (Some(x), Some(y)) = (it.next(), it.next()) { [INFO] [stdout] 22 | | if let (Ok(xv), Ok(yv)) = (x.parse::(), y.parse::()) { [INFO] [stdout] 23 | | points.push(Point { x: xv, y: yv }); [INFO] [stdout] 24 | | } [INFO] [stdout] 25 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 21 ~ if let (Some(x), Some(y)) = (it.next(), it.next()) [INFO] [stdout] 22 ~ && let (Ok(xv), Ok(yv)) = (x.parse::(), y.parse::()) { [INFO] [stdout] 23 | points.push(Point { x: xv, y: yv }); [INFO] [stdout] 24 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parser/helpers.rs:51:8 [INFO] [stdout] | [INFO] [stdout] 51 | if !candidate.extension().is_some_and(|e| e == "xml") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `candidate.extension().is_none_or(|e| e != "xml")` [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: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/parser/source.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | / Ok(std::fs::read_to_string(path.as_str()) [INFO] [stdout] 38 | | .with_context(|| format!("Failed to read {}", path))?) [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] 37 ~ std::fs::read_to_string(path.as_str()) [INFO] [stdout] 38 ~ .with_context(|| format!("Failed to read {}", path)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/mod.rs:127:13 [INFO] [stdout] | [INFO] [stdout] 127 | / if let Some(source_block) = block.properties.get("SourceBlock").cloned() { [INFO] [stdout] 128 | | if let Some((lib_name, block_path)) = source_block.split_once('/') { [INFO] [stdout] 129 | | let lib_name = lib_name.trim(); [INFO] [stdout] 130 | | let block_path = block_path.trim(); [INFO] [stdout] ... | [INFO] [stdout] 169 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 127 ~ if let Some(source_block) = block.properties.get("SourceBlock").cloned() [INFO] [stdout] 128 ~ && let Some((lib_name, block_path)) = source_block.split_once('/') { [INFO] [stdout] 129 | let lib_name = lib_name.trim(); [INFO] [stdout] ... [INFO] [stdout] 167 | } [INFO] [stdout] 168 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/mod.rs:199:13 [INFO] [stdout] | [INFO] [stdout] 199 | / if anc.file_name() == Some("systems") { [INFO] [stdout] 200 | | if let Some(parent) = anc.parent() { [INFO] [stdout] 201 | | if parent.file_name() == Some("simulink") { [INFO] [stdout] 202 | | found_root = Some(parent.to_path_buf()); [INFO] [stdout] ... | [INFO] [stdout] 206 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 199 ~ if anc.file_name() == Some("systems") [INFO] [stdout] 200 ~ && let Some(parent) = anc.parent() { [INFO] [stdout] 201 | if parent.file_name() == Some("simulink") { [INFO] [stdout] ... [INFO] [stdout] 204 | } [INFO] [stdout] 205 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/mod.rs:200:17 [INFO] [stdout] | [INFO] [stdout] 200 | / if let Some(parent) = anc.parent() { [INFO] [stdout] 201 | | if parent.file_name() == Some("simulink") { [INFO] [stdout] 202 | | found_root = Some(parent.to_path_buf()); [INFO] [stdout] 203 | | break; [INFO] [stdout] 204 | | } [INFO] [stdout] 205 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 200 ~ if let Some(parent) = anc.parent() [INFO] [stdout] 201 ~ && parent.file_name() == Some("simulink") { [INFO] [stdout] 202 | found_root = Some(parent.to_path_buf()); [INFO] [stdout] 203 | break; [INFO] [stdout] 204 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/mod.rs:255:13 [INFO] [stdout] | [INFO] [stdout] 255 | / if anc.file_name() == Some("systems") { [INFO] [stdout] 256 | | if let Some(parent) = anc.parent() { [INFO] [stdout] 257 | | if parent.file_name() == Some("simulink") { [INFO] [stdout] 258 | | found_root = Some(parent.to_path_buf()); [INFO] [stdout] ... | [INFO] [stdout] 262 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 255 ~ if anc.file_name() == Some("systems") [INFO] [stdout] 256 ~ && let Some(parent) = anc.parent() { [INFO] [stdout] 257 | if parent.file_name() == Some("simulink") { [INFO] [stdout] ... [INFO] [stdout] 260 | } [INFO] [stdout] 261 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/mod.rs:256:17 [INFO] [stdout] | [INFO] [stdout] 256 | / if let Some(parent) = anc.parent() { [INFO] [stdout] 257 | | if parent.file_name() == Some("simulink") { [INFO] [stdout] 258 | | found_root = Some(parent.to_path_buf()); [INFO] [stdout] 259 | | break; [INFO] [stdout] 260 | | } [INFO] [stdout] 261 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 256 ~ if let Some(parent) = anc.parent() [INFO] [stdout] 257 ~ && parent.file_name() == Some("simulink") { [INFO] [stdout] 258 | found_root = Some(parent.to_path_buf()); [INFO] [stdout] 259 | break; [INFO] [stdout] 260 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/model.rs:440:1 [INFO] [stdout] | [INFO] [stdout] 440 | / impl Default for ValueKind { [INFO] [stdout] 441 | | fn default() -> Self { [INFO] [stdout] 442 | | ValueKind::Unknown [INFO] [stdout] 443 | | } [INFO] [stdout] 444 | | } [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 and mark the default variant [INFO] [stdout] | [INFO] [stdout] 433 + #[derive(Default)] [INFO] [stdout] 434 | pub enum ValueKind { [INFO] [stdout] 435 ~ #[default] [INFO] [stdout] 436 ~ Unknown, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/model.rs:522:1 [INFO] [stdout] | [INFO] [stdout] 522 | / pub enum SlxContent { [INFO] [stdout] 523 | | /// Raw bytes for files that are preserved verbatim. [INFO] [stdout] 524 | | Raw(Vec), [INFO] [stdout] | | ------------ the second-largest variant contains at least 24 bytes [INFO] [stdout] 525 | | /// A parsed system XML file that will be regenerated from the [`System`] model. [INFO] [stdout] 526 | | SystemXml(System), [INFO] [stdout] | | ----------------- the largest variant contains at least 296 bytes [INFO] [stdout] 527 | | } [INFO] [stdout] | |_^ the entire enum is at least 296 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 526 - SystemXml(System), [INFO] [stdout] 526 + SystemXml(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/chart.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | / if let Some(eml) = st [INFO] [stdout] 49 | | .children() [INFO] [stdout] 50 | | .find(|c| c.is_element() && c.has_tag_name("eml")) [INFO] [stdout] ... | [INFO] [stdout] 62 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 50 ~ .find(|c| c.is_element() && c.has_tag_name("eml")) [INFO] [stdout] 51 ~ && let Some(scr) = eml [INFO] [stdout] 52 | .children() [INFO] [stdout] ... [INFO] [stdout] 59 | break; [INFO] [stdout] 60 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/chart.rs:142:33 [INFO] [stdout] | [INFO] [stdout] 142 | / ... if pp.has_tag_name("P") { [INFO] [stdout] 143 | | ... if let Some(nm) = pp.attribute("Name") { [INFO] [stdout] 144 | | ... let val = pp.text().unwrap_or("").to_string(); [INFO] [stdout] 145 | | ... match nm { [INFO] [stdout] ... | [INFO] [stdout] 151 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 142 ~ if pp.has_tag_name("P") [INFO] [stdout] 143 ~ && let Some(nm) = pp.attribute("Name") { [INFO] [stdout] 144 | let val = pp.text().unwrap_or("").to_string(); [INFO] [stdout] ... [INFO] [stdout] 149 | } [INFO] [stdout] 150 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/mask_eval.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | //! We map popup parameter to an index (1-based). We then select the corresponding element from var cell array and return it. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 7 | //! We map popup parameter to an index (1-based). We then select the corresponding element from var cell array and return it. [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/mask_eval.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | //! If anything fails, we return None. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 8 | //! If anything fails, we return None. [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mask_eval.rs:32:13 [INFO] [stdout] | [INFO] [stdout] 32 | / if let Some(val) = p.value.as_ref() { [INFO] [stdout] 33 | | if let Some(idx) = parse_leading_index(val) { [INFO] [stdout] 34 | | param_map.insert(p.name.clone(), idx); [INFO] [stdout] 35 | | } [INFO] [stdout] 36 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 32 ~ if let Some(val) = p.value.as_ref() [INFO] [stdout] 33 ~ && let Some(idx) = parse_leading_index(val) { [INFO] [stdout] 34 | param_map.insert(p.name.clone(), idx); [INFO] [stdout] 35 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mask_eval.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 57 | / if let Some(open) = init.find('{') { [INFO] [stdout] 58 | | if let Some(close) = init[open + 1..].find('}') { [INFO] [stdout] 59 | | // relative index [INFO] [stdout] 60 | | let inner = &init[open + 1..open + 1 + close]; [INFO] [stdout] ... | [INFO] [stdout] 71 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 57 ~ if let Some(open) = init.find('{') [INFO] [stdout] 58 ~ && let Some(close) = init[open + 1..].find('}') { [INFO] [stdout] 59 | // relative index [INFO] [stdout] ... [INFO] [stdout] 69 | return out; [INFO] [stdout] 70 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/helpers.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | / if let (Some(x), Some(y)) = (it.next(), it.next()) { [INFO] [stdout] 22 | | if let (Ok(xv), Ok(yv)) = (x.parse::(), y.parse::()) { [INFO] [stdout] 23 | | points.push(Point { x: xv, y: yv }); [INFO] [stdout] 24 | | } [INFO] [stdout] 25 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 21 ~ if let (Some(x), Some(y)) = (it.next(), it.next()) [INFO] [stdout] 22 ~ && let (Ok(xv), Ok(yv)) = (x.parse::(), y.parse::()) { [INFO] [stdout] 23 | points.push(Point { x: xv, y: yv }); [INFO] [stdout] 24 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parser/helpers.rs:51:8 [INFO] [stdout] | [INFO] [stdout] 51 | if !candidate.extension().is_some_and(|e| e == "xml") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `candidate.extension().is_none_or(|e| e != "xml")` [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: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/parser/source.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | / Ok(std::fs::read_to_string(path.as_str()) [INFO] [stdout] 38 | | .with_context(|| format!("Failed to read {}", path))?) [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] 37 ~ std::fs::read_to_string(path.as_str()) [INFO] [stdout] 38 ~ .with_context(|| format!("Failed to read {}", path)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/mod.rs:127:13 [INFO] [stdout] | [INFO] [stdout] 127 | / if let Some(source_block) = block.properties.get("SourceBlock").cloned() { [INFO] [stdout] 128 | | if let Some((lib_name, block_path)) = source_block.split_once('/') { [INFO] [stdout] 129 | | let lib_name = lib_name.trim(); [INFO] [stdout] 130 | | let block_path = block_path.trim(); [INFO] [stdout] ... | [INFO] [stdout] 169 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 127 ~ if let Some(source_block) = block.properties.get("SourceBlock").cloned() [INFO] [stdout] 128 ~ && let Some((lib_name, block_path)) = source_block.split_once('/') { [INFO] [stdout] 129 | let lib_name = lib_name.trim(); [INFO] [stdout] ... [INFO] [stdout] 167 | } [INFO] [stdout] 168 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/mod.rs:199:13 [INFO] [stdout] | [INFO] [stdout] 199 | / if anc.file_name() == Some("systems") { [INFO] [stdout] 200 | | if let Some(parent) = anc.parent() { [INFO] [stdout] 201 | | if parent.file_name() == Some("simulink") { [INFO] [stdout] 202 | | found_root = Some(parent.to_path_buf()); [INFO] [stdout] ... | [INFO] [stdout] 206 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 199 ~ if anc.file_name() == Some("systems") [INFO] [stdout] 200 ~ && let Some(parent) = anc.parent() { [INFO] [stdout] 201 | if parent.file_name() == Some("simulink") { [INFO] [stdout] ... [INFO] [stdout] 204 | } [INFO] [stdout] 205 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/mod.rs:200:17 [INFO] [stdout] | [INFO] [stdout] 200 | / if let Some(parent) = anc.parent() { [INFO] [stdout] 201 | | if parent.file_name() == Some("simulink") { [INFO] [stdout] 202 | | found_root = Some(parent.to_path_buf()); [INFO] [stdout] 203 | | break; [INFO] [stdout] 204 | | } [INFO] [stdout] 205 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 200 ~ if let Some(parent) = anc.parent() [INFO] [stdout] 201 ~ && parent.file_name() == Some("simulink") { [INFO] [stdout] 202 | found_root = Some(parent.to_path_buf()); [INFO] [stdout] 203 | break; [INFO] [stdout] 204 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/mod.rs:255:13 [INFO] [stdout] | [INFO] [stdout] 255 | / if anc.file_name() == Some("systems") { [INFO] [stdout] 256 | | if let Some(parent) = anc.parent() { [INFO] [stdout] 257 | | if parent.file_name() == Some("simulink") { [INFO] [stdout] 258 | | found_root = Some(parent.to_path_buf()); [INFO] [stdout] ... | [INFO] [stdout] 262 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 255 ~ if anc.file_name() == Some("systems") [INFO] [stdout] 256 ~ && let Some(parent) = anc.parent() { [INFO] [stdout] 257 | if parent.file_name() == Some("simulink") { [INFO] [stdout] ... [INFO] [stdout] 260 | } [INFO] [stdout] 261 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/mod.rs:256:17 [INFO] [stdout] | [INFO] [stdout] 256 | / if let Some(parent) = anc.parent() { [INFO] [stdout] 257 | | if parent.file_name() == Some("simulink") { [INFO] [stdout] 258 | | found_root = Some(parent.to_path_buf()); [INFO] [stdout] 259 | | break; [INFO] [stdout] 260 | | } [INFO] [stdout] 261 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 256 ~ if let Some(parent) = anc.parent() [INFO] [stdout] 257 ~ && parent.file_name() == Some("simulink") { [INFO] [stdout] 258 | found_root = Some(parent.to_path_buf()); [INFO] [stdout] 259 | break; [INFO] [stdout] 260 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/mask_eval.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | //! We map popup parameter to an index (1-based). We then select the corresponding element from var cell array and return it. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 7 | //! We map popup parameter to an index (1-based). We then select the corresponding element from var cell array and return it. [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/mask_eval.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | //! If anything fails, we return None. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 8 | //! If anything fails, we return None. [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mask_eval.rs:32:13 [INFO] [stdout] | [INFO] [stdout] 32 | / if let Some(val) = p.value.as_ref() { [INFO] [stdout] 33 | | if let Some(idx) = parse_leading_index(val) { [INFO] [stdout] 34 | | param_map.insert(p.name.clone(), idx); [INFO] [stdout] 35 | | } [INFO] [stdout] 36 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 32 ~ if let Some(val) = p.value.as_ref() [INFO] [stdout] 33 ~ && let Some(idx) = parse_leading_index(val) { [INFO] [stdout] 34 | param_map.insert(p.name.clone(), idx); [INFO] [stdout] 35 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mask_eval.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 57 | / if let Some(open) = init.find('{') { [INFO] [stdout] 58 | | if let Some(close) = init[open + 1..].find('}') { [INFO] [stdout] 59 | | // relative index [INFO] [stdout] 60 | | let inner = &init[open + 1..open + 1 + close]; [INFO] [stdout] ... | [INFO] [stdout] 71 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 57 ~ if let Some(open) = init.find('{') [INFO] [stdout] 58 ~ && let Some(close) = init[open + 1..].find('}') { [INFO] [stdout] 59 | // relative index [INFO] [stdout] ... [INFO] [stdout] 69 | return out; [INFO] [stdout] 70 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> examples/roundtrip_compare.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | / if let Some(regen_data) = regenerated.get(name) { [INFO] [stdout] 108 | | if orig_data != regen_data { [INFO] [stdout] 109 | | // Try to show a useful diff [INFO] [stdout] 110 | | let orig_str = String::from_utf8(orig_data.clone()); [INFO] [stdout] ... | [INFO] [stdout] 158 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 107 ~ if let Some(regen_data) = regenerated.get(name) [INFO] [stdout] 108 ~ && orig_data != regen_data { [INFO] [stdout] 109 | // Try to show a useful diff [INFO] [stdout] ... [INFO] [stdout] 156 | } [INFO] [stdout] 157 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> examples/list_blocks.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | / if let Some(parent) = path.parent() { [INFO] [stdout] 32 | | if parent.as_str() != "" { [INFO] [stdout] 33 | | lib_paths.push(parent.to_path_buf()); [INFO] [stdout] 34 | | } [INFO] [stdout] 35 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 31 ~ if let Some(parent) = path.parent() [INFO] [stdout] 32 ~ && parent.as_str() != "" { [INFO] [stdout] 33 | lib_paths.push(parent.to_path_buf()); [INFO] [stdout] 34 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> examples/list_blocks.rs:36:42 [INFO] [stdout] | [INFO] [stdout] 36 | lib_paths.extend(args.lib.iter().map(|s| Utf8PathBuf::from(s))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Utf8PathBuf::from` [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: length comparison to one [INFO] [stdout] --> tests/block_sid.rs:60:13 [INFO] [stdout] | [INFO] [stdout] 60 | assert!(system.lines.len() >= 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!system.lines.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: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:182:17 [INFO] [stdout] | [INFO] [stdout] 182 | / if tag == "Block" { [INFO] [stdout] 183 | | if let Some(bt) = node.attribute("BlockType") { [INFO] [stdout] 184 | | if !known_block_types.contains(&bt) { [INFO] [stdout] 185 | | unknown_block_types.insert(bt.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 188 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 182 ~ if tag == "Block" [INFO] [stdout] 183 ~ && let Some(bt) = node.attribute("BlockType") { [INFO] [stdout] 184 | if !known_block_types.contains(&bt) { [INFO] [stdout] 185 | unknown_block_types.insert(bt.to_string()); [INFO] [stdout] 186 | } [INFO] [stdout] 187 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:183:21 [INFO] [stdout] | [INFO] [stdout] 183 | / if let Some(bt) = node.attribute("BlockType") { [INFO] [stdout] 184 | | if !known_block_types.contains(&bt) { [INFO] [stdout] 185 | | unknown_block_types.insert(bt.to_string()); [INFO] [stdout] 186 | | } [INFO] [stdout] 187 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 183 ~ if let Some(bt) = node.attribute("BlockType") [INFO] [stdout] 184 ~ && !known_block_types.contains(&bt) { [INFO] [stdout] 185 | unknown_block_types.insert(bt.to_string()); [INFO] [stdout] 186 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `lr.found.get(0)` [INFO] [stdout] --> examples/analyze_libraries.rs:99:35 [INFO] [stdout] | [INFO] [stdout] 99 | if let Some((_, p)) = lr.found.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `lr.found.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: empty string literal in `println!` [INFO] [stdout] --> examples/analyze_libraries.rs:111:9 [INFO] [stdout] | [INFO] [stdout] 111 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:182:17 [INFO] [stdout] | [INFO] [stdout] 182 | / if tag == "Block" { [INFO] [stdout] 183 | | if let Some(bt) = node.attribute("BlockType") { [INFO] [stdout] 184 | | if !known_block_types.contains(&bt) { [INFO] [stdout] 185 | | unknown_block_types.insert(bt.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 188 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 182 ~ if tag == "Block" [INFO] [stdout] 183 ~ && let Some(bt) = node.attribute("BlockType") { [INFO] [stdout] 184 | if !known_block_types.contains(&bt) { [INFO] [stdout] 185 | unknown_block_types.insert(bt.to_string()); [INFO] [stdout] 186 | } [INFO] [stdout] 187 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:183:21 [INFO] [stdout] | [INFO] [stdout] 183 | / if let Some(bt) = node.attribute("BlockType") { [INFO] [stdout] 184 | | if !known_block_types.contains(&bt) { [INFO] [stdout] 185 | | unknown_block_types.insert(bt.to_string()); [INFO] [stdout] 186 | | } [INFO] [stdout] 187 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 183 ~ if let Some(bt) = node.attribute("BlockType") [INFO] [stdout] 184 ~ && !known_block_types.contains(&bt) { [INFO] [stdout] 185 | unknown_block_types.insert(bt.to_string()); [INFO] [stdout] 186 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> tests/library_resolver.rs:68:31 [INFO] [stdout] | [INFO] [stdout] 68 | let res = resolver.locate(names.iter().map(|s| *s)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `names.iter().copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> tests/library_resolver.rs:67:17 [INFO] [stdout] | [INFO] [stdout] 67 | let names = vec!["Regler", "OtherLib", "MissingLib"]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["Regler", "OtherLib", "MissingLib"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 17.63s [INFO] running `Command { std: "docker" "inspect" "00c9ab8164f399627f1eeaeed1834b0f03c5bbabad355a4de1398a67f79c18a9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "00c9ab8164f399627f1eeaeed1834b0f03c5bbabad355a4de1398a67f79c18a9", kill_on_drop: false }` [INFO] [stdout] 00c9ab8164f399627f1eeaeed1834b0f03c5bbabad355a4de1398a67f79c18a9