[INFO] cloning repository https://github.com/Cupnfish/cramp [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Cupnfish/cramp" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCupnfish%2Fcramp", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCupnfish%2Fcramp'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] a9aec86331df101c8460ebc8558f1ba6df17eb94 [INFO] linting Cupnfish/cramp against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCupnfish%2Fcramp" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Cupnfish/cramp [INFO] finished tweaking git repo https://github.com/Cupnfish/cramp [INFO] tweaked toml for git repo https://github.com/Cupnfish/cramp written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Cupnfish/cramp 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/Cupnfish/cramp 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 git repository `https://github.com/modelcontextprotocol/rust-sdk` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded cargo-util-schemas v0.2.0 [INFO] [stderr] Downloaded cargo-platform v0.2.0 [INFO] [stderr] Downloaded sse-stream v0.2.0 [INFO] [stderr] Downloaded tracing-attributes v0.1.29 [INFO] [stderr] Downloaded cargo_metadata v0.20.0 [INFO] [stderr] Downloaded lsp-types v0.97.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] b595f4f8d8994b56a483b2206fbcaf7e24371ad9a64056752db29e7cb1a8924a [INFO] running `Command { std: "docker" "start" "-a" "b595f4f8d8994b56a483b2206fbcaf7e24371ad9a64056752db29e7cb1a8924a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b595f4f8d8994b56a483b2206fbcaf7e24371ad9a64056752db29e7cb1a8924a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b595f4f8d8994b56a483b2206fbcaf7e24371ad9a64056752db29e7cb1a8924a", kill_on_drop: false }` [INFO] [stdout] b595f4f8d8994b56a483b2206fbcaf7e24371ad9a64056752db29e7cb1a8924a [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] da0e13719bf271287364c7cf00d25fba6c695f28343ecc70e745c7ebf08fa4ca [INFO] running `Command { std: "docker" "start" "-a" "da0e13719bf271287364c7cf00d25fba6c695f28343ecc70e745c7ebf08fa4ca", kill_on_drop: false }` [INFO] [stderr] Compiling syn v2.0.101 [INFO] [stderr] Compiling serde v1.0.219 [INFO] [stderr] Checking scopeguard v1.2.0 [INFO] [stderr] Checking parking_lot_core v0.9.11 [INFO] [stderr] Checking signal-hook-registry v1.4.5 [INFO] [stderr] Checking mio v1.0.4 [INFO] [stderr] Checking socket2 v0.5.10 [INFO] [stderr] Compiling openssl-sys v0.9.109 [INFO] [stderr] Compiling serde_json v1.0.140 [INFO] [stderr] Compiling ring v0.17.14 [INFO] [stderr] Compiling rustls v0.23.27 [INFO] [stderr] Compiling semver v1.0.26 [INFO] [stderr] Checking winnow v0.7.10 [INFO] [stderr] Checking ordered-float v2.10.1 [INFO] [stderr] Compiling camino v1.1.10 [INFO] [stderr] Checking lock_api v0.4.13 [INFO] [stderr] Checking webpki-roots v1.0.0 [INFO] [stderr] Checking rayon v1.10.0 [INFO] [stderr] Checking uuid v1.17.0 [INFO] [stderr] Checking fluent-uri v0.1.4 [INFO] [stderr] Checking parking_lot v0.12.4 [INFO] [stderr] Compiling schemars v0.8.22 [INFO] [stderr] Checking sha2 v0.10.9 [INFO] [stderr] Checking itertools v0.14.0 [INFO] [stderr] Checking similar v2.7.0 [INFO] [stderr] Checking pathdiff v0.2.3 [INFO] [stderr] Compiling rustix v0.38.44 [INFO] [stderr] Checking dyn-clone v1.0.19 [INFO] [stderr] Compiling convert_case v0.7.1 [INFO] [stderr] Checking flate2 v1.1.2 [INFO] [stderr] Checking linux-raw-sys v0.4.15 [INFO] [stderr] Compiling rustix v1.0.7 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Compiling openssl v0.10.73 [INFO] [stderr] Compiling native-tls v0.2.14 [INFO] [stderr] Checking signal-hook v0.3.18 [INFO] [stderr] Checking bytemuck v1.23.1 [INFO] [stderr] Checking clap_builder v4.5.39 [INFO] [stderr] Checking tracing-log v0.2.0 [INFO] [stderr] Checking thread_local v1.1.8 [INFO] [stderr] Checking cramp-assets v0.1.0 (/opt/rustwide/workdir/crates/assets) [INFO] [stderr] Checking png v0.17.16 [INFO] [stderr] Checking signal-hook-mio v0.2.4 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Checking image v0.25.6 [INFO] [stderr] Checking dashmap v6.1.0 [INFO] [stderr] Checking rustls-webpki v0.103.3 [INFO] [stderr] Checking x11rb v0.13.1 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling serde_derive_internals v0.29.1 [INFO] [stderr] Checking arboard v3.5.0 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.0 [INFO] [stderr] Compiling tokio-macros v2.5.0 [INFO] [stderr] Compiling zerovec-derive v0.11.1 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Compiling tracing-attributes v0.1.29 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Compiling thiserror-impl v2.0.12 [INFO] [stderr] Compiling serde_repr v0.1.20 [INFO] [stderr] Compiling axum-macros v0.5.0 [INFO] [stderr] Compiling rmcp-macros v0.1.5 (https://github.com/modelcontextprotocol/rust-sdk?rev=db03f63#db03f63e) [INFO] [stderr] Compiling schemars_derive v0.8.22 [INFO] [stderr] Compiling derive_more-impl v2.0.1 [INFO] [stderr] Compiling clap_derive v4.5.32 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking tokio v1.45.1 [INFO] [stderr] Checking derive_more v2.0.1 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking crossterm v0.29.0 [INFO] [stderr] Checking thiserror v2.0.12 [INFO] [stderr] Checking yoke v0.8.0 [INFO] [stderr] Checking tracing v0.1.41 [INFO] [stderr] Checking zerovec v0.11.2 [INFO] [stderr] Checking zerotrie v0.2.2 [INFO] [stderr] Checking axum-core v0.5.2 [INFO] [stderr] Checking tracing-subscriber v0.3.19 [INFO] [stderr] Checking clap v4.5.39 [INFO] [stderr] Checking tinystr v0.8.1 [INFO] [stderr] Checking potential_utf v0.1.2 [INFO] [stderr] Checking icu_collections v2.0.0 [INFO] [stderr] Checking icu_locale_core v2.0.0 [INFO] [stderr] Checking icu_provider v2.0.0 [INFO] [stderr] Checking icu_properties v2.0.1 [INFO] [stderr] Checking icu_normalizer v2.0.0 [INFO] [stderr] Checking futures-executor v0.3.31 [INFO] [stderr] Checking sse-stream v0.2.0 [INFO] [stderr] Checking futures v0.3.31 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking idna v1.0.3 [INFO] [stderr] Checking url v2.5.4 [INFO] [stderr] Checking toml_datetime v0.6.11 [INFO] [stderr] Checking serde_spanned v0.6.9 [INFO] [stderr] Checking erased-serde v0.4.6 [INFO] [stderr] Checking serde-value v0.7.0 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking cargo-platform v0.2.0 [INFO] [stderr] Checking chrono v0.4.41 [INFO] [stderr] Checking serde_path_to_error v0.1.17 [INFO] [stderr] Checking toml_edit v0.22.27 [INFO] [stderr] Checking tokio-util v0.7.15 [INFO] [stderr] Checking tower v0.5.2 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking tokio-rustls v0.26.2 [INFO] [stderr] Checking tokio-stream v0.1.17 [INFO] [stderr] Checking serde-untagged v0.1.7 [INFO] [stderr] Checking tower-http v0.6.6 [INFO] [stderr] Checking h2 v0.4.10 [INFO] [stderr] Checking lsp-types v0.97.0 [INFO] [stderr] Checking toml v0.8.23 [INFO] [stderr] Checking cargo-util-schemas v0.2.0 [INFO] [stderr] Checking cargo_metadata v0.20.0 [INFO] [stderr] Checking hyper v1.6.0 [INFO] [stderr] Checking hyper-util v0.1.14 [INFO] [stderr] Checking hyper-rustls v0.27.7 [INFO] [stderr] Checking hyper-tls v0.6.0 [INFO] [stderr] Checking axum v0.8.4 [INFO] [stderr] Checking reqwest v0.12.19 [INFO] [stderr] Checking oauth2 v5.0.0 [INFO] [stderr] Checking cramp-lsp v0.1.0 (/opt/rustwide/workdir/crates/lsp) [INFO] [stderr] Checking rmcp v0.1.5 (https://github.com/modelcontextprotocol/rust-sdk?rev=db03f63#db03f63e) [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> crates/lsp/src/cargo.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | / for line in stderr_reader.lines() { [INFO] [stdout] 40 | | if let Ok(line) = line { [INFO] [stdout] 41 | | debug!( [INFO] [stdout] 42 | | "[cargo stderr {:?}]: {}", [INFO] [stdout] ... | [INFO] [stdout] 47 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> crates/lsp/src/cargo.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | / if let Ok(line) = line { [INFO] [stdout] 41 | | debug!( [INFO] [stdout] 42 | | "[cargo stderr {:?}]: {}", [INFO] [stdout] 43 | | project_root_clone.file_name().unwrap_or_default(), [INFO] [stdout] 44 | | line [INFO] [stdout] 45 | | ); [INFO] [stdout] 46 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 39 ~ for line in stderr_reader.lines().flatten() { [INFO] [stdout] 40 + debug!( [INFO] [stdout] 41 + "[cargo stderr {:?}]: {}", [INFO] [stdout] 42 + project_root_clone.file_name().unwrap_or_default(), [INFO] [stdout] 43 + line [INFO] [stdout] 44 + ); [INFO] [stdout] 45 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> crates/lsp/src/cargo.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | / for line in stderr_reader.lines() { [INFO] [stdout] 40 | | if let Ok(line) = line { [INFO] [stdout] 41 | | debug!( [INFO] [stdout] 42 | | "[cargo stderr {:?}]: {}", [INFO] [stdout] ... | [INFO] [stdout] 47 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> crates/lsp/src/cargo.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | / if let Ok(line) = line { [INFO] [stdout] 41 | | debug!( [INFO] [stdout] 42 | | "[cargo stderr {:?}]: {}", [INFO] [stdout] 43 | | project_root_clone.file_name().unwrap_or_default(), [INFO] [stdout] 44 | | line [INFO] [stdout] 45 | | ); [INFO] [stdout] 46 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 39 ~ for line in stderr_reader.lines().flatten() { [INFO] [stdout] 40 + debug!( [INFO] [stdout] 41 + "[cargo stderr {:?}]: {}", [INFO] [stdout] 42 + project_root_clone.file_name().unwrap_or_default(), [INFO] [stdout] 43 + line [INFO] [stdout] 44 + ); [INFO] [stdout] 45 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/lsp/src/converters.rs:199:9 [INFO] [stdout] | [INFO] [stdout] 199 | / if let Some(children) = &symbol.children { [INFO] [stdout] 200 | | if let Some(child) = find_symbol_by_name_in_hierarchy(children, name) { [INFO] [stdout] 201 | | return Some(child); [INFO] [stdout] 202 | | } [INFO] [stdout] 203 | | } [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] 199 ~ if let Some(children) = &symbol.children [INFO] [stdout] 200 ~ && let Some(child) = find_symbol_by_name_in_hierarchy(children, name) { [INFO] [stdout] 201 | return Some(child); [INFO] [stdout] 202 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/lsp/src/converters.rs:214:13 [INFO] [stdout] | [INFO] [stdout] 214 | / if let Some(children) = &symbol.children { [INFO] [stdout] 215 | | if let Some(child) = find_symbol_in_hierarchy(children, range) { [INFO] [stdout] 216 | | return Some(child); [INFO] [stdout] 217 | | } [INFO] [stdout] 218 | | } [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] 214 ~ if let Some(children) = &symbol.children [INFO] [stdout] 215 ~ && let Some(child) = find_symbol_in_hierarchy(children, range) { [INFO] [stdout] 216 | return Some(child); [INFO] [stdout] 217 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/lsp/src/converters.rs:199:9 [INFO] [stdout] | [INFO] [stdout] 199 | / if let Some(children) = &symbol.children { [INFO] [stdout] 200 | | if let Some(child) = find_symbol_by_name_in_hierarchy(children, name) { [INFO] [stdout] 201 | | return Some(child); [INFO] [stdout] 202 | | } [INFO] [stdout] 203 | | } [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] 199 ~ if let Some(children) = &symbol.children [INFO] [stdout] 200 ~ && let Some(child) = find_symbol_by_name_in_hierarchy(children, name) { [INFO] [stdout] 201 | return Some(child); [INFO] [stdout] 202 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/lsp/src/converters.rs:214:13 [INFO] [stdout] | [INFO] [stdout] 214 | / if let Some(children) = &symbol.children { [INFO] [stdout] 215 | | if let Some(child) = find_symbol_in_hierarchy(children, range) { [INFO] [stdout] 216 | | return Some(child); [INFO] [stdout] 217 | | } [INFO] [stdout] 218 | | } [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] 214 ~ if let Some(children) = &symbol.children [INFO] [stdout] 215 ~ && let Some(child) = find_symbol_in_hierarchy(children, range) { [INFO] [stdout] 216 | return Some(child); [INFO] [stdout] 217 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/lsp/src/converters.rs:269:13 [INFO] [stdout] | [INFO] [stdout] 269 | / if start > end { [INFO] [stdout] 270 | | if !(start.line == end.line && start.character > end.character) { [INFO] [stdout] 271 | | warn!("Invalid range from cargo: {:?} at {:?}", span, path); [INFO] [stdout] 272 | | return None; [INFO] [stdout] 273 | | } [INFO] [stdout] 274 | | } [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] 269 ~ if start > end [INFO] [stdout] 270 ~ && !(start.line == end.line && start.character > end.character) { [INFO] [stdout] 271 | warn!("Invalid range from cargo: {:?} at {:?}", span, path); [INFO] [stdout] 272 | return None; [INFO] [stdout] 273 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/lsp/src/converters.rs:269:13 [INFO] [stdout] | [INFO] [stdout] 269 | / if start > end { [INFO] [stdout] 270 | | if !(start.line == end.line && start.character > end.character) { [INFO] [stdout] 271 | | warn!("Invalid range from cargo: {:?} at {:?}", span, path); [INFO] [stdout] 272 | | return None; [INFO] [stdout] 273 | | } [INFO] [stdout] 274 | | } [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] 269 ~ if start > end [INFO] [stdout] 270 ~ && !(start.line == end.line && start.character > end.character) { [INFO] [stdout] 271 | warn!("Invalid range from cargo: {:?} at {:?}", span, path); [INFO] [stdout] 272 | return None; [INFO] [stdout] 273 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `MySeverity` which implements the `Copy` trait [INFO] [stdout] --> crates/lsp/src/converters.rs:280:27 [INFO] [stdout] | [INFO] [stdout] 280 | severity: severity.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `severity` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `MySeverity` which implements the `Copy` trait [INFO] [stdout] --> crates/lsp/src/converters.rs:280:27 [INFO] [stdout] | [INFO] [stdout] 280 | severity: severity.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `severity` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> crates/lsp/src/lsp_codec.rs:30:30 [INFO] [stdout] | [INFO] [stdout] 30 | let content_length = item.as_bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `item.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] = note: `#[warn(clippy::needless_as_bytes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> crates/lsp/src/lsp_codec.rs:30:30 [INFO] [stdout] | [INFO] [stdout] 30 | let content_length = item.as_bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `item.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] = note: `#[warn(clippy::needless_as_bytes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> crates/lsp/src/lsp_codec.rs:108:27 [INFO] [stdout] | [INFO] [stdout] 108 | let len_str = line[CONTENT_LENGTH_HEADER.len()..].trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> crates/lsp/src/lsp_codec.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | if line.starts_with(CONTENT_LENGTH_HEADER) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 107 ~ if let Some() = line.strip_prefix(CONTENT_LENGTH_HEADER) { [INFO] [stdout] 108 ~ let len_str = .trim(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> crates/lsp/src/lsp_codec.rs:108:27 [INFO] [stdout] | [INFO] [stdout] 108 | let len_str = line[CONTENT_LENGTH_HEADER.len()..].trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> crates/lsp/src/lsp_codec.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | if line.starts_with(CONTENT_LENGTH_HEADER) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 107 ~ if let Some() = line.strip_prefix(CONTENT_LENGTH_HEADER) { [INFO] [stdout] 108 ~ let len_str = .trim(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> crates/lsp/src/models.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | impl Into for Position { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 14 ~ impl From for lsp_types::Position { [INFO] [stdout] 15 ~ fn from(val: Position) -> Self { [INFO] [stdout] 16 | lsp_types::Position { [INFO] [stdout] 17 ~ line: val.line, [INFO] [stdout] 18 ~ character: val.character, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> crates/lsp/src/models.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | impl Into for Position { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 14 ~ impl From for lsp_types::Position { [INFO] [stdout] 15 ~ fn from(val: Position) -> Self { [INFO] [stdout] 16 | lsp_types::Position { [INFO] [stdout] 17 ~ line: val.line, [INFO] [stdout] 18 ~ character: val.character, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> crates/lsp/src/models.rs:40:1 [INFO] [stdout] | [INFO] [stdout] 40 | impl Into for Range { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 40 ~ impl From for lsp_types::Range { [INFO] [stdout] 41 ~ fn from(val: Range) -> Self { [INFO] [stdout] 42 | lsp_types::Range { [INFO] [stdout] 43 ~ start: val.start.into(), [INFO] [stdout] 44 ~ end: val.end.into(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> crates/lsp/src/models.rs:40:1 [INFO] [stdout] | [INFO] [stdout] 40 | impl Into for Range { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 40 ~ impl From for lsp_types::Range { [INFO] [stdout] 41 ~ fn from(val: Range) -> Self { [INFO] [stdout] 42 | lsp_types::Range { [INFO] [stdout] 43 ~ start: val.start.into(), [INFO] [stdout] 44 ~ end: val.end.into(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> crates/lsp/src/server.rs:119:9 [INFO] [stdout] | [INFO] [stdout] 119 | / let mut handles = vec![]; [INFO] [stdout] 120 | | handles.push(tokio::spawn(stderr_loop(stderr, project_name.clone()))); [INFO] [stdout] 121 | | handles.push(tokio::spawn(writer_loop(stdin, writer_rx))); [INFO] [stdout] 122 | | handles.push(tokio::spawn(reader_loop( [INFO] [stdout] ... | [INFO] [stdout] 130 | | project_name.clone(), [INFO] [stdout] 131 | | ))); [INFO] [stdout] | |____________^ help: consider using the `vec![]` macro: `let handles = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct update has no effect, all the fields in the struct have already been specified [INFO] [stdout] --> crates/lsp/src/server.rs:233:23 [INFO] [stdout] | [INFO] [stdout] 233 | ..Default::default() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update [INFO] [stdout] = note: `#[warn(clippy::needless_update)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> crates/lsp/src/server.rs:119:9 [INFO] [stdout] | [INFO] [stdout] 119 | / let mut handles = vec![]; [INFO] [stdout] 120 | | handles.push(tokio::spawn(stderr_loop(stderr, project_name.clone()))); [INFO] [stdout] 121 | | handles.push(tokio::spawn(writer_loop(stdin, writer_rx))); [INFO] [stdout] 122 | | handles.push(tokio::spawn(reader_loop( [INFO] [stdout] ... | [INFO] [stdout] 130 | | project_name.clone(), [INFO] [stdout] 131 | | ))); [INFO] [stdout] | |____________^ help: consider using the `vec![]` macro: `let handles = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct update has no effect, all the fields in the struct have already been specified [INFO] [stdout] --> crates/lsp/src/server.rs:233:23 [INFO] [stdout] | [INFO] [stdout] 233 | ..Default::default() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update [INFO] [stdout] = note: `#[warn(clippy::needless_update)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.filter_map(..)` can be written more simply using `.map(..)` [INFO] [stdout] --> crates/lsp/src/server.rs:674:18 [INFO] [stdout] | [INFO] [stdout] 674 | .filter_map(|link| Some(LspLocation::new(link.target_uri, link.target_range))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_filter_map [INFO] [stdout] = note: `#[warn(clippy::unnecessary_filter_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/lsp/src/server.rs:793:35 [INFO] [stdout] | [INFO] [stdout] 793 | .and_then(|h| extract_hover_docs(h)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `extract_hover_docs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> crates/lsp/src/server.rs:1008:1 [INFO] [stdout] | [INFO] [stdout] 1008 | / async fn reader_loop( [INFO] [stdout] 1009 | | reader: R, [INFO] [stdout] 1010 | | lsp_diagnostics: DiagnosticsMap, [INFO] [stdout] 1011 | | pending: PendingRequests, [INFO] [stdout] ... | [INFO] [stdout] 1016 | | project_name: String, [INFO] [stdout] 1017 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> crates/lsp/src/server.rs:1165:1 [INFO] [stdout] | [INFO] [stdout] 1165 | / async fn process_message( [INFO] [stdout] 1166 | | value: Value, [INFO] [stdout] 1167 | | lsp_diagnostics: &DiagnosticsMap, [INFO] [stdout] 1168 | | pending: &PendingRequests, [INFO] [stdout] ... | [INFO] [stdout] 1176 | | project_name: &str, [INFO] [stdout] 1177 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> crates/lsp/src/server.rs:1291:25 [INFO] [stdout] | [INFO] [stdout] 1291 | / if let Ok(url) = url { [INFO] [stdout] 1292 | | // debug!("[RA:{}] Diagnostics for {}", project_name, url); [INFO] [stdout] 1293 | | lsp_diagnostics.insert(url, params.diagnostics); [INFO] [stdout] 1294 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> crates/lsp/src/server.rs:1290:31 [INFO] [stdout] | [INFO] [stdout] 1290 | if let Ok(url) = spawn_blocking(move || lsp_uri_to_url(&uri_clone)).await { [INFO] [stdout] | ^^^ replace this binding [INFO] [stdout] 1291 | if let Ok(url) = url { [INFO] [stdout] | ^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/lsp/src/server.rs:1290:21 [INFO] [stdout] | [INFO] [stdout] 1290 | / if let Ok(url) = spawn_blocking(move || lsp_uri_to_url(&uri_clone)).await { [INFO] [stdout] 1291 | | if let Ok(url) = url { [INFO] [stdout] 1292 | | // debug!("[RA:{}] Diagnostics for {}", project_name, url); [INFO] [stdout] 1293 | | lsp_diagnostics.insert(url, params.diagnostics); [INFO] [stdout] 1294 | | } [INFO] [stdout] 1295 | | } [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] 1290 ~ if let Ok(url) = spawn_blocking(move || lsp_uri_to_url(&uri_clone)).await [INFO] [stdout] 1291 ~ && let Ok(url) = url { [INFO] [stdout] 1292 | // debug!("[RA:{}] Diagnostics for {}", project_name, url); [INFO] [stdout] 1293 | lsp_diagnostics.insert(url, params.diagnostics); [INFO] [stdout] 1294 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.filter_map(..)` can be written more simply using `.map(..)` [INFO] [stdout] --> crates/lsp/src/server.rs:674:18 [INFO] [stdout] | [INFO] [stdout] 674 | .filter_map(|link| Some(LspLocation::new(link.target_uri, link.target_range))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_filter_map [INFO] [stdout] = note: `#[warn(clippy::unnecessary_filter_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/lsp/src/server.rs:793:35 [INFO] [stdout] | [INFO] [stdout] 793 | .and_then(|h| extract_hover_docs(h)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `extract_hover_docs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/lsp/src/toolbox.rs:321:21 [INFO] [stdout] | [INFO] [stdout] 321 | / resolved_path [INFO] [stdout] 322 | | .as_ref() [INFO] [stdout] 323 | | .map_or(true, |rp| rp == &d.location.path) [INFO] [stdout] | |__________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 323 - .map_or(true, |rp| rp == &d.location.path) [INFO] [stdout] 323 + .is_none_or(|rp| rp == &d.location.path) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `models::Range` [INFO] [stdout] --> crates/lsp/src/toolbox.rs:451:28 [INFO] [stdout] | [INFO] [stdout] 451 | target_range = target_diag.location.range.into(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `target_diag.location.range` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/lsp/src/toolbox.rs:506:32 [INFO] [stdout] | [INFO] [stdout] 506 | ... || !edit.document_changes.is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `edit.document_changes.is_some()` [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 function has too many arguments (8/7) [INFO] [stdout] --> crates/lsp/src/server.rs:1008:1 [INFO] [stdout] | [INFO] [stdout] 1008 | / async fn reader_loop( [INFO] [stdout] 1009 | | reader: R, [INFO] [stdout] 1010 | | lsp_diagnostics: DiagnosticsMap, [INFO] [stdout] 1011 | | pending: PendingRequests, [INFO] [stdout] ... | [INFO] [stdout] 1016 | | project_name: String, [INFO] [stdout] 1017 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/lsp/src/toolbox.rs:505:36 [INFO] [stdout] | [INFO] [stdout] 505 | } else if !edit.changes.as_ref().map_or(true, |c| c.is_empty()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 505 - } else if !edit.changes.as_ref().map_or(true, |c| c.is_empty()) [INFO] [stdout] 505 + } else if !edit.changes.as_ref().is_none_or(|c| c.is_empty()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> crates/lsp/src/server.rs:1165:1 [INFO] [stdout] | [INFO] [stdout] 1165 | / async fn process_message( [INFO] [stdout] 1166 | | value: Value, [INFO] [stdout] 1167 | | lsp_diagnostics: &DiagnosticsMap, [INFO] [stdout] 1168 | | pending: &PendingRequests, [INFO] [stdout] ... | [INFO] [stdout] 1176 | | project_name: &str, [INFO] [stdout] 1177 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> crates/lsp/src/server.rs:1291:25 [INFO] [stdout] | [INFO] [stdout] 1291 | / if let Ok(url) = url { [INFO] [stdout] 1292 | | // debug!("[RA:{}] Diagnostics for {}", project_name, url); [INFO] [stdout] 1293 | | lsp_diagnostics.insert(url, params.diagnostics); [INFO] [stdout] 1294 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> crates/lsp/src/server.rs:1290:31 [INFO] [stdout] | [INFO] [stdout] 1290 | if let Ok(url) = spawn_blocking(move || lsp_uri_to_url(&uri_clone)).await { [INFO] [stdout] | ^^^ replace this binding [INFO] [stdout] 1291 | if let Ok(url) = url { [INFO] [stdout] | ^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/lsp/src/server.rs:1290:21 [INFO] [stdout] | [INFO] [stdout] 1290 | / if let Ok(url) = spawn_blocking(move || lsp_uri_to_url(&uri_clone)).await { [INFO] [stdout] 1291 | | if let Ok(url) = url { [INFO] [stdout] 1292 | | // debug!("[RA:{}] Diagnostics for {}", project_name, url); [INFO] [stdout] 1293 | | lsp_diagnostics.insert(url, params.diagnostics); [INFO] [stdout] 1294 | | } [INFO] [stdout] 1295 | | } [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] 1290 ~ if let Ok(url) = spawn_blocking(move || lsp_uri_to_url(&uri_clone)).await [INFO] [stdout] 1291 ~ && let Ok(url) = url { [INFO] [stdout] 1292 | // debug!("[RA:{}] Diagnostics for {}", project_name, url); [INFO] [stdout] 1293 | lsp_diagnostics.insert(url, params.diagnostics); [INFO] [stdout] 1294 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> crates/lsp/src/toolbox.rs:809:17 [INFO] [stdout] | [INFO] [stdout] 809 | format!("{}", sym.file_path) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `sym.file_path.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/lsp/src/toolbox.rs:321:21 [INFO] [stdout] | [INFO] [stdout] 321 | / resolved_path [INFO] [stdout] 322 | | .as_ref() [INFO] [stdout] 323 | | .map_or(true, |rp| rp == &d.location.path) [INFO] [stdout] | |__________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 323 - .map_or(true, |rp| rp == &d.location.path) [INFO] [stdout] 323 + .is_none_or(|rp| rp == &d.location.path) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `models::Range` [INFO] [stdout] --> crates/lsp/src/toolbox.rs:451:28 [INFO] [stdout] | [INFO] [stdout] 451 | target_range = target_diag.location.range.into(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `target_diag.location.range` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/lsp/src/toolbox.rs:506:32 [INFO] [stdout] | [INFO] [stdout] 506 | ... || !edit.document_changes.is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `edit.document_changes.is_some()` [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 `map_or` can be simplified [INFO] [stdout] --> crates/lsp/src/toolbox.rs:505:36 [INFO] [stdout] | [INFO] [stdout] 505 | } else if !edit.changes.as_ref().map_or(true, |c| c.is_empty()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 505 - } else if !edit.changes.as_ref().map_or(true, |c| c.is_empty()) [INFO] [stdout] 505 + } else if !edit.changes.as_ref().is_none_or(|c| c.is_empty()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> crates/lsp/src/toolbox.rs:809:17 [INFO] [stdout] | [INFO] [stdout] 809 | format!("{}", sym.file_path) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `sym.file_path.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking cramp-mcp v0.1.0 (/opt/rustwide/workdir/crates/mcp) [INFO] [stdout] warning: you should consider adding a `Default` implementation for `McpToolboxService` [INFO] [stdout] --> crates/mcp/src/lib.rs:112:5 [INFO] [stdout] | [INFO] [stdout] 112 | / pub fn new() -> Self { [INFO] [stdout] 113 | | Self { [INFO] [stdout] 114 | | toolbox: Arc::new(Toolbox::new()), [INFO] [stdout] 115 | | } [INFO] [stdout] 116 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 111 + impl Default for McpToolboxService { [INFO] [stdout] 112 + fn default() -> Self { [INFO] [stdout] 113 + Self::new() [INFO] [stdout] 114 + } [INFO] [stdout] 115 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `McpToolboxService` [INFO] [stdout] --> crates/mcp/src/lib.rs:112:5 [INFO] [stdout] | [INFO] [stdout] 112 | / pub fn new() -> Self { [INFO] [stdout] 113 | | Self { [INFO] [stdout] 114 | | toolbox: Arc::new(Toolbox::new()), [INFO] [stdout] 115 | | } [INFO] [stdout] 116 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 111 + impl Default for McpToolboxService { [INFO] [stdout] 112 + fn default() -> Self { [INFO] [stdout] 113 + Self::new() [INFO] [stdout] 114 + } [INFO] [stdout] 115 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking cramp v0.1.0 (/opt/rustwide/workdir/crates/cramp) [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> crates/cramp/src/main.rs:490:62 [INFO] [stdout] | [INFO] [stdout] 490 | output.push_str(&format!("{}{}\n", " • ".cyan(), &line[2..])); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> crates/cramp/src/main.rs:489:16 [INFO] [stdout] | [INFO] [stdout] 489 | } else if line.starts_with("- ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 489 ~ } else if let Some() = line.strip_prefix("- ") { [INFO] [stdout] 490 ~ output.push_str(&format!("{}{}\n", " • ".cyan(), )); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> crates/cramp/src/main.rs:490:62 [INFO] [stdout] | [INFO] [stdout] 490 | output.push_str(&format!("{}{}\n", " • ".cyan(), &line[2..])); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> crates/cramp/src/main.rs:489:16 [INFO] [stdout] | [INFO] [stdout] 489 | } else if line.starts_with("- ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 489 ~ } else if let Some() = line.strip_prefix("- ") { [INFO] [stdout] 490 ~ output.push_str(&format!("{}{}\n", " • ".cyan(), )); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 24s [INFO] running `Command { std: "docker" "inspect" "da0e13719bf271287364c7cf00d25fba6c695f28343ecc70e745c7ebf08fa4ca", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "da0e13719bf271287364c7cf00d25fba6c695f28343ecc70e745c7ebf08fa4ca", kill_on_drop: false }` [INFO] [stdout] da0e13719bf271287364c7cf00d25fba6c695f28343ecc70e745c7ebf08fa4ca