[INFO] fetching crate obsidian-lsp 0.1.0... [INFO] linting obsidian-lsp-0.1.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate obsidian-lsp 0.1.0 into /workspace/builds/worker-1-tc1/source [INFO] started tweaking crates.io crate obsidian-lsp 0.1.0 [INFO] finished tweaking crates.io crate obsidian-lsp 0.1.0 [INFO] tweaked toml for crates.io crate obsidian-lsp 0.1.0 written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate obsidian-lsp 0.1.0 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate obsidian-lsp 0.1.0 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded tower-lsp-server v0.22.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 5d9b7669ee421d022c46a3e88230317725de36e62ba65ea2a4fac8508f121ec3 [INFO] running `Command { std: "docker" "start" "-a" "5d9b7669ee421d022c46a3e88230317725de36e62ba65ea2a4fac8508f121ec3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "5d9b7669ee421d022c46a3e88230317725de36e62ba65ea2a4fac8508f121ec3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5d9b7669ee421d022c46a3e88230317725de36e62ba65ea2a4fac8508f121ec3", kill_on_drop: false }` [INFO] [stdout] 5d9b7669ee421d022c46a3e88230317725de36e62ba65ea2a4fac8508f121ec3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 6372f290ff427015fd8bc04ef2583fa498528ba2aed9be9b326e166787ec1e5d [INFO] running `Command { std: "docker" "start" "-a" "6372f290ff427015fd8bc04ef2583fa498528ba2aed9be9b326e166787ec1e5d", kill_on_drop: false }` [INFO] [stderr] Checking futures-channel v0.3.31 [INFO] [stderr] Checking fluent-uri v0.1.4 [INFO] [stderr] Checking parking_lot_core v0.9.11 [INFO] [stderr] Compiling rustix v1.0.8 [INFO] [stderr] Checking regex-automata v0.4.10 [INFO] [stderr] Compiling tokio-macros v2.5.0 [INFO] [stderr] Compiling serde_repr v0.1.20 [INFO] [stderr] Checking serde v1.0.219 [INFO] [stderr] Checking getrandom v0.3.3 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking parking_lot v0.12.4 [INFO] [stderr] Checking dashmap v6.1.0 [INFO] [stderr] Checking tokio v1.47.1 [INFO] [stderr] Checking tempfile v3.21.0 [INFO] [stderr] Checking regex v1.11.2 [INFO] [stderr] Checking serde_json v1.0.142 [INFO] [stderr] Checking lsp-types v0.97.0 [INFO] [stderr] Checking futures v0.3.31 [INFO] [stderr] Checking tower v0.5.2 [INFO] [stderr] Checking tokio-util v0.7.16 [INFO] [stderr] Checking tower-lsp-server v0.22.1 [INFO] [stderr] Checking obsidian-lsp v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `tower_lsp_server::Client` [INFO] [stdout] --> src/main.rs:2077:9 [INFO] [stdout] | [INFO] [stdout] 2077 | use tower_lsp_server::Client; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated field `lsp_types::DocumentSymbol::deprecated`: Use tags instead [INFO] [stdout] --> src/main.rs:241:29 [INFO] [stdout] | [INFO] [stdout] 241 | ... deprecated: None, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated field `lsp_types::DocumentSymbol::deprecated`: Use tags instead [INFO] [stdout] --> src/main.rs:282:29 [INFO] [stdout] | [INFO] [stdout] 282 | ... deprecated: None, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated field `lsp_types::DocumentSymbol::deprecated`: Use tags instead [INFO] [stdout] --> src/main.rs:302:29 [INFO] [stdout] | [INFO] [stdout] 302 | ... deprecated: None, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated field `lsp_types::DocumentSymbol::deprecated`: Use tags instead [INFO] [stdout] --> src/main.rs:241:29 [INFO] [stdout] | [INFO] [stdout] 241 | ... deprecated: None, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated field `lsp_types::DocumentSymbol::deprecated`: Use tags instead [INFO] [stdout] --> src/main.rs:282:29 [INFO] [stdout] | [INFO] [stdout] 282 | ... deprecated: None, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated field `lsp_types::DocumentSymbol::deprecated`: Use tags instead [INFO] [stdout] --> src/main.rs:302:29 [INFO] [stdout] | [INFO] [stdout] 302 | ... deprecated: None, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `link_type` is never read [INFO] [stdout] --> src/ast.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 22 | pub struct Link { [INFO] [stdout] | ---- field in this struct [INFO] [stdout] 23 | pub link_type: LinkType, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Link` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Web` is never constructed [INFO] [stdout] --> src/ast.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 29 | pub enum LinkType { [INFO] [stdout] | -------- variant in this enum [INFO] [stdout] 30 | Web, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `LinkType` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `None` is never constructed [INFO] [stdout] --> src/ast.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 43 | pub enum ColumnAlignment { [INFO] [stdout] | --------------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 47 | None, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ColumnAlignment` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple fields are never read [INFO] [stdout] --> src/index.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 18 | pub struct ObsidianFile { [INFO] [stdout] | ------------ fields in this struct [INFO] [stdout] 19 | pub name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 20 | pub path: PathBuf, [INFO] [stdout] | ^^^^ [INFO] [stdout] 21 | pub stem: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 22 | pub aliases: Vec, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 23 | pub tags: Vec, [INFO] [stdout] | ^^^^ [INFO] [stdout] 24 | pub properties: HashMap, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 25 | pub checked_at: Instant, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 26 | pub kind: FileKind, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ObsidianFile` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/ast.rs:517:41 [INFO] [stdout] | [INFO] [stdout] 517 | / ... if parent_level < level { [INFO] [stdout] 518 | | ... nodes [INFO] [stdout] 519 | | ... .get_mut(&parent_id) [INFO] [stdout] 520 | | ... .unwrap() [INFO] [stdout] ... | [INFO] [stdout] 526 | | ... node_stack.pop(); [INFO] [stdout] 527 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 516 ~ NodeType::Heading(parent_level) [INFO] [stdout] 517 ~ if parent_level < level => { [INFO] [stdout] 518 | nodes [INFO] [stdout] ... [INFO] [stdout] 524 | break; [INFO] [stdout] 525 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used consecutive `str::replace` call [INFO] [stdout] --> src/index.rs:58:10 [INFO] [stdout] | [INFO] [stdout] 58 | .replace(' ', "-") [INFO] [stdout] | __________^ [INFO] [stdout] 59 | | .replace('_', "-") [INFO] [stdout] | |__________________________^ help: replace with: `replace([' ', '_'], "-")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace [INFO] [stdout] = note: `#[warn(clippy::collapsible_str_replace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/index.rs:87:32 [INFO] [stdout] | [INFO] [stdout] 87 | if let Some(end) = content[3..].find("---") { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/index.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | if content.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] 86 ~ if let Some() = content.strip_prefix("---") { [INFO] [stdout] 87 ~ if let Some(end) = .find("---") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/index.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | / if content.starts_with("---") { [INFO] [stdout] 87 | | if let Some(end) = content[3..].find("---") { [INFO] [stdout] 88 | | let frontmatter = &content[3..end + 3]; [INFO] [stdout] 89 | | let (fm_aliases, fm_tags, fm_properties) = parse_frontmatter(frontmatter); [INFO] [stdout] ... | [INFO] [stdout] 94 | | } [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] 86 ~ if content.starts_with("---") [INFO] [stdout] 87 ~ && let Some(end) = content[3..].find("---") { [INFO] [stdout] 88 | let frontmatter = &content[3..end + 3]; [INFO] [stdout] ... [INFO] [stdout] 92 | properties = fm_properties; [INFO] [stdout] 93 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/index.rs:98:32 [INFO] [stdout] | [INFO] [stdout] 98 | if let Some(end) = content[3..].find("---") { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/index.rs:97:20 [INFO] [stdout] | [INFO] [stdout] 97 | let body = if content.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] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 97 ~ let body = if let Some() = content.strip_prefix("---") { [INFO] [stdout] 98 ~ if let Some(end) = .find("---") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/index.rs:183:24 [INFO] [stdout] | [INFO] [stdout] 183 | let item = line[2..].trim().trim_matches('"').trim_matches('\''); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/index.rs:182:16 [INFO] [stdout] | [INFO] [stdout] 182 | } 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] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 182 ~ } else if let Some() = line.strip_prefix("- ") { [INFO] [stdout] 183 ~ let item = .trim().trim_matches('"').trim_matches('\''); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.filter_map(..)` can be written more simply using `.map(..)` [INFO] [stdout] --> src/index.rs:238:10 [INFO] [stdout] | [INFO] [stdout] 238 | .filter_map(|cap| { [INFO] [stdout] | __________^ [INFO] [stdout] 239 | | let link_text = &cap[1]; [INFO] [stdout] 240 | | // Handle pipe links by extracting the address part [INFO] [stdout] 241 | | if let Some(pipe_pos) = link_text.find('|') { [INFO] [stdout] ... | [INFO] [stdout] 246 | | }) [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: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/index.rs:329:18 [INFO] [stdout] | [INFO] [stdout] 329 | .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/index.rs:338:18 [INFO] [stdout] | [INFO] [stdout] 338 | .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's keys [INFO] [stdout] --> src/index.rs:342:48 [INFO] [stdout] | [INFO] [stdout] 342 | for (property_key, _property_value) in &properties { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 342 - for (property_key, _property_value) in &properties { [INFO] [stdout] 342 + for property_key in properties.keys() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/index.rs:347:18 [INFO] [stdout] | [INFO] [stdout] 347 | .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:91:13 [INFO] [stdout] | [INFO] [stdout] 91 | / if let Some(client) = client { [INFO] [stdout] 92 | | if let Ok(workspace_folders) = client.workspace_folders().await { [INFO] [stdout] 93 | | if let Some(folders) = workspace_folders { [INFO] [stdout] 94 | | for folder in folders { [INFO] [stdout] ... | [INFO] [stdout] 103 | | } [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] 91 ~ if let Some(client) = client [INFO] [stdout] 92 ~ && let Ok(workspace_folders) = client.workspace_folders().await { [INFO] [stdout] 93 | if let Some(folders) = workspace_folders { [INFO] [stdout] ... [INFO] [stdout] 101 | } [INFO] [stdout] 102 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/main.rs:93:21 [INFO] [stdout] | [INFO] [stdout] 93 | / if let Some(folders) = workspace_folders { [INFO] [stdout] 94 | | for folder in folders { [INFO] [stdout] 95 | | if let Some(path) = folder.uri.to_file_path() { [INFO] [stdout] 96 | | Backend::index_workspace_static(&Some(client), &vault_index, &path) [INFO] [stdout] ... | [INFO] [stdout] 101 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/main.rs:92:27 [INFO] [stdout] | [INFO] [stdout] 92 | if let Ok(workspace_folders) = client.workspace_folders().await { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ replace this binding [INFO] [stdout] 93 | if let Some(folders) = workspace_folders { [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] --> src/main.rs:92:17 [INFO] [stdout] | [INFO] [stdout] 92 | / if let Ok(workspace_folders) = client.workspace_folders().await { [INFO] [stdout] 93 | | if let Some(folders) = workspace_folders { [INFO] [stdout] 94 | | for folder in folders { [INFO] [stdout] 95 | | if let Some(path) = folder.uri.to_file_path() { [INFO] [stdout] ... | [INFO] [stdout] 102 | | } [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] 92 ~ if let Ok(workspace_folders) = client.workspace_folders().await [INFO] [stdout] 93 ~ && let Some(folders) = workspace_folders { [INFO] [stdout] 94 | for folder in folders { [INFO] [stdout] ... [INFO] [stdout] 100 | } [INFO] [stdout] 101 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: mutable key type [INFO] [stdout] --> src/main.rs:717:21 [INFO] [stdout] | [INFO] [stdout] 717 | let mut changes = HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `Uri`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Uri`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Data`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Option`, which has interior mutability [INFO] [stdout] = note: ... because it contains `AuthData`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell>`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: `#[warn(clippy::mutable_key_type)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:783:9 [INFO] [stdout] | [INFO] [stdout] 783 | / if let Some(last_parse_time) = self.last_parse.get(&uri_str) { [INFO] [stdout] 784 | | if now.duration_since(*last_parse_time) < Duration::from_millis(100) { [INFO] [stdout] 785 | | info!( [INFO] [stdout] 786 | | "Skipping parse due to rate limiting (change #{})", [INFO] [stdout] ... | [INFO] [stdout] 791 | | } [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] 783 ~ if let Some(last_parse_time) = self.last_parse.get(&uri_str) [INFO] [stdout] 784 ~ && now.duration_since(*last_parse_time) < Duration::from_millis(100) { [INFO] [stdout] 785 | info!( [INFO] [stdout] ... [INFO] [stdout] 789 | return; [INFO] [stdout] 790 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `link_end` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:989:41 [INFO] [stdout] | [INFO] [stdout] 977 | if link_end.is_none() { [INFO] [stdout] | --------------------- help: try: `if let Some() = link_end` [INFO] [stdout] ... [INFO] [stdout] 989 | &after_link_start[..link_end.unwrap() + 2] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1246:13 [INFO] [stdout] | [INFO] [stdout] 1246 | / if prop_name.contains(&partial_lower) || partial.is_empty() { [INFO] [stdout] 1247 | | if !common_properties [INFO] [stdout] 1248 | | .iter() [INFO] [stdout] 1249 | | .any(|(common, _)| common == prop_name) [INFO] [stdout] ... | [INFO] [stdout] 1265 | | } [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] 1246 ~ if (prop_name.contains(&partial_lower) || partial.is_empty()) { [INFO] [stdout] 1247 ~ && !common_properties [INFO] [stdout] 1248 | .iter() [INFO] [stdout] ... [INFO] [stdout] 1263 | }); [INFO] [stdout] 1264 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1325:21 [INFO] [stdout] | [INFO] [stdout] 1325 | / if let NodeType::Link(link) = &node.node_type { [INFO] [stdout] 1326 | | if normalize_link_text(&link.address) == normalized_target { [INFO] [stdout] 1327 | | if let Some(location) = self.node_to_location(file_path, node) { [INFO] [stdout] 1328 | | locations.push(location); [INFO] [stdout] ... | [INFO] [stdout] 1332 | | } [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] 1325 ~ if let NodeType::Link(link) = &node.node_type [INFO] [stdout] 1326 ~ && normalize_link_text(&link.address) == normalized_target { [INFO] [stdout] 1327 | if let Some(location) = self.node_to_location(file_path, node) { [INFO] [stdout] ... [INFO] [stdout] 1330 | } [INFO] [stdout] 1331 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1326:25 [INFO] [stdout] | [INFO] [stdout] 1326 | / if normalize_link_text(&link.address) == normalized_target { [INFO] [stdout] 1327 | | if let Some(location) = self.node_to_location(file_path, node) { [INFO] [stdout] 1328 | | locations.push(location); [INFO] [stdout] 1329 | | debug!("Found reference at line {}", node.range.start.line); [INFO] [stdout] 1330 | | } [INFO] [stdout] 1331 | | } [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] 1326 ~ if normalize_link_text(&link.address) == normalized_target [INFO] [stdout] 1327 ~ && let Some(location) = self.node_to_location(file_path, node) { [INFO] [stdout] 1328 | locations.push(location); [INFO] [stdout] 1329 | debug!("Found reference at line {}", node.range.start.line); [INFO] [stdout] 1330 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1387:21 [INFO] [stdout] | [INFO] [stdout] 1387 | / if let NodeType::Tag(node_tag) = &node.node_type { [INFO] [stdout] 1388 | | if node_tag.to_lowercase() == normalized_tag { [INFO] [stdout] 1389 | | if let Some(location) = self.node_to_location(file_path, node) { [INFO] [stdout] 1390 | | locations.push(location); [INFO] [stdout] ... | [INFO] [stdout] 1397 | | } [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] 1387 ~ if let NodeType::Tag(node_tag) = &node.node_type [INFO] [stdout] 1388 ~ && node_tag.to_lowercase() == normalized_tag { [INFO] [stdout] 1389 | if let Some(location) = self.node_to_location(file_path, node) { [INFO] [stdout] ... [INFO] [stdout] 1395 | } [INFO] [stdout] 1396 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1388:25 [INFO] [stdout] | [INFO] [stdout] 1388 | / if node_tag.to_lowercase() == normalized_tag { [INFO] [stdout] 1389 | | if let Some(location) = self.node_to_location(file_path, node) { [INFO] [stdout] 1390 | | locations.push(location); [INFO] [stdout] 1391 | | debug!( [INFO] [stdout] ... | [INFO] [stdout] 1396 | | } [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] 1388 ~ if node_tag.to_lowercase() == normalized_tag [INFO] [stdout] 1389 ~ && let Some(location) = self.node_to_location(file_path, node) { [INFO] [stdout] 1390 | locations.push(location); [INFO] [stdout] ... [INFO] [stdout] 1394 | ); [INFO] [stdout] 1395 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1401:17 [INFO] [stdout] | [INFO] [stdout] 1401 | / if let Some(frontmatter_location) = [INFO] [stdout] 1402 | | self.find_frontmatter_tag_location(&content, &normalized_tag) [INFO] [stdout] 1403 | | { [INFO] [stdout] 1404 | | if let Some(location) = self.node_to_location(file_path, &frontmatter_location) [INFO] [stdout] ... | [INFO] [stdout] 1412 | | } [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] 1402 ~ self.find_frontmatter_tag_location(&content, &normalized_tag) [INFO] [stdout] 1403 ~ && let Some(location) = self.node_to_location(file_path, &frontmatter_location) [INFO] [stdout] 1404 | { [INFO] [stdout] ... [INFO] [stdout] 1409 | ); [INFO] [stdout] 1410 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: mutable key type [INFO] [stdout] --> src/main.rs:1601:9 [INFO] [stdout] | [INFO] [stdout] 1601 | let changes = workspace_edit.changes.as_mut().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `Uri`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Uri`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Data`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Option`, which has interior mutability [INFO] [stdout] = note: ... because it contains `AuthData`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell>`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1622:21 [INFO] [stdout] | [INFO] [stdout] 1622 | / if let NodeType::Link(ref_link) = &node.node_type { [INFO] [stdout] 1623 | | if normalize_link_text(&ref_link.address) == normalized_target { [INFO] [stdout] 1624 | | // This link references our target, update it [INFO] [stdout] 1625 | | debug!( [INFO] [stdout] ... | [INFO] [stdout] 1650 | | } [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] 1622 ~ if let NodeType::Link(ref_link) = &node.node_type [INFO] [stdout] 1623 ~ && normalize_link_text(&ref_link.address) == normalized_target { [INFO] [stdout] 1624 | // This link references our target, update it [INFO] [stdout] ... [INFO] [stdout] 1648 | } [INFO] [stdout] 1649 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:1641:68 [INFO] [stdout] | [INFO] [stdout] 1641 | ... if let Some(uri) = Uri::from_file_path(&ref_file_path) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `ref_file_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/main.rs:1647:52 [INFO] [stdout] | [INFO] [stdout] 1647 | ... changes.entry(uri).or_insert_with(Vec::new).push(text_edit); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/main.rs:1673:45 [INFO] [stdout] | [INFO] [stdout] 1673 | for (_node_id, node) in &doc.nodes { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 1673 - for (_node_id, node) in &doc.nodes { [INFO] [stdout] 1673 + for node in doc.nodes.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/main.rs:1700:42 [INFO] [stdout] | [INFO] [stdout] 1700 | ... .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Web` is never constructed [INFO] [stdout] --> src/ast.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 29 | pub enum LinkType { [INFO] [stdout] | -------- variant in this enum [INFO] [stdout] 30 | Web, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `LinkType` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `None` is never constructed [INFO] [stdout] --> src/ast.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 43 | pub enum ColumnAlignment { [INFO] [stdout] | --------------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 47 | None, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ColumnAlignment` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name`, `path`, and `checked_at` are never read [INFO] [stdout] --> src/index.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 18 | pub struct ObsidianFile { [INFO] [stdout] | ------------ fields in this struct [INFO] [stdout] 19 | pub name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 20 | pub path: PathBuf, [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 25 | pub checked_at: Instant, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ObsidianFile` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: items after a test module [INFO] [stdout] --> src/main.rs:2074:1 [INFO] [stdout] | [INFO] [stdout] 2074 | mod tests { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 2816 | async fn main() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_test_module [INFO] [stdout] = note: `#[warn(clippy::items_after_test_module)]` on by default [INFO] [stdout] = help: move the items to before the test module was defined [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/ast.rs:517:41 [INFO] [stdout] | [INFO] [stdout] 517 | / ... if parent_level < level { [INFO] [stdout] 518 | | ... nodes [INFO] [stdout] 519 | | ... .get_mut(&parent_id) [INFO] [stdout] 520 | | ... .unwrap() [INFO] [stdout] ... | [INFO] [stdout] 526 | | ... node_stack.pop(); [INFO] [stdout] 527 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 516 ~ NodeType::Heading(parent_level) [INFO] [stdout] 517 ~ if parent_level < level => { [INFO] [stdout] 518 | nodes [INFO] [stdout] ... [INFO] [stdout] 524 | break; [INFO] [stdout] 525 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `column_widths` [INFO] [stdout] --> src/main.rs:1959:18 [INFO] [stdout] | [INFO] [stdout] 1959 | for i in 0..table.headers.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 1959 - for i in 0..table.headers.len() { [INFO] [stdout] 1959 + for (i, ) in column_widths.iter().enumerate().take(table.headers.len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ast.rs:729:9 [INFO] [stdout] | [INFO] [stdout] 729 | / if let Some(&link_id) = wiki_link_in_heading { [INFO] [stdout] 730 | | if let NodeType::Link(link) = &doc.nodes[&link_id].node_type { [INFO] [stdout] 731 | | assert_eq!(link.address, "Wiki Link"); [INFO] [stdout] 732 | | assert!(matches!(link.link_type, LinkType::Wiki)); [INFO] [stdout] 733 | | } [INFO] [stdout] 734 | | } [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] 729 ~ if let Some(&link_id) = wiki_link_in_heading [INFO] [stdout] 730 ~ && let NodeType::Link(link) = &doc.nodes[&link_id].node_type { [INFO] [stdout] 731 | assert_eq!(link.address, "Wiki Link"); [INFO] [stdout] 732 | assert!(matches!(link.link_type, LinkType::Wiki)); [INFO] [stdout] 733 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used consecutive `str::replace` call [INFO] [stdout] --> src/index.rs:58:10 [INFO] [stdout] | [INFO] [stdout] 58 | .replace(' ', "-") [INFO] [stdout] | __________^ [INFO] [stdout] 59 | | .replace('_', "-") [INFO] [stdout] | |__________________________^ help: replace with: `replace([' ', '_'], "-")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace [INFO] [stdout] = note: `#[warn(clippy::collapsible_str_replace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/index.rs:87:32 [INFO] [stdout] | [INFO] [stdout] 87 | if let Some(end) = content[3..].find("---") { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/index.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | if content.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] 86 ~ if let Some() = content.strip_prefix("---") { [INFO] [stdout] 87 ~ if let Some(end) = .find("---") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/index.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | / if content.starts_with("---") { [INFO] [stdout] 87 | | if let Some(end) = content[3..].find("---") { [INFO] [stdout] 88 | | let frontmatter = &content[3..end + 3]; [INFO] [stdout] 89 | | let (fm_aliases, fm_tags, fm_properties) = parse_frontmatter(frontmatter); [INFO] [stdout] ... | [INFO] [stdout] 94 | | } [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] 86 ~ if content.starts_with("---") [INFO] [stdout] 87 ~ && let Some(end) = content[3..].find("---") { [INFO] [stdout] 88 | let frontmatter = &content[3..end + 3]; [INFO] [stdout] ... [INFO] [stdout] 92 | properties = fm_properties; [INFO] [stdout] 93 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/index.rs:98:32 [INFO] [stdout] | [INFO] [stdout] 98 | if let Some(end) = content[3..].find("---") { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/index.rs:97:20 [INFO] [stdout] | [INFO] [stdout] 97 | let body = if content.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] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 97 ~ let body = if let Some() = content.strip_prefix("---") { [INFO] [stdout] 98 ~ if let Some(end) = .find("---") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/index.rs:183:24 [INFO] [stdout] | [INFO] [stdout] 183 | let item = line[2..].trim().trim_matches('"').trim_matches('\''); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/index.rs:182:16 [INFO] [stdout] | [INFO] [stdout] 182 | } 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] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 182 ~ } else if let Some() = line.strip_prefix("- ") { [INFO] [stdout] 183 ~ let item = .trim().trim_matches('"').trim_matches('\''); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.filter_map(..)` can be written more simply using `.map(..)` [INFO] [stdout] --> src/index.rs:238:10 [INFO] [stdout] | [INFO] [stdout] 238 | .filter_map(|cap| { [INFO] [stdout] | __________^ [INFO] [stdout] 239 | | let link_text = &cap[1]; [INFO] [stdout] 240 | | // Handle pipe links by extracting the address part [INFO] [stdout] 241 | | if let Some(pipe_pos) = link_text.find('|') { [INFO] [stdout] ... | [INFO] [stdout] 246 | | }) [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: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/index.rs:329:18 [INFO] [stdout] | [INFO] [stdout] 329 | .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/index.rs:338:18 [INFO] [stdout] | [INFO] [stdout] 338 | .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's keys [INFO] [stdout] --> src/index.rs:342:48 [INFO] [stdout] | [INFO] [stdout] 342 | for (property_key, _property_value) in &properties { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 342 - for (property_key, _property_value) in &properties { [INFO] [stdout] 342 + for property_key in properties.keys() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/index.rs:347:18 [INFO] [stdout] | [INFO] [stdout] 347 | .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/index.rs:376:43 [INFO] [stdout] | [INFO] [stdout] 376 | fs::write(root.join("image.png"), &[0u8; 100]).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `[0u8; 100]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:91:13 [INFO] [stdout] | [INFO] [stdout] 91 | / if let Some(client) = client { [INFO] [stdout] 92 | | if let Ok(workspace_folders) = client.workspace_folders().await { [INFO] [stdout] 93 | | if let Some(folders) = workspace_folders { [INFO] [stdout] 94 | | for folder in folders { [INFO] [stdout] ... | [INFO] [stdout] 103 | | } [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] 91 ~ if let Some(client) = client [INFO] [stdout] 92 ~ && let Ok(workspace_folders) = client.workspace_folders().await { [INFO] [stdout] 93 | if let Some(folders) = workspace_folders { [INFO] [stdout] ... [INFO] [stdout] 101 | } [INFO] [stdout] 102 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/main.rs:93:21 [INFO] [stdout] | [INFO] [stdout] 93 | / if let Some(folders) = workspace_folders { [INFO] [stdout] 94 | | for folder in folders { [INFO] [stdout] 95 | | if let Some(path) = folder.uri.to_file_path() { [INFO] [stdout] 96 | | Backend::index_workspace_static(&Some(client), &vault_index, &path) [INFO] [stdout] ... | [INFO] [stdout] 101 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/main.rs:92:27 [INFO] [stdout] | [INFO] [stdout] 92 | if let Ok(workspace_folders) = client.workspace_folders().await { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ replace this binding [INFO] [stdout] 93 | if let Some(folders) = workspace_folders { [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] --> src/main.rs:92:17 [INFO] [stdout] | [INFO] [stdout] 92 | / if let Ok(workspace_folders) = client.workspace_folders().await { [INFO] [stdout] 93 | | if let Some(folders) = workspace_folders { [INFO] [stdout] 94 | | for folder in folders { [INFO] [stdout] 95 | | if let Some(path) = folder.uri.to_file_path() { [INFO] [stdout] ... | [INFO] [stdout] 102 | | } [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] 92 ~ if let Ok(workspace_folders) = client.workspace_folders().await [INFO] [stdout] 93 ~ && let Some(folders) = workspace_folders { [INFO] [stdout] 94 | for folder in folders { [INFO] [stdout] ... [INFO] [stdout] 100 | } [INFO] [stdout] 101 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: mutable key type [INFO] [stdout] --> src/main.rs:717:21 [INFO] [stdout] | [INFO] [stdout] 717 | let mut changes = HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `Uri`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Uri`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Data`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Option`, which has interior mutability [INFO] [stdout] = note: ... because it contains `AuthData`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell>`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: `#[warn(clippy::mutable_key_type)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:783:9 [INFO] [stdout] | [INFO] [stdout] 783 | / if let Some(last_parse_time) = self.last_parse.get(&uri_str) { [INFO] [stdout] 784 | | if now.duration_since(*last_parse_time) < Duration::from_millis(100) { [INFO] [stdout] 785 | | info!( [INFO] [stdout] 786 | | "Skipping parse due to rate limiting (change #{})", [INFO] [stdout] ... | [INFO] [stdout] 791 | | } [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] 783 ~ if let Some(last_parse_time) = self.last_parse.get(&uri_str) [INFO] [stdout] 784 ~ && now.duration_since(*last_parse_time) < Duration::from_millis(100) { [INFO] [stdout] 785 | info!( [INFO] [stdout] ... [INFO] [stdout] 789 | return; [INFO] [stdout] 790 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `link_end` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:989:41 [INFO] [stdout] | [INFO] [stdout] 977 | if link_end.is_none() { [INFO] [stdout] | --------------------- help: try: `if let Some() = link_end` [INFO] [stdout] ... [INFO] [stdout] 989 | &after_link_start[..link_end.unwrap() + 2] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1246:13 [INFO] [stdout] | [INFO] [stdout] 1246 | / if prop_name.contains(&partial_lower) || partial.is_empty() { [INFO] [stdout] 1247 | | if !common_properties [INFO] [stdout] 1248 | | .iter() [INFO] [stdout] 1249 | | .any(|(common, _)| common == prop_name) [INFO] [stdout] ... | [INFO] [stdout] 1265 | | } [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] 1246 ~ if (prop_name.contains(&partial_lower) || partial.is_empty()) { [INFO] [stdout] 1247 ~ && !common_properties [INFO] [stdout] 1248 | .iter() [INFO] [stdout] ... [INFO] [stdout] 1263 | }); [INFO] [stdout] 1264 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1325:21 [INFO] [stdout] | [INFO] [stdout] 1325 | / if let NodeType::Link(link) = &node.node_type { [INFO] [stdout] 1326 | | if normalize_link_text(&link.address) == normalized_target { [INFO] [stdout] 1327 | | if let Some(location) = self.node_to_location(file_path, node) { [INFO] [stdout] 1328 | | locations.push(location); [INFO] [stdout] ... | [INFO] [stdout] 1332 | | } [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] 1325 ~ if let NodeType::Link(link) = &node.node_type [INFO] [stdout] 1326 ~ && normalize_link_text(&link.address) == normalized_target { [INFO] [stdout] 1327 | if let Some(location) = self.node_to_location(file_path, node) { [INFO] [stdout] ... [INFO] [stdout] 1330 | } [INFO] [stdout] 1331 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1326:25 [INFO] [stdout] | [INFO] [stdout] 1326 | / if normalize_link_text(&link.address) == normalized_target { [INFO] [stdout] 1327 | | if let Some(location) = self.node_to_location(file_path, node) { [INFO] [stdout] 1328 | | locations.push(location); [INFO] [stdout] 1329 | | debug!("Found reference at line {}", node.range.start.line); [INFO] [stdout] 1330 | | } [INFO] [stdout] 1331 | | } [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] 1326 ~ if normalize_link_text(&link.address) == normalized_target [INFO] [stdout] 1327 ~ && let Some(location) = self.node_to_location(file_path, node) { [INFO] [stdout] 1328 | locations.push(location); [INFO] [stdout] 1329 | debug!("Found reference at line {}", node.range.start.line); [INFO] [stdout] 1330 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1387:21 [INFO] [stdout] | [INFO] [stdout] 1387 | / if let NodeType::Tag(node_tag) = &node.node_type { [INFO] [stdout] 1388 | | if node_tag.to_lowercase() == normalized_tag { [INFO] [stdout] 1389 | | if let Some(location) = self.node_to_location(file_path, node) { [INFO] [stdout] 1390 | | locations.push(location); [INFO] [stdout] ... | [INFO] [stdout] 1397 | | } [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] 1387 ~ if let NodeType::Tag(node_tag) = &node.node_type [INFO] [stdout] 1388 ~ && node_tag.to_lowercase() == normalized_tag { [INFO] [stdout] 1389 | if let Some(location) = self.node_to_location(file_path, node) { [INFO] [stdout] ... [INFO] [stdout] 1395 | } [INFO] [stdout] 1396 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1388:25 [INFO] [stdout] | [INFO] [stdout] 1388 | / if node_tag.to_lowercase() == normalized_tag { [INFO] [stdout] 1389 | | if let Some(location) = self.node_to_location(file_path, node) { [INFO] [stdout] 1390 | | locations.push(location); [INFO] [stdout] 1391 | | debug!( [INFO] [stdout] ... | [INFO] [stdout] 1396 | | } [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] 1388 ~ if node_tag.to_lowercase() == normalized_tag [INFO] [stdout] 1389 ~ && let Some(location) = self.node_to_location(file_path, node) { [INFO] [stdout] 1390 | locations.push(location); [INFO] [stdout] ... [INFO] [stdout] 1394 | ); [INFO] [stdout] 1395 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1401:17 [INFO] [stdout] | [INFO] [stdout] 1401 | / if let Some(frontmatter_location) = [INFO] [stdout] 1402 | | self.find_frontmatter_tag_location(&content, &normalized_tag) [INFO] [stdout] 1403 | | { [INFO] [stdout] 1404 | | if let Some(location) = self.node_to_location(file_path, &frontmatter_location) [INFO] [stdout] ... | [INFO] [stdout] 1412 | | } [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] 1402 ~ self.find_frontmatter_tag_location(&content, &normalized_tag) [INFO] [stdout] 1403 ~ && let Some(location) = self.node_to_location(file_path, &frontmatter_location) [INFO] [stdout] 1404 | { [INFO] [stdout] ... [INFO] [stdout] 1409 | ); [INFO] [stdout] 1410 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: mutable key type [INFO] [stdout] --> src/main.rs:1601:9 [INFO] [stdout] | [INFO] [stdout] 1601 | let changes = workspace_edit.changes.as_mut().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `Uri`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Uri`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Data`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Option`, which has interior mutability [INFO] [stdout] = note: ... because it contains `AuthData`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell>`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1622:21 [INFO] [stdout] | [INFO] [stdout] 1622 | / if let NodeType::Link(ref_link) = &node.node_type { [INFO] [stdout] 1623 | | if normalize_link_text(&ref_link.address) == normalized_target { [INFO] [stdout] 1624 | | // This link references our target, update it [INFO] [stdout] 1625 | | debug!( [INFO] [stdout] ... | [INFO] [stdout] 1650 | | } [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] 1622 ~ if let NodeType::Link(ref_link) = &node.node_type [INFO] [stdout] 1623 ~ && normalize_link_text(&ref_link.address) == normalized_target { [INFO] [stdout] 1624 | // This link references our target, update it [INFO] [stdout] ... [INFO] [stdout] 1648 | } [INFO] [stdout] 1649 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:1641:68 [INFO] [stdout] | [INFO] [stdout] 1641 | ... if let Some(uri) = Uri::from_file_path(&ref_file_path) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `ref_file_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/main.rs:1647:52 [INFO] [stdout] | [INFO] [stdout] 1647 | ... changes.entry(uri).or_insert_with(Vec::new).push(text_edit); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/main.rs:1673:45 [INFO] [stdout] | [INFO] [stdout] 1673 | for (_node_id, node) in &doc.nodes { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 1673 - for (_node_id, node) in &doc.nodes { [INFO] [stdout] 1673 + for node in doc.nodes.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/main.rs:1700:42 [INFO] [stdout] | [INFO] [stdout] 1700 | ... .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `column_widths` [INFO] [stdout] --> src/main.rs:1959:18 [INFO] [stdout] | [INFO] [stdout] 1959 | for i in 0..table.headers.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 1959 - for i in 0..table.headers.len() { [INFO] [stdout] 1959 + for (i, ) in column_widths.iter().enumerate().take(table.headers.len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:2274:28 [INFO] [stdout] | [INFO] [stdout] 2274 | let line_1_in_fm = 1 > 0 && 1 < 3; // title line [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `1 > 0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:2275:28 [INFO] [stdout] | [INFO] [stdout] 2275 | let line_2_in_fm = 2 > 0 && 2 < 3; // author line [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `2 > 0` [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: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/main.rs:2500:18 [INFO] [stdout] | [INFO] [stdout] 2500 | .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/main.rs:2509:18 [INFO] [stdout] | [INFO] [stdout] 2509 | .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/main.rs:2574:18 [INFO] [stdout] | [INFO] [stdout] 2574 | .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/main.rs:2583:18 [INFO] [stdout] | [INFO] [stdout] 2583 | .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/main.rs:2665:9 [INFO] [stdout] | [INFO] [stdout] 2665 | scored_items.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] 2665 - scored_items.sort_by(|a, b| b.0.cmp(&a.0)); [INFO] [stdout] 2665 + scored_items.sort_by_key(|b| std::cmp::Reverse(b.0)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:2805:28 [INFO] [stdout] | [INFO] [stdout] 2805 | let line_1_in_fm = 1 > 0 && 1 < 3; // title line [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `1 > 0` [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] --> src/main.rs:2806:28 [INFO] [stdout] | [INFO] [stdout] 2806 | let line_2_in_fm = 2 > 0 && 2 < 3; // author line [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `2 > 0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 21.36s [INFO] running `Command { std: "docker" "inspect" "6372f290ff427015fd8bc04ef2583fa498528ba2aed9be9b326e166787ec1e5d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6372f290ff427015fd8bc04ef2583fa498528ba2aed9be9b326e166787ec1e5d", kill_on_drop: false }` [INFO] [stdout] 6372f290ff427015fd8bc04ef2583fa498528ba2aed9be9b326e166787ec1e5d