[INFO] cloning repository https://github.com/ihorandrianov/witcraft-lsp [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/ihorandrianov/witcraft-lsp" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fihorandrianov%2Fwitcraft-lsp", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fihorandrianov%2Fwitcraft-lsp'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] af63c97efc65237112171b3c451caaeb477b639b [INFO] linting ihorandrianov/witcraft-lsp against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fihorandrianov%2Fwitcraft-lsp" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/ihorandrianov/witcraft-lsp [INFO] finished tweaking git repo https://github.com/ihorandrianov/witcraft-lsp [INFO] tweaked toml for git repo https://github.com/ihorandrianov/witcraft-lsp written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/ihorandrianov/witcraft-lsp 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/ihorandrianov/witcraft-lsp already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded tower-lsp-macros v0.9.0 [INFO] [stderr] Downloaded zmij v1.0.15 [INFO] [stderr] Downloaded tower-lsp v0.20.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 56f2bc9b4b6abb50ed11f12613e6383b10a0038a271b77c300f910e15cbad90e [INFO] running `Command { std: "docker" "start" "-a" "56f2bc9b4b6abb50ed11f12613e6383b10a0038a271b77c300f910e15cbad90e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "56f2bc9b4b6abb50ed11f12613e6383b10a0038a271b77c300f910e15cbad90e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "56f2bc9b4b6abb50ed11f12613e6383b10a0038a271b77c300f910e15cbad90e", kill_on_drop: false }` [INFO] [stdout] 56f2bc9b4b6abb50ed11f12613e6383b10a0038a271b77c300f910e15cbad90e [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] a1ef47960272b048bd24921455e8c7ca7fcddc472ec697f9af4b9bb73a84d86d [INFO] running `Command { std: "docker" "start" "-a" "a1ef47960272b048bd24921455e8c7ca7fcddc472ec697f9af4b9bb73a84d86d", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.105 [INFO] [stderr] Compiling quote v1.0.43 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Checking memchr v2.7.6 [INFO] [stderr] Checking tracing-core v0.1.36 [INFO] [stderr] Checking log v0.4.29 [INFO] [stderr] Compiling zmij v1.0.15 [INFO] [stderr] Checking futures-channel v0.3.31 [INFO] [stderr] Checking slab v0.4.11 [INFO] [stderr] Checking percent-encoding v2.3.2 [INFO] [stderr] Checking bytes v1.11.0 [INFO] [stderr] Checking nu-ansi-term v0.50.3 [INFO] [stderr] Checking form_urlencoded v1.2.2 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking dashmap v5.5.3 [INFO] [stderr] Checking dashmap v6.1.0 [INFO] [stderr] Checking serde_json v1.0.149 [INFO] [stderr] Checking witcraft-syntax v0.1.0 (/opt/rustwide/workdir/crates/witcraft-syntax) [INFO] [stderr] Checking tracing-log v0.2.0 [INFO] [stderr] Checking tracing-subscriber v0.3.22 [INFO] [stderr] Compiling syn v2.0.114 [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/witcraft-syntax/src/ast.rs:99:1 [INFO] [stdout] | [INFO] [stdout] 99 | / impl Default for SourceFile { [INFO] [stdout] 100 | | fn default() -> Self { [INFO] [stdout] 101 | | Self { [INFO] [stdout] 102 | | package: None, [INFO] [stdout] ... | [INFO] [stdout] 109 | | } [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] 91 + #[derive(Default)] [INFO] [stdout] 92 | pub struct SourceFile { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> crates/witcraft-syntax/src/ast.rs:168:1 [INFO] [stdout] | [INFO] [stdout] 168 | / pub enum Item { [INFO] [stdout] 169 | | Interface(InterfaceDecl), [INFO] [stdout] | | ------------------------ the second-largest variant contains at least 184 bytes [INFO] [stdout] 170 | | World(WorldDecl), [INFO] [stdout] 171 | | TypeDef(TypeDef), [INFO] [stdout] | | ---------------- the largest variant contains at least 1016 bytes [INFO] [stdout] 172 | | } [INFO] [stdout] | |_^ the entire enum is at least 1016 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] 171 - TypeDef(TypeDef), [INFO] [stdout] 171 + TypeDef(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> crates/witcraft-syntax/src/ast.rs:222:1 [INFO] [stdout] | [INFO] [stdout] 222 | / pub enum InterfaceItem { [INFO] [stdout] 223 | | TypeDef(TypeDef), [INFO] [stdout] | | ---------------- the largest variant contains at least 1016 bytes [INFO] [stdout] 224 | | Func(FuncDecl), [INFO] [stdout] | | -------------- the second-largest variant contains at least 784 bytes [INFO] [stdout] 225 | | Use(InterfaceUse), [INFO] [stdout] 226 | | } [INFO] [stdout] | |_^ the entire enum is at least 1016 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] 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] 223 - TypeDef(TypeDef), [INFO] [stdout] 223 + TypeDef(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> crates/witcraft-syntax/src/ast.rs:248:1 [INFO] [stdout] | [INFO] [stdout] 248 | / pub enum WorldItem { [INFO] [stdout] 249 | | Import(ImportDecl), [INFO] [stdout] | | ------------------ the second-largest variant contains at least 688 bytes [INFO] [stdout] 250 | | Export(ExportDecl), [INFO] [stdout] 251 | | Include(IncludeDecl), [INFO] [stdout] 252 | | TypeDef(TypeDef), [INFO] [stdout] | | ---------------- the largest variant contains at least 1016 bytes [INFO] [stdout] 253 | | Use(InterfaceUse), [INFO] [stdout] 254 | | } [INFO] [stdout] | |_^ the entire enum is at least 1016 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] 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] 252 - TypeDef(TypeDef), [INFO] [stdout] 252 + TypeDef(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> crates/witcraft-syntax/src/ast.rs:305:1 [INFO] [stdout] | [INFO] [stdout] 305 | / pub enum ExternKind { [INFO] [stdout] 306 | | /// Reference to another interface: `import foo;` [INFO] [stdout] 307 | | Path(UsePath), [INFO] [stdout] | | ------------- the second-largest variant contains at least 104 bytes [INFO] [stdout] 308 | | /// Inline interface definition: `export bar: interface { ... }` [INFO] [stdout] ... | [INFO] [stdout] 311 | | Func(FuncSignature), [INFO] [stdout] | | ------------------- the largest variant contains at least 624 bytes [INFO] [stdout] 312 | | } [INFO] [stdout] | |_^ the entire enum is at least 624 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] 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] 311 - Func(FuncSignature), [INFO] [stdout] 311 + Func(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> crates/witcraft-syntax/src/ast.rs:360:1 [INFO] [stdout] | [INFO] [stdout] 360 | / pub enum FuncResults { [INFO] [stdout] 361 | | /// No return value [INFO] [stdout] 362 | | None, [INFO] [stdout] 363 | | /// Single anonymous return: `-> T` [INFO] [stdout] 364 | | Anon(Type), [INFO] [stdout] | | ---------- the second-largest variant contains at least 40 bytes [INFO] [stdout] 365 | | /// Named returns: `-> (a: T, b: U)` [INFO] [stdout] 366 | | Named(SmallVec4), [INFO] [stdout] | | ----------------------- the largest variant contains at least 304 bytes [INFO] [stdout] 367 | | } [INFO] [stdout] | |_^ the entire enum is at least 304 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] 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] 366 - Named(SmallVec4), [INFO] [stdout] 366 + Named(Box>), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-syntax/src/lookup.rs:104:5 [INFO] [stdout] | [INFO] [stdout] 104 | / if let Some(pkg) = &source.package { [INFO] [stdout] 105 | | if pkg.range.contains(offset) { [INFO] [stdout] 106 | | for ns in &pkg.namespace { [INFO] [stdout] 107 | | if ns.range.contains(offset) { [INFO] [stdout] ... | [INFO] [stdout] 121 | | } [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] 104 ~ if let Some(pkg) = &source.package [INFO] [stdout] 105 ~ && pkg.range.contains(offset) { [INFO] [stdout] 106 | for ns in &pkg.namespace { [INFO] [stdout] ... [INFO] [stdout] 119 | return Some(NodeRef::Package(pkg)); [INFO] [stdout] 120 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-syntax/src/lookup.rs:253:21 [INFO] [stdout] | [INFO] [stdout] 253 | / if let Some(ty) = &case.ty { [INFO] [stdout] 254 | | if let Some(node) = node_at_type(ty, offset) { [INFO] [stdout] 255 | | return Some(node); [INFO] [stdout] 256 | | } [INFO] [stdout] 257 | | } [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] 253 ~ if let Some(ty) = &case.ty [INFO] [stdout] 254 ~ && let Some(node) = node_at_type(ty, offset) { [INFO] [stdout] 255 | return Some(node); [INFO] [stdout] 256 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-syntax/src/lookup.rs:331:5 [INFO] [stdout] | [INFO] [stdout] 331 | / if let FuncResults::Anon(ty) = &func.sig.results { [INFO] [stdout] 332 | | if let Some(node) = node_at_type(ty, offset) { [INFO] [stdout] 333 | | return Some(node); [INFO] [stdout] 334 | | } [INFO] [stdout] 335 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 331 ~ if let FuncResults::Anon(ty) = &func.sig.results [INFO] [stdout] 332 ~ && let Some(node) = node_at_type(ty, offset) { [INFO] [stdout] 333 | return Some(node); [INFO] [stdout] 334 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-syntax/src/lookup.rs:379:13 [INFO] [stdout] | [INFO] [stdout] 379 | / if let Some(ok) = &res.ok { [INFO] [stdout] 380 | | if let Some(node) = node_at_type(ok, offset) { [INFO] [stdout] 381 | | return Some(node); [INFO] [stdout] 382 | | } [INFO] [stdout] 383 | | } [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] 379 ~ if let Some(ok) = &res.ok [INFO] [stdout] 380 ~ && let Some(node) = node_at_type(ok, offset) { [INFO] [stdout] 381 | return Some(node); [INFO] [stdout] 382 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-syntax/src/lookup.rs:384:13 [INFO] [stdout] | [INFO] [stdout] 384 | / if let Some(err) = &res.err { [INFO] [stdout] 385 | | if let Some(node) = node_at_type(err, offset) { [INFO] [stdout] 386 | | return Some(node); [INFO] [stdout] 387 | | } [INFO] [stdout] 388 | | } [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] 384 ~ if let Some(err) = &res.err [INFO] [stdout] 385 ~ && let Some(node) = node_at_type(err, offset) { [INFO] [stdout] 386 | return Some(node); [INFO] [stdout] 387 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-syntax/src/lookup.rs:407:13 [INFO] [stdout] | [INFO] [stdout] 407 | / if let Some(inner) = &future.inner { [INFO] [stdout] 408 | | if let Some(node) = node_at_type(inner, offset) { [INFO] [stdout] 409 | | return Some(node); [INFO] [stdout] 410 | | } [INFO] [stdout] 411 | | } [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] 407 ~ if let Some(inner) = &future.inner [INFO] [stdout] 408 ~ && let Some(node) = node_at_type(inner, offset) { [INFO] [stdout] 409 | return Some(node); [INFO] [stdout] 410 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-syntax/src/lookup.rs:415:13 [INFO] [stdout] | [INFO] [stdout] 415 | / if let Some(inner) = &stream.inner { [INFO] [stdout] 416 | | if let Some(node) = node_at_type(inner, offset) { [INFO] [stdout] 417 | | return Some(node); [INFO] [stdout] 418 | | } [INFO] [stdout] 419 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 415 ~ if let Some(inner) = &stream.inner [INFO] [stdout] 416 ~ && let Some(node) = node_at_type(inner, offset) { [INFO] [stdout] 417 | return Some(node); [INFO] [stdout] 418 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:386:12 [INFO] [stdout] | [INFO] [stdout] 386 | if !self.eat(SyntaxKind::Colon).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.eat(SyntaxKind::Colon).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 boolean expression can be simplified [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:526:12 [INFO] [stdout] | [INFO] [stdout] 526 | if !self.eat(SyntaxKind::Dot).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.eat(SyntaxKind::Dot).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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:537:12 [INFO] [stdout] | [INFO] [stdout] 537 | if !self.eat(SyntaxKind::Dot).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.eat(SyntaxKind::Dot).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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:749:20 [INFO] [stdout] | [INFO] [stdout] 749 | if !self.eat(SyntaxKind::Comma).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.eat(SyntaxKind::Comma).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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:1138:16 [INFO] [stdout] | [INFO] [stdout] 1138 | if !self.eat(SyntaxKind::Comma).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.eat(SyntaxKind::Comma).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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:1188:16 [INFO] [stdout] | [INFO] [stdout] 1188 | if !self.eat(SyntaxKind::Comma).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.eat(SyntaxKind::Comma).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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:1263:16 [INFO] [stdout] | [INFO] [stdout] 1263 | if !self.eat(SyntaxKind::Comma).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.eat(SyntaxKind::Comma).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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:1305:16 [INFO] [stdout] | [INFO] [stdout] 1305 | if !self.eat(SyntaxKind::Comma).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.eat(SyntaxKind::Comma).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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:1424:16 [INFO] [stdout] | [INFO] [stdout] 1424 | if !self.eat(SyntaxKind::Comma).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.eat(SyntaxKind::Comma).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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:1514:16 [INFO] [stdout] | [INFO] [stdout] 1514 | if !self.eat(SyntaxKind::Comma).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.eat(SyntaxKind::Comma).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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:1567:20 [INFO] [stdout] | [INFO] [stdout] 1567 | if !self.eat(SyntaxKind::Comma).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.eat(SyntaxKind::Comma).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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:1727:16 [INFO] [stdout] | [INFO] [stdout] 1727 | if !self.eat(SyntaxKind::Comma).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.eat(SyntaxKind::Comma).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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> crates/witcraft-syntax/tests/wasi_integration.rs:192:9 [INFO] [stdout] | [INFO] [stdout] 192 | result.root.items.len() >= 1, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!result.root.items.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 `impl` can be derived [INFO] [stdout] --> crates/witcraft-syntax/src/ast.rs:99:1 [INFO] [stdout] | [INFO] [stdout] 99 | / impl Default for SourceFile { [INFO] [stdout] 100 | | fn default() -> Self { [INFO] [stdout] 101 | | Self { [INFO] [stdout] 102 | | package: None, [INFO] [stdout] ... | [INFO] [stdout] 109 | | } [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] 91 + #[derive(Default)] [INFO] [stdout] 92 | pub struct SourceFile { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> crates/witcraft-syntax/src/ast.rs:168:1 [INFO] [stdout] | [INFO] [stdout] 168 | / pub enum Item { [INFO] [stdout] 169 | | Interface(InterfaceDecl), [INFO] [stdout] | | ------------------------ the second-largest variant contains at least 184 bytes [INFO] [stdout] 170 | | World(WorldDecl), [INFO] [stdout] 171 | | TypeDef(TypeDef), [INFO] [stdout] | | ---------------- the largest variant contains at least 1016 bytes [INFO] [stdout] 172 | | } [INFO] [stdout] | |_^ the entire enum is at least 1016 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] 171 - TypeDef(TypeDef), [INFO] [stdout] 171 + TypeDef(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> crates/witcraft-syntax/src/ast.rs:222:1 [INFO] [stdout] | [INFO] [stdout] 222 | / pub enum InterfaceItem { [INFO] [stdout] 223 | | TypeDef(TypeDef), [INFO] [stdout] | | ---------------- the largest variant contains at least 1016 bytes [INFO] [stdout] 224 | | Func(FuncDecl), [INFO] [stdout] | | -------------- the second-largest variant contains at least 784 bytes [INFO] [stdout] 225 | | Use(InterfaceUse), [INFO] [stdout] 226 | | } [INFO] [stdout] | |_^ the entire enum is at least 1016 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] 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] 223 - TypeDef(TypeDef), [INFO] [stdout] 223 + TypeDef(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> crates/witcraft-syntax/src/ast.rs:248:1 [INFO] [stdout] | [INFO] [stdout] 248 | / pub enum WorldItem { [INFO] [stdout] 249 | | Import(ImportDecl), [INFO] [stdout] | | ------------------ the second-largest variant contains at least 688 bytes [INFO] [stdout] 250 | | Export(ExportDecl), [INFO] [stdout] 251 | | Include(IncludeDecl), [INFO] [stdout] 252 | | TypeDef(TypeDef), [INFO] [stdout] | | ---------------- the largest variant contains at least 1016 bytes [INFO] [stdout] 253 | | Use(InterfaceUse), [INFO] [stdout] 254 | | } [INFO] [stdout] | |_^ the entire enum is at least 1016 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] 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] 252 - TypeDef(TypeDef), [INFO] [stdout] 252 + TypeDef(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> crates/witcraft-syntax/src/ast.rs:305:1 [INFO] [stdout] | [INFO] [stdout] 305 | / pub enum ExternKind { [INFO] [stdout] 306 | | /// Reference to another interface: `import foo;` [INFO] [stdout] 307 | | Path(UsePath), [INFO] [stdout] | | ------------- the second-largest variant contains at least 104 bytes [INFO] [stdout] 308 | | /// Inline interface definition: `export bar: interface { ... }` [INFO] [stdout] ... | [INFO] [stdout] 311 | | Func(FuncSignature), [INFO] [stdout] | | ------------------- the largest variant contains at least 624 bytes [INFO] [stdout] 312 | | } [INFO] [stdout] | |_^ the entire enum is at least 624 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] 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] 311 - Func(FuncSignature), [INFO] [stdout] 311 + Func(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> crates/witcraft-syntax/src/ast.rs:360:1 [INFO] [stdout] | [INFO] [stdout] 360 | / pub enum FuncResults { [INFO] [stdout] 361 | | /// No return value [INFO] [stdout] 362 | | None, [INFO] [stdout] 363 | | /// Single anonymous return: `-> T` [INFO] [stdout] 364 | | Anon(Type), [INFO] [stdout] | | ---------- the second-largest variant contains at least 40 bytes [INFO] [stdout] 365 | | /// Named returns: `-> (a: T, b: U)` [INFO] [stdout] 366 | | Named(SmallVec4), [INFO] [stdout] | | ----------------------- the largest variant contains at least 304 bytes [INFO] [stdout] 367 | | } [INFO] [stdout] | |_^ the entire enum is at least 304 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] 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] 366 - Named(SmallVec4), [INFO] [stdout] 366 + Named(Box>), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-syntax/src/lookup.rs:104:5 [INFO] [stdout] | [INFO] [stdout] 104 | / if let Some(pkg) = &source.package { [INFO] [stdout] 105 | | if pkg.range.contains(offset) { [INFO] [stdout] 106 | | for ns in &pkg.namespace { [INFO] [stdout] 107 | | if ns.range.contains(offset) { [INFO] [stdout] ... | [INFO] [stdout] 121 | | } [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] 104 ~ if let Some(pkg) = &source.package [INFO] [stdout] 105 ~ && pkg.range.contains(offset) { [INFO] [stdout] 106 | for ns in &pkg.namespace { [INFO] [stdout] ... [INFO] [stdout] 119 | return Some(NodeRef::Package(pkg)); [INFO] [stdout] 120 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-syntax/src/lookup.rs:253:21 [INFO] [stdout] | [INFO] [stdout] 253 | / if let Some(ty) = &case.ty { [INFO] [stdout] 254 | | if let Some(node) = node_at_type(ty, offset) { [INFO] [stdout] 255 | | return Some(node); [INFO] [stdout] 256 | | } [INFO] [stdout] 257 | | } [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] 253 ~ if let Some(ty) = &case.ty [INFO] [stdout] 254 ~ && let Some(node) = node_at_type(ty, offset) { [INFO] [stdout] 255 | return Some(node); [INFO] [stdout] 256 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-syntax/src/lookup.rs:331:5 [INFO] [stdout] | [INFO] [stdout] 331 | / if let FuncResults::Anon(ty) = &func.sig.results { [INFO] [stdout] 332 | | if let Some(node) = node_at_type(ty, offset) { [INFO] [stdout] 333 | | return Some(node); [INFO] [stdout] 334 | | } [INFO] [stdout] 335 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 331 ~ if let FuncResults::Anon(ty) = &func.sig.results [INFO] [stdout] 332 ~ && let Some(node) = node_at_type(ty, offset) { [INFO] [stdout] 333 | return Some(node); [INFO] [stdout] 334 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-syntax/src/lookup.rs:379:13 [INFO] [stdout] | [INFO] [stdout] 379 | / if let Some(ok) = &res.ok { [INFO] [stdout] 380 | | if let Some(node) = node_at_type(ok, offset) { [INFO] [stdout] 381 | | return Some(node); [INFO] [stdout] 382 | | } [INFO] [stdout] 383 | | } [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] 379 ~ if let Some(ok) = &res.ok [INFO] [stdout] 380 ~ && let Some(node) = node_at_type(ok, offset) { [INFO] [stdout] 381 | return Some(node); [INFO] [stdout] 382 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-syntax/src/lookup.rs:384:13 [INFO] [stdout] | [INFO] [stdout] 384 | / if let Some(err) = &res.err { [INFO] [stdout] 385 | | if let Some(node) = node_at_type(err, offset) { [INFO] [stdout] 386 | | return Some(node); [INFO] [stdout] 387 | | } [INFO] [stdout] 388 | | } [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] 384 ~ if let Some(err) = &res.err [INFO] [stdout] 385 ~ && let Some(node) = node_at_type(err, offset) { [INFO] [stdout] 386 | return Some(node); [INFO] [stdout] 387 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-syntax/src/lookup.rs:407:13 [INFO] [stdout] | [INFO] [stdout] 407 | / if let Some(inner) = &future.inner { [INFO] [stdout] 408 | | if let Some(node) = node_at_type(inner, offset) { [INFO] [stdout] 409 | | return Some(node); [INFO] [stdout] 410 | | } [INFO] [stdout] 411 | | } [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] 407 ~ if let Some(inner) = &future.inner [INFO] [stdout] 408 ~ && let Some(node) = node_at_type(inner, offset) { [INFO] [stdout] 409 | return Some(node); [INFO] [stdout] 410 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-syntax/src/lookup.rs:415:13 [INFO] [stdout] | [INFO] [stdout] 415 | / if let Some(inner) = &stream.inner { [INFO] [stdout] 416 | | if let Some(node) = node_at_type(inner, offset) { [INFO] [stdout] 417 | | return Some(node); [INFO] [stdout] 418 | | } [INFO] [stdout] 419 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 415 ~ if let Some(inner) = &stream.inner [INFO] [stdout] 416 ~ && let Some(node) = node_at_type(inner, offset) { [INFO] [stdout] 417 | return Some(node); [INFO] [stdout] 418 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:386:12 [INFO] [stdout] | [INFO] [stdout] 386 | if !self.eat(SyntaxKind::Colon).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.eat(SyntaxKind::Colon).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 boolean expression can be simplified [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:526:12 [INFO] [stdout] | [INFO] [stdout] 526 | if !self.eat(SyntaxKind::Dot).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.eat(SyntaxKind::Dot).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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:537:12 [INFO] [stdout] | [INFO] [stdout] 537 | if !self.eat(SyntaxKind::Dot).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.eat(SyntaxKind::Dot).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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:749:20 [INFO] [stdout] | [INFO] [stdout] 749 | if !self.eat(SyntaxKind::Comma).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.eat(SyntaxKind::Comma).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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:1138:16 [INFO] [stdout] | [INFO] [stdout] 1138 | if !self.eat(SyntaxKind::Comma).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.eat(SyntaxKind::Comma).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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:1188:16 [INFO] [stdout] | [INFO] [stdout] 1188 | if !self.eat(SyntaxKind::Comma).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.eat(SyntaxKind::Comma).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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:1263:16 [INFO] [stdout] | [INFO] [stdout] 1263 | if !self.eat(SyntaxKind::Comma).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.eat(SyntaxKind::Comma).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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:1305:16 [INFO] [stdout] | [INFO] [stdout] 1305 | if !self.eat(SyntaxKind::Comma).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.eat(SyntaxKind::Comma).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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:1424:16 [INFO] [stdout] | [INFO] [stdout] 1424 | if !self.eat(SyntaxKind::Comma).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.eat(SyntaxKind::Comma).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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:1514:16 [INFO] [stdout] | [INFO] [stdout] 1514 | if !self.eat(SyntaxKind::Comma).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.eat(SyntaxKind::Comma).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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:1567:20 [INFO] [stdout] | [INFO] [stdout] 1567 | if !self.eat(SyntaxKind::Comma).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.eat(SyntaxKind::Comma).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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:1727:16 [INFO] [stdout] | [INFO] [stdout] 1727 | if !self.eat(SyntaxKind::Comma).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.eat(SyntaxKind::Comma).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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:2918:17 [INFO] [stdout] | [INFO] [stdout] 2918 | assert!(result.root.items.len() >= 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!result.root.items.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] --> crates/witcraft-syntax/src/parser.rs:3121:9 [INFO] [stdout] | [INFO] [stdout] 3121 | / if let Some(Item::Interface(iface)) = result.root.items.first() { [INFO] [stdout] 3122 | | if let Some(InterfaceItem::Func(f)) = iface.items.first() { [INFO] [stdout] 3123 | | assert!(f.sig.is_async); [INFO] [stdout] 3124 | | } [INFO] [stdout] 3125 | | } [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] 3121 ~ if let Some(Item::Interface(iface)) = result.root.items.first() [INFO] [stdout] 3122 ~ && let Some(InterfaceItem::Func(f)) = iface.items.first() { [INFO] [stdout] 3123 | assert!(f.sig.is_async); [INFO] [stdout] 3124 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:3241:9 [INFO] [stdout] | [INFO] [stdout] 3241 | / if let Some(Item::Interface(iface)) = result.root.items.first() { [INFO] [stdout] 3242 | | if let Some(InterfaceItem::Func(f)) = iface.items.first() { [INFO] [stdout] 3243 | | assert_eq!(f.gates.gates.len(), 1); [INFO] [stdout] 3244 | | if let Gate::Unstable(g) = &f.gates.gates[0] { [INFO] [stdout] ... | [INFO] [stdout] 3250 | | } [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] 3241 ~ if let Some(Item::Interface(iface)) = result.root.items.first() [INFO] [stdout] 3242 ~ && let Some(InterfaceItem::Func(f)) = iface.items.first() { [INFO] [stdout] 3243 | assert_eq!(f.gates.gates.len(), 1); [INFO] [stdout] ... [INFO] [stdout] 3248 | } [INFO] [stdout] 3249 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:3262:9 [INFO] [stdout] | [INFO] [stdout] 3262 | / if let Some(Item::Interface(iface)) = result.root.items.first() { [INFO] [stdout] 3263 | | if let Some(InterfaceItem::Func(f)) = iface.items.first() { [INFO] [stdout] 3264 | | assert_eq!(f.gates.gates.len(), 1); [INFO] [stdout] 3265 | | if let Gate::Deprecated(g) = &f.gates.gates[0] { [INFO] [stdout] ... | [INFO] [stdout] 3273 | | } [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] 3262 ~ if let Some(Item::Interface(iface)) = result.root.items.first() [INFO] [stdout] 3263 ~ && let Some(InterfaceItem::Func(f)) = iface.items.first() { [INFO] [stdout] 3264 | assert_eq!(f.gates.gates.len(), 1); [INFO] [stdout] ... [INFO] [stdout] 3271 | } [INFO] [stdout] 3272 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:3286:9 [INFO] [stdout] | [INFO] [stdout] 3286 | / if let Some(Item::Interface(iface)) = result.root.items.first() { [INFO] [stdout] 3287 | | if let Some(InterfaceItem::Func(f)) = iface.items.first() { [INFO] [stdout] 3288 | | assert_eq!(f.gates.gates.len(), 2); [INFO] [stdout] 3289 | | assert!(matches!(&f.gates.gates[0], Gate::Since(_))); [INFO] [stdout] ... | [INFO] [stdout] 3292 | | } [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] 3286 ~ if let Some(Item::Interface(iface)) = result.root.items.first() [INFO] [stdout] 3287 ~ && let Some(InterfaceItem::Func(f)) = iface.items.first() { [INFO] [stdout] 3288 | assert_eq!(f.gates.gates.len(), 2); [INFO] [stdout] 3289 | assert!(matches!(&f.gates.gates[0], Gate::Since(_))); [INFO] [stdout] 3290 | assert!(matches!(&f.gates.gates[1], Gate::Deprecated(_))); [INFO] [stdout] 3291 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:3307:9 [INFO] [stdout] | [INFO] [stdout] 3307 | / if let Some(Item::Interface(iface)) = result.root.items.first() { [INFO] [stdout] 3308 | | if let Some(InterfaceItem::TypeDef(TypeDef::Record(r))) = iface.items.first() { [INFO] [stdout] 3309 | | assert_eq!(r.gates.gates.len(), 1); [INFO] [stdout] 3310 | | } [INFO] [stdout] 3311 | | } [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] 3307 ~ if let Some(Item::Interface(iface)) = result.root.items.first() [INFO] [stdout] 3308 ~ && let Some(InterfaceItem::TypeDef(TypeDef::Record(r))) = iface.items.first() { [INFO] [stdout] 3309 | assert_eq!(r.gates.gates.len(), 1); [INFO] [stdout] 3310 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:3338:9 [INFO] [stdout] | [INFO] [stdout] 3338 | / if let Some(Item::Interface(iface)) = result.root.items.first() { [INFO] [stdout] 3339 | | if let Some(InterfaceItem::Func(f)) = iface.items.first() { [INFO] [stdout] 3340 | | assert_eq!(f.gates.gates.len(), 1); [INFO] [stdout] 3341 | | assert!(f.docs.is_some()); [INFO] [stdout] 3342 | | } [INFO] [stdout] 3343 | | } [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] 3338 ~ if let Some(Item::Interface(iface)) = result.root.items.first() [INFO] [stdout] 3339 ~ && let Some(InterfaceItem::Func(f)) = iface.items.first() { [INFO] [stdout] 3340 | assert_eq!(f.gates.gates.len(), 1); [INFO] [stdout] 3341 | assert!(f.docs.is_some()); [INFO] [stdout] 3342 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:3465:9 [INFO] [stdout] | [INFO] [stdout] 3465 | / if let Some(Item::Interface(iface)) = result.root.items.first() { [INFO] [stdout] 3466 | | if let Some(InterfaceItem::TypeDef(TypeDef::Resource(res))) = iface.items.first() { [INFO] [stdout] 3467 | | assert_eq!(res.items.len(), 1); [INFO] [stdout] 3468 | | if let ResourceItem::Constructor(c) = &res.items[0] { [INFO] [stdout] ... | [INFO] [stdout] 3473 | | } [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] 3465 ~ if let Some(Item::Interface(iface)) = result.root.items.first() [INFO] [stdout] 3466 ~ && let Some(InterfaceItem::TypeDef(TypeDef::Resource(res))) = iface.items.first() { [INFO] [stdout] 3467 | assert_eq!(res.items.len(), 1); [INFO] [stdout] ... [INFO] [stdout] 3471 | } [INFO] [stdout] 3472 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:3486:9 [INFO] [stdout] | [INFO] [stdout] 3486 | / if let Some(Item::Interface(iface)) = result.root.items.first() { [INFO] [stdout] 3487 | | if let Some(InterfaceItem::TypeDef(TypeDef::Resource(res))) = iface.items.first() { [INFO] [stdout] 3488 | | if let ResourceItem::Constructor(c) = &res.items[0] { [INFO] [stdout] 3489 | | assert!(c.result.is_none()); [INFO] [stdout] ... | [INFO] [stdout] 3493 | | } [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] 3486 ~ if let Some(Item::Interface(iface)) = result.root.items.first() [INFO] [stdout] 3487 ~ && let Some(InterfaceItem::TypeDef(TypeDef::Resource(res))) = iface.items.first() { [INFO] [stdout] 3488 | if let ResourceItem::Constructor(c) = &res.items[0] { [INFO] [stdout] ... [INFO] [stdout] 3491 | } [INFO] [stdout] 3492 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:3487:13 [INFO] [stdout] | [INFO] [stdout] 3487 | / if let Some(InterfaceItem::TypeDef(TypeDef::Resource(res))) = iface.items.first() { [INFO] [stdout] 3488 | | if let ResourceItem::Constructor(c) = &res.items[0] { [INFO] [stdout] 3489 | | assert!(c.result.is_none()); [INFO] [stdout] 3490 | | assert_eq!(c.params.len(), 2); [INFO] [stdout] 3491 | | } [INFO] [stdout] 3492 | | } [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] 3487 ~ if let Some(InterfaceItem::TypeDef(TypeDef::Resource(res))) = iface.items.first() [INFO] [stdout] 3488 ~ && let ResourceItem::Constructor(c) = &res.items[0] { [INFO] [stdout] 3489 | assert!(c.result.is_none()); [INFO] [stdout] 3490 | assert_eq!(c.params.len(), 2); [INFO] [stdout] 3491 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:3506:9 [INFO] [stdout] | [INFO] [stdout] 3506 | / if let Some(Item::Interface(iface)) = result.root.items.first() { [INFO] [stdout] 3507 | | if let Some(InterfaceItem::TypeDef(TypeDef::Resource(res))) = iface.items.first() { [INFO] [stdout] 3508 | | if let ResourceItem::Constructor(c) = &res.items[0] { [INFO] [stdout] 3509 | | assert!(c.result.is_some()); [INFO] [stdout] ... | [INFO] [stdout] 3513 | | } [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] 3506 ~ if let Some(Item::Interface(iface)) = result.root.items.first() [INFO] [stdout] 3507 ~ && let Some(InterfaceItem::TypeDef(TypeDef::Resource(res))) = iface.items.first() { [INFO] [stdout] 3508 | if let ResourceItem::Constructor(c) = &res.items[0] { [INFO] [stdout] ... [INFO] [stdout] 3511 | } [INFO] [stdout] 3512 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:3507:13 [INFO] [stdout] | [INFO] [stdout] 3507 | / if let Some(InterfaceItem::TypeDef(TypeDef::Resource(res))) = iface.items.first() { [INFO] [stdout] 3508 | | if let ResourceItem::Constructor(c) = &res.items[0] { [INFO] [stdout] 3509 | | assert!(c.result.is_some()); [INFO] [stdout] 3510 | | assert_eq!(c.params.len(), 1); [INFO] [stdout] 3511 | | } [INFO] [stdout] 3512 | | } [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] 3507 ~ if let Some(InterfaceItem::TypeDef(TypeDef::Resource(res))) = iface.items.first() [INFO] [stdout] 3508 ~ && let ResourceItem::Constructor(c) = &res.items[0] { [INFO] [stdout] 3509 | assert!(c.result.is_some()); [INFO] [stdout] 3510 | assert_eq!(c.params.len(), 1); [INFO] [stdout] 3511 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:3526:9 [INFO] [stdout] | [INFO] [stdout] 3526 | / if let Some(Item::Interface(iface)) = result.root.items.first() { [INFO] [stdout] 3527 | | if let Some(InterfaceItem::TypeDef(TypeDef::Resource(res))) = iface.items.first() { [INFO] [stdout] 3528 | | if let ResourceItem::Constructor(c) = &res.items[0] { [INFO] [stdout] 3529 | | assert!(c.result.is_some()); [INFO] [stdout] ... | [INFO] [stdout] 3532 | | } [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] 3526 ~ if let Some(Item::Interface(iface)) = result.root.items.first() [INFO] [stdout] 3527 ~ && let Some(InterfaceItem::TypeDef(TypeDef::Resource(res))) = iface.items.first() { [INFO] [stdout] 3528 | if let ResourceItem::Constructor(c) = &res.items[0] { [INFO] [stdout] 3529 | assert!(c.result.is_some()); [INFO] [stdout] 3530 | } [INFO] [stdout] 3531 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:3527:13 [INFO] [stdout] | [INFO] [stdout] 3527 | / if let Some(InterfaceItem::TypeDef(TypeDef::Resource(res))) = iface.items.first() { [INFO] [stdout] 3528 | | if let ResourceItem::Constructor(c) = &res.items[0] { [INFO] [stdout] 3529 | | assert!(c.result.is_some()); [INFO] [stdout] 3530 | | } [INFO] [stdout] 3531 | | } [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] 3527 ~ if let Some(InterfaceItem::TypeDef(TypeDef::Resource(res))) = iface.items.first() [INFO] [stdout] 3528 ~ && let ResourceItem::Constructor(c) = &res.items[0] { [INFO] [stdout] 3529 | assert!(c.result.is_some()); [INFO] [stdout] 3530 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:3545:9 [INFO] [stdout] | [INFO] [stdout] 3545 | / if let Some(Item::Interface(iface)) = result.root.items.first() { [INFO] [stdout] 3546 | | if let Some(InterfaceItem::TypeDef(TypeDef::Resource(res))) = iface.items.first() { [INFO] [stdout] 3547 | | if let ResourceItem::Constructor(c) = &res.items[0] { [INFO] [stdout] 3548 | | assert!(c.result.is_some()); [INFO] [stdout] ... | [INFO] [stdout] 3559 | | } [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] 3545 ~ if let Some(Item::Interface(iface)) = result.root.items.first() [INFO] [stdout] 3546 ~ && let Some(InterfaceItem::TypeDef(TypeDef::Resource(res))) = iface.items.first() { [INFO] [stdout] 3547 | if let ResourceItem::Constructor(c) = &res.items[0] { [INFO] [stdout] ... [INFO] [stdout] 3557 | } [INFO] [stdout] 3558 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-syntax/src/parser.rs:3546:13 [INFO] [stdout] | [INFO] [stdout] 3546 | / if let Some(InterfaceItem::TypeDef(TypeDef::Resource(res))) = iface.items.first() { [INFO] [stdout] 3547 | | if let ResourceItem::Constructor(c) = &res.items[0] { [INFO] [stdout] 3548 | | assert!(c.result.is_some()); [INFO] [stdout] 3549 | | if let Type::Result(r) = c.result.as_ref().unwrap() { [INFO] [stdout] ... | [INFO] [stdout] 3558 | | } [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] 3546 ~ if let Some(InterfaceItem::TypeDef(TypeDef::Resource(res))) = iface.items.first() [INFO] [stdout] 3547 ~ && let ResourceItem::Constructor(c) = &res.items[0] { [INFO] [stdout] 3548 | assert!(c.result.is_some()); [INFO] [stdout] ... [INFO] [stdout] 3556 | } [INFO] [stdout] 3557 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.1 [INFO] [stderr] Compiling zerovec-derive v0.11.2 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Compiling tokio-macros v2.6.0 [INFO] [stderr] Compiling pin-project-internal v1.1.10 [INFO] [stderr] Compiling tracing-attributes v0.1.31 [INFO] [stderr] Compiling serde_repr v0.1.20 [INFO] [stderr] Compiling async-trait v0.1.89 [INFO] [stderr] Compiling auto_impl v1.3.0 [INFO] [stderr] Compiling tower-lsp-macros v0.9.0 [INFO] [stderr] Checking tokio v1.49.0 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking pin-project v1.1.10 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking tracing v0.1.44 [INFO] [stderr] Checking yoke v0.8.1 [INFO] [stderr] Checking zerovec v0.11.5 [INFO] [stderr] Checking zerotrie v0.2.3 [INFO] [stderr] Checking tinystr v0.8.2 [INFO] [stderr] Checking potential_utf v0.1.4 [INFO] [stderr] Checking icu_collections v2.1.1 [INFO] [stderr] Checking icu_locale_core v2.1.1 [INFO] [stderr] Checking tokio-util v0.7.18 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking icu_provider v2.1.1 [INFO] [stderr] Checking icu_normalizer v2.1.1 [INFO] [stderr] Checking icu_properties v2.1.2 [INFO] [stderr] Checking futures v0.3.31 [INFO] [stderr] Checking tower v0.4.13 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking url v2.5.8 [INFO] [stderr] Checking lsp-types v0.94.1 [INFO] [stderr] Checking tower-lsp v0.20.0 [INFO] [stderr] Checking witcraft-lsp v0.1.0 (/opt/rustwide/workdir/crates/witcraft-lsp) [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:183:9 [INFO] [stdout] | [INFO] [stdout] 183 | / if let Some(entry) = self.unopened_cache.get(&path) { [INFO] [stdout] 184 | | if entry.stamp == stamp { [INFO] [stdout] 185 | | debug!(uri = %uri, source = "cache", "unopened cache hit"); [INFO] [stdout] 186 | | return Some(entry.clone()); [INFO] [stdout] 187 | | } [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] 183 ~ if let Some(entry) = self.unopened_cache.get(&path) [INFO] [stdout] 184 ~ && entry.stamp == stamp { [INFO] [stdout] 185 | debug!(uri = %uri, source = "cache", "unopened cache hit"); [INFO] [stdout] 186 | return Some(entry.clone()); [INFO] [stdout] 187 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:389:16 [INFO] [stdout] | [INFO] [stdout] 389 | } else if let Some(root_uri) = params.root_uri { [INFO] [stdout] | ________________^ [INFO] [stdout] 390 | | if let Ok(path) = root_uri.to_file_path() { [INFO] [stdout] 391 | | info!("Initializing workspace with root URI: {:?}", path); [INFO] [stdout] 392 | | self.workspace.initialize(vec![path]); [INFO] [stdout] 393 | | } [INFO] [stdout] 394 | | } [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] 389 ~ } else if let Some(root_uri) = params.root_uri [INFO] [stdout] 390 ~ && let Ok(path) = root_uri.to_file_path() { [INFO] [stdout] 391 | info!("Initializing workspace with root URI: {:?}", path); [INFO] [stdout] 392 | self.workspace.initialize(vec![path]); [INFO] [stdout] 393 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:613:21 [INFO] [stdout] | [INFO] [stdout] 613 | / if let Some(target_range) = [INFO] [stdout] 614 | | self.range_to_lsp_in_uri(&global_def.uri, global_def.name_range) [INFO] [stdout] 615 | | { [INFO] [stdout] 616 | | Some(Location::new(target_uri, target_range)) [INFO] [stdout] 617 | | } else { [INFO] [stdout] 618 | | None [INFO] [stdout] 619 | | } [INFO] [stdout] | |_____________________^ help: try: `self.range_to_lsp_in_uri(&global_def.uri, global_def.name_range).map(|target_range| Location::new(target_uri, target_range))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:1194:13 [INFO] [stdout] | [INFO] [stdout] 1194 | / if diag.message.starts_with("unused import") { [INFO] [stdout] 1195 | | if let Some(action) = [INFO] [stdout] 1196 | | self.make_remove_import_action(&uri, diag, &index, &line_index, &content) [INFO] [stdout] ... | [INFO] [stdout] 1200 | | } [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] 1194 ~ if diag.message.starts_with("unused import") [INFO] [stdout] 1195 ~ && let Some(action) = [INFO] [stdout] 1196 | self.make_remove_import_action(&uri, diag, &index, &line_index, &content) [INFO] [stdout] 1197 | { [INFO] [stdout] 1198 | actions.push(action); [INFO] [stdout] 1199 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:1203:13 [INFO] [stdout] | [INFO] [stdout] 1203 | / if diag.message.starts_with("undefined type") { [INFO] [stdout] 1204 | | if let Some(action) = [INFO] [stdout] 1205 | | self.make_add_import_action(&uri, diag, &index, &root, &line_index) [INFO] [stdout] ... | [INFO] [stdout] 1209 | | } [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] 1203 ~ if diag.message.starts_with("undefined type") [INFO] [stdout] 1204 ~ && let Some(action) = [INFO] [stdout] 1205 | self.make_add_import_action(&uri, diag, &index, &root, &line_index) [INFO] [stdout] 1206 | { [INFO] [stdout] 1207 | actions.push(action); [INFO] [stdout] 1208 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:1452:13 [INFO] [stdout] | [INFO] [stdout] 1452 | / if !edits.is_empty() { [INFO] [stdout] 1453 | | if let Ok(url) = Url::parse(file_uri) { [INFO] [stdout] 1454 | | changes.insert(url, edits); [INFO] [stdout] 1455 | | } [INFO] [stdout] 1456 | | } [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] 1452 ~ if !edits.is_empty() [INFO] [stdout] 1453 ~ && let Ok(url) = Url::parse(file_uri) { [INFO] [stdout] 1454 | changes.insert(url, edits); [INFO] [stdout] 1455 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:1718:20 [INFO] [stdout] | [INFO] [stdout] 1718 | if &*reference.name == name { [INFO] [stdout] | ----------------^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `*reference.name` [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: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:2289:9 [INFO] [stdout] | [INFO] [stdout] 2289 | / if let witcraft_syntax::ast::Item::Interface(iface) = item { [INFO] [stdout] 2290 | | if iface.name.name.as_ref() == interface_name { [INFO] [stdout] 2291 | | return Some(iface.name.range); [INFO] [stdout] 2292 | | } [INFO] [stdout] 2293 | | } [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] 2289 ~ if let witcraft_syntax::ast::Item::Interface(iface) = item [INFO] [stdout] 2290 ~ && iface.name.name.as_ref() == interface_name { [INFO] [stdout] 2291 | return Some(iface.name.range); [INFO] [stdout] 2292 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:2519:76 [INFO] [stdout] | [INFO] [stdout] 2519 | } else if trimmed.ends_with("interface") || trimmed.ends_with("world") { [INFO] [stdout] | ____________________________________________________________________________^ [INFO] [stdout] 2520 | | vec![] [INFO] [stdout] 2521 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:2521:12 [INFO] [stdout] | [INFO] [stdout] 2521 | } else { [INFO] [stdout] | ____________^ [INFO] [stdout] 2522 | | vec![] [INFO] [stdout] 2523 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `match` [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:2762:25 [INFO] [stdout] | [INFO] [stdout] 2762 | / if let witcraft_syntax::TypeDef::Alias(alias) = typedef { [INFO] [stdout] 2763 | | add_type_alias_hint(alias, line_index, hints); [INFO] [stdout] 2764 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:2761:61 [INFO] [stdout] | [INFO] [stdout] 2761 | witcraft_syntax::InterfaceItem::TypeDef(typedef) => { [INFO] [stdout] | ^^^^^^^ replace this binding [INFO] [stdout] 2762 | if let witcraft_syntax::TypeDef::Alias(alias) = typedef { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `match` [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:2777:25 [INFO] [stdout] | [INFO] [stdout] 2777 | / if let witcraft_syntax::TypeDef::Alias(alias) = typedef { [INFO] [stdout] 2778 | | add_type_alias_hint(alias, line_index, hints); [INFO] [stdout] 2779 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:2776:57 [INFO] [stdout] | [INFO] [stdout] 2776 | witcraft_syntax::WorldItem::TypeDef(typedef) => { [INFO] [stdout] | ^^^^^^^ replace this binding [INFO] [stdout] 2777 | if let witcraft_syntax::TypeDef::Alias(alias) = typedef { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:2827:13 [INFO] [stdout] | [INFO] [stdout] 2827 | / if let Some(def) = pkg.find_definition(name_item.name.name.as_ref()) { [INFO] [stdout] 2828 | | if def.uri.as_str() != uri { [INFO] [stdout] 2829 | | let file_name = def.uri.rsplit('/').next().unwrap_or(&def.uri); [INFO] [stdout] 2830 | | let pos = line_index.position(name_item.range.end()); [INFO] [stdout] ... | [INFO] [stdout] 2845 | | } [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] 2827 ~ if let Some(def) = pkg.find_definition(name_item.name.name.as_ref()) [INFO] [stdout] 2828 ~ && def.uri.as_str() != uri { [INFO] [stdout] 2829 | let file_name = def.uri.rsplit('/').next().unwrap_or(&def.uri); [INFO] [stdout] ... [INFO] [stdout] 2843 | }); [INFO] [stdout] 2844 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:3004:13 [INFO] [stdout] | [INFO] [stdout] 3004 | / if imp.name.range.contains(offset) { [INFO] [stdout] 3005 | | ranges.push(imp.name.range); [INFO] [stdout] 3006 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3003 ~ witcraft_syntax::WorldItem::Import(imp) [INFO] [stdout] 3004 ~ if imp.name.range.contains(offset) => { [INFO] [stdout] 3005 | ranges.push(imp.name.range); [INFO] [stdout] 3006 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:3009:13 [INFO] [stdout] | [INFO] [stdout] 3009 | / if exp.name.range.contains(offset) { [INFO] [stdout] 3010 | | ranges.push(exp.name.range); [INFO] [stdout] 3011 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3008 ~ witcraft_syntax::WorldItem::Export(exp) [INFO] [stdout] 3009 ~ if exp.name.range.contains(offset) => { [INFO] [stdout] 3010 | ranges.push(exp.name.range); [INFO] [stdout] 3011 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> crates/witcraft-lsp/src/workspace/package_index.rs:101:9 [INFO] [stdout] | [INFO] [stdout] 101 | / self.definitions [INFO] [stdout] 102 | | .get(name) [INFO] [stdout] 103 | | .map(|defs| defs.clone()) [INFO] [stdout] | |_____________________________________^ [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] help: consider calling the dedicated `cloned` method [INFO] [stdout] | [INFO] [stdout] 101 ~ self.definitions [INFO] [stdout] 102 + .get(name).cloned() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-lsp/src/workspace/resolver.rs:141:13 [INFO] [stdout] | [INFO] [stdout] 141 | / if reference.kind == witcraft_syntax::ReferenceKind::Type && !reference.name.is_empty() [INFO] [stdout] 142 | | { [INFO] [stdout] 143 | | if matches!( [INFO] [stdout] 144 | | self.resolve_type(uri, &reference.name, local_index), [INFO] [stdout] ... | [INFO] [stdout] 157 | | } [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] 141 ~ if reference.kind == witcraft_syntax::ReferenceKind::Type && !reference.name.is_empty() [INFO] [stdout] 142 ~ && matches!( [INFO] [stdout] 143 | self.resolve_type(uri, &reference.name, local_index), [INFO] [stdout] ... [INFO] [stdout] 154 | }); [INFO] [stdout] 155 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-lsp/src/workspace/mod.rs:142:13 [INFO] [stdout] | [INFO] [stdout] 142 | / if let Some(path) = uri_to_path(uri) { [INFO] [stdout] 143 | | if let Some(parent) = path.parent() { [INFO] [stdout] 144 | | self.ensure_package_index(parent); [INFO] [stdout] 145 | | self.file_to_package [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 let Some(path) = uri_to_path(uri) [INFO] [stdout] 143 ~ && let Some(parent) = path.parent() { [INFO] [stdout] 144 | self.ensure_package_index(parent); [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] --> crates/witcraft-lsp/src/workspace/mod.rs:165:9 [INFO] [stdout] | [INFO] [stdout] 165 | / if let Some((_, pkg_dir)) = self.file_to_package.remove(uri) { [INFO] [stdout] 166 | | if let Some(mut pkg) = self.packages.get_mut(&pkg_dir) { [INFO] [stdout] 167 | | pkg.remove_file(uri); [INFO] [stdout] 168 | | } [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] 165 ~ if let Some((_, pkg_dir)) = self.file_to_package.remove(uri) [INFO] [stdout] 166 ~ && let Some(mut pkg) = self.packages.get_mut(&pkg_dir) { [INFO] [stdout] 167 | pkg.remove_file(uri); [INFO] [stdout] 168 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-lsp/src/workspace/mod.rs:247:17 [INFO] [stdout] | [INFO] [stdout] 247 | / if let Some(name) = path.file_name().and_then(|n| n.to_str()) { [INFO] [stdout] 248 | | if !name.starts_with('.') && name != "target" && name != "node_modules" { [INFO] [stdout] 249 | | files.extend(find_wit_files(&path)); [INFO] [stdout] 250 | | } [INFO] [stdout] 251 | | } [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] 247 ~ if let Some(name) = path.file_name().and_then(|n| n.to_str()) [INFO] [stdout] 248 ~ && !name.starts_with('.') && name != "target" && name != "node_modules" { [INFO] [stdout] 249 | files.extend(find_wit_files(&path)); [INFO] [stdout] 250 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:183:9 [INFO] [stdout] | [INFO] [stdout] 183 | / if let Some(entry) = self.unopened_cache.get(&path) { [INFO] [stdout] 184 | | if entry.stamp == stamp { [INFO] [stdout] 185 | | debug!(uri = %uri, source = "cache", "unopened cache hit"); [INFO] [stdout] 186 | | return Some(entry.clone()); [INFO] [stdout] 187 | | } [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] 183 ~ if let Some(entry) = self.unopened_cache.get(&path) [INFO] [stdout] 184 ~ && entry.stamp == stamp { [INFO] [stdout] 185 | debug!(uri = %uri, source = "cache", "unopened cache hit"); [INFO] [stdout] 186 | return Some(entry.clone()); [INFO] [stdout] 187 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:389:16 [INFO] [stdout] | [INFO] [stdout] 389 | } else if let Some(root_uri) = params.root_uri { [INFO] [stdout] | ________________^ [INFO] [stdout] 390 | | if let Ok(path) = root_uri.to_file_path() { [INFO] [stdout] 391 | | info!("Initializing workspace with root URI: {:?}", path); [INFO] [stdout] 392 | | self.workspace.initialize(vec![path]); [INFO] [stdout] 393 | | } [INFO] [stdout] 394 | | } [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] 389 ~ } else if let Some(root_uri) = params.root_uri [INFO] [stdout] 390 ~ && let Ok(path) = root_uri.to_file_path() { [INFO] [stdout] 391 | info!("Initializing workspace with root URI: {:?}", path); [INFO] [stdout] 392 | self.workspace.initialize(vec![path]); [INFO] [stdout] 393 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:613:21 [INFO] [stdout] | [INFO] [stdout] 613 | / if let Some(target_range) = [INFO] [stdout] 614 | | self.range_to_lsp_in_uri(&global_def.uri, global_def.name_range) [INFO] [stdout] 615 | | { [INFO] [stdout] 616 | | Some(Location::new(target_uri, target_range)) [INFO] [stdout] 617 | | } else { [INFO] [stdout] 618 | | None [INFO] [stdout] 619 | | } [INFO] [stdout] | |_____________________^ help: try: `self.range_to_lsp_in_uri(&global_def.uri, global_def.name_range).map(|target_range| Location::new(target_uri, target_range))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:1194:13 [INFO] [stdout] | [INFO] [stdout] 1194 | / if diag.message.starts_with("unused import") { [INFO] [stdout] 1195 | | if let Some(action) = [INFO] [stdout] 1196 | | self.make_remove_import_action(&uri, diag, &index, &line_index, &content) [INFO] [stdout] ... | [INFO] [stdout] 1200 | | } [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] 1194 ~ if diag.message.starts_with("unused import") [INFO] [stdout] 1195 ~ && let Some(action) = [INFO] [stdout] 1196 | self.make_remove_import_action(&uri, diag, &index, &line_index, &content) [INFO] [stdout] 1197 | { [INFO] [stdout] 1198 | actions.push(action); [INFO] [stdout] 1199 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:1203:13 [INFO] [stdout] | [INFO] [stdout] 1203 | / if diag.message.starts_with("undefined type") { [INFO] [stdout] 1204 | | if let Some(action) = [INFO] [stdout] 1205 | | self.make_add_import_action(&uri, diag, &index, &root, &line_index) [INFO] [stdout] ... | [INFO] [stdout] 1209 | | } [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] 1203 ~ if diag.message.starts_with("undefined type") [INFO] [stdout] 1204 ~ && let Some(action) = [INFO] [stdout] 1205 | self.make_add_import_action(&uri, diag, &index, &root, &line_index) [INFO] [stdout] 1206 | { [INFO] [stdout] 1207 | actions.push(action); [INFO] [stdout] 1208 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:1452:13 [INFO] [stdout] | [INFO] [stdout] 1452 | / if !edits.is_empty() { [INFO] [stdout] 1453 | | if let Ok(url) = Url::parse(file_uri) { [INFO] [stdout] 1454 | | changes.insert(url, edits); [INFO] [stdout] 1455 | | } [INFO] [stdout] 1456 | | } [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] 1452 ~ if !edits.is_empty() [INFO] [stdout] 1453 ~ && let Ok(url) = Url::parse(file_uri) { [INFO] [stdout] 1454 | changes.insert(url, edits); [INFO] [stdout] 1455 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:1718:20 [INFO] [stdout] | [INFO] [stdout] 1718 | if &*reference.name == name { [INFO] [stdout] | ----------------^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `*reference.name` [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: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:2289:9 [INFO] [stdout] | [INFO] [stdout] 2289 | / if let witcraft_syntax::ast::Item::Interface(iface) = item { [INFO] [stdout] 2290 | | if iface.name.name.as_ref() == interface_name { [INFO] [stdout] 2291 | | return Some(iface.name.range); [INFO] [stdout] 2292 | | } [INFO] [stdout] 2293 | | } [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] 2289 ~ if let witcraft_syntax::ast::Item::Interface(iface) = item [INFO] [stdout] 2290 ~ && iface.name.name.as_ref() == interface_name { [INFO] [stdout] 2291 | return Some(iface.name.range); [INFO] [stdout] 2292 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:2519:76 [INFO] [stdout] | [INFO] [stdout] 2519 | } else if trimmed.ends_with("interface") || trimmed.ends_with("world") { [INFO] [stdout] | ____________________________________________________________________________^ [INFO] [stdout] 2520 | | vec![] [INFO] [stdout] 2521 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:2521:12 [INFO] [stdout] | [INFO] [stdout] 2521 | } else { [INFO] [stdout] | ____________^ [INFO] [stdout] 2522 | | vec![] [INFO] [stdout] 2523 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `match` [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:2762:25 [INFO] [stdout] | [INFO] [stdout] 2762 | / if let witcraft_syntax::TypeDef::Alias(alias) = typedef { [INFO] [stdout] 2763 | | add_type_alias_hint(alias, line_index, hints); [INFO] [stdout] 2764 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:2761:61 [INFO] [stdout] | [INFO] [stdout] 2761 | witcraft_syntax::InterfaceItem::TypeDef(typedef) => { [INFO] [stdout] | ^^^^^^^ replace this binding [INFO] [stdout] 2762 | if let witcraft_syntax::TypeDef::Alias(alias) = typedef { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `match` [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:2777:25 [INFO] [stdout] | [INFO] [stdout] 2777 | / if let witcraft_syntax::TypeDef::Alias(alias) = typedef { [INFO] [stdout] 2778 | | add_type_alias_hint(alias, line_index, hints); [INFO] [stdout] 2779 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:2776:57 [INFO] [stdout] | [INFO] [stdout] 2776 | witcraft_syntax::WorldItem::TypeDef(typedef) => { [INFO] [stdout] | ^^^^^^^ replace this binding [INFO] [stdout] 2777 | if let witcraft_syntax::TypeDef::Alias(alias) = typedef { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:2827:13 [INFO] [stdout] | [INFO] [stdout] 2827 | / if let Some(def) = pkg.find_definition(name_item.name.name.as_ref()) { [INFO] [stdout] 2828 | | if def.uri.as_str() != uri { [INFO] [stdout] 2829 | | let file_name = def.uri.rsplit('/').next().unwrap_or(&def.uri); [INFO] [stdout] 2830 | | let pos = line_index.position(name_item.range.end()); [INFO] [stdout] ... | [INFO] [stdout] 2845 | | } [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] 2827 ~ if let Some(def) = pkg.find_definition(name_item.name.name.as_ref()) [INFO] [stdout] 2828 ~ && def.uri.as_str() != uri { [INFO] [stdout] 2829 | let file_name = def.uri.rsplit('/').next().unwrap_or(&def.uri); [INFO] [stdout] ... [INFO] [stdout] 2843 | }); [INFO] [stdout] 2844 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:3004:13 [INFO] [stdout] | [INFO] [stdout] 3004 | / if imp.name.range.contains(offset) { [INFO] [stdout] 3005 | | ranges.push(imp.name.range); [INFO] [stdout] 3006 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3003 ~ witcraft_syntax::WorldItem::Import(imp) [INFO] [stdout] 3004 ~ if imp.name.range.contains(offset) => { [INFO] [stdout] 3005 | ranges.push(imp.name.range); [INFO] [stdout] 3006 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:3009:13 [INFO] [stdout] | [INFO] [stdout] 3009 | / if exp.name.range.contains(offset) { [INFO] [stdout] 3010 | | ranges.push(exp.name.range); [INFO] [stdout] 3011 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3008 ~ witcraft_syntax::WorldItem::Export(exp) [INFO] [stdout] 3009 ~ if exp.name.range.contains(offset) => { [INFO] [stdout] 3010 | ranges.push(exp.name.range); [INFO] [stdout] 3011 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:3864:24 [INFO] [stdout] | [INFO] [stdout] 3864 | if &*reference.name == name { [INFO] [stdout] | ----------------^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `*reference.name` [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: needlessly taken reference of left operand [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:3964:24 [INFO] [stdout] | [INFO] [stdout] 3964 | if &*reference.name == name { [INFO] [stdout] | ----------------^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `*reference.name` [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: needlessly taken reference of left operand [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:4250:24 [INFO] [stdout] | [INFO] [stdout] 4250 | if &*reference.name == name { [INFO] [stdout] | ----------------^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `*reference.name` [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: consider using `sort_by_key` [INFO] [stdout] --> crates/witcraft-lsp/src/server.rs:4581:9 [INFO] [stdout] | [INFO] [stdout] 4581 | edits_with_offsets.sort_by(|a, b| b.0.cmp(&a.0)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 4581 - edits_with_offsets.sort_by(|a, b| b.0.cmp(&a.0)); [INFO] [stdout] 4581 + edits_with_offsets.sort_by_key(|b| std::cmp::Reverse(b.0)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> crates/witcraft-lsp/src/workspace/package_index.rs:101:9 [INFO] [stdout] | [INFO] [stdout] 101 | / self.definitions [INFO] [stdout] 102 | | .get(name) [INFO] [stdout] 103 | | .map(|defs| defs.clone()) [INFO] [stdout] | |_____________________________________^ [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] help: consider calling the dedicated `cloned` method [INFO] [stdout] | [INFO] [stdout] 101 ~ self.definitions [INFO] [stdout] 102 + .get(name).cloned() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-lsp/src/workspace/resolver.rs:141:13 [INFO] [stdout] | [INFO] [stdout] 141 | / if reference.kind == witcraft_syntax::ReferenceKind::Type && !reference.name.is_empty() [INFO] [stdout] 142 | | { [INFO] [stdout] 143 | | if matches!( [INFO] [stdout] 144 | | self.resolve_type(uri, &reference.name, local_index), [INFO] [stdout] ... | [INFO] [stdout] 157 | | } [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] 141 ~ if reference.kind == witcraft_syntax::ReferenceKind::Type && !reference.name.is_empty() [INFO] [stdout] 142 ~ && matches!( [INFO] [stdout] 143 | self.resolve_type(uri, &reference.name, local_index), [INFO] [stdout] ... [INFO] [stdout] 154 | }); [INFO] [stdout] 155 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-lsp/src/workspace/mod.rs:142:13 [INFO] [stdout] | [INFO] [stdout] 142 | / if let Some(path) = uri_to_path(uri) { [INFO] [stdout] 143 | | if let Some(parent) = path.parent() { [INFO] [stdout] 144 | | self.ensure_package_index(parent); [INFO] [stdout] 145 | | self.file_to_package [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 let Some(path) = uri_to_path(uri) [INFO] [stdout] 143 ~ && let Some(parent) = path.parent() { [INFO] [stdout] 144 | self.ensure_package_index(parent); [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] --> crates/witcraft-lsp/src/workspace/mod.rs:165:9 [INFO] [stdout] | [INFO] [stdout] 165 | / if let Some((_, pkg_dir)) = self.file_to_package.remove(uri) { [INFO] [stdout] 166 | | if let Some(mut pkg) = self.packages.get_mut(&pkg_dir) { [INFO] [stdout] 167 | | pkg.remove_file(uri); [INFO] [stdout] 168 | | } [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] 165 ~ if let Some((_, pkg_dir)) = self.file_to_package.remove(uri) [INFO] [stdout] 166 ~ && let Some(mut pkg) = self.packages.get_mut(&pkg_dir) { [INFO] [stdout] 167 | pkg.remove_file(uri); [INFO] [stdout] 168 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/witcraft-lsp/src/workspace/mod.rs:247:17 [INFO] [stdout] | [INFO] [stdout] 247 | / if let Some(name) = path.file_name().and_then(|n| n.to_str()) { [INFO] [stdout] 248 | | if !name.starts_with('.') && name != "target" && name != "node_modules" { [INFO] [stdout] 249 | | files.extend(find_wit_files(&path)); [INFO] [stdout] 250 | | } [INFO] [stdout] 251 | | } [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] 247 ~ if let Some(name) = path.file_name().and_then(|n| n.to_str()) [INFO] [stdout] 248 ~ && !name.starts_with('.') && name != "target" && name != "node_modules" { [INFO] [stdout] 249 | files.extend(find_wit_files(&path)); [INFO] [stdout] 250 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 35.06s [INFO] running `Command { std: "docker" "inspect" "a1ef47960272b048bd24921455e8c7ca7fcddc472ec697f9af4b9bb73a84d86d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a1ef47960272b048bd24921455e8c7ca7fcddc472ec697f9af4b9bb73a84d86d", kill_on_drop: false }` [INFO] [stdout] a1ef47960272b048bd24921455e8c7ca7fcddc472ec697f9af4b9bb73a84d86d