[INFO] cloning repository https://github.com/ef3d0c3e/nml [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/ef3d0c3e/nml" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fef3d0c3e%2Fnml", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fef3d0c3e%2Fnml'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 452e8b08d011a663de519d33898b44506bed4b23 [INFO] linting ef3d0c3e/nml against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fef3d0c3e%2Fnml" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/ef3d0c3e/nml [INFO] finished tweaking git repo https://github.com/ef3d0c3e/nml [INFO] tweaked toml for git repo https://github.com/ef3d0c3e/nml written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/ef3d0c3e/nml 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/ef3d0c3e/nml 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 mlua-sys v0.8.3 [INFO] [stderr] Downloaded rustc-serialize v0.3.25 [INFO] [stderr] Downloaded dot-structures v0.1.2 [INFO] [stderr] Downloaded tower-lsp-macros v0.9.0 [INFO] [stderr] Downloaded runtime-format v0.1.3 [INFO] [stderr] Downloaded ariadne v0.4.1 [INFO] [stderr] Downloaded into-attr v0.1.1 [INFO] [stderr] Downloaded tower-lsp v0.20.0 [INFO] [stderr] Downloaded auto-registry v0.0.2 [INFO] [stderr] Downloaded pest_generator v2.8.3 [INFO] [stderr] Downloaded lsp-types v0.94.1 [INFO] [stderr] Downloaded into-attr-derive v0.2.1 [INFO] [stderr] Downloaded dot-generator v0.2.0 [INFO] [stderr] Downloaded pest_meta v2.8.3 [INFO] [stderr] Downloaded mlua v0.11.4 [INFO] [stderr] Downloaded pest_derive v2.8.3 [INFO] [stderr] Downloaded lua-src v548.1.2 [INFO] [stderr] Downloaded luajit-src v210.6.2+25a61a1 [INFO] [stderr] Downloaded graphviz-rust v0.9.6 [INFO] [stderr] Downloaded pest v2.8.3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 885acdc8e67f118299d280d85651f473c3191c0fb0a6264fc65befe651e06e49 [INFO] running `Command { std: "docker" "start" "-a" "885acdc8e67f118299d280d85651f473c3191c0fb0a6264fc65befe651e06e49", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "885acdc8e67f118299d280d85651f473c3191c0fb0a6264fc65befe651e06e49", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "885acdc8e67f118299d280d85651f473c3191c0fb0a6264fc65befe651e06e49", kill_on_drop: false }` [INFO] [stdout] 885acdc8e67f118299d280d85651f473c3191c0fb0a6264fc65befe651e06e49 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 08bf766afb19004e81e04a757f5152219abc3c27aa5ae60d9e59463af340e40c [INFO] running `Command { std: "docker" "start" "-a" "08bf766afb19004e81e04a757f5152219abc3c27aa5ae60d9e59463af340e40c", kill_on_drop: false }` [INFO] [stderr] Compiling unicode-ident v1.0.20 [INFO] [stderr] Compiling cc v1.2.43 [INFO] [stderr] Compiling rustix v1.1.2 [INFO] [stderr] Compiling linux-raw-sys v0.11.0 [INFO] [stderr] Compiling bitflags v2.10.0 [INFO] [stderr] Compiling env_home v0.1.0 [INFO] [stderr] Compiling ahash v0.8.12 [INFO] [stderr] Compiling typeid v1.0.3 [INFO] [stderr] Compiling proc-macro2 v1.0.103 [INFO] [stderr] Compiling serde_core v1.0.228 [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Compiling erased-serde v0.4.8 [INFO] [stderr] Checking lock_api v0.4.14 [INFO] [stderr] Checking hashbrown v0.14.5 [INFO] [stderr] Checking getrandom v0.3.4 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Compiling serde_json v1.0.145 [INFO] [stderr] Compiling lua-src v548.1.2 [INFO] [stderr] Compiling pest v2.8.3 [INFO] [stderr] Checking futures-channel v0.3.31 [INFO] [stderr] Compiling quote v1.0.41 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking percent-encoding v2.3.2 [INFO] [stderr] Compiling smallvec v1.15.1 [INFO] [stderr] Compiling dot-structures v0.1.2 [INFO] [stderr] Compiling onig_sys v69.9.1 [INFO] [stderr] Compiling syn v2.0.108 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling libsqlite3-sys v0.28.0 [INFO] [stderr] Compiling ordered-float v2.10.1 [INFO] [stderr] Compiling pest_meta v2.8.3 [INFO] [stderr] Compiling which v8.0.0 [INFO] [stderr] Compiling luajit-src v210.6.2+25a61a1 [INFO] [stderr] Checking form_urlencoded v1.2.2 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking simd-adler32 v0.3.7 [INFO] [stderr] Compiling gcc v0.3.55 [INFO] [stderr] Compiling mlua-sys v0.8.3 [INFO] [stderr] Checking miniz_oxide v0.8.9 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Compiling rust-crypto v0.2.36 [INFO] [stderr] Checking time v0.3.44 [INFO] [stderr] Compiling parking_lot v0.12.5 [INFO] [stderr] Compiling bstr v1.12.1 [INFO] [stderr] Compiling serde-value v0.7.0 [INFO] [stderr] Compiling into-attr v0.1.1 [INFO] [stderr] Compiling dot-generator v0.2.0 [INFO] [stderr] Checking rand v0.4.6 [INFO] [stderr] Checking quick-xml v0.38.3 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling pest_generator v2.8.3 [INFO] [stderr] Checking winnow v0.7.13 [INFO] [stderr] Compiling rustc-hash v2.1.1 [INFO] [stderr] Compiling either v1.15.0 [INFO] [stderr] Checking linked-hash-map v0.5.6 [INFO] [stderr] Checking tempfile v3.23.0 [INFO] [stderr] Checking regex-automata v0.4.13 [INFO] [stderr] Checking yaml-rust v0.4.5 [INFO] [stderr] Compiling into-attr-derive v0.2.1 [INFO] [stderr] Checking rand v0.3.23 [INFO] [stderr] Checking onig v6.5.1 [INFO] [stderr] Compiling mlua v0.11.4 [INFO] [stderr] Checking flate2 v1.1.5 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.1 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling zerovec-derive v0.11.2 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Compiling pin-project-internal v1.1.10 [INFO] [stderr] Compiling tokio-macros v2.6.0 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking yoke v0.8.1 [INFO] [stderr] Compiling serde_repr v0.1.20 [INFO] [stderr] Checking zerovec v0.11.5 [INFO] [stderr] Checking tinystr v0.8.2 [INFO] [stderr] Checking potential_utf v0.1.4 [INFO] [stderr] Checking zerotrie v0.2.3 [INFO] [stderr] Checking icu_locale_core v2.1.1 [INFO] [stderr] Checking icu_collections v2.1.1 [INFO] [stderr] Checking tokio v1.48.0 [INFO] [stderr] Compiling tracing-attributes v0.1.30 [INFO] [stderr] Checking pin-project v1.1.10 [INFO] [stderr] Compiling thiserror-impl v2.0.17 [INFO] [stderr] Checking icu_provider v2.1.1 [INFO] [stderr] Compiling auto_impl v1.3.0 [INFO] [stderr] Checking icu_properties v2.1.1 [INFO] [stderr] Checking icu_normalizer v2.1.1 [INFO] [stderr] Checking tokio-util v0.7.16 [INFO] [stderr] Checking tracing v0.1.41 [INFO] [stderr] Checking futures v0.3.31 [INFO] [stderr] Checking tower v0.4.13 [INFO] [stderr] Checking thiserror v2.0.17 [INFO] [stderr] Compiling pest_derive v2.8.3 [INFO] [stderr] Compiling tower-lsp-macros v0.9.0 [INFO] [stderr] Compiling async-trait v0.1.89 [INFO] [stderr] Checking hashlink v0.9.1 [INFO] [stderr] Checking dashmap v5.5.3 [INFO] [stderr] Checking time v0.1.45 [INFO] [stderr] Checking toml_datetime v0.6.11 [INFO] [stderr] Checking serde_spanned v0.6.9 [INFO] [stderr] Checking plist v1.8.0 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking bincode v1.3.3 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking toml_edit v0.22.27 [INFO] [stderr] Checking fallible-iterator v0.3.0 [INFO] [stderr] Checking url v2.5.7 [INFO] [stderr] Checking rustc-serialize v0.3.25 [INFO] [stderr] Checking syntect v5.3.0 [INFO] [stderr] Checking ariadne v0.4.1 [INFO] [stderr] Compiling auto-userdata v0.0.1 (/opt/rustwide/workdir/crates/auto-userdata) [INFO] [stdout] warning: unused import: `quote::TokenStreamExt` [INFO] [stdout] --> crates/auto-userdata/src/lib.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use quote::TokenStreamExt; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: feature `proc_macro_span` is declared but not used [INFO] [stdout] --> crates/auto-userdata/src/lib.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | #![feature(proc_macro_span)] [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_features)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking getopts v0.2.24 [INFO] [stderr] Checking graphviz-rust v0.9.6 [INFO] [stderr] Checking lsp-types v0.94.1 [INFO] [stderr] Checking regex v1.12.2 [INFO] [stderr] Checking dashmap v6.1.0 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking runtime-format v0.1.3 [INFO] [stderr] Compiling auto-registry v0.0.2 [INFO] [stderr] Checking toml v0.8.23 [INFO] [stderr] Checking rusqlite v0.31.0 [INFO] [stderr] Checking tower-lsp v0.20.0 [INFO] [stderr] Checking nml v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/compiler/compiler.rs:43:4 [INFO] [stdout] | [INFO] [stdout] 43 | target: target, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `target` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/compiler/compiler.rs:43:4 [INFO] [stdout] | [INFO] [stdout] 43 | target: target, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `target` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/elements/heading/rule.rs:204:4 [INFO] [stdout] | [INFO] [stdout] 204 | reference: reference, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `reference` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/elements/heading/rule.rs:204:4 [INFO] [stdout] | [INFO] [stdout] 204 | reference: reference, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `reference` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/compiler/compiler.rs:43:4 [INFO] [stdout] | [INFO] [stdout] 43 | target: target, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `target` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `core::hash` [INFO] [stdout] --> src/elements/typst/elem.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use core::hash; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::unit::element::ContainerElement` [INFO] [stdout] --> src/elements/typst/elem.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | use crate::unit::element::ContainerElement; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::unit::element::LinkableElement` [INFO] [stdout] --> src/elements/typst/elem.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | use crate::unit::element::LinkableElement; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::unit::element::ReferenceableElement` [INFO] [stdout] --> src/elements/typst/elem.rs:35:5 [INFO] [stdout] | [INFO] [stdout] 35 | use crate::unit::element::ReferenceableElement; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/lsp/semantic.rs:423:42 [INFO] [stdout] | [INFO] [stdout] 423 | .get(&($source as std::sync::Arc)) [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] = note: `#[warn(clippy::crate_in_macro_def)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/elements/heading/rule.rs:204:4 [INFO] [stdout] | [INFO] [stdout] 204 | reference: reference, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `reference` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/lua/kernel.rs:434:18 [INFO] [stdout] | [INFO] [stdout] 434 | let mut funs = crate::lua::kernel::LUA_FUNC.lock(); [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/lua/kernel.rs:476:18 [INFO] [stdout] | [INFO] [stdout] 476 | let mut funs = crate::lua::kernel::LUA_FUNC.lock(); [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/lua/doc.rs:33:18 [INFO] [stdout] | [INFO] [stdout] 33 | let mut docs = crate::lua::doc::LUA_DOCS.lock(); [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/lua/doc.rs:62:18 [INFO] [stdout] | [INFO] [stdout] 62 | let mut docs = crate::lua::doc::LUA_DOCS.lock(); [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/parser/property.rs:74:6 [INFO] [stdout] | [INFO] [stdout] 74 | /// (Note) In this case, reports should have been set [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] = note: `#[warn(clippy::tabs_in_doc_comments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/parser/property.rs:118:6 [INFO] [stdout] | [INFO] [stdout] 118 | /// (Note) In this case, reports should have been set [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/parser/property.rs:196:6 [INFO] [stdout] | [INFO] [stdout] 196 | /// (Note) In this case, reports should have been set [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/parser/property.rs:265:6 [INFO] [stdout] | [INFO] [stdout] 265 | /// Property::new("Width of the element in em".to_string(), None)); [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/parser/property.rs:271:6 [INFO] [stdout] | [INFO] [stdout] 271 | /// Some(properties) => properties, [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/parser/property.rs:272:6 [INFO] [stdout] | [INFO] [stdout] 272 | /// None => return reports, [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::BTreeMap` [INFO] [stdout] --> src/parser/rule.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | use std::collections::BTreeMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `core::hash` [INFO] [stdout] --> src/elements/typst/elem.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use core::hash; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::unit::element::ContainerElement` [INFO] [stdout] --> src/elements/typst/elem.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | use crate::unit::element::ContainerElement; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::unit::element::LinkableElement` [INFO] [stdout] --> src/elements/typst/elem.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | use crate::unit::element::LinkableElement; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::unit::element::ReferenceableElement` [INFO] [stdout] --> src/elements/typst/elem.rs:35:5 [INFO] [stdout] | [INFO] [stdout] 35 | use crate::unit::element::ReferenceableElement; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/parser/source.rs:169:4 [INFO] [stdout] | [INFO] [stdout] 169 | /// # Offsets [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused macro definition: `create_styles` [INFO] [stdout] --> src/parser/style.rs:35:14 [INFO] [stdout] | [INFO] [stdout] 35 | macro_rules! create_styles { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_macros)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/parser/util.rs:16:1 [INFO] [stdout] | [INFO] [stdout] 16 | / /// Processes text for escape characters and paragraphing [INFO] [stdout] 17 | | /* [INFO] [stdout] 18 | | pub fn process_text(scope: Arc>, content: &str) -> String { [INFO] [stdout] 19 | | let mut escaped = false; [INFO] [stdout] ... | [INFO] [stdout] 93 | | */ [INFO] [stdout] 94 | | [INFO] [stdout] | |_^ [INFO] [stdout] ... [INFO] [stdout] 101 | pub fn transform_text>(text: S) -> String { [INFO] [stdout] | --------------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the doc comment should not document function `transform_text` then comment it out [INFO] [stdout] | [INFO] [stdout] 16 | // /// Processes text for escape characters and paragraphing [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/lsp/semantic.rs:423:42 [INFO] [stdout] | [INFO] [stdout] 423 | .get(&($source as std::sync::Arc)) [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] = note: `#[warn(clippy::crate_in_macro_def)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/util/testers.rs:8:3 [INFO] [stdout] | [INFO] [stdout] 8 | crate::validate_ast_parse_field!($obj, $idx, $t, [], $($field_tokens)*); [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/util/testers.rs:18:8 [INFO] [stdout] | [INFO] [stdout] 18 | use crate::util::util::AsRefForCompare; [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/util/testers.rs:68:3 [INFO] [stdout] | [INFO] [stdout] 68 | crate::validate_ast_evaluate_expr!(&$obj.$first, $($middle).* . $method()) [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/util/testers.rs:88:14 [INFO] [stdout] | [INFO] [stdout] 88 | let elem = crate::unit::scope::ScopeAccessor::get_content($scope, $idx).unwrap(); [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/lua/kernel.rs:434:18 [INFO] [stdout] | [INFO] [stdout] 434 | let mut funs = crate::lua::kernel::LUA_FUNC.lock(); [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/lua/kernel.rs:476:18 [INFO] [stdout] | [INFO] [stdout] 476 | let mut funs = crate::lua::kernel::LUA_FUNC.lock(); [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/lua/doc.rs:33:18 [INFO] [stdout] | [INFO] [stdout] 33 | let mut docs = crate::lua::doc::LUA_DOCS.lock(); [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/lua/doc.rs:62:18 [INFO] [stdout] | [INFO] [stdout] 62 | let mut docs = crate::lua::doc::LUA_DOCS.lock(); [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `core::hash` [INFO] [stdout] --> src/elements/typst/elem.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use core::hash; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::unit::element::ContainerElement` [INFO] [stdout] --> src/elements/typst/elem.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | use crate::unit::element::ContainerElement; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::unit::element::LinkableElement` [INFO] [stdout] --> src/elements/typst/elem.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | use crate::unit::element::LinkableElement; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::unit::element::ReferenceableElement` [INFO] [stdout] --> src/elements/typst/elem.rs:35:5 [INFO] [stdout] | [INFO] [stdout] 35 | use crate::unit::element::ReferenceableElement; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/parser/property.rs:74:6 [INFO] [stdout] | [INFO] [stdout] 74 | /// (Note) In this case, reports should have been set [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] = note: `#[warn(clippy::tabs_in_doc_comments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/parser/property.rs:118:6 [INFO] [stdout] | [INFO] [stdout] 118 | /// (Note) In this case, reports should have been set [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/parser/property.rs:196:6 [INFO] [stdout] | [INFO] [stdout] 196 | /// (Note) In this case, reports should have been set [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/parser/property.rs:265:6 [INFO] [stdout] | [INFO] [stdout] 265 | /// Property::new("Width of the element in em".to_string(), None)); [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/parser/property.rs:271:6 [INFO] [stdout] | [INFO] [stdout] 271 | /// Some(properties) => properties, [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/parser/property.rs:272:6 [INFO] [stdout] | [INFO] [stdout] 272 | /// None => return reports, [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::BTreeMap` [INFO] [stdout] --> src/parser/rule.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | use std::collections::BTreeMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/parser/source.rs:169:4 [INFO] [stdout] | [INFO] [stdout] 169 | /// # Offsets [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused macro definition: `create_styles` [INFO] [stdout] --> src/parser/style.rs:35:14 [INFO] [stdout] | [INFO] [stdout] 35 | macro_rules! create_styles { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_macros)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/parser/util.rs:16:1 [INFO] [stdout] | [INFO] [stdout] 16 | / /// Processes text for escape characters and paragraphing [INFO] [stdout] 17 | | /* [INFO] [stdout] 18 | | pub fn process_text(scope: Arc>, content: &str) -> String { [INFO] [stdout] 19 | | let mut escaped = false; [INFO] [stdout] ... | [INFO] [stdout] 93 | | */ [INFO] [stdout] 94 | | [INFO] [stdout] | |_^ [INFO] [stdout] ... [INFO] [stdout] 101 | pub fn transform_text>(text: S) -> String { [INFO] [stdout] | --------------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the doc comment should not document function `transform_text` then comment it out [INFO] [stdout] | [INFO] [stdout] 16 | // /// Processes text for escape characters and paragraphing [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/util/testers.rs:8:3 [INFO] [stdout] | [INFO] [stdout] 8 | crate::validate_ast_parse_field!($obj, $idx, $t, [], $($field_tokens)*); [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/util/testers.rs:18:8 [INFO] [stdout] | [INFO] [stdout] 18 | use crate::util::util::AsRefForCompare; [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/util/testers.rs:68:3 [INFO] [stdout] | [INFO] [stdout] 68 | crate::validate_ast_evaluate_expr!(&$obj.$first, $($middle).* . $method()) [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/util/testers.rs:88:14 [INFO] [stdout] | [INFO] [stdout] 88 | let elem = crate::unit::scope::ScopeAccessor::get_content($scope, $idx).unwrap(); [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/server.rs:536:5 [INFO] [stdout] | [INFO] [stdout] 536 | data: data, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/lua/kernel.rs:434:18 [INFO] [stdout] | [INFO] [stdout] 434 | let mut funs = crate::lua::kernel::LUA_FUNC.lock(); [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] = note: `#[warn(clippy::crate_in_macro_def)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/lua/kernel.rs:476:18 [INFO] [stdout] | [INFO] [stdout] 476 | let mut funs = crate::lua::kernel::LUA_FUNC.lock(); [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/compiler/compiler.rs:43:4 [INFO] [stdout] | [INFO] [stdout] 43 | target: target, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `target` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/lua/doc.rs:33:18 [INFO] [stdout] | [INFO] [stdout] 33 | let mut docs = crate::lua::doc::LUA_DOCS.lock(); [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/lua/doc.rs:62:18 [INFO] [stdout] | [INFO] [stdout] 62 | let mut docs = crate::lua::doc::LUA_DOCS.lock(); [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/parser/property.rs:74:6 [INFO] [stdout] | [INFO] [stdout] 74 | /// (Note) In this case, reports should have been set [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] = note: `#[warn(clippy::tabs_in_doc_comments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/parser/property.rs:118:6 [INFO] [stdout] | [INFO] [stdout] 118 | /// (Note) In this case, reports should have been set [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/parser/property.rs:196:6 [INFO] [stdout] | [INFO] [stdout] 196 | /// (Note) In this case, reports should have been set [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/parser/property.rs:265:6 [INFO] [stdout] | [INFO] [stdout] 265 | /// Property::new("Width of the element in em".to_string(), None)); [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/parser/property.rs:271:6 [INFO] [stdout] | [INFO] [stdout] 271 | /// Some(properties) => properties, [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/parser/property.rs:272:6 [INFO] [stdout] | [INFO] [stdout] 272 | /// None => return reports, [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::BTreeMap` [INFO] [stdout] --> src/parser/rule.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | use std::collections::BTreeMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/parser/source.rs:169:4 [INFO] [stdout] | [INFO] [stdout] 169 | /// # Offsets [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused macro definition: `create_styles` [INFO] [stdout] --> src/parser/style.rs:35:14 [INFO] [stdout] | [INFO] [stdout] 35 | macro_rules! create_styles { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_macros)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/parser/util.rs:16:1 [INFO] [stdout] | [INFO] [stdout] 16 | / /// Processes text for escape characters and paragraphing [INFO] [stdout] 17 | | /* [INFO] [stdout] 18 | | pub fn process_text(scope: Arc>, content: &str) -> String { [INFO] [stdout] 19 | | let mut escaped = false; [INFO] [stdout] ... | [INFO] [stdout] 93 | | */ [INFO] [stdout] 94 | | [INFO] [stdout] | |_^ [INFO] [stdout] ... [INFO] [stdout] 101 | pub fn transform_text>(text: S) -> String { [INFO] [stdout] | --------------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the doc comment should not document function `transform_text` then comment it out [INFO] [stdout] | [INFO] [stdout] 16 | // /// Processes text for escape characters and paragraphing [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/elements/heading/rule.rs:204:4 [INFO] [stdout] | [INFO] [stdout] 204 | reference: reference, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `reference` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `core::hash` [INFO] [stdout] --> src/elements/typst/elem.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use core::hash; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::unit::element::ContainerElement` [INFO] [stdout] --> src/elements/typst/elem.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | use crate::unit::element::ContainerElement; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::unit::element::LinkableElement` [INFO] [stdout] --> src/elements/typst/elem.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | use crate::unit::element::LinkableElement; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::unit::element::ReferenceableElement` [INFO] [stdout] --> src/elements/typst/elem.rs:35:5 [INFO] [stdout] | [INFO] [stdout] 35 | use crate::unit::element::ReferenceableElement; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/lua/kernel.rs:434:18 [INFO] [stdout] | [INFO] [stdout] 434 | let mut funs = crate::lua::kernel::LUA_FUNC.lock(); [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] = note: `#[warn(clippy::crate_in_macro_def)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/lua/kernel.rs:476:18 [INFO] [stdout] | [INFO] [stdout] 476 | let mut funs = crate::lua::kernel::LUA_FUNC.lock(); [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/lua/doc.rs:33:18 [INFO] [stdout] | [INFO] [stdout] 33 | let mut docs = crate::lua::doc::LUA_DOCS.lock(); [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/lua/doc.rs:62:18 [INFO] [stdout] | [INFO] [stdout] 62 | let mut docs = crate::lua::doc::LUA_DOCS.lock(); [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/parser/property.rs:74:6 [INFO] [stdout] | [INFO] [stdout] 74 | /// (Note) In this case, reports should have been set [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] = note: `#[warn(clippy::tabs_in_doc_comments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/parser/property.rs:118:6 [INFO] [stdout] | [INFO] [stdout] 118 | /// (Note) In this case, reports should have been set [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/parser/property.rs:196:6 [INFO] [stdout] | [INFO] [stdout] 196 | /// (Note) In this case, reports should have been set [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/parser/property.rs:265:6 [INFO] [stdout] | [INFO] [stdout] 265 | /// Property::new("Width of the element in em".to_string(), None)); [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/parser/property.rs:271:6 [INFO] [stdout] | [INFO] [stdout] 271 | /// Some(properties) => properties, [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/parser/property.rs:272:6 [INFO] [stdout] | [INFO] [stdout] 272 | /// None => return reports, [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::BTreeMap` [INFO] [stdout] --> src/parser/rule.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | use std::collections::BTreeMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/parser/source.rs:169:4 [INFO] [stdout] | [INFO] [stdout] 169 | /// # Offsets [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused macro definition: `create_styles` [INFO] [stdout] --> src/parser/style.rs:35:14 [INFO] [stdout] | [INFO] [stdout] 35 | macro_rules! create_styles { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_macros)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/parser/util.rs:16:1 [INFO] [stdout] | [INFO] [stdout] 16 | / /// Processes text for escape characters and paragraphing [INFO] [stdout] 17 | | /* [INFO] [stdout] 18 | | pub fn process_text(scope: Arc>, content: &str) -> String { [INFO] [stdout] 19 | | let mut escaped = false; [INFO] [stdout] ... | [INFO] [stdout] 93 | | */ [INFO] [stdout] 94 | | [INFO] [stdout] | |_^ [INFO] [stdout] ... [INFO] [stdout] 101 | pub fn transform_text>(text: S) -> String { [INFO] [stdout] | --------------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the doc comment should not document function `transform_text` then comment it out [INFO] [stdout] | [INFO] [stdout] 16 | // /// Processes text for escape characters and paragraphing [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/server.rs:536:5 [INFO] [stdout] | [INFO] [stdout] 536 | data: data, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::element::Element` [INFO] [stdout] --> src/unit/variable.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | use super::element::Element; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ariadne::Span` [INFO] [stdout] --> src/parser/source.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use ariadne::Span; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: irrefutable `let...else` pattern [INFO] [stdout] --> src/compiler/compiler.rs:113:5 [INFO] [stdout] | [INFO] [stdout] 113 | let ProjectOutput::Html(html) = &settings.output else { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this pattern always matches, so the else clause is unreachable [INFO] [stdout] help: remove this `else` block [INFO] [stdout] --> src/compiler/compiler.rs:113:59 [INFO] [stdout] | [INFO] [stdout] 113 | let ProjectOutput::Html(html) = &settings.output else { [INFO] [stdout] | _______________________________________________________________________^ [INFO] [stdout] 114 | | panic!("Invalid project settings") [INFO] [stdout] 115 | | }; [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: `#[warn(irrefutable_let_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `lua` [INFO] [stdout] --> src/lua/kernel.rs:494:7 [INFO] [stdout] | [INFO] [stdout] 494 | let lua = $lua; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/elements/list/rule.rs:398:19 [INFO] [stdout] | [INFO] [stdout] 398 | let entries = convert_lua_args!(lua, args, (ListEntry, "entries", vuserdata)); [INFO] [stdout] | --------------------------------------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] help: `lua` is captured in macro and introduced a unused variable [INFO] [stdout] --> src/lua/kernel.rs:494:7 [INFO] [stdout] | [INFO] [stdout] 494 | let lua = $lua; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/elements/list/rule.rs:398:19 [INFO] [stdout] | [INFO] [stdout] 398 | let entries = convert_lua_args!(lua, args, (ListEntry, "entries", vuserdata)); [INFO] [stdout] | --------------------------------------------------------------- in this macro invocation [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] = note: this warning originates in the macro `convert_lua_args` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::element::Element` [INFO] [stdout] --> src/unit/variable.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | use super::element::Element; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ariadne::Span` [INFO] [stdout] --> src/parser/source.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use ariadne::Span; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: irrefutable `let...else` pattern [INFO] [stdout] --> src/compiler/compiler.rs:113:5 [INFO] [stdout] | [INFO] [stdout] 113 | let ProjectOutput::Html(html) = &settings.output else { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this pattern always matches, so the else clause is unreachable [INFO] [stdout] help: remove this `else` block [INFO] [stdout] --> src/compiler/compiler.rs:113:59 [INFO] [stdout] | [INFO] [stdout] 113 | let ProjectOutput::Html(html) = &settings.output else { [INFO] [stdout] | _______________________________________________________________________^ [INFO] [stdout] 114 | | panic!("Invalid project settings") [INFO] [stdout] 115 | | }; [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: `#[warn(irrefutable_let_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `lua` [INFO] [stdout] --> src/lua/kernel.rs:494:7 [INFO] [stdout] | [INFO] [stdout] 494 | let lua = $lua; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/elements/list/rule.rs:398:19 [INFO] [stdout] | [INFO] [stdout] 398 | let entries = convert_lua_args!(lua, args, (ListEntry, "entries", vuserdata)); [INFO] [stdout] | --------------------------------------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] help: `lua` is captured in macro and introduced a unused variable [INFO] [stdout] --> src/lua/kernel.rs:494:7 [INFO] [stdout] | [INFO] [stdout] 494 | let lua = $lua; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/elements/list/rule.rs:398:19 [INFO] [stdout] | [INFO] [stdout] 398 | let entries = convert_lua_args!(lua, args, (ListEntry, "entries", vuserdata)); [INFO] [stdout] | --------------------------------------------------------------- in this macro invocation [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] = note: this warning originates in the macro `convert_lua_args` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::element::Element` [INFO] [stdout] --> src/unit/variable.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | use super::element::Element; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ariadne::Span` [INFO] [stdout] --> src/parser/source.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use ariadne::Span; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::element::Element` [INFO] [stdout] --> src/unit/variable.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | use super::element::Element; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ariadne::Span` [INFO] [stdout] --> src/parser/source.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use ariadne::Span; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: irrefutable `let...else` pattern [INFO] [stdout] --> src/compiler/compiler.rs:113:5 [INFO] [stdout] | [INFO] [stdout] 113 | let ProjectOutput::Html(html) = &settings.output else { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this pattern always matches, so the else clause is unreachable [INFO] [stdout] help: remove this `else` block [INFO] [stdout] --> src/compiler/compiler.rs:113:59 [INFO] [stdout] | [INFO] [stdout] 113 | let ProjectOutput::Html(html) = &settings.output else { [INFO] [stdout] | _______________________________________________________________________^ [INFO] [stdout] 114 | | panic!("Invalid project settings") [INFO] [stdout] 115 | | }; [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: `#[warn(irrefutable_let_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: irrefutable `let...else` pattern [INFO] [stdout] --> src/compiler/compiler.rs:113:5 [INFO] [stdout] | [INFO] [stdout] 113 | let ProjectOutput::Html(html) = &settings.output else { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this pattern always matches, so the else clause is unreachable [INFO] [stdout] help: remove this `else` block [INFO] [stdout] --> src/compiler/compiler.rs:113:59 [INFO] [stdout] | [INFO] [stdout] 113 | let ProjectOutput::Html(html) = &settings.output else { [INFO] [stdout] | _______________________________________________________________________^ [INFO] [stdout] 114 | | panic!("Invalid project settings") [INFO] [stdout] 115 | | }; [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: `#[warn(irrefutable_let_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `lua` [INFO] [stdout] --> src/lua/kernel.rs:494:7 [INFO] [stdout] | [INFO] [stdout] 494 | let lua = $lua; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/elements/list/rule.rs:398:19 [INFO] [stdout] | [INFO] [stdout] 398 | let entries = convert_lua_args!(lua, args, (ListEntry, "entries", vuserdata)); [INFO] [stdout] | --------------------------------------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] help: `lua` is captured in macro and introduced a unused variable [INFO] [stdout] --> src/lua/kernel.rs:494:7 [INFO] [stdout] | [INFO] [stdout] 494 | let lua = $lua; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/elements/list/rule.rs:398:19 [INFO] [stdout] | [INFO] [stdout] 398 | let entries = convert_lua_args!(lua, args, (ListEntry, "entries", vuserdata)); [INFO] [stdout] | --------------------------------------------------------------- in this macro invocation [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] = note: this warning originates in the macro `convert_lua_args` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/parser/rule.rs:80:6 [INFO] [stdout] | [INFO] [stdout] 80 | let mut rules = get_rules!(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `lua` [INFO] [stdout] --> src/lua/kernel.rs:494:7 [INFO] [stdout] | [INFO] [stdout] 494 | let lua = $lua; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/elements/list/rule.rs:398:19 [INFO] [stdout] | [INFO] [stdout] 398 | let entries = convert_lua_args!(lua, args, (ListEntry, "entries", vuserdata)); [INFO] [stdout] | --------------------------------------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] help: `lua` is captured in macro and introduced a unused variable [INFO] [stdout] --> src/lua/kernel.rs:494:7 [INFO] [stdout] | [INFO] [stdout] 494 | let lua = $lua; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/elements/list/rule.rs:398:19 [INFO] [stdout] | [INFO] [stdout] 398 | let entries = convert_lua_args!(lua, args, (ListEntry, "entries", vuserdata)); [INFO] [stdout] | --------------------------------------------------------------- in this macro invocation [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] = note: this warning originates in the macro `convert_lua_args` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/layout/size.rs:28:4 [INFO] [stdout] | [INFO] [stdout] 23 | SizeOutput::CSS => match self { [INFO] [stdout] | --------------- matches all the relevant values [INFO] [stdout] ... [INFO] [stdout] 28 | _ => todo!(), [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/parser/rule.rs:80:6 [INFO] [stdout] | [INFO] [stdout] 80 | let mut rules = get_rules!(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/layout/size.rs:28:4 [INFO] [stdout] | [INFO] [stdout] 23 | SizeOutput::CSS => match self { [INFO] [stdout] | --------------- matches all the relevant values [INFO] [stdout] ... [INFO] [stdout] 28 | _ => todo!(), [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `target` is never read [INFO] [stdout] --> src/compiler/output.rs:69:2 [INFO] [stdout] | [INFO] [stdout] 67 | pub struct CompilerOutput { [INFO] [stdout] | -------------- field in this struct [INFO] [stdout] 68 | /// Compilation target [INFO] [stdout] 69 | target: Target, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `outputs` is never read [INFO] [stdout] --> src/compiler/process.rs:93:2 [INFO] [stdout] | [INFO] [stdout] 90 | pub struct ProcessQueue { [INFO] [stdout] | ------------ field in this struct [INFO] [stdout] ... [INFO] [stdout] 93 | outputs: Vec<()>, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CodeRangeParams` is never constructed [INFO] [stdout] --> src/lsp/code.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 22 | pub struct CodeRangeParams { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CodeRange` is never constructed [INFO] [stdout] --> src/lsp/code.rs:42:12 [INFO] [stdout] | [INFO] [stdout] 42 | pub struct CodeRange<'a> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `from_source_impl`, `from_source`, and `add` are never used [INFO] [stdout] --> src/lsp/code.rs:51:5 [INFO] [stdout] | [INFO] [stdout] 50 | impl<'a> CodeRange<'a> { [INFO] [stdout] | ---------------------- associated items in this implementation [INFO] [stdout] 51 | fn from_source_impl( [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 83 | pub fn from_source( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 93 | pub fn add(&self, range: Range, language: String) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConcealParams` is never constructed [INFO] [stdout] --> src/lsp/conceal.rs:20:12 [INFO] [stdout] | [INFO] [stdout] 20 | pub struct ConcealParams { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `original_source` is never read [INFO] [stdout] --> src/lsp/conceal.rs:57:2 [INFO] [stdout] | [INFO] [stdout] 54 | pub struct Conceal<'lsp> { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 57 | original_source: Arc, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Conceal` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `cursor` is never read [INFO] [stdout] --> src/lsp/hints.rs:16:2 [INFO] [stdout] | [INFO] [stdout] 14 | pub struct HintsData { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] 15 | /// The current cursor [INFO] [stdout] 16 | cursor: RwLock, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `HintsData` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Hints` is never constructed [INFO] [stdout] --> src/lsp/hints.rs:33:12 [INFO] [stdout] | [INFO] [stdout] 33 | pub struct Hints<'a> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `add` is never used [INFO] [stdout] --> src/lsp/hints.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 41 | impl<'a> Hints<'a> { [INFO] [stdout] | ------------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 86 | pub fn add(&self, position: usize, label: String) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `original_source` and `source` are never read [INFO] [stdout] --> src/lsp/hover.rs:27:2 [INFO] [stdout] | [INFO] [stdout] 24 | pub struct Hover<'lsp> { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 27 | original_source: Arc, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 28 | /// The resolved parent source [INFO] [stdout] 29 | source: Arc, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `StyleParams` is never constructed [INFO] [stdout] --> src/lsp/styles.rs:17:12 [INFO] [stdout] | [INFO] [stdout] 17 | pub struct StyleParams { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Styles` is never constructed [INFO] [stdout] --> src/lsp/styles.rs:44:12 [INFO] [stdout] | [INFO] [stdout] 44 | pub struct Styles<'a> { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `add` is never used [INFO] [stdout] --> src/lsp/styles.rs:97:9 [INFO] [stdout] | [INFO] [stdout] 52 | impl<'a> Styles<'a> { [INFO] [stdout] | ------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 97 | pub fn add(&self, range: Range, style: Style) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `original_source` and `source` are never read [INFO] [stdout] --> src/lsp/ranges.rs:26:2 [INFO] [stdout] | [INFO] [stdout] 23 | pub struct Range<'lsp> { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 26 | original_source: Arc, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 27 | /// The resolved parent source [INFO] [stdout] 28 | source: Arc, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `UserDataElem` is never used [INFO] [stdout] --> src/lua/wrappers.rs:67:11 [INFO] [stdout] | [INFO] [stdout] 67 | pub trait UserDataElem [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `try_new` is never used [INFO] [stdout] --> src/lua/kernel.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 26 | impl KernelName { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 33 | pub fn try_new(s: &str) -> Result<&KernelName, String> [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `source` and `content` are never read [INFO] [stdout] --> src/lua/kernel.rs:114:6 [INFO] [stdout] | [INFO] [stdout] 112 | pub struct KernelRedirect { [INFO] [stdout] | -------------- fields in this struct [INFO] [stdout] 113 | /// Message source e.g print() [INFO] [stdout] 114 | pub source: String, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 115 | /// Message content [INFO] [stdout] 116 | pub content: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `reports` is never read [INFO] [stdout] --> src/lua/kernel.rs:125:6 [INFO] [stdout] | [INFO] [stdout] 120 | pub struct KernelContext<'ctx> { [INFO] [stdout] | ------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 125 | pub reports: Vec, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `export_table` is never used [INFO] [stdout] --> src/lua/kernel.rs:319:9 [INFO] [stdout] | [INFO] [stdout] 150 | impl Kernel { [INFO] [stdout] | ----------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 319 | pub fn export_table( [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `ParserRuleAccessor` is never used [INFO] [stdout] --> src/parser/parser.rs:232:11 [INFO] [stdout] | [INFO] [stdout] 232 | pub trait ParserRuleAccessor { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `with_content` and `path` are never used [INFO] [stdout] --> src/parser/source.rs:98:9 [INFO] [stdout] | [INFO] [stdout] 76 | impl SourceFile { [INFO] [stdout] | --------------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 98 | pub fn with_content(path: String, content: String, location: Option) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 115 | pub fn path(&self) -> &PathBuf { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_position` is never used [INFO] [stdout] --> src/parser/source.rs:384:9 [INFO] [stdout] | [INFO] [stdout] 371 | impl LineCursor { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 384 | pub fn from_position( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Global`, `Scope`, and `Paragraph` are never constructed [INFO] [stdout] --> src/parser/state.rs:79:2 [INFO] [stdout] | [INFO] [stdout] 77 | pub enum StateScope { [INFO] [stdout] | ---------- variants in this enum [INFO] [stdout] 78 | /// Global state [INFO] [stdout] 79 | Global = 0, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 80 | /// Scope-local state [INFO] [stdout] 81 | Scope = 1, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 82 | /// Paragraph-local state [INFO] [stdout] 83 | Paragraph = 2, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `StateScope` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `on_remove` is never used [INFO] [stdout] --> src/parser/state.rs:91:5 [INFO] [stdout] | [INFO] [stdout] 86 | pub trait RuleState: Downcast { [INFO] [stdout] | --------- method in this trait [INFO] [stdout] ... [INFO] [stdout] 91 | fn on_remove<'u>(&self, unit: &mut TranslationUnit); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `RuleStateHolder` is never constructed [INFO] [stdout] --> src/parser/state.rs:103:12 [INFO] [stdout] | [INFO] [stdout] 103 | pub struct RuleStateHolder { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `insert`, `get`, and `on_scope_end` are never used [INFO] [stdout] --> src/parser/state.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 107 | impl RuleStateHolder { [INFO] [stdout] | -------------------- methods in this implementation [INFO] [stdout] 108 | pub fn insert( [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 120 | pub fn get>(&self, name: S) -> Option>> { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 127 | pub fn on_scope_end<'u>(&mut self, unit: &mut TranslationUnit, scope: StateScope) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `ElementStyle` is never used [INFO] [stdout] --> src/parser/style.rs:10:11 [INFO] [stdout] | [INFO] [stdout] 10 | pub trait ElementStyle: Downcast + core::fmt::Debug { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `StyleHolder` is never constructed [INFO] [stdout] --> src/parser/style.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 31 | pub struct StyleHolder { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `is_registered`, `current`, and `set_current` are never used [INFO] [stdout] --> src/parser/style.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 55 | impl StyleHolder { [INFO] [stdout] | ---------------- methods in this implementation [INFO] [stdout] 56 | /// Checks if a given style key is registered [INFO] [stdout] 57 | pub fn is_registered(&self, style_key: &str) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 68 | pub fn current(&self, style_key: &str) -> Rc { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 73 | pub fn set_current(&mut self, style: Rc) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_content`, `has_state`, and `token` are never used [INFO] [stdout] --> src/unit/scope.rs:131:5 [INFO] [stdout] | [INFO] [stdout] 109 | pub trait ScopeAccessor { [INFO] [stdout] | ------------- methods in this trait [INFO] [stdout] ... [INFO] [stdout] 131 | fn get_content(&self, id: usize) -> Option>; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 150 | fn has_state(&self, name: &str) -> bool; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 157 | fn token(&self) -> Token; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `input_path` is never used [INFO] [stdout] --> src/unit/unit.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 43 | impl<'u> OffloadedUnit<'u> { [INFO] [stdout] | -------------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 53 | pub fn input_path(&self) -> &PathBuf { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `value` is never used [INFO] [stdout] --> src/unit/variable.rs:211:9 [INFO] [stdout] | [INFO] [stdout] 210 | impl PropertyVariable { [INFO] [stdout] | --------------------- method in this implementation [INFO] [stdout] 211 | pub fn value(&self) -> &PropertyValue { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `AsRefForCompare` is never used [INFO] [stdout] --> src/util/util.rs:3:11 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait AsRefForCompare<'a, T: ?Sized> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/cache/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod cache; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/cache/cache.rs:252:63 [INFO] [stdout] | [INFO] [stdout] 252 | pub fn export_ref_unit(&self, unit: &TranslationUnit, input: &PathBuf, output: &Option) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 252 - pub fn export_ref_unit(&self, unit: &TranslationUnit, input: &PathBuf, output: &Option) { [INFO] [stdout] 252 + pub fn export_ref_unit(&self, unit: &TranslationUnit, input: &Path, output: &Option) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `rusqlite::MappedRows<'_, {closure@src/cache/cache.rs:450:19: 450:24}>` [INFO] [stdout] --> src/cache/cache.rs:449:3 [INFO] [stdout] | [INFO] [stdout] 449 | / update [INFO] [stdout] 450 | | .query_map([], |row| { [INFO] [stdout] 451 | | Ok(( [INFO] [stdout] 452 | | row.get_unwrap::<_, String>(0), [INFO] [stdout] ... | [INFO] [stdout] 458 | | .unwrap() [INFO] [stdout] 459 | | .into_iter() [INFO] [stdout] | |________________________^ [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] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 449 ~ update [INFO] [stdout] 450 ~ .query_map([], |row| { [INFO] [stdout] 451 ~ Ok(( [INFO] [stdout] 452 ~ row.get_unwrap::<_, String>(0), [INFO] [stdout] 453 ~ row.get_unwrap::<_, usize>(1), [INFO] [stdout] 454 ~ row.get_unwrap::<_, usize>(2), [INFO] [stdout] 455 ~ row.get_unwrap::<_, String>(3), [INFO] [stdout] 456 ~ )) [INFO] [stdout] 457 ~ }) [INFO] [stdout] 458 ~ .unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/compiler/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod compiler; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `HTML` contains a capitalized acronym [INFO] [stdout] --> src/compiler/compiler.rs:21:2 [INFO] [stdout] | [INFO] [stdout] 21 | HTML, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Html` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `LATEX` contains a capitalized acronym [INFO] [stdout] --> src/compiler/compiler.rs:23:2 [INFO] [stdout] | [INFO] [stdout] 23 | LATEX, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Latex` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `extend` instead of `append` for adding the full range of a second vector [INFO] [stdout] --> src/compiler/compiler.rs:101:5 [INFO] [stdout] | [INFO] [stdout] 101 | reports.extend(reps.drain(..)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `reports.append(&mut reps)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain [INFO] [stdout] = note: `#[warn(clippy::extend_with_drain)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/compiler/compiler.rs:134:24 [INFO] [stdout] | [INFO] [stdout] 134 | output.add_content(&format!( [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 135 | | "{icon}{css}", [INFO] [stdout] 136 | | self.sanitize(html.language.as_str()) [INFO] [stdout] 137 | | )); [INFO] [stdout] | |_________________^ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 134 ~ output.add_content(format!( [INFO] [stdout] 135 ~ "{icon}{css}", [INFO] [stdout] 136 ~ self.sanitize(html.language.as_str()) [INFO] [stdout] 137 ~ )); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/compiler.rs:156:4 [INFO] [stdout] | [INFO] [stdout] 156 | &unit.colors(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `unit.colors()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/compiler/links.rs:12:11 [INFO] [stdout] | [INFO] [stdout] 12 | refname: &String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 12 - refname: &String, [INFO] [stdout] 12 + refname: &str, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/compiler/output.rs:125:39 [INFO] [stdout] | [INFO] [stdout] 125 | if task.result.get().is_some() || !task.handle.get().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `task.handle.get().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/compiler/output.rs:129:8 [INFO] [stdout] | [INFO] [stdout] 129 | if task [INFO] [stdout] | ____________________^ [INFO] [stdout] 130 | | .handle [INFO] [stdout] 131 | | .get() [INFO] [stdout] 132 | | .map_or(false, |handle| handle.is_finished()) [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_some_and` instead [INFO] [stdout] | [INFO] [stdout] 132 - .map_or(false, |handle| handle.is_finished()) [INFO] [stdout] 132 + .is_some_and(|handle| handle.is_finished()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `extend` instead of `append` for adding the full range of a second vector [INFO] [stdout] --> src/compiler/output.rs:186:4 [INFO] [stdout] | [INFO] [stdout] 186 | reports.extend(err.drain(..)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `reports.append(&mut err)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same postfix: `Error` [INFO] [stdout] --> src/compiler/process.rs:30:1 [INFO] [stdout] | [INFO] [stdout] 30 | / pub enum ProcessError { [INFO] [stdout] 31 | | GeneralError(String), [INFO] [stdout] 32 | | InputError(String, PathBuf), [INFO] [stdout] 33 | | LinkError(Vec), [INFO] [stdout] 34 | | CompileError(Vec), [INFO] [stdout] 35 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/compiler/process.rs:148:48 [INFO] [stdout] | [INFO] [stdout] 148 | let Some(local_path) = pathdiff::diff_paths(&input, &self.project_path) else { [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/process.rs:182:35 [INFO] [stdout] | [INFO] [stdout] 182 | ProcessQueueMessage::Skipped(&input), [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/process.rs:188:34 [INFO] [stdout] | [INFO] [stdout] 188 | ProcessQueueMessage::Parsing(&input), [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/compiler/process.rs:261:13 [INFO] [stdout] | [INFO] [stdout] 261 | .map_err(|err| ProcessError::LinkError(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `ProcessError::LinkError` [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: unnecessary use of `cloned` [INFO] [stdout] --> src/elements/import/elem.rs:49:16 [INFO] [stdout] | [INFO] [stdout] 49 | for scope in self.content.iter().cloned() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] help: remove any references to the binding [INFO] [stdout] | [INFO] [stdout] 49 - for scope in self.content.iter().cloned() { [INFO] [stdout] 49 + for scope in self.content.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/elements/list/completion.rs:53:22 [INFO] [stdout] | [INFO] [stdout] 53 | insert_text: Some(format!( [INFO] [stdout] | _______________________________^ [INFO] [stdout] 54 | | "* ${{1:CONTENT}}" [INFO] [stdout] 55 | | )), [INFO] [stdout] | |_____________^ help: consider using `.to_string()`: `"* ${1:CONTENT}".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: useless use of `format!` [INFO] [stdout] --> src/elements/list/completion.rs:93:22 [INFO] [stdout] | [INFO] [stdout] 93 | insert_text: Some(format!( [INFO] [stdout] | _______________________________^ [INFO] [stdout] 94 | | "- ${{1:CONTENT}}" [INFO] [stdout] 95 | | )), [INFO] [stdout] | |_____________^ help: consider using `.to_string()`: `"- ${1:CONTENT}".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] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/elements/list/rule.rs:139:5 [INFO] [stdout] | [INFO] [stdout] 139 | parsed.last_mut().map(|last| last.offset = offset); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] = note: `#[warn(clippy::option_map_unit_fn)]` on by default [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 139 - parsed.last_mut().map(|last| last.offset = offset); [INFO] [stdout] 139 + if let Some(last) = parsed.last_mut() { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/elements/list/rule.rs:352:33 [INFO] [stdout] | [INFO] [stdout] 352 | span(token.range.clone(), err.into()) [INFO] [stdout] | ^^^^^^^^^^ help: consider removing `.into()`: `err` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `lua_ranges` is never read [INFO] [stdout] --> src/server.rs:66:2 [INFO] [stdout] | [INFO] [stdout] 41 | pub struct Backend { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 66 | lua_ranges: DashMap>>, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_unique_link` is never used [INFO] [stdout] --> src/compiler/links.rs:9:8 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn get_unique_link( [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `translate_reference` is never used [INFO] [stdout] --> src/compiler/links.rs:43:8 [INFO] [stdout] | [INFO] [stdout] 43 | pub fn translate_reference( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `target` is never read [INFO] [stdout] --> src/compiler/output.rs:69:2 [INFO] [stdout] | [INFO] [stdout] 67 | pub struct CompilerOutput { [INFO] [stdout] | -------------- field in this struct [INFO] [stdout] 68 | /// Compilation target [INFO] [stdout] 69 | target: Target, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ProcessOptions` is never constructed [INFO] [stdout] --> src/compiler/process.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 24 | pub struct ProcessOptions { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `ProcessError` is never used [INFO] [stdout] --> src/compiler/process.rs:30:10 [INFO] [stdout] | [INFO] [stdout] 30 | pub enum ProcessError { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `ProcessOutputOptions` is never used [INFO] [stdout] --> src/compiler/process.rs:37:10 [INFO] [stdout] | [INFO] [stdout] 37 | pub enum ProcessOutputOptions { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `ProcessQueueMessage` is never used [INFO] [stdout] --> src/compiler/process.rs:45:10 [INFO] [stdout] | [INFO] [stdout] 45 | pub enum ProcessQueueMessage<'u> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `output_message` is never used [INFO] [stdout] --> src/compiler/process.rs:57:8 [INFO] [stdout] | [INFO] [stdout] 57 | pub fn output_message<'u>(message: ProcessQueueMessage<'u>, perc: f64) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ProcessQueue` is never constructed [INFO] [stdout] --> src/compiler/process.rs:90:12 [INFO] [stdout] | [INFO] [stdout] 90 | pub struct ProcessQueue { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `process` are never used [INFO] [stdout] --> src/compiler/process.rs:102:9 [INFO] [stdout] | [INFO] [stdout] 101 | impl ProcessQueue { [INFO] [stdout] | ----------------- associated items in this implementation [INFO] [stdout] 102 | pub fn new( [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 130 | pub fn process( [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CodeRangeParams` is never constructed [INFO] [stdout] --> src/lsp/code.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 22 | pub struct CodeRangeParams { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CodeRange` is never constructed [INFO] [stdout] --> src/lsp/code.rs:42:12 [INFO] [stdout] | [INFO] [stdout] 42 | pub struct CodeRange<'a> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `from_source_impl`, `from_source`, and `add` are never used [INFO] [stdout] --> src/lsp/code.rs:51:5 [INFO] [stdout] | [INFO] [stdout] 50 | impl<'a> CodeRange<'a> { [INFO] [stdout] | ---------------------- associated items in this implementation [INFO] [stdout] 51 | fn from_source_impl( [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 83 | pub fn from_source( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 93 | pub fn add(&self, range: Range, language: String) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `original_source` is never read [INFO] [stdout] --> src/lsp/conceal.rs:57:2 [INFO] [stdout] | [INFO] [stdout] 54 | pub struct Conceal<'lsp> { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 57 | original_source: Arc, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Conceal` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `cursor` is never read [INFO] [stdout] --> src/lsp/hints.rs:16:2 [INFO] [stdout] | [INFO] [stdout] 14 | pub struct HintsData { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] 15 | /// The current cursor [INFO] [stdout] 16 | cursor: RwLock, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `HintsData` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Hints` is never constructed [INFO] [stdout] --> src/lsp/hints.rs:33:12 [INFO] [stdout] | [INFO] [stdout] 33 | pub struct Hints<'a> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `add` is never used [INFO] [stdout] --> src/lsp/hints.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 41 | impl<'a> Hints<'a> { [INFO] [stdout] | ------------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 86 | pub fn add(&self, position: usize, label: String) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `original_source` and `source` are never read [INFO] [stdout] --> src/lsp/hover.rs:27:2 [INFO] [stdout] | [INFO] [stdout] 24 | pub struct Hover<'lsp> { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 27 | original_source: Arc, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 28 | /// The resolved parent source [INFO] [stdout] 29 | source: Arc, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Styles` is never constructed [INFO] [stdout] --> src/lsp/styles.rs:44:12 [INFO] [stdout] | [INFO] [stdout] 44 | pub struct Styles<'a> { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `add` is never used [INFO] [stdout] --> src/lsp/styles.rs:97:9 [INFO] [stdout] | [INFO] [stdout] 52 | impl<'a> Styles<'a> { [INFO] [stdout] | ------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 97 | pub fn add(&self, range: Range, style: Style) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `original_source` and `source` are never read [INFO] [stdout] --> src/lsp/ranges.rs:26:2 [INFO] [stdout] | [INFO] [stdout] 23 | pub struct Range<'lsp> { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 26 | original_source: Arc, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 27 | /// The resolved parent source [INFO] [stdout] 28 | source: Arc, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `InternalReferenceWrapper` is never constructed [INFO] [stdout] --> src/lua/wrappers.rs:41:12 [INFO] [stdout] | [INFO] [stdout] 41 | pub struct InternalReferenceWrapper(pub Option>); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `UserDataElem` is never used [INFO] [stdout] --> src/lua/wrappers.rs:67:11 [INFO] [stdout] | [INFO] [stdout] 67 | pub trait UserDataElem [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `try_new` is never used [INFO] [stdout] --> src/lua/kernel.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 26 | impl KernelName { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 33 | pub fn try_new(s: &str) -> Result<&KernelName, String> [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `source` and `content` are never read [INFO] [stdout] --> src/lua/kernel.rs:114:6 [INFO] [stdout] | [INFO] [stdout] 112 | pub struct KernelRedirect { [INFO] [stdout] | -------------- fields in this struct [INFO] [stdout] 113 | /// Message source e.g print() [INFO] [stdout] 114 | pub source: String, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 115 | /// Message content [INFO] [stdout] 116 | pub content: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `reports` is never read [INFO] [stdout] --> src/lua/kernel.rs:125:6 [INFO] [stdout] | [INFO] [stdout] 120 | pub struct KernelContext<'ctx> { [INFO] [stdout] | ------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 125 | pub reports: Vec, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `export_table` is never used [INFO] [stdout] --> src/lua/kernel.rs:319:9 [INFO] [stdout] | [INFO] [stdout] 150 | impl Kernel { [INFO] [stdout] | ----------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 319 | pub fn export_table( [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name`, `args`, `returns`, and `doc` are never read [INFO] [stdout] --> src/lua/doc.rs:13:6 [INFO] [stdout] | [INFO] [stdout] 12 | pub struct LuaMethodDoc { [INFO] [stdout] | ------------ fields in this struct [INFO] [stdout] 13 | pub name: &'static str, [INFO] [stdout] | ^^^^ [INFO] [stdout] 14 | pub args: Vec<&'static str>, [INFO] [stdout] | ^^^^ [INFO] [stdout] 15 | pub returns: Option<&'static str>, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 16 | pub doc: &'static str, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `LuaMethodDoc` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `type_name` is never read [INFO] [stdout] --> src/lua/doc.rs:22:6 [INFO] [stdout] | [INFO] [stdout] 21 | pub struct UserDataDoc { [INFO] [stdout] | ----------- field in this struct [INFO] [stdout] 22 | pub type_name: &'static str, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `UserDataDoc` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_lua_docs` is never used [INFO] [stdout] --> src/lua/doc.rs:98:8 [INFO] [stdout] | [INFO] [stdout] 98 | pub fn get_lua_docs() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `ParserRuleAccessor` is never used [INFO] [stdout] --> src/parser/parser.rs:232:11 [INFO] [stdout] | [INFO] [stdout] 232 | pub trait ParserRuleAccessor { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `ResolveError` is never used [INFO] [stdout] --> src/parser/resolver.rs:23:10 [INFO] [stdout] | [INFO] [stdout] 23 | pub enum ResolveError { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Resolver` is never constructed [INFO] [stdout] --> src/parser/resolver.rs:28:12 [INFO] [stdout] | [INFO] [stdout] 28 | pub struct Resolver<'u> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `resolve_reference`, `resolve_links`, `add_dependency`, and `resolve_references` are never used [INFO] [stdout] --> src/parser/resolver.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 42 | impl<'u> Resolver<'u> { [INFO] [stdout] | --------------------- associated items in this implementation [INFO] [stdout] 43 | pub fn new( [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 132 | pub fn resolve_reference( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 214 | pub fn resolve_links(&self, _cache: Arc, target: Target) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 229 | fn add_dependency( [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 254 | pub fn resolve_references( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `path` is never used [INFO] [stdout] --> src/parser/source.rs:115:9 [INFO] [stdout] | [INFO] [stdout] 76 | impl SourceFile { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 115 | pub fn path(&self) -> &PathBuf { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Global`, `Scope`, and `Paragraph` are never constructed [INFO] [stdout] --> src/parser/state.rs:79:2 [INFO] [stdout] | [INFO] [stdout] 77 | pub enum StateScope { [INFO] [stdout] | ---------- variants in this enum [INFO] [stdout] 78 | /// Global state [INFO] [stdout] 79 | Global = 0, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 80 | /// Scope-local state [INFO] [stdout] 81 | Scope = 1, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 82 | /// Paragraph-local state [INFO] [stdout] 83 | Paragraph = 2, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `StateScope` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `on_remove` is never used [INFO] [stdout] --> src/parser/state.rs:91:5 [INFO] [stdout] | [INFO] [stdout] 86 | pub trait RuleState: Downcast { [INFO] [stdout] | --------- method in this trait [INFO] [stdout] ... [INFO] [stdout] 91 | fn on_remove<'u>(&self, unit: &mut TranslationUnit); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `RuleStateHolder` is never constructed [INFO] [stdout] --> src/parser/state.rs:103:12 [INFO] [stdout] | [INFO] [stdout] 103 | pub struct RuleStateHolder { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `insert`, `get`, and `on_scope_end` are never used [INFO] [stdout] --> src/parser/state.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 107 | impl RuleStateHolder { [INFO] [stdout] | -------------------- methods in this implementation [INFO] [stdout] 108 | pub fn insert( [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 120 | pub fn get>(&self, name: S) -> Option>> { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 127 | pub fn on_scope_end<'u>(&mut self, unit: &mut TranslationUnit, scope: StateScope) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `ElementStyle` is never used [INFO] [stdout] --> src/parser/style.rs:10:11 [INFO] [stdout] | [INFO] [stdout] 10 | pub trait ElementStyle: Downcast + core::fmt::Debug { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `StyleHolder` is never constructed [INFO] [stdout] --> src/parser/style.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 31 | pub struct StyleHolder { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `is_registered`, `current`, and `set_current` are never used [INFO] [stdout] --> src/parser/style.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 55 | impl StyleHolder { [INFO] [stdout] | ---------------- methods in this implementation [INFO] [stdout] 56 | /// Checks if a given style key is registered [INFO] [stdout] 57 | pub fn is_registered(&self, style_key: &str) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 68 | pub fn current(&self, style_key: &str) -> Rc { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 73 | pub fn set_current(&mut self, style: Rc) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_content` and `has_state` are never used [INFO] [stdout] --> src/unit/scope.rs:131:5 [INFO] [stdout] | [INFO] [stdout] 109 | pub trait ScopeAccessor { [INFO] [stdout] | ------------- methods in this trait [INFO] [stdout] ... [INFO] [stdout] 131 | fn get_content(&self, id: usize) -> Option>; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 150 | fn has_state(&self, name: &str) -> bool; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `references` and `update_settings` are never used [INFO] [stdout] --> src/unit/translation.rs:370:5 [INFO] [stdout] | [INFO] [stdout] 352 | pub trait TranslationAccessors { [INFO] [stdout] | -------------------- methods in this trait [INFO] [stdout] ... [INFO] [stdout] 370 | fn references(&self) -> &HashMap>; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 373 | fn update_settings(&self, settings: ProjectSettings); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `OffloadedUnit` is never used [INFO] [stdout] --> src/unit/unit.rs:36:10 [INFO] [stdout] | [INFO] [stdout] 36 | pub enum OffloadedUnit<'u> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `reference_key`, `input_path`, `output_path`, and `query_reference` are never used [INFO] [stdout] --> src/unit/unit.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 43 | impl<'u> OffloadedUnit<'u> { [INFO] [stdout] | -------------------------- methods in this implementation [INFO] [stdout] 44 | /// Gets the unit's reference key [INFO] [stdout] 45 | pub fn reference_key(&self) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 53 | pub fn input_path(&self) -> &PathBuf { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 61 | pub fn output_path(&self) -> &PathBuf { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 70 | pub fn query_reference>(&self, cache: Arc, name: S) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `value` is never used [INFO] [stdout] --> src/unit/variable.rs:211:9 [INFO] [stdout] | [INFO] [stdout] 210 | impl PropertyVariable { [INFO] [stdout] | --------------------- method in this implementation [INFO] [stdout] 211 | pub fn value(&self) -> &PropertyValue { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `AsRefForCompare` is never used [INFO] [stdout] --> src/util/util.rs:3:11 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait AsRefForCompare<'a, T: ?Sized> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/cache/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod cache; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/cache/cache.rs:252:63 [INFO] [stdout] | [INFO] [stdout] 252 | pub fn export_ref_unit(&self, unit: &TranslationUnit, input: &PathBuf, output: &Option) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 252 - pub fn export_ref_unit(&self, unit: &TranslationUnit, input: &PathBuf, output: &Option) { [INFO] [stdout] 252 + pub fn export_ref_unit(&self, unit: &TranslationUnit, input: &Path, output: &Option) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `rusqlite::MappedRows<'_, {closure@src/cache/cache.rs:450:19: 450:24}>` [INFO] [stdout] --> src/cache/cache.rs:449:3 [INFO] [stdout] | [INFO] [stdout] 449 | / update [INFO] [stdout] 450 | | .query_map([], |row| { [INFO] [stdout] 451 | | Ok(( [INFO] [stdout] 452 | | row.get_unwrap::<_, String>(0), [INFO] [stdout] ... | [INFO] [stdout] 458 | | .unwrap() [INFO] [stdout] 459 | | .into_iter() [INFO] [stdout] | |________________________^ [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] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 449 ~ update [INFO] [stdout] 450 ~ .query_map([], |row| { [INFO] [stdout] 451 ~ Ok(( [INFO] [stdout] 452 ~ row.get_unwrap::<_, String>(0), [INFO] [stdout] 453 ~ row.get_unwrap::<_, usize>(1), [INFO] [stdout] 454 ~ row.get_unwrap::<_, usize>(2), [INFO] [stdout] 455 ~ row.get_unwrap::<_, String>(3), [INFO] [stdout] 456 ~ )) [INFO] [stdout] 457 ~ }) [INFO] [stdout] 458 ~ .unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/compiler/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod compiler; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `HTML` contains a capitalized acronym [INFO] [stdout] --> src/compiler/compiler.rs:21:2 [INFO] [stdout] | [INFO] [stdout] 21 | HTML, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Html` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `LATEX` contains a capitalized acronym [INFO] [stdout] --> src/compiler/compiler.rs:23:2 [INFO] [stdout] | [INFO] [stdout] 23 | LATEX, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Latex` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `extend` instead of `append` for adding the full range of a second vector [INFO] [stdout] --> src/compiler/compiler.rs:101:5 [INFO] [stdout] | [INFO] [stdout] 101 | reports.extend(reps.drain(..)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `reports.append(&mut reps)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain [INFO] [stdout] = note: `#[warn(clippy::extend_with_drain)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/compiler/compiler.rs:134:24 [INFO] [stdout] | [INFO] [stdout] 134 | output.add_content(&format!( [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 135 | | "{icon}{css}", [INFO] [stdout] 136 | | self.sanitize(html.language.as_str()) [INFO] [stdout] 137 | | )); [INFO] [stdout] | |_________________^ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 134 ~ output.add_content(format!( [INFO] [stdout] 135 ~ "{icon}{css}", [INFO] [stdout] 136 ~ self.sanitize(html.language.as_str()) [INFO] [stdout] 137 ~ )); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/compiler.rs:156:4 [INFO] [stdout] | [INFO] [stdout] 156 | &unit.colors(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `unit.colors()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/compiler/links.rs:12:11 [INFO] [stdout] | [INFO] [stdout] 12 | refname: &String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 12 - refname: &String, [INFO] [stdout] 12 + refname: &str, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/compiler/output.rs:125:39 [INFO] [stdout] | [INFO] [stdout] 125 | if task.result.get().is_some() || !task.handle.get().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `task.handle.get().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/compiler/output.rs:129:8 [INFO] [stdout] | [INFO] [stdout] 129 | if task [INFO] [stdout] | ____________________^ [INFO] [stdout] 130 | | .handle [INFO] [stdout] 131 | | .get() [INFO] [stdout] 132 | | .map_or(false, |handle| handle.is_finished()) [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_some_and` instead [INFO] [stdout] | [INFO] [stdout] 132 - .map_or(false, |handle| handle.is_finished()) [INFO] [stdout] 132 + .is_some_and(|handle| handle.is_finished()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `extend` instead of `append` for adding the full range of a second vector [INFO] [stdout] --> src/compiler/output.rs:186:4 [INFO] [stdout] | [INFO] [stdout] 186 | reports.extend(err.drain(..)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `reports.append(&mut err)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same postfix: `Error` [INFO] [stdout] --> src/compiler/process.rs:30:1 [INFO] [stdout] | [INFO] [stdout] 30 | / pub enum ProcessError { [INFO] [stdout] 31 | | GeneralError(String), [INFO] [stdout] 32 | | InputError(String, PathBuf), [INFO] [stdout] 33 | | LinkError(Vec), [INFO] [stdout] 34 | | CompileError(Vec), [INFO] [stdout] 35 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/compiler/process.rs:148:48 [INFO] [stdout] | [INFO] [stdout] 148 | let Some(local_path) = pathdiff::diff_paths(&input, &self.project_path) else { [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/process.rs:182:35 [INFO] [stdout] | [INFO] [stdout] 182 | ProcessQueueMessage::Skipped(&input), [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/process.rs:188:34 [INFO] [stdout] | [INFO] [stdout] 188 | ProcessQueueMessage::Parsing(&input), [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/compiler/process.rs:261:13 [INFO] [stdout] | [INFO] [stdout] 261 | .map_err(|err| ProcessError::LinkError(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `ProcessError::LinkError` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/elements/list/elem.rs:146:6 [INFO] [stdout] | [INFO] [stdout] 146 | / match &entry.bullet { [INFO] [stdout] 147 | | BulletMarker::Checkbox(state) => match state { [INFO] [stdout] 148 | | CheckboxState::Unchecked => { [INFO] [stdout] 149 | | output.add_content( [INFO] [stdout] ... | [INFO] [stdout] 164 | | _ => {} [INFO] [stdout] 165 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 146 ~ if let BulletMarker::Checkbox(state) = &entry.bullet { match state { [INFO] [stdout] 147 ~ CheckboxState::Unchecked => { [INFO] [stdout] 148 ~ output.add_content( [INFO] [stdout] 149 ~ r#""#, [INFO] [stdout] 150 ~ ); [INFO] [stdout] 151 ~ } [INFO] [stdout] 152 ~ CheckboxState::Partial => { [INFO] [stdout] 153 ~ output.add_content( [INFO] [stdout] 154 ~ r#""#, [INFO] [stdout] 155 ~ ); [INFO] [stdout] 156 ~ } [INFO] [stdout] 157 ~ CheckboxState::Checked => { [INFO] [stdout] 158 ~ output.add_content( [INFO] [stdout] 159 ~ r#""#, [INFO] [stdout] 160 ~ ); [INFO] [stdout] 161 ~ } [INFO] [stdout] 162 ~ } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/elements/linebreak/rule.rs:52:3 [INFO] [stdout] | [INFO] [stdout] 52 | return !mode.paragraph_only; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 52 - return !mode.paragraph_only; [INFO] [stdout] 52 + !mode.paragraph_only [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `cloned` [INFO] [stdout] --> src/elements/import/elem.rs:49:16 [INFO] [stdout] | [INFO] [stdout] 49 | for scope in self.content.iter().cloned() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] help: remove any references to the binding [INFO] [stdout] | [INFO] [stdout] 49 - for scope in self.content.iter().cloned() { [INFO] [stdout] 49 + for scope in self.content.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/elements/list/completion.rs:53:22 [INFO] [stdout] | [INFO] [stdout] 53 | insert_text: Some(format!( [INFO] [stdout] | _______________________________^ [INFO] [stdout] 54 | | "* ${{1:CONTENT}}" [INFO] [stdout] 55 | | )), [INFO] [stdout] | |_____________^ help: consider using `.to_string()`: `"* ${1:CONTENT}".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: useless use of `format!` [INFO] [stdout] --> src/elements/list/completion.rs:93:22 [INFO] [stdout] | [INFO] [stdout] 93 | insert_text: Some(format!( [INFO] [stdout] | _______________________________^ [INFO] [stdout] 94 | | "- ${{1:CONTENT}}" [INFO] [stdout] 95 | | )), [INFO] [stdout] | |_____________^ help: consider using `.to_string()`: `"- ${1:CONTENT}".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] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/elements/list/rule.rs:139:5 [INFO] [stdout] | [INFO] [stdout] 139 | parsed.last_mut().map(|last| last.offset = offset); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] = note: `#[warn(clippy::option_map_unit_fn)]` on by default [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 139 - parsed.last_mut().map(|last| last.offset = offset); [INFO] [stdout] 139 + if let Some(last) = parsed.last_mut() { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/elements/list/rule.rs:352:33 [INFO] [stdout] | [INFO] [stdout] 352 | span(token.range.clone(), err.into()) [INFO] [stdout] | ^^^^^^^^^^ help: consider removing `.into()`: `err` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/elements/anchor/elem.rs:78:16 [INFO] [stdout] | [INFO] [stdout] 78 | self.refname.to_string())) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/elements/list/elem.rs:146:6 [INFO] [stdout] | [INFO] [stdout] 146 | / match &entry.bullet { [INFO] [stdout] 147 | | BulletMarker::Checkbox(state) => match state { [INFO] [stdout] 148 | | CheckboxState::Unchecked => { [INFO] [stdout] 149 | | output.add_content( [INFO] [stdout] ... | [INFO] [stdout] 164 | | _ => {} [INFO] [stdout] 165 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 146 ~ if let BulletMarker::Checkbox(state) = &entry.bullet { match state { [INFO] [stdout] 147 ~ CheckboxState::Unchecked => { [INFO] [stdout] 148 ~ output.add_content( [INFO] [stdout] 149 ~ r#""#, [INFO] [stdout] 150 ~ ); [INFO] [stdout] 151 ~ } [INFO] [stdout] 152 ~ CheckboxState::Partial => { [INFO] [stdout] 153 ~ output.add_content( [INFO] [stdout] 154 ~ r#""#, [INFO] [stdout] 155 ~ ); [INFO] [stdout] 156 ~ } [INFO] [stdout] 157 ~ CheckboxState::Checked => { [INFO] [stdout] 158 ~ output.add_content( [INFO] [stdout] 159 ~ r#""#, [INFO] [stdout] 160 ~ ); [INFO] [stdout] 161 ~ } [INFO] [stdout] 162 ~ } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/elements/linebreak/rule.rs:52:3 [INFO] [stdout] | [INFO] [stdout] 52 | return !mode.paragraph_only; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 52 - return !mode.paragraph_only; [INFO] [stdout] 52 + !mode.paragraph_only [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/elements/anchor/elem.rs:78:16 [INFO] [stdout] | [INFO] [stdout] 78 | self.refname.to_string())) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/elements/internal_link/rule.rs:200:17 [INFO] [stdout] | [INFO] [stdout] 200 | link_refname.to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/elements/heading/elem.rs:73:14 [INFO] [stdout] | [INFO] [stdout] 73 | cause: Arc::new(mlua::Error::RuntimeError( [INFO] [stdout] | ________________________________^ [INFO] [stdout] 74 | | "Expected an internal reference name".into(), [INFO] [stdout] 75 | | )), [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Error` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Error` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] = note: `#[warn(clippy::arc_with_non_send_sync)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/elements/heading/elem.rs:133:14 [INFO] [stdout] | [INFO] [stdout] 133 | cause: Arc::new(mlua::Error::RuntimeError( [INFO] [stdout] | ________________________________^ [INFO] [stdout] 134 | | "Expected an internal reference name".into(), [INFO] [stdout] 135 | | )), [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Error` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Error` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/elements/heading/elem.rs:201:26 [INFO] [stdout] | [INFO] [stdout] 201 | for (scope, elem) in (&self.display[0]).content_iter(false) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `self.display[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method chain can be written more clearly with `if .. else ..` [INFO] [stdout] --> src/elements/style/custom.rs:28:24 [INFO] [stdout] | [INFO] [stdout] 28 | ... Target::HTML => enable.then_some("").unwrap_or(""), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if enable { "" } else { "" }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else [INFO] [stdout] = note: `#[warn(clippy::obfuscated_if_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method chain can be written more clearly with `if .. else ..` [INFO] [stdout] --> src/elements/style/custom.rs:40:24 [INFO] [stdout] | [INFO] [stdout] 40 | ... Target::HTML => enable.then_some("").unwrap_or(""), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if enable { "" } else { "" }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method chain can be written more clearly with `if .. else ..` [INFO] [stdout] --> src/elements/style/custom.rs:52:24 [INFO] [stdout] | [INFO] [stdout] 52 | ... Target::HTML => enable.then_some("").unwrap_or(""), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if enable { "" } else { "" }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method chain can be written more clearly with `if .. else ..` [INFO] [stdout] --> src/elements/style/custom.rs:64:24 [INFO] [stdout] | [INFO] [stdout] 64 | ... Target::HTML => enable.then_some("").unwrap_or(""), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if enable { "" } else { "" }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/elements/style/rule.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::usize; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/elements/style/rule.rs:92:4 [INFO] [stdout] | [INFO] [stdout] 92 | / let Some(matched) = matched_rule else { [INFO] [stdout] 93 | | return None; [INFO] [stdout] 94 | | }; [INFO] [stdout] | |______________^ help: replace it with: `let matched = matched_rule?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/elements/style/state.rs:33:22 [INFO] [stdout] | [INFO] [stdout] 33 | pub(crate) compile: Arc< [INFO] [stdout] | _________________________^ [INFO] [stdout] 34 | | dyn Fn(bool, Arc>, &Compiler, &mut CompilerOutput) -> Result<(), Vec> [INFO] [stdout] 35 | | + Send [INFO] [stdout] 36 | | + Sync, [INFO] [stdout] 37 | | >, [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/elements/layout/custom.rs:162:25 [INFO] [stdout] | [INFO] [stdout] 162 | output.add_content(format!(r#"
"#)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `r#"
"#.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] [INFO] [stdout] [INFO] [stdout] warning: this method chain can be written more clearly with `if .. else ..` [INFO] [stdout] --> src/elements/lua/completion.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 67 | context_triggered(context, ":").then_some("").unwrap_or(":") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if context_triggered(context, ":") { "" } else { ":" }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/elements/lua/completion.rs:112:22 [INFO] [stdout] | [INFO] [stdout] 112 | insert_text: Some(format!("{{:lua ${{1:CONTENT}}:}}",)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"{:lua ${1:CONTENT}:}".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] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/elements/lua/custom.rs:48:1 [INFO] [stdout] | [INFO] [stdout] 48 | / impl Default for LuaData { [INFO] [stdout] 49 | | fn default() -> Self { [INFO] [stdout] 50 | | Self { [INFO] [stdout] 51 | | registered: HashMap::default(), [INFO] [stdout] ... | [INFO] [stdout] 54 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 16 + #[derive(Default)] [INFO] [stdout] 17 | pub struct LuaData { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/elements/lua/rule.rs:143:61 [INFO] [stdout] | [INFO] [stdout] 143 | let Some(newline) = source.content()[content_end..].find(|c| c == '\n') else { [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider using a `char`: `'\n'` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] = note: `#[warn(clippy::manual_pattern_char_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/elements/internal_link/rule.rs:200:17 [INFO] [stdout] | [INFO] [stdout] 200 | link_refname.to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/elements/lua/rule.rs:191:62 [INFO] [stdout] | [INFO] [stdout] 191 | let ctx = KernelContext::new(lua_source.clone().into(), &*kernel, unit); [INFO] [stdout] | ^^^^^^^^ help: try: `&kernel` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/layout/size.rs:28:4 [INFO] [stdout] | [INFO] [stdout] 23 | SizeOutput::CSS => match self { [INFO] [stdout] | --------------- matches all the relevant values [INFO] [stdout] ... [INFO] [stdout] 28 | _ => todo!(), [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/elements/lua/rule.rs:396:62 [INFO] [stdout] | [INFO] [stdout] 396 | let ctx = KernelContext::new(lua_source.clone().into(), &*kernel, unit); [INFO] [stdout] | ^^^^^^^^ help: try: `&kernel` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/elements/lua/elem.rs:82:17 [INFO] [stdout] | [INFO] [stdout] 82 | pub fn process<'ctx>(&self, unit: &mut TranslationUnit) { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/elements/lua/elem.rs:90:63 [INFO] [stdout] | [INFO] [stdout] 90 | let ctx = KernelContext::new(self.source.clone().into(), &*kernel, unit); [INFO] [stdout] | ^^^^^^^^ help: try: `&kernel` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/elements/lua/elem.rs:172:24 [INFO] [stdout] | [INFO] [stdout] 172 | for (scope, elem) in (&content[0]).content_iter(false) { [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `content[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/elements/heading/elem.rs:73:14 [INFO] [stdout] | [INFO] [stdout] 73 | cause: Arc::new(mlua::Error::RuntimeError( [INFO] [stdout] | ________________________________^ [INFO] [stdout] 74 | | "Expected an internal reference name".into(), [INFO] [stdout] 75 | | )), [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Error` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Error` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] = note: `#[warn(clippy::arc_with_non_send_sync)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/elements/variable/rule.rs:41:3 [INFO] [stdout] | [INFO] [stdout] 41 | / let Some((pos, c)) = it.next() else { [INFO] [stdout] 42 | | return None; [INFO] [stdout] 43 | | }; [INFO] [stdout] | |__________^ help: replace it with: `let (pos, c) = it.next()?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/elements/variable/rule.rs:343:3 [INFO] [stdout] | [INFO] [stdout] 343 | return cursor.at(end_pos + value_len + 2 * delim.len()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 343 - return cursor.at(end_pos + value_len + 2 * delim.len()); [INFO] [stdout] 343 + cursor.at(end_pos + value_len + 2 * delim.len()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/elements/variable/rule.rs:326:5 [INFO] [stdout] | [INFO] [stdout] 326 | content[content_range.clone()].to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `&content[content_range.clone()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'u [INFO] [stdout] --> src/elements/variable/rule.rs:383:20 [INFO] [stdout] | [INFO] [stdout] 383 | fn on_regex_match<'u>( [INFO] [stdout] | ^^ [INFO] [stdout] ... [INFO] [stdout] 386 | unit: &'u mut TranslationUnit, [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 383 ~ fn on_regex_match( [INFO] [stdout] 384 | &self, [INFO] [stdout] 385 | _index: usize, [INFO] [stdout] 386 ~ unit: &mut TranslationUnit, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/elements/heading/elem.rs:133:14 [INFO] [stdout] | [INFO] [stdout] 133 | cause: Arc::new(mlua::Error::RuntimeError( [INFO] [stdout] | ________________________________^ [INFO] [stdout] 134 | | "Expected an internal reference name".into(), [INFO] [stdout] 135 | | )), [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Error` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Error` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/parser/rule.rs:80:6 [INFO] [stdout] | [INFO] [stdout] 80 | let mut rules = get_rules!(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/elements/media/rule.rs:86:3 [INFO] [stdout] | [INFO] [stdout] 86 | return !mode.paragraph_only; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 86 - return !mode.paragraph_only; [INFO] [stdout] 86 + !mode.paragraph_only [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/elements/media/rule.rs:137:34 [INFO] [stdout] | [INFO] [stdout] 137 | span(refname_group.range(), err.into()) [INFO] [stdout] | ^^^^^^^^^^ help: consider removing `.into()`: `err` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/elements/media/rule.rs:344:11 [INFO] [stdout] | [INFO] [stdout] 344 | if let Some(_) = elem.downcast_ref::() { [INFO] [stdout] | -------^^^^^^^------------------------------------ help: try: `if elem.downcast_ref::().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/elements/heading/elem.rs:201:26 [INFO] [stdout] | [INFO] [stdout] 201 | for (scope, elem) in (&self.display[0]).content_iter(false) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `self.display[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method chain can be written more clearly with `if .. else ..` [INFO] [stdout] --> src/elements/style/custom.rs:28:24 [INFO] [stdout] | [INFO] [stdout] 28 | ... Target::HTML => enable.then_some("").unwrap_or(""), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if enable { "" } else { "" }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else [INFO] [stdout] = note: `#[warn(clippy::obfuscated_if_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method chain can be written more clearly with `if .. else ..` [INFO] [stdout] --> src/elements/style/custom.rs:40:24 [INFO] [stdout] | [INFO] [stdout] 40 | ... Target::HTML => enable.then_some("").unwrap_or(""), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if enable { "" } else { "" }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method chain can be written more clearly with `if .. else ..` [INFO] [stdout] --> src/elements/style/custom.rs:52:24 [INFO] [stdout] | [INFO] [stdout] 52 | ... Target::HTML => enable.then_some("").unwrap_or(""), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if enable { "" } else { "" }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method chain can be written more clearly with `if .. else ..` [INFO] [stdout] --> src/elements/style/custom.rs:64:24 [INFO] [stdout] | [INFO] [stdout] 64 | ... Target::HTML => enable.then_some("").unwrap_or(""), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if enable { "" } else { "" }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'lsp [INFO] [stdout] --> src/lsp/data.rs:105:20 [INFO] [stdout] | [INFO] [stdout] 105 | pub fn get_source<'lsp>(&'lsp self, name: &Path) -> Option> { [INFO] [stdout] | ^^^^ ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 105 - pub fn get_source<'lsp>(&'lsp self, name: &Path) -> Option> { [INFO] [stdout] 105 + pub fn get_source(&self, name: &Path) -> Option> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lsp/data.rs:124:3 [INFO] [stdout] | [INFO] [stdout] 124 | / match Semantics::from_source(source, self) { [INFO] [stdout] 125 | | Some(sems) => Some(f(&sems, &self.semantic_tokens)), [INFO] [stdout] 126 | | None => None, [INFO] [stdout] 127 | | } [INFO] [stdout] | |_________^ help: try: `Semantics::from_source(source, self).map(|sems| f(&sems, &self.semantic_tokens))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/elements/style/rule.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::usize; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'lsp [INFO] [stdout] --> src/lsp/data.rs:130:24 [INFO] [stdout] | [INFO] [stdout] 130 | pub fn add_definition<'lsp>(&'lsp self, source: Token, target: &Token) { [INFO] [stdout] | ^^^^ ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 130 - pub fn add_definition<'lsp>(&'lsp self, source: Token, target: &Token) { [INFO] [stdout] 130 + pub fn add_definition(&self, source: Token, target: &Token) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'lsp [INFO] [stdout] --> src/lsp/data.rs:134:19 [INFO] [stdout] | [INFO] [stdout] 134 | pub fn add_hover<'lsp>(&'lsp self, range: Token, content: String) { [INFO] [stdout] | ^^^^ ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 134 - pub fn add_hover<'lsp>(&'lsp self, range: Token, content: String) { [INFO] [stdout] 134 + pub fn add_hover(&self, range: Token, content: String) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'lsp [INFO] [stdout] --> src/lsp/data.rs:145:21 [INFO] [stdout] | [INFO] [stdout] 145 | pub fn add_conceal<'lsp>(&'lsp self, range: Token, conceal: ConcealTarget) { [INFO] [stdout] | ^^^^ ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 145 - pub fn add_conceal<'lsp>(&'lsp self, range: Token, conceal: ConcealTarget) { [INFO] [stdout] 145 + pub fn add_conceal(&self, range: Token, conceal: ConcealTarget) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'lsp [INFO] [stdout] --> src/lsp/data.rs:153:19 [INFO] [stdout] | [INFO] [stdout] 153 | pub fn add_range<'lsp>( [INFO] [stdout] | ^^^^ [INFO] [stdout] 154 | &'lsp self, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 153 ~ pub fn add_range( [INFO] [stdout] 154 ~ &self, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'lsp [INFO] [stdout] --> src/lsp/definition.rs:26:21 [INFO] [stdout] | [INFO] [stdout] 26 | fn from_source_impl<'lsp>( [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 29 | lsp: &'lsp LangServerData, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 26 ~ fn from_source_impl( [INFO] [stdout] 27 | source: Arc, [INFO] [stdout] 28 | target: &Token, [INFO] [stdout] 29 ~ lsp: &LangServerData, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lsp/definition.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 46 | } else if !source.downcast_ref::().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `source.downcast_ref::().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'lsp [INFO] [stdout] --> src/lsp/definition.rs:104:27 [INFO] [stdout] | [INFO] [stdout] 104 | pub(crate) fn from_source<'lsp>(source: Token, target: &Token, lsp: &'lsp LangServerData) { [INFO] [stdout] | ^^^^ ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 104 - pub(crate) fn from_source<'lsp>(source: Token, target: &Token, lsp: &'lsp LangServerData) { [INFO] [stdout] 104 + pub(crate) fn from_source(source: Token, target: &Token, lsp: &LangServerData) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/elements/style/rule.rs:92:4 [INFO] [stdout] | [INFO] [stdout] 92 | / let Some(matched) = matched_rule else { [INFO] [stdout] 93 | | return None; [INFO] [stdout] 94 | | }; [INFO] [stdout] | |______________^ help: replace it with: `let matched = matched_rule?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lsp/semantic.rs:264:22 [INFO] [stdout] | [INFO] [stdout] 264 | pub semantic_queue: RwLock, (u32, u32))>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/elements/style/state.rs:33:22 [INFO] [stdout] | [INFO] [stdout] 33 | pub(crate) compile: Arc< [INFO] [stdout] | _________________________^ [INFO] [stdout] 34 | | dyn Fn(bool, Arc>, &Compiler, &mut CompilerOutput) -> Result<(), Vec> [INFO] [stdout] 35 | | + Send [INFO] [stdout] 36 | | + Sync, [INFO] [stdout] 37 | | >, [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/lua/wrappers/scope.rs:65:14 [INFO] [stdout] | [INFO] [stdout] 65 | cause: Arc::new(mlua::Error::RuntimeError("Index out of bounds".into())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Error` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Error` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/lua/wrappers/internal_reference.rs:60:14 [INFO] [stdout] | [INFO] [stdout] 60 | cause: Arc::new(mlua::Error::RuntimeError( [INFO] [stdout] | ________________________________^ [INFO] [stdout] 61 | | "Expected an internal reference name".into(), [INFO] [stdout] 62 | | )), [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Error` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Error` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lua/wrappers.rs:48:32 [INFO] [stdout] | [INFO] [stdout] 48 | pub struct IteratorWrapper(pub Box>, Arc)>>); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lua/kernel.rs:42:16 [INFO] [stdout] | [INFO] [stdout] 42 | return Err(format!("Kernel names cannot contain control sequences")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Kernel names cannot contain control sequences".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] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lua/kernel.rs:91:16 [INFO] [stdout] | [INFO] [stdout] 91 | return Err(format!("Kernel names cannot contain control sequences")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Kernel names cannot contain control sequences".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] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lua/kernel.rs:204:53 [INFO] [stdout] | [INFO] [stdout] 204 | let wrapper = lua.create_userdata(UnitWrapper(&mut ctx_ref.unit))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `ctx_ref.unit` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/lua/kernel.rs:222:18 [INFO] [stdout] | [INFO] [stdout] 222 | ... .map_err(|err| mlua::Error::RuntimeError(err)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `mlua::Error::RuntimeError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lua/kernel.rs:399:11 [INFO] [stdout] | [INFO] [stdout] 399 | pub fun: std::sync::Arc< [INFO] [stdout] | ______________^ [INFO] [stdout] 400 | | dyn Fn(&Lua, mlua::MultiValue) -> mlua::Result [INFO] [stdout] 401 | | + Send [INFO] [stdout] 402 | | + Sync, [INFO] [stdout] 403 | | >, [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lua/kernel.rs:411:6 [INFO] [stdout] | [INFO] [stdout] 411 | ) -> std::sync::Arc< [INFO] [stdout] | ______^ [INFO] [stdout] 412 | | dyn Fn( [INFO] [stdout] 413 | | &mlua::Lua, [INFO] [stdout] 414 | | mlua::MultiValue, [INFO] [stdout] ... | [INFO] [stdout] 417 | | + Sync, [INFO] [stdout] 418 | | > [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lua/kernel.rs:452:6 [INFO] [stdout] | [INFO] [stdout] 452 | ) -> std::sync::Arc< [INFO] [stdout] | ______^ [INFO] [stdout] 453 | | dyn for<'lua> Fn( [INFO] [stdout] 454 | | &'lua mlua::Lua, [INFO] [stdout] 455 | | mlua::MultiValue, [INFO] [stdout] ... | [INFO] [stdout] 458 | | + Sync, [INFO] [stdout] 459 | | > [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lua/doc.rs:116:14 [INFO] [stdout] | [INFO] [stdout] 116 | args += &format!("{name}"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `name.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] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/lua/doc.rs:118:24 [INFO] [stdout] | [INFO] [stdout] 118 | if !doc.is_empty() { [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 119 | | docs += &format!("--- @param {arg} {doc}\n"); [INFO] [stdout] 120 | | } else { [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/lua/doc.rs:120:12 [INFO] [stdout] | [INFO] [stdout] 120 | } else { [INFO] [stdout] | ________________________^ [INFO] [stdout] 121 | | docs += &format!("--- @param {arg} {doc}\n"); [INFO] [stdout] 122 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lua/doc.rs:126:13 [INFO] [stdout] | [INFO] [stdout] 126 | args += format!("{arg}").as_str(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `arg.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] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/parser/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod parser; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/parser/parser.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::usize; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/parser/parser.rs:39:6 [INFO] [stdout] | [INFO] [stdout] 39 | /// If the winning match is None, it means that the document has no more [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 39 | /// If the winning match is None, it means that the document has no more [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/parser/parser.rs:40:6 [INFO] [stdout] | [INFO] [stdout] 40 | /// rule to match. I.e The rest of the content should be added as a [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 40 | /// rule to match. I.e The rest of the content should be added as a [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/parser/parser.rs:41:6 [INFO] [stdout] | [INFO] [stdout] 41 | /// [`crate::elements::text::elem::Text`] element. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 41 | /// [`crate::elements::text::elem::Text`] element. [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/parser/parser.rs:42:6 [INFO] [stdout] | [INFO] [stdout] 42 | /// The match data should be passed to the [`Rule::on_match`] method. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 42 | /// The match data should be passed to the [`Rule::on_match`] method. [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/parser/parser.rs:62:7 [INFO] [stdout] | [INFO] [stdout] 62 | ) -> Option<( [INFO] [stdout] | __________^ [INFO] [stdout] 63 | | Cursor, [INFO] [stdout] 64 | | &Box, [INFO] [stdout] 65 | | Box, [INFO] [stdout] 66 | | )> { [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/parser/parser.rs:157:3 [INFO] [stdout] | [INFO] [stdout] 157 | return Some((cursor.at(next), &self.rules[best_idx], state.matches[best_idx].1.take().unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 157 - return Some((cursor.at(next), &self.rules[best_idx], state.matches[best_idx].1.take().unwrap())); [INFO] [stdout] 157 + Some((cursor.at(next), &self.rules[best_idx], state.matches[best_idx].1.take().unwrap())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'u [INFO] [stdout] --> src/parser/parser.rs:161:14 [INFO] [stdout] | [INFO] [stdout] 161 | fn add_text<'u>(&'u self, unit: &mut TranslationUnit, range: Range) { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 161 - fn add_text<'u>(&'u self, unit: &mut TranslationUnit, range: Range) { [INFO] [stdout] 161 + fn add_text(&self, unit: &mut TranslationUnit, range: Range) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/parser/parser.rs:190:37 [INFO] [stdout] | [INFO] [stdout] 190 | unit.add_content(Text::new(token, content.into())); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider removing `.into()`: `content` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::sync::Arc` [INFO] [stdout] --> src/parser/parser.rs:195:35 [INFO] [stdout] | [INFO] [stdout] 195 | let mut cursor = Cursor::new(0, Arc::as_ref(unit.get_scope()).read().source().into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `Arc::as_ref(unit.get_scope()).read().source()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/parser/property.rs:74:6 [INFO] [stdout] | [INFO] [stdout] 74 | /// (Note) In this case, reports should have been set [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 74 | /// (Note) In this case, reports should have been set [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/parser/property.rs:118:6 [INFO] [stdout] | [INFO] [stdout] 118 | /// (Note) In this case, reports should have been set [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 118 | /// (Note) In this case, reports should have been set [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/parser/property.rs:196:6 [INFO] [stdout] | [INFO] [stdout] 196 | /// (Note) In this case, reports should have been set [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 196 | /// (Note) In this case, reports should have been set [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/parser/property.rs:282:19 [INFO] [stdout] | [INFO] [stdout] 282 | pub fn parse<'s, 'u>( [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/parser/property.rs:366:9 [INFO] [stdout] | [INFO] [stdout] 366 | if escaped % 2 == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace with: `escaped.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/parser/property.rs:473:25 [INFO] [stdout] | [INFO] [stdout] 473 | pub fn parse_token<'s, 'u>( [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/parser/reports.rs:128:3 [INFO] [stdout] | [INFO] [stdout] 128 | self, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/parser/reports.rs:130:7 [INFO] [stdout] | [INFO] [stdout] 130 | ) -> ( [INFO] [stdout] | __________^ [INFO] [stdout] 131 | | ariadne::Report<'static, (Arc, Range)>, [INFO] [stdout] 132 | | impl ariadne::Cache>, [INFO] [stdout] 133 | | ) { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/parser/reports.rs:180:24 [INFO] [stdout] | [INFO] [stdout] 180 | pub fn to_diagnostics(self, diagnostic_map: &DashMap>) { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser/resolver.rs:71:6 [INFO] [stdout] | [INFO] [stdout] 71 | / if previous.input_file != *loaded.input_path() { [INFO] [stdout] 72 | | let token = loaded.token(); [INFO] [stdout] 73 | | Err(make_err!( [INFO] [stdout] 74 | | token.source(), [INFO] [stdout] ... | [INFO] [stdout] 93 | | ))?; [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_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 69 ~ Some(OffloadedUnit::Unloaded(previous)) [INFO] [stdout] 70 | // Duplicate with a database unit [INFO] [stdout] 71 ~ if previous.input_file != *loaded.input_path() => { [INFO] [stdout] 72 | let token = loaded.token(); [INFO] [stdout] ... [INFO] [stdout] 93 | ))?; [INFO] [stdout] 94 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/parser/resolver.rs:90:9 [INFO] [stdout] | [INFO] [stdout] 90 | ... (&previous.input_file).display().fg(colors.info), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `previous.input_file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/parser/resolver.rs:141:20 [INFO] [stdout] | [INFO] [stdout] 141 | .get_reference(&name) [INFO] [stdout] | ^^^^^ help: change this to: `name` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/parser/resolver.rs:171:39 [INFO] [stdout] | [INFO] [stdout] 171 | .query_reference(cache.clone(), &name) [INFO] [stdout] | ^^^^^ help: change this to: `name` [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: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/parser/resolver.rs:191:8 [INFO] [stdout] | [INFO] [stdout] 191 | / ... unit.query_reference(cache.clone(), &name) [INFO] [stdout] 192 | | ... .and_then(|reference| Some((reference, unit))) [INFO] [stdout] | |________________________________________________________________________^ help: try: `unit.query_reference(cache.clone(), &name).map(|reference| (reference, unit))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/parser/resolver.rs:191:44 [INFO] [stdout] | [INFO] [stdout] 191 | ... unit.query_reference(cache.clone(), &name) [INFO] [stdout] | ^^^^^ help: change this to: `name` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/parser/resolver.rs:258:7 [INFO] [stdout] | [INFO] [stdout] 258 | ) -> Result>>, Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/parser/resolver.rs:269:33 [INFO] [stdout] | [INFO] [stdout] 269 | .filter_map(|(scope, elem)| elem.as_linkable().and_then(|link| Some((scope, link)))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `elem.as_linkable().map(|link| (scope, link))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/parser/rule.rs:171:14 [INFO] [stdout] | [INFO] [stdout] 171 | fn on_match<'u>( [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/parser/rule.rs:231:20 [INFO] [stdout] | [INFO] [stdout] 231 | fn on_regex_match<'u>( [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused "map closure" when calling `Result::map_or_else` value [INFO] [stdout] --> src/parser/source.rs:81:18 [INFO] [stdout] | [INFO] [stdout] 81 | let absolute = path [INFO] [stdout] | ________________________^ [INFO] [stdout] 82 | | .canonicalize() [INFO] [stdout] 83 | | .map_or_else(|_| path.to_path_buf(), |p| p); [INFO] [stdout] | |_______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_result_map_or_else [INFO] [stdout] = note: `#[warn(clippy::unnecessary_result_map_or_else)]` on by default [INFO] [stdout] help: consider using `unwrap_or_else` [INFO] [stdout] | [INFO] [stdout] 81 ~ let absolute = path [INFO] [stdout] 82 ~ .canonicalize().unwrap_or_else(|_| path.to_path_buf()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/parser/state.rs:52:15 [INFO] [stdout] | [INFO] [stdout] 52 | pub matches: Vec<(Range, Option>)>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/parser/state.rs:91:15 [INFO] [stdout] | [INFO] [stdout] 91 | fn on_remove<'u>(&self, unit: &mut TranslationUnit); [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/parser/state.rs:127:22 [INFO] [stdout] | [INFO] [stdout] 127 | pub fn on_scope_end<'u>(&mut self, unit: &mut TranslationUnit, scope: StateScope) { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/parser/style.rs:19:15 [INFO] [stdout] | [INFO] [stdout] 19 | fn from_json(&self, json: &str) -> Result, String>; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/parser/style.rs:23:3 [INFO] [stdout] | [INFO] [stdout] 23 | &self, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/parser/style.rs:47:1 [INFO] [stdout] | [INFO] [stdout] 47 | / impl Default for StyleHolder { [INFO] [stdout] 48 | | fn default() -> Self { [INFO] [stdout] 49 | | Self { [INFO] [stdout] 50 | | styles: HashMap::default(), //make_styles(), [INFO] [stdout] ... | [INFO] [stdout] 53 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 31 + #[derive(Default)] [INFO] [stdout] 32 | pub struct StyleHolder { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/parser/util.rs:227:33 [INFO] [stdout] | [INFO] [stdout] 227 | } else if escaped % 2 == 1 && token_it.peek().map_or(false, |p| *p == c) { [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_some_and` instead [INFO] [stdout] | [INFO] [stdout] 227 - } else if escaped % 2 == 1 && token_it.peek().map_or(false, |p| *p == c) { [INFO] [stdout] 227 + } else if escaped % 2 == 1 && token_it.peek().is_some_and(|p| *p == c) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/parser/util.rs:267:4 [INFO] [stdout] | [INFO] [stdout] 267 | while let Some(_elem) = iter.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _elem in iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/unit/scope.rs:122:49 [INFO] [stdout] | [INFO] [stdout] 122 | fn get_variable(&self, name: &VariableName) -> Option<(Arc, Arc>)>; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the impl [INFO] [stdout] --> src/unit/scope.rs:160:6 [INFO] [stdout] | [INFO] [stdout] 160 | impl<'s> ScopeAccessor for Arc> { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take` [INFO] [stdout] --> src/unit/scope.rs:177:4 [INFO] [stdout] | [INFO] [stdout] 177 | std::mem::replace(&mut scope.parser_state.states, HashMap::default()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut scope.parser_state.states)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default [INFO] [stdout] = note: `#[warn(clippy::mem_replace_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/unit/scope.rs:200:3 [INFO] [stdout] | [INFO] [stdout] 200 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 200 - return None; [INFO] [stdout] 200 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/unit/scope.rs:337:3 [INFO] [stdout] | [INFO] [stdout] 337 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 337 - return None; [INFO] [stdout] 337 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/unit/translation.rs:106:5 [INFO] [stdout] | [INFO] [stdout] 106 | /// Whenever a variable is defined, it will overwrite the previously defined variable, if they have the same key in the current scope. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 106 | /// Whenever a variable is defined, it will overwrite the previously defined variable, if they have the same key in the current scope. [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 's [INFO] [stdout] --> src/unit/translation.rs:281:16 [INFO] [stdout] | [INFO] [stdout] 281 | pub fn colors<'s>(&'s self) -> &'s ReportColors { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 281 - pub fn colors<'s>(&'s self) -> &'s ReportColors { [INFO] [stdout] 281 + pub fn colors(&self) -> &ReportColors { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/unit/translation.rs:313:25 [INFO] [stdout] | [INFO] [stdout] 313 | cache.export_ref_unit(&self, &output.input_file, &output.output_file); [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/unit/mod.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | pub mod unit; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/unit/variable.rs:37:3 [INFO] [stdout] | [INFO] [stdout] 37 | while let Some(c) = it.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for c in it` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/unit/variable.rs:114:12 [INFO] [stdout] | [INFO] [stdout] 114 | fn expand<'u>(&self, unit: &mut TranslationUnit, location: Token) -> Arc>; [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/unit/variable.rs:154:56 [INFO] [stdout] | [INFO] [stdout] 154 | self.content.location().map_or(&self.location, |loc| &loc) [INFO] [stdout] | ^^^^ help: change this to: `loc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/unit/variable.rs:168:3 [INFO] [stdout] | [INFO] [stdout] 159 | / let content = unit.with_child( [INFO] [stdout] 160 | | self.content.clone(), [INFO] [stdout] 161 | | ParseMode::default(), [INFO] [stdout] 162 | | true, [INFO] [stdout] ... | [INFO] [stdout] 166 | | }, [INFO] [stdout] 167 | | ); [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 168 | content [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 159 ~ [INFO] [stdout] 160 ~ unit.with_child( [INFO] [stdout] 161 ~ self.content.clone(), [INFO] [stdout] 162 ~ ParseMode::default(), [INFO] [stdout] 163 ~ true, [INFO] [stdout] 164 ~ |unit, scope| { [INFO] [stdout] 165 ~ unit.parser.clone().parse(unit); [INFO] [stdout] 166 ~ scope [INFO] [stdout] 167 ~ }, [INFO] [stdout] 168 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct implementation of `ToString` [INFO] [stdout] --> src/unit/variable.rs:188:1 [INFO] [stdout] | [INFO] [stdout] 188 | / impl ToString for PropertyValue { [INFO] [stdout] 189 | | fn to_string(&self) -> String { [INFO] [stdout] 190 | | match self { [INFO] [stdout] 191 | | PropertyValue::Integer(i) => i.to_string(), [INFO] [stdout] ... | [INFO] [stdout] 196 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] = note: `#[warn(clippy::to_string_trait_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/unit/variable.rs:261:3 [INFO] [stdout] | [INFO] [stdout] 249 | / let content = unit.with_child( [INFO] [stdout] 250 | | definition_source.clone(), [INFO] [stdout] 251 | | ParseMode::default(), [INFO] [stdout] 252 | | true, [INFO] [stdout] ... | [INFO] [stdout] 259 | | }, [INFO] [stdout] 260 | | ); [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 261 | content [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 249 ~ [INFO] [stdout] 250 ~ unit.with_child( [INFO] [stdout] 251 ~ definition_source.clone(), [INFO] [stdout] 252 ~ ParseMode::default(), [INFO] [stdout] 253 ~ true, [INFO] [stdout] 254 ~ |_unit, scope| { [INFO] [stdout] 255 ~ scope.add_content(Arc::new(Text { [INFO] [stdout] 256 ~ location: definition_source.into(), [INFO] [stdout] 257 ~ content: self.value.to_string(), [INFO] [stdout] 258 ~ })); [INFO] [stdout] 259 ~ scope [INFO] [stdout] 260 ~ }, [INFO] [stdout] 261 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::path::PathBuf` [INFO] [stdout] --> src/util/settings.rs:55:15 [INFO] [stdout] | [INFO] [stdout] 55 | .unwrap_or(PathBuf::from(path.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `PathBuf::from()`: `path.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::path::PathBuf` [INFO] [stdout] --> src/util/settings.rs:62:15 [INFO] [stdout] | [INFO] [stdout] 62 | .unwrap_or(PathBuf::from(output_buf.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `PathBuf::from()`: `output_buf.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/util/settings.rs:67:37 [INFO] [stdout] | [INFO] [stdout] 67 | *icon = get_path(diff.clone(), &icon)?; [INFO] [stdout] | ^^^^^ help: change this to: `icon` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/util/settings.rs:72:36 [INFO] [stdout] | [INFO] [stdout] 72 | *css = get_path(diff.clone(), &css)?; [INFO] [stdout] | ^^^^ help: change this to: `css` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/util/mod.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub mod util; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/util/util.rs:10:3 [INFO] [stdout] | [INFO] [stdout] 10 | &self [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CSS` contains a capitalized acronym [INFO] [stdout] --> src/layout/size.rs:10:2 [INFO] [stdout] | [INFO] [stdout] 10 | CSS, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Css` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value [INFO] [stdout] --> src/layout/size.rs:21:19 [INFO] [stdout] | [INFO] [stdout] 21 | pub fn to_output(&self, output: SizeOutput) -> String { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct implementation of `ToString` [INFO] [stdout] --> src/layout/size.rs:33:1 [INFO] [stdout] | [INFO] [stdout] 33 | / impl ToString for Size { [INFO] [stdout] 34 | | fn to_string(&self) -> String { [INFO] [stdout] 35 | | match self { [INFO] [stdout] 36 | | Size::Em(s) => format!("{s}em"), [INFO] [stdout] ... | [INFO] [stdout] 41 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/size.rs:64:12 [INFO] [stdout] | [INFO] [stdout] 64 | unit => return Err(format!("Unknown unit type: {}", unit)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 64 - unit => return Err(format!("Unknown unit type: {}", unit)), [INFO] [stdout] 64 + unit => Err(format!("Unknown unit type: {}", unit)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/layout/size.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | err.to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/server.rs:404:4 [INFO] [stdout] | [INFO] [stdout] 404 | / let Some(hovers) = self.hovers_map.get(uri) else { [INFO] [stdout] 405 | | return None; [INFO] [stdout] 406 | | }; [INFO] [stdout] | |______________^ help: replace it with: `let hovers = self.hovers_map.get(uri)?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> src/server.rs:446:27 [INFO] [stdout] | [INFO] [stdout] 446 | let Some(hover) = found.map(|elem| elem.provide_hover()).flatten() else { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|elem| elem.provide_hover())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/server.rs:472:79 [INFO] [stdout] | [INFO] [stdout] 472 | if range.start.line == pos.line && range.start.character <= pos.character { [INFO] [stdout] | ___________________________________________________________________________________________^ [INFO] [stdout] 473 | | std::cmp::Ordering::Equal [INFO] [stdout] 474 | | } else if range.end.line == pos.line && range.end.character >= pos.character { [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/server.rs:474:82 [INFO] [stdout] | [INFO] [stdout] 474 | } else if range.end.line == pos.line && range.end.character >= pos.character { [INFO] [stdout] | ______________________________________________________________________________________________^ [INFO] [stdout] 475 | | std::cmp::Ordering::Equal [INFO] [stdout] 476 | | } else if range.start.line < pos.line && range.end.line > pos.line { [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/server.rs:474:82 [INFO] [stdout] | [INFO] [stdout] 474 | } else if range.end.line == pos.line && range.end.character >= pos.character { [INFO] [stdout] | ______________________________________________________________________________________________^ [INFO] [stdout] 475 | | std::cmp::Ordering::Equal [INFO] [stdout] 476 | | } else if range.start.line < pos.line && range.end.line > pos.line { [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/server.rs:476:72 [INFO] [stdout] | [INFO] [stdout] 476 | } else if range.start.line < pos.line && range.end.line > pos.line { [INFO] [stdout] | ____________________________________________________________________________________^ [INFO] [stdout] 477 | | std::cmp::Ordering::Equal [INFO] [stdout] 478 | | } else { [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.filter_map(..)` can be written more simply using `.map(..)` [INFO] [stdout] --> src/server.rs:531:6 [INFO] [stdout] | [INFO] [stdout] 531 | .filter_map(|token| Some(token.clone())) [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: using `clone` on type `SemanticToken` which implements the `Copy` trait [INFO] [stdout] --> src/server.rs:531:30 [INFO] [stdout] | [INFO] [stdout] 531 | .filter_map(|token| Some(token.clone())) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*token` [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: function call inside of `expect` [INFO] [stdout] --> src/server.rs:590:5 [INFO] [stdout] | [INFO] [stdout] 590 | .expect(format!("Project file {} contains invalid UTF-8", file.display()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Project file {} contains invalid UTF-8", file.display()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/server.rs:588:17 [INFO] [stdout] | [INFO] [stdout] 588 | read(&file).expect(format!("Failed to read {}", file.display()).as_str()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Failed to read {}", file.display()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/elements/layout/custom.rs:162:25 [INFO] [stdout] | [INFO] [stdout] 162 | output.add_content(format!(r#"
"#)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `r#"
"#.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] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/layout/size.rs:28:4 [INFO] [stdout] | [INFO] [stdout] 23 | SizeOutput::CSS => match self { [INFO] [stdout] | --------------- matches all the relevant values [INFO] [stdout] ... [INFO] [stdout] 28 | _ => todo!(), [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method chain can be written more clearly with `if .. else ..` [INFO] [stdout] --> src/elements/lua/completion.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 67 | context_triggered(context, ":").then_some("").unwrap_or(":") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if context_triggered(context, ":") { "" } else { ":" }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/elements/lua/completion.rs:112:22 [INFO] [stdout] | [INFO] [stdout] 112 | insert_text: Some(format!("{{:lua ${{1:CONTENT}}:}}",)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"{:lua ${1:CONTENT}:}".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] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/elements/lua/custom.rs:48:1 [INFO] [stdout] | [INFO] [stdout] 48 | / impl Default for LuaData { [INFO] [stdout] 49 | | fn default() -> Self { [INFO] [stdout] 50 | | Self { [INFO] [stdout] 51 | | registered: HashMap::default(), [INFO] [stdout] ... | [INFO] [stdout] 54 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 16 + #[derive(Default)] [INFO] [stdout] 17 | pub struct LuaData { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/elements/lua/rule.rs:143:61 [INFO] [stdout] | [INFO] [stdout] 143 | let Some(newline) = source.content()[content_end..].find(|c| c == '\n') else { [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider using a `char`: `'\n'` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] = note: `#[warn(clippy::manual_pattern_char_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/elements/lua/rule.rs:191:62 [INFO] [stdout] | [INFO] [stdout] 191 | let ctx = KernelContext::new(lua_source.clone().into(), &*kernel, unit); [INFO] [stdout] | ^^^^^^^^ help: try: `&kernel` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/elements/lua/rule.rs:396:62 [INFO] [stdout] | [INFO] [stdout] 396 | let ctx = KernelContext::new(lua_source.clone().into(), &*kernel, unit); [INFO] [stdout] | ^^^^^^^^ help: try: `&kernel` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/elements/lua/elem.rs:82:17 [INFO] [stdout] | [INFO] [stdout] 82 | pub fn process<'ctx>(&self, unit: &mut TranslationUnit) { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/elements/lua/elem.rs:90:63 [INFO] [stdout] | [INFO] [stdout] 90 | let ctx = KernelContext::new(self.source.clone().into(), &*kernel, unit); [INFO] [stdout] | ^^^^^^^^ help: try: `&kernel` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/elements/lua/elem.rs:172:24 [INFO] [stdout] | [INFO] [stdout] 172 | for (scope, elem) in (&content[0]).content_iter(false) { [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `content[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/elements/variable/rule.rs:41:3 [INFO] [stdout] | [INFO] [stdout] 41 | / let Some((pos, c)) = it.next() else { [INFO] [stdout] 42 | | return None; [INFO] [stdout] 43 | | }; [INFO] [stdout] | |__________^ help: replace it with: `let (pos, c) = it.next()?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/elements/variable/rule.rs:343:3 [INFO] [stdout] | [INFO] [stdout] 343 | return cursor.at(end_pos + value_len + 2 * delim.len()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 343 - return cursor.at(end_pos + value_len + 2 * delim.len()); [INFO] [stdout] 343 + cursor.at(end_pos + value_len + 2 * delim.len()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/elements/variable/rule.rs:326:5 [INFO] [stdout] | [INFO] [stdout] 326 | content[content_range.clone()].to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `&content[content_range.clone()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'u [INFO] [stdout] --> src/elements/variable/rule.rs:383:20 [INFO] [stdout] | [INFO] [stdout] 383 | fn on_regex_match<'u>( [INFO] [stdout] | ^^ [INFO] [stdout] ... [INFO] [stdout] 386 | unit: &'u mut TranslationUnit, [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 383 ~ fn on_regex_match( [INFO] [stdout] 384 | &self, [INFO] [stdout] 385 | _index: usize, [INFO] [stdout] 386 ~ unit: &mut TranslationUnit, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/elements/media/rule.rs:86:3 [INFO] [stdout] | [INFO] [stdout] 86 | return !mode.paragraph_only; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 86 - return !mode.paragraph_only; [INFO] [stdout] 86 + !mode.paragraph_only [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/elements/media/rule.rs:137:34 [INFO] [stdout] | [INFO] [stdout] 137 | span(refname_group.range(), err.into()) [INFO] [stdout] | ^^^^^^^^^^ help: consider removing `.into()`: `err` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/elements/media/rule.rs:344:11 [INFO] [stdout] | [INFO] [stdout] 344 | if let Some(_) = elem.downcast_ref::() { [INFO] [stdout] | -------^^^^^^^------------------------------------ help: try: `if elem.downcast_ref::().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CSS` contains a capitalized acronym [INFO] [stdout] --> src/layout/size.rs:10:2 [INFO] [stdout] | [INFO] [stdout] 10 | CSS, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Css` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value [INFO] [stdout] --> src/layout/size.rs:21:19 [INFO] [stdout] | [INFO] [stdout] 21 | pub fn to_output(&self, output: SizeOutput) -> String { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct implementation of `ToString` [INFO] [stdout] --> src/layout/size.rs:33:1 [INFO] [stdout] | [INFO] [stdout] 33 | / impl ToString for Size { [INFO] [stdout] 34 | | fn to_string(&self) -> String { [INFO] [stdout] 35 | | match self { [INFO] [stdout] 36 | | Size::Em(s) => format!("{s}em"), [INFO] [stdout] ... | [INFO] [stdout] 41 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] = note: `#[warn(clippy::to_string_trait_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/size.rs:64:12 [INFO] [stdout] | [INFO] [stdout] 64 | unit => return Err(format!("Unknown unit type: {}", unit)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 64 - unit => return Err(format!("Unknown unit type: {}", unit)), [INFO] [stdout] 64 + unit => Err(format!("Unknown unit type: {}", unit)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/layout/size.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | err.to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'lsp [INFO] [stdout] --> src/lsp/data.rs:105:20 [INFO] [stdout] | [INFO] [stdout] 105 | pub fn get_source<'lsp>(&'lsp self, name: &Path) -> Option> { [INFO] [stdout] | ^^^^ ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 105 - pub fn get_source<'lsp>(&'lsp self, name: &Path) -> Option> { [INFO] [stdout] 105 + pub fn get_source(&self, name: &Path) -> Option> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lsp/data.rs:124:3 [INFO] [stdout] | [INFO] [stdout] 124 | / match Semantics::from_source(source, self) { [INFO] [stdout] 125 | | Some(sems) => Some(f(&sems, &self.semantic_tokens)), [INFO] [stdout] 126 | | None => None, [INFO] [stdout] 127 | | } [INFO] [stdout] | |_________^ help: try: `Semantics::from_source(source, self).map(|sems| f(&sems, &self.semantic_tokens))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'lsp [INFO] [stdout] --> src/lsp/data.rs:130:24 [INFO] [stdout] | [INFO] [stdout] 130 | pub fn add_definition<'lsp>(&'lsp self, source: Token, target: &Token) { [INFO] [stdout] | ^^^^ ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 130 - pub fn add_definition<'lsp>(&'lsp self, source: Token, target: &Token) { [INFO] [stdout] 130 + pub fn add_definition(&self, source: Token, target: &Token) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'lsp [INFO] [stdout] --> src/lsp/data.rs:134:19 [INFO] [stdout] | [INFO] [stdout] 134 | pub fn add_hover<'lsp>(&'lsp self, range: Token, content: String) { [INFO] [stdout] | ^^^^ ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 134 - pub fn add_hover<'lsp>(&'lsp self, range: Token, content: String) { [INFO] [stdout] 134 + pub fn add_hover(&self, range: Token, content: String) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'lsp [INFO] [stdout] --> src/lsp/data.rs:145:21 [INFO] [stdout] | [INFO] [stdout] 145 | pub fn add_conceal<'lsp>(&'lsp self, range: Token, conceal: ConcealTarget) { [INFO] [stdout] | ^^^^ ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 145 - pub fn add_conceal<'lsp>(&'lsp self, range: Token, conceal: ConcealTarget) { [INFO] [stdout] 145 + pub fn add_conceal(&self, range: Token, conceal: ConcealTarget) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'lsp [INFO] [stdout] --> src/lsp/data.rs:153:19 [INFO] [stdout] | [INFO] [stdout] 153 | pub fn add_range<'lsp>( [INFO] [stdout] | ^^^^ [INFO] [stdout] 154 | &'lsp self, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 153 ~ pub fn add_range( [INFO] [stdout] 154 ~ &self, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'lsp [INFO] [stdout] --> src/lsp/definition.rs:26:21 [INFO] [stdout] | [INFO] [stdout] 26 | fn from_source_impl<'lsp>( [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 29 | lsp: &'lsp LangServerData, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 26 ~ fn from_source_impl( [INFO] [stdout] 27 | source: Arc, [INFO] [stdout] 28 | target: &Token, [INFO] [stdout] 29 ~ lsp: &LangServerData, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lsp/definition.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 46 | } else if !source.downcast_ref::().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `source.downcast_ref::().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'lsp [INFO] [stdout] --> src/lsp/definition.rs:104:27 [INFO] [stdout] | [INFO] [stdout] 104 | pub(crate) fn from_source<'lsp>(source: Token, target: &Token, lsp: &'lsp LangServerData) { [INFO] [stdout] | ^^^^ ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 104 - pub(crate) fn from_source<'lsp>(source: Token, target: &Token, lsp: &'lsp LangServerData) { [INFO] [stdout] 104 + pub(crate) fn from_source(source: Token, target: &Token, lsp: &LangServerData) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lsp/semantic.rs:264:22 [INFO] [stdout] | [INFO] [stdout] 264 | pub semantic_queue: RwLock, (u32, u32))>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/parser/rule.rs:80:6 [INFO] [stdout] | [INFO] [stdout] 80 | let mut rules = get_rules!(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/lua/wrappers/scope.rs:65:14 [INFO] [stdout] | [INFO] [stdout] 65 | cause: Arc::new(mlua::Error::RuntimeError("Index out of bounds".into())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Error` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Error` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/lua/wrappers/internal_reference.rs:60:14 [INFO] [stdout] | [INFO] [stdout] 60 | cause: Arc::new(mlua::Error::RuntimeError( [INFO] [stdout] | ________________________________^ [INFO] [stdout] 61 | | "Expected an internal reference name".into(), [INFO] [stdout] 62 | | )), [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Error` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Error` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lua/wrappers.rs:48:32 [INFO] [stdout] | [INFO] [stdout] 48 | pub struct IteratorWrapper(pub Box>, Arc)>>); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lua/kernel.rs:42:16 [INFO] [stdout] | [INFO] [stdout] 42 | return Err(format!("Kernel names cannot contain control sequences")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Kernel names cannot contain control sequences".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] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lua/kernel.rs:91:16 [INFO] [stdout] | [INFO] [stdout] 91 | return Err(format!("Kernel names cannot contain control sequences")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Kernel names cannot contain control sequences".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] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lua/kernel.rs:204:53 [INFO] [stdout] | [INFO] [stdout] 204 | let wrapper = lua.create_userdata(UnitWrapper(&mut ctx_ref.unit))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `ctx_ref.unit` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/lua/kernel.rs:222:18 [INFO] [stdout] | [INFO] [stdout] 222 | ... .map_err(|err| mlua::Error::RuntimeError(err)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `mlua::Error::RuntimeError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lua/kernel.rs:399:11 [INFO] [stdout] | [INFO] [stdout] 399 | pub fun: std::sync::Arc< [INFO] [stdout] | ______________^ [INFO] [stdout] 400 | | dyn Fn(&Lua, mlua::MultiValue) -> mlua::Result [INFO] [stdout] 401 | | + Send [INFO] [stdout] 402 | | + Sync, [INFO] [stdout] 403 | | >, [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lua/kernel.rs:411:6 [INFO] [stdout] | [INFO] [stdout] 411 | ) -> std::sync::Arc< [INFO] [stdout] | ______^ [INFO] [stdout] 412 | | dyn Fn( [INFO] [stdout] 413 | | &mlua::Lua, [INFO] [stdout] 414 | | mlua::MultiValue, [INFO] [stdout] ... | [INFO] [stdout] 417 | | + Sync, [INFO] [stdout] 418 | | > [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lua/kernel.rs:452:6 [INFO] [stdout] | [INFO] [stdout] 452 | ) -> std::sync::Arc< [INFO] [stdout] | ______^ [INFO] [stdout] 453 | | dyn for<'lua> Fn( [INFO] [stdout] 454 | | &'lua mlua::Lua, [INFO] [stdout] 455 | | mlua::MultiValue, [INFO] [stdout] ... | [INFO] [stdout] 458 | | + Sync, [INFO] [stdout] 459 | | > [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lua/doc.rs:116:14 [INFO] [stdout] | [INFO] [stdout] 116 | args += &format!("{name}"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `name.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] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/lua/doc.rs:118:24 [INFO] [stdout] | [INFO] [stdout] 118 | if !doc.is_empty() { [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 119 | | docs += &format!("--- @param {arg} {doc}\n"); [INFO] [stdout] 120 | | } else { [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/lua/doc.rs:120:12 [INFO] [stdout] | [INFO] [stdout] 120 | } else { [INFO] [stdout] | ________________________^ [INFO] [stdout] 121 | | docs += &format!("--- @param {arg} {doc}\n"); [INFO] [stdout] 122 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lua/doc.rs:126:13 [INFO] [stdout] | [INFO] [stdout] 126 | args += format!("{arg}").as_str(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `arg.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] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/parser/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod parser; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/parser/parser.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::usize; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/parser/parser.rs:39:6 [INFO] [stdout] | [INFO] [stdout] 39 | /// If the winning match is None, it means that the document has no more [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 39 | /// If the winning match is None, it means that the document has no more [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/parser/parser.rs:40:6 [INFO] [stdout] | [INFO] [stdout] 40 | /// rule to match. I.e The rest of the content should be added as a [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 40 | /// rule to match. I.e The rest of the content should be added as a [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/parser/parser.rs:41:6 [INFO] [stdout] | [INFO] [stdout] 41 | /// [`crate::elements::text::elem::Text`] element. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 41 | /// [`crate::elements::text::elem::Text`] element. [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/parser/parser.rs:42:6 [INFO] [stdout] | [INFO] [stdout] 42 | /// The match data should be passed to the [`Rule::on_match`] method. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 42 | /// The match data should be passed to the [`Rule::on_match`] method. [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/parser/parser.rs:62:7 [INFO] [stdout] | [INFO] [stdout] 62 | ) -> Option<( [INFO] [stdout] | __________^ [INFO] [stdout] 63 | | Cursor, [INFO] [stdout] 64 | | &Box, [INFO] [stdout] 65 | | Box, [INFO] [stdout] 66 | | )> { [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/parser/parser.rs:157:3 [INFO] [stdout] | [INFO] [stdout] 157 | return Some((cursor.at(next), &self.rules[best_idx], state.matches[best_idx].1.take().unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 157 - return Some((cursor.at(next), &self.rules[best_idx], state.matches[best_idx].1.take().unwrap())); [INFO] [stdout] 157 + Some((cursor.at(next), &self.rules[best_idx], state.matches[best_idx].1.take().unwrap())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'u [INFO] [stdout] --> src/parser/parser.rs:161:14 [INFO] [stdout] | [INFO] [stdout] 161 | fn add_text<'u>(&'u self, unit: &mut TranslationUnit, range: Range) { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 161 - fn add_text<'u>(&'u self, unit: &mut TranslationUnit, range: Range) { [INFO] [stdout] 161 + fn add_text(&self, unit: &mut TranslationUnit, range: Range) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/parser/parser.rs:190:37 [INFO] [stdout] | [INFO] [stdout] 190 | unit.add_content(Text::new(token, content.into())); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider removing `.into()`: `content` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::sync::Arc` [INFO] [stdout] --> src/parser/parser.rs:195:35 [INFO] [stdout] | [INFO] [stdout] 195 | let mut cursor = Cursor::new(0, Arc::as_ref(unit.get_scope()).read().source().into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `Arc::as_ref(unit.get_scope()).read().source()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/parser/property.rs:74:6 [INFO] [stdout] | [INFO] [stdout] 74 | /// (Note) In this case, reports should have been set [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 74 | /// (Note) In this case, reports should have been set [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/parser/property.rs:118:6 [INFO] [stdout] | [INFO] [stdout] 118 | /// (Note) In this case, reports should have been set [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 118 | /// (Note) In this case, reports should have been set [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/parser/property.rs:196:6 [INFO] [stdout] | [INFO] [stdout] 196 | /// (Note) In this case, reports should have been set [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 196 | /// (Note) In this case, reports should have been set [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/parser/property.rs:282:19 [INFO] [stdout] | [INFO] [stdout] 282 | pub fn parse<'s, 'u>( [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/parser/property.rs:366:9 [INFO] [stdout] | [INFO] [stdout] 366 | if escaped % 2 == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace with: `escaped.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/parser/property.rs:473:25 [INFO] [stdout] | [INFO] [stdout] 473 | pub fn parse_token<'s, 'u>( [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/parser/reports.rs:128:3 [INFO] [stdout] | [INFO] [stdout] 128 | self, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/parser/reports.rs:130:7 [INFO] [stdout] | [INFO] [stdout] 130 | ) -> ( [INFO] [stdout] | __________^ [INFO] [stdout] 131 | | ariadne::Report<'static, (Arc, Range)>, [INFO] [stdout] 132 | | impl ariadne::Cache>, [INFO] [stdout] 133 | | ) { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/parser/reports.rs:180:24 [INFO] [stdout] | [INFO] [stdout] 180 | pub fn to_diagnostics(self, diagnostic_map: &DashMap>) { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser/resolver.rs:71:6 [INFO] [stdout] | [INFO] [stdout] 71 | / if previous.input_file != *loaded.input_path() { [INFO] [stdout] 72 | | let token = loaded.token(); [INFO] [stdout] 73 | | Err(make_err!( [INFO] [stdout] 74 | | token.source(), [INFO] [stdout] ... | [INFO] [stdout] 93 | | ))?; [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_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 69 ~ Some(OffloadedUnit::Unloaded(previous)) [INFO] [stdout] 70 | // Duplicate with a database unit [INFO] [stdout] 71 ~ if previous.input_file != *loaded.input_path() => { [INFO] [stdout] 72 | let token = loaded.token(); [INFO] [stdout] ... [INFO] [stdout] 93 | ))?; [INFO] [stdout] 94 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/parser/resolver.rs:90:9 [INFO] [stdout] | [INFO] [stdout] 90 | ... (&previous.input_file).display().fg(colors.info), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `previous.input_file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/parser/resolver.rs:141:20 [INFO] [stdout] | [INFO] [stdout] 141 | .get_reference(&name) [INFO] [stdout] | ^^^^^ help: change this to: `name` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/parser/resolver.rs:171:39 [INFO] [stdout] | [INFO] [stdout] 171 | .query_reference(cache.clone(), &name) [INFO] [stdout] | ^^^^^ help: change this to: `name` [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: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/parser/resolver.rs:191:8 [INFO] [stdout] | [INFO] [stdout] 191 | / ... unit.query_reference(cache.clone(), &name) [INFO] [stdout] 192 | | ... .and_then(|reference| Some((reference, unit))) [INFO] [stdout] | |________________________________________________________________________^ help: try: `unit.query_reference(cache.clone(), &name).map(|reference| (reference, unit))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/parser/resolver.rs:191:44 [INFO] [stdout] | [INFO] [stdout] 191 | ... unit.query_reference(cache.clone(), &name) [INFO] [stdout] | ^^^^^ help: change this to: `name` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/parser/resolver.rs:258:7 [INFO] [stdout] | [INFO] [stdout] 258 | ) -> Result>>, Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/parser/resolver.rs:269:33 [INFO] [stdout] | [INFO] [stdout] 269 | .filter_map(|(scope, elem)| elem.as_linkable().and_then(|link| Some((scope, link)))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `elem.as_linkable().map(|link| (scope, link))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/parser/rule.rs:171:14 [INFO] [stdout] | [INFO] [stdout] 171 | fn on_match<'u>( [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/parser/rule.rs:231:20 [INFO] [stdout] | [INFO] [stdout] 231 | fn on_regex_match<'u>( [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused "map closure" when calling `Result::map_or_else` value [INFO] [stdout] --> src/parser/source.rs:81:18 [INFO] [stdout] | [INFO] [stdout] 81 | let absolute = path [INFO] [stdout] | ________________________^ [INFO] [stdout] 82 | | .canonicalize() [INFO] [stdout] 83 | | .map_or_else(|_| path.to_path_buf(), |p| p); [INFO] [stdout] | |_______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_result_map_or_else [INFO] [stdout] = note: `#[warn(clippy::unnecessary_result_map_or_else)]` on by default [INFO] [stdout] help: consider using `unwrap_or_else` [INFO] [stdout] | [INFO] [stdout] 81 ~ let absolute = path [INFO] [stdout] 82 ~ .canonicalize().unwrap_or_else(|_| path.to_path_buf()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/parser/state.rs:52:15 [INFO] [stdout] | [INFO] [stdout] 52 | pub matches: Vec<(Range, Option>)>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/parser/state.rs:91:15 [INFO] [stdout] | [INFO] [stdout] 91 | fn on_remove<'u>(&self, unit: &mut TranslationUnit); [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/parser/state.rs:127:22 [INFO] [stdout] | [INFO] [stdout] 127 | pub fn on_scope_end<'u>(&mut self, unit: &mut TranslationUnit, scope: StateScope) { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/parser/style.rs:19:15 [INFO] [stdout] | [INFO] [stdout] 19 | fn from_json(&self, json: &str) -> Result, String>; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/parser/style.rs:23:3 [INFO] [stdout] | [INFO] [stdout] 23 | &self, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/parser/style.rs:47:1 [INFO] [stdout] | [INFO] [stdout] 47 | / impl Default for StyleHolder { [INFO] [stdout] 48 | | fn default() -> Self { [INFO] [stdout] 49 | | Self { [INFO] [stdout] 50 | | styles: HashMap::default(), //make_styles(), [INFO] [stdout] ... | [INFO] [stdout] 53 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 31 + #[derive(Default)] [INFO] [stdout] 32 | pub struct StyleHolder { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/parser/util.rs:227:33 [INFO] [stdout] | [INFO] [stdout] 227 | } else if escaped % 2 == 1 && token_it.peek().map_or(false, |p| *p == c) { [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_some_and` instead [INFO] [stdout] | [INFO] [stdout] 227 - } else if escaped % 2 == 1 && token_it.peek().map_or(false, |p| *p == c) { [INFO] [stdout] 227 + } else if escaped % 2 == 1 && token_it.peek().is_some_and(|p| *p == c) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/parser/util.rs:267:4 [INFO] [stdout] | [INFO] [stdout] 267 | while let Some(_elem) = iter.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _elem in iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/unit/scope.rs:122:49 [INFO] [stdout] | [INFO] [stdout] 122 | fn get_variable(&self, name: &VariableName) -> Option<(Arc, Arc>)>; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the impl [INFO] [stdout] --> src/unit/scope.rs:160:6 [INFO] [stdout] | [INFO] [stdout] 160 | impl<'s> ScopeAccessor for Arc> { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take` [INFO] [stdout] --> src/unit/scope.rs:177:4 [INFO] [stdout] | [INFO] [stdout] 177 | std::mem::replace(&mut scope.parser_state.states, HashMap::default()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut scope.parser_state.states)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default [INFO] [stdout] = note: `#[warn(clippy::mem_replace_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/unit/scope.rs:200:3 [INFO] [stdout] | [INFO] [stdout] 200 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 200 - return None; [INFO] [stdout] 200 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/unit/scope.rs:337:3 [INFO] [stdout] | [INFO] [stdout] 337 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 337 - return None; [INFO] [stdout] 337 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/unit/translation.rs:106:5 [INFO] [stdout] | [INFO] [stdout] 106 | /// Whenever a variable is defined, it will overwrite the previously defined variable, if they have the same key in the current scope. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 106 | /// Whenever a variable is defined, it will overwrite the previously defined variable, if they have the same key in the current scope. [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 's [INFO] [stdout] --> src/unit/translation.rs:281:16 [INFO] [stdout] | [INFO] [stdout] 281 | pub fn colors<'s>(&'s self) -> &'s ReportColors { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 281 - pub fn colors<'s>(&'s self) -> &'s ReportColors { [INFO] [stdout] 281 + pub fn colors(&self) -> &ReportColors { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/unit/translation.rs:313:25 [INFO] [stdout] | [INFO] [stdout] 313 | cache.export_ref_unit(&self, &output.input_file, &output.output_file); [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/unit/mod.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | pub mod unit; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/unit/variable.rs:37:3 [INFO] [stdout] | [INFO] [stdout] 37 | while let Some(c) = it.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for c in it` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/unit/variable.rs:114:12 [INFO] [stdout] | [INFO] [stdout] 114 | fn expand<'u>(&self, unit: &mut TranslationUnit, location: Token) -> Arc>; [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/unit/variable.rs:154:56 [INFO] [stdout] | [INFO] [stdout] 154 | self.content.location().map_or(&self.location, |loc| &loc) [INFO] [stdout] | ^^^^ help: change this to: `loc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/unit/variable.rs:168:3 [INFO] [stdout] | [INFO] [stdout] 159 | / let content = unit.with_child( [INFO] [stdout] 160 | | self.content.clone(), [INFO] [stdout] 161 | | ParseMode::default(), [INFO] [stdout] 162 | | true, [INFO] [stdout] ... | [INFO] [stdout] 166 | | }, [INFO] [stdout] 167 | | ); [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 168 | content [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 159 ~ [INFO] [stdout] 160 ~ unit.with_child( [INFO] [stdout] 161 ~ self.content.clone(), [INFO] [stdout] 162 ~ ParseMode::default(), [INFO] [stdout] 163 ~ true, [INFO] [stdout] 164 ~ |unit, scope| { [INFO] [stdout] 165 ~ unit.parser.clone().parse(unit); [INFO] [stdout] 166 ~ scope [INFO] [stdout] 167 ~ }, [INFO] [stdout] 168 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct implementation of `ToString` [INFO] [stdout] --> src/unit/variable.rs:188:1 [INFO] [stdout] | [INFO] [stdout] 188 | / impl ToString for PropertyValue { [INFO] [stdout] 189 | | fn to_string(&self) -> String { [INFO] [stdout] 190 | | match self { [INFO] [stdout] 191 | | PropertyValue::Integer(i) => i.to_string(), [INFO] [stdout] ... | [INFO] [stdout] 196 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/unit/variable.rs:261:3 [INFO] [stdout] | [INFO] [stdout] 249 | / let content = unit.with_child( [INFO] [stdout] 250 | | definition_source.clone(), [INFO] [stdout] 251 | | ParseMode::default(), [INFO] [stdout] 252 | | true, [INFO] [stdout] ... | [INFO] [stdout] 259 | | }, [INFO] [stdout] 260 | | ); [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 261 | content [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 249 ~ [INFO] [stdout] 250 ~ unit.with_child( [INFO] [stdout] 251 ~ definition_source.clone(), [INFO] [stdout] 252 ~ ParseMode::default(), [INFO] [stdout] 253 ~ true, [INFO] [stdout] 254 ~ |_unit, scope| { [INFO] [stdout] 255 ~ scope.add_content(Arc::new(Text { [INFO] [stdout] 256 ~ location: definition_source.into(), [INFO] [stdout] 257 ~ content: self.value.to_string(), [INFO] [stdout] 258 ~ })); [INFO] [stdout] 259 ~ scope [INFO] [stdout] 260 ~ }, [INFO] [stdout] 261 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::path::PathBuf` [INFO] [stdout] --> src/util/settings.rs:55:15 [INFO] [stdout] | [INFO] [stdout] 55 | .unwrap_or(PathBuf::from(path.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `PathBuf::from()`: `path.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::path::PathBuf` [INFO] [stdout] --> src/util/settings.rs:62:15 [INFO] [stdout] | [INFO] [stdout] 62 | .unwrap_or(PathBuf::from(output_buf.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `PathBuf::from()`: `output_buf.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/util/settings.rs:67:37 [INFO] [stdout] | [INFO] [stdout] 67 | *icon = get_path(diff.clone(), &icon)?; [INFO] [stdout] | ^^^^^ help: change this to: `icon` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/util/settings.rs:72:36 [INFO] [stdout] | [INFO] [stdout] 72 | *css = get_path(diff.clone(), &css)?; [INFO] [stdout] | ^^^^ help: change this to: `css` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/util/mod.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub mod util; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/util/util.rs:10:3 [INFO] [stdout] | [INFO] [stdout] 10 | &self [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/main.rs:173:2 [INFO] [stdout] | [INFO] [stdout] 173 | settings.db_path = db_path.unwrap_or(PathBuf::from("")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `util::settings::ProjectSettings { db_path: db_path.unwrap_or(PathBuf::from("")), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/main.rs:172:2 [INFO] [stdout] | [INFO] [stdout] 172 | let mut settings = ProjectSettings::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:80:17 [INFO] [stdout] | [INFO] [stdout] 80 | return Err(format!( [INFO] [stdout] | ________________________________^ [INFO] [stdout] 81 | | "Input is a directory, but ouput is not a directory, halting" [INFO] [stdout] 82 | | )); [INFO] [stdout] | |_____________________^ help: consider using `.to_string()`: `"Input is a directory, but ouput is not a directory, halting".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] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:134:15 [INFO] [stdout] | [INFO] [stdout] 134 | return Err(format!("Directory mode requires a database (-d)")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Directory mode requires a database (-d)".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] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/main.rs:333:2 [INFO] [stdout] | [INFO] [stdout] 333 | options.force_rebuild = matches.opt_present("force-rebuild"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `compiler::process::ProcessOptions { force_rebuild: matches.opt_present("force-rebuild"), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/main.rs:332:2 [INFO] [stdout] | [INFO] [stdout] 332 | let mut options = ProcessOptions::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::path::PathBuf` [INFO] [stdout] --> src/main.rs:343:50 [INFO] [stdout] | [INFO] [stdout] 343 | let mut queue = ProcessQueue::new(Target::HTML, PathBuf::from(project_path), settings, files); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `PathBuf::from()`: `project_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `lua_ranges` is never read [INFO] [stdout] --> src/server.rs:66:2 [INFO] [stdout] | [INFO] [stdout] 41 | pub struct Backend { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 66 | lua_ranges: DashMap>>, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_unique_link` is never used [INFO] [stdout] --> src/compiler/links.rs:9:8 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn get_unique_link( [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `translate_reference` is never used [INFO] [stdout] --> src/compiler/links.rs:43:8 [INFO] [stdout] | [INFO] [stdout] 43 | pub fn translate_reference( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `target` is never read [INFO] [stdout] --> src/compiler/output.rs:69:2 [INFO] [stdout] | [INFO] [stdout] 67 | pub struct CompilerOutput { [INFO] [stdout] | -------------- field in this struct [INFO] [stdout] 68 | /// Compilation target [INFO] [stdout] 69 | target: Target, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ProcessOptions` is never constructed [INFO] [stdout] --> src/compiler/process.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 24 | pub struct ProcessOptions { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `ProcessError` is never used [INFO] [stdout] --> src/compiler/process.rs:30:10 [INFO] [stdout] | [INFO] [stdout] 30 | pub enum ProcessError { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `ProcessOutputOptions` is never used [INFO] [stdout] --> src/compiler/process.rs:37:10 [INFO] [stdout] | [INFO] [stdout] 37 | pub enum ProcessOutputOptions { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `ProcessQueueMessage` is never used [INFO] [stdout] --> src/compiler/process.rs:45:10 [INFO] [stdout] | [INFO] [stdout] 45 | pub enum ProcessQueueMessage<'u> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `output_message` is never used [INFO] [stdout] --> src/compiler/process.rs:57:8 [INFO] [stdout] | [INFO] [stdout] 57 | pub fn output_message<'u>(message: ProcessQueueMessage<'u>, perc: f64) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ProcessQueue` is never constructed [INFO] [stdout] --> src/compiler/process.rs:90:12 [INFO] [stdout] | [INFO] [stdout] 90 | pub struct ProcessQueue { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `process` are never used [INFO] [stdout] --> src/compiler/process.rs:102:9 [INFO] [stdout] | [INFO] [stdout] 101 | impl ProcessQueue { [INFO] [stdout] | ----------------- associated items in this implementation [INFO] [stdout] 102 | pub fn new( [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 130 | pub fn process( [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CodeRangeParams` is never constructed [INFO] [stdout] --> src/lsp/code.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 22 | pub struct CodeRangeParams { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CodeRange` is never constructed [INFO] [stdout] --> src/lsp/code.rs:42:12 [INFO] [stdout] | [INFO] [stdout] 42 | pub struct CodeRange<'a> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `from_source_impl`, `from_source`, and `add` are never used [INFO] [stdout] --> src/lsp/code.rs:51:5 [INFO] [stdout] | [INFO] [stdout] 50 | impl<'a> CodeRange<'a> { [INFO] [stdout] | ---------------------- associated items in this implementation [INFO] [stdout] 51 | fn from_source_impl( [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 83 | pub fn from_source( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 93 | pub fn add(&self, range: Range, language: String) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `original_source` is never read [INFO] [stdout] --> src/lsp/conceal.rs:57:2 [INFO] [stdout] | [INFO] [stdout] 54 | pub struct Conceal<'lsp> { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 57 | original_source: Arc, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Conceal` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `cursor` is never read [INFO] [stdout] --> src/lsp/hints.rs:16:2 [INFO] [stdout] | [INFO] [stdout] 14 | pub struct HintsData { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] 15 | /// The current cursor [INFO] [stdout] 16 | cursor: RwLock, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `HintsData` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Hints` is never constructed [INFO] [stdout] --> src/lsp/hints.rs:33:12 [INFO] [stdout] | [INFO] [stdout] 33 | pub struct Hints<'a> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `add` is never used [INFO] [stdout] --> src/lsp/hints.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 41 | impl<'a> Hints<'a> { [INFO] [stdout] | ------------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 86 | pub fn add(&self, position: usize, label: String) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `original_source` and `source` are never read [INFO] [stdout] --> src/lsp/hover.rs:27:2 [INFO] [stdout] | [INFO] [stdout] 24 | pub struct Hover<'lsp> { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 27 | original_source: Arc, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 28 | /// The resolved parent source [INFO] [stdout] 29 | source: Arc, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Styles` is never constructed [INFO] [stdout] --> src/lsp/styles.rs:44:12 [INFO] [stdout] | [INFO] [stdout] 44 | pub struct Styles<'a> { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `add` is never used [INFO] [stdout] --> src/lsp/styles.rs:97:9 [INFO] [stdout] | [INFO] [stdout] 52 | impl<'a> Styles<'a> { [INFO] [stdout] | ------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 97 | pub fn add(&self, range: Range, style: Style) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `original_source` and `source` are never read [INFO] [stdout] --> src/lsp/ranges.rs:26:2 [INFO] [stdout] | [INFO] [stdout] 23 | pub struct Range<'lsp> { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 26 | original_source: Arc, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 27 | /// The resolved parent source [INFO] [stdout] 28 | source: Arc, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `InternalReferenceWrapper` is never constructed [INFO] [stdout] --> src/lua/wrappers.rs:41:12 [INFO] [stdout] | [INFO] [stdout] 41 | pub struct InternalReferenceWrapper(pub Option>); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `UserDataElem` is never used [INFO] [stdout] --> src/lua/wrappers.rs:67:11 [INFO] [stdout] | [INFO] [stdout] 67 | pub trait UserDataElem [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `try_new` is never used [INFO] [stdout] --> src/lua/kernel.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 26 | impl KernelName { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 33 | pub fn try_new(s: &str) -> Result<&KernelName, String> [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `source` and `content` are never read [INFO] [stdout] --> src/lua/kernel.rs:114:6 [INFO] [stdout] | [INFO] [stdout] 112 | pub struct KernelRedirect { [INFO] [stdout] | -------------- fields in this struct [INFO] [stdout] 113 | /// Message source e.g print() [INFO] [stdout] 114 | pub source: String, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 115 | /// Message content [INFO] [stdout] 116 | pub content: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `reports` is never read [INFO] [stdout] --> src/lua/kernel.rs:125:6 [INFO] [stdout] | [INFO] [stdout] 120 | pub struct KernelContext<'ctx> { [INFO] [stdout] | ------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 125 | pub reports: Vec, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `export_table` is never used [INFO] [stdout] --> src/lua/kernel.rs:319:9 [INFO] [stdout] | [INFO] [stdout] 150 | impl Kernel { [INFO] [stdout] | ----------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 319 | pub fn export_table( [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name`, `args`, `returns`, and `doc` are never read [INFO] [stdout] --> src/lua/doc.rs:13:6 [INFO] [stdout] | [INFO] [stdout] 12 | pub struct LuaMethodDoc { [INFO] [stdout] | ------------ fields in this struct [INFO] [stdout] 13 | pub name: &'static str, [INFO] [stdout] | ^^^^ [INFO] [stdout] 14 | pub args: Vec<&'static str>, [INFO] [stdout] | ^^^^ [INFO] [stdout] 15 | pub returns: Option<&'static str>, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 16 | pub doc: &'static str, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `LuaMethodDoc` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `type_name` is never read [INFO] [stdout] --> src/lua/doc.rs:22:6 [INFO] [stdout] | [INFO] [stdout] 21 | pub struct UserDataDoc { [INFO] [stdout] | ----------- field in this struct [INFO] [stdout] 22 | pub type_name: &'static str, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `UserDataDoc` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_lua_docs` is never used [INFO] [stdout] --> src/lua/doc.rs:98:8 [INFO] [stdout] | [INFO] [stdout] 98 | pub fn get_lua_docs() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `ParserRuleAccessor` is never used [INFO] [stdout] --> src/parser/parser.rs:232:11 [INFO] [stdout] | [INFO] [stdout] 232 | pub trait ParserRuleAccessor { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `ResolveError` is never used [INFO] [stdout] --> src/parser/resolver.rs:23:10 [INFO] [stdout] | [INFO] [stdout] 23 | pub enum ResolveError { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Resolver` is never constructed [INFO] [stdout] --> src/parser/resolver.rs:28:12 [INFO] [stdout] | [INFO] [stdout] 28 | pub struct Resolver<'u> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `resolve_reference`, `resolve_links`, `add_dependency`, and `resolve_references` are never used [INFO] [stdout] --> src/parser/resolver.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 42 | impl<'u> Resolver<'u> { [INFO] [stdout] | --------------------- associated items in this implementation [INFO] [stdout] 43 | pub fn new( [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 132 | pub fn resolve_reference( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 214 | pub fn resolve_links(&self, _cache: Arc, target: Target) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 229 | fn add_dependency( [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 254 | pub fn resolve_references( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `path` is never used [INFO] [stdout] --> src/parser/source.rs:115:9 [INFO] [stdout] | [INFO] [stdout] 76 | impl SourceFile { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 115 | pub fn path(&self) -> &PathBuf { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Global`, `Scope`, and `Paragraph` are never constructed [INFO] [stdout] --> src/parser/state.rs:79:2 [INFO] [stdout] | [INFO] [stdout] 77 | pub enum StateScope { [INFO] [stdout] | ---------- variants in this enum [INFO] [stdout] 78 | /// Global state [INFO] [stdout] 79 | Global = 0, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 80 | /// Scope-local state [INFO] [stdout] 81 | Scope = 1, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 82 | /// Paragraph-local state [INFO] [stdout] 83 | Paragraph = 2, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `StateScope` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `on_remove` is never used [INFO] [stdout] --> src/parser/state.rs:91:5 [INFO] [stdout] | [INFO] [stdout] 86 | pub trait RuleState: Downcast { [INFO] [stdout] | --------- method in this trait [INFO] [stdout] ... [INFO] [stdout] 91 | fn on_remove<'u>(&self, unit: &mut TranslationUnit); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `RuleStateHolder` is never constructed [INFO] [stdout] --> src/parser/state.rs:103:12 [INFO] [stdout] | [INFO] [stdout] 103 | pub struct RuleStateHolder { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `insert`, `get`, and `on_scope_end` are never used [INFO] [stdout] --> src/parser/state.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 107 | impl RuleStateHolder { [INFO] [stdout] | -------------------- methods in this implementation [INFO] [stdout] 108 | pub fn insert( [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 120 | pub fn get>(&self, name: S) -> Option>> { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 127 | pub fn on_scope_end<'u>(&mut self, unit: &mut TranslationUnit, scope: StateScope) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `ElementStyle` is never used [INFO] [stdout] --> src/parser/style.rs:10:11 [INFO] [stdout] | [INFO] [stdout] 10 | pub trait ElementStyle: Downcast + core::fmt::Debug { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `StyleHolder` is never constructed [INFO] [stdout] --> src/parser/style.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 31 | pub struct StyleHolder { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `is_registered`, `current`, and `set_current` are never used [INFO] [stdout] --> src/parser/style.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 55 | impl StyleHolder { [INFO] [stdout] | ---------------- methods in this implementation [INFO] [stdout] 56 | /// Checks if a given style key is registered [INFO] [stdout] 57 | pub fn is_registered(&self, style_key: &str) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 68 | pub fn current(&self, style_key: &str) -> Rc { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 73 | pub fn set_current(&mut self, style: Rc) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `has_state` is never used [INFO] [stdout] --> src/unit/scope.rs:150:5 [INFO] [stdout] | [INFO] [stdout] 109 | pub trait ScopeAccessor { [INFO] [stdout] | ------------- method in this trait [INFO] [stdout] ... [INFO] [stdout] 150 | fn has_state(&self, name: &str) -> bool; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `references` and `update_settings` are never used [INFO] [stdout] --> src/unit/translation.rs:370:5 [INFO] [stdout] | [INFO] [stdout] 352 | pub trait TranslationAccessors { [INFO] [stdout] | -------------------- methods in this trait [INFO] [stdout] ... [INFO] [stdout] 370 | fn references(&self) -> &HashMap>; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 373 | fn update_settings(&self, settings: ProjectSettings); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `OffloadedUnit` is never used [INFO] [stdout] --> src/unit/unit.rs:36:10 [INFO] [stdout] | [INFO] [stdout] 36 | pub enum OffloadedUnit<'u> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `reference_key`, `input_path`, `output_path`, and `query_reference` are never used [INFO] [stdout] --> src/unit/unit.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 43 | impl<'u> OffloadedUnit<'u> { [INFO] [stdout] | -------------------------- methods in this implementation [INFO] [stdout] 44 | /// Gets the unit's reference key [INFO] [stdout] 45 | pub fn reference_key(&self) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 53 | pub fn input_path(&self) -> &PathBuf { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 61 | pub fn output_path(&self) -> &PathBuf { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 70 | pub fn query_reference>(&self, cache: Arc, name: S) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `value` is never used [INFO] [stdout] --> src/unit/variable.rs:211:9 [INFO] [stdout] | [INFO] [stdout] 210 | impl PropertyVariable { [INFO] [stdout] | --------------------- method in this implementation [INFO] [stdout] 211 | pub fn value(&self) -> &PropertyValue { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/cache/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod cache; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/cache/cache.rs:252:63 [INFO] [stdout] | [INFO] [stdout] 252 | pub fn export_ref_unit(&self, unit: &TranslationUnit, input: &PathBuf, output: &Option) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 252 - pub fn export_ref_unit(&self, unit: &TranslationUnit, input: &PathBuf, output: &Option) { [INFO] [stdout] 252 + pub fn export_ref_unit(&self, unit: &TranslationUnit, input: &Path, output: &Option) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `rusqlite::MappedRows<'_, {closure@src/cache/cache.rs:450:19: 450:24}>` [INFO] [stdout] --> src/cache/cache.rs:449:3 [INFO] [stdout] | [INFO] [stdout] 449 | / update [INFO] [stdout] 450 | | .query_map([], |row| { [INFO] [stdout] 451 | | Ok(( [INFO] [stdout] 452 | | row.get_unwrap::<_, String>(0), [INFO] [stdout] ... | [INFO] [stdout] 458 | | .unwrap() [INFO] [stdout] 459 | | .into_iter() [INFO] [stdout] | |________________________^ [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] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 449 ~ update [INFO] [stdout] 450 ~ .query_map([], |row| { [INFO] [stdout] 451 ~ Ok(( [INFO] [stdout] 452 ~ row.get_unwrap::<_, String>(0), [INFO] [stdout] 453 ~ row.get_unwrap::<_, usize>(1), [INFO] [stdout] 454 ~ row.get_unwrap::<_, usize>(2), [INFO] [stdout] 455 ~ row.get_unwrap::<_, String>(3), [INFO] [stdout] 456 ~ )) [INFO] [stdout] 457 ~ }) [INFO] [stdout] 458 ~ .unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/compiler/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod compiler; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `HTML` contains a capitalized acronym [INFO] [stdout] --> src/compiler/compiler.rs:21:2 [INFO] [stdout] | [INFO] [stdout] 21 | HTML, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Html` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `LATEX` contains a capitalized acronym [INFO] [stdout] --> src/compiler/compiler.rs:23:2 [INFO] [stdout] | [INFO] [stdout] 23 | LATEX, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Latex` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `extend` instead of `append` for adding the full range of a second vector [INFO] [stdout] --> src/compiler/compiler.rs:101:5 [INFO] [stdout] | [INFO] [stdout] 101 | reports.extend(reps.drain(..)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `reports.append(&mut reps)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain [INFO] [stdout] = note: `#[warn(clippy::extend_with_drain)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/compiler/compiler.rs:134:24 [INFO] [stdout] | [INFO] [stdout] 134 | output.add_content(&format!( [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 135 | | "{icon}{css}", [INFO] [stdout] 136 | | self.sanitize(html.language.as_str()) [INFO] [stdout] 137 | | )); [INFO] [stdout] | |_________________^ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 134 ~ output.add_content(format!( [INFO] [stdout] 135 ~ "{icon}{css}", [INFO] [stdout] 136 ~ self.sanitize(html.language.as_str()) [INFO] [stdout] 137 ~ )); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/compiler.rs:156:4 [INFO] [stdout] | [INFO] [stdout] 156 | &unit.colors(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `unit.colors()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/compiler/links.rs:12:11 [INFO] [stdout] | [INFO] [stdout] 12 | refname: &String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 12 - refname: &String, [INFO] [stdout] 12 + refname: &str, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/compiler/output.rs:125:39 [INFO] [stdout] | [INFO] [stdout] 125 | if task.result.get().is_some() || !task.handle.get().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `task.handle.get().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/compiler/output.rs:129:8 [INFO] [stdout] | [INFO] [stdout] 129 | if task [INFO] [stdout] | ____________________^ [INFO] [stdout] 130 | | .handle [INFO] [stdout] 131 | | .get() [INFO] [stdout] 132 | | .map_or(false, |handle| handle.is_finished()) [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_some_and` instead [INFO] [stdout] | [INFO] [stdout] 132 - .map_or(false, |handle| handle.is_finished()) [INFO] [stdout] 132 + .is_some_and(|handle| handle.is_finished()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `extend` instead of `append` for adding the full range of a second vector [INFO] [stdout] --> src/compiler/output.rs:186:4 [INFO] [stdout] | [INFO] [stdout] 186 | reports.extend(err.drain(..)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `reports.append(&mut err)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same postfix: `Error` [INFO] [stdout] --> src/compiler/process.rs:30:1 [INFO] [stdout] | [INFO] [stdout] 30 | / pub enum ProcessError { [INFO] [stdout] 31 | | GeneralError(String), [INFO] [stdout] 32 | | InputError(String, PathBuf), [INFO] [stdout] 33 | | LinkError(Vec), [INFO] [stdout] 34 | | CompileError(Vec), [INFO] [stdout] 35 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/compiler/process.rs:148:48 [INFO] [stdout] | [INFO] [stdout] 148 | let Some(local_path) = pathdiff::diff_paths(&input, &self.project_path) else { [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/process.rs:182:35 [INFO] [stdout] | [INFO] [stdout] 182 | ProcessQueueMessage::Skipped(&input), [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/process.rs:188:34 [INFO] [stdout] | [INFO] [stdout] 188 | ProcessQueueMessage::Parsing(&input), [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/compiler/process.rs:261:13 [INFO] [stdout] | [INFO] [stdout] 261 | .map_err(|err| ProcessError::LinkError(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `ProcessError::LinkError` [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: field `target` is never read [INFO] [stdout] --> src/compiler/output.rs:69:2 [INFO] [stdout] | [INFO] [stdout] 67 | pub struct CompilerOutput { [INFO] [stdout] | -------------- field in this struct [INFO] [stdout] 68 | /// Compilation target [INFO] [stdout] 69 | target: Target, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `outputs` is never read [INFO] [stdout] --> src/compiler/process.rs:93:2 [INFO] [stdout] | [INFO] [stdout] 90 | pub struct ProcessQueue { [INFO] [stdout] | ------------ field in this struct [INFO] [stdout] ... [INFO] [stdout] 93 | outputs: Vec<()>, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CodeRangeParams` is never constructed [INFO] [stdout] --> src/lsp/code.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 22 | pub struct CodeRangeParams { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CodeRange` is never constructed [INFO] [stdout] --> src/lsp/code.rs:42:12 [INFO] [stdout] | [INFO] [stdout] 42 | pub struct CodeRange<'a> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `from_source_impl`, `from_source`, and `add` are never used [INFO] [stdout] --> src/lsp/code.rs:51:5 [INFO] [stdout] | [INFO] [stdout] 50 | impl<'a> CodeRange<'a> { [INFO] [stdout] | ---------------------- associated items in this implementation [INFO] [stdout] 51 | fn from_source_impl( [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 83 | pub fn from_source( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 93 | pub fn add(&self, range: Range, language: String) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConcealParams` is never constructed [INFO] [stdout] --> src/lsp/conceal.rs:20:12 [INFO] [stdout] | [INFO] [stdout] 20 | pub struct ConcealParams { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `original_source` is never read [INFO] [stdout] --> src/lsp/conceal.rs:57:2 [INFO] [stdout] | [INFO] [stdout] 54 | pub struct Conceal<'lsp> { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 57 | original_source: Arc, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Conceal` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `cursor` is never read [INFO] [stdout] --> src/lsp/hints.rs:16:2 [INFO] [stdout] | [INFO] [stdout] 14 | pub struct HintsData { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] 15 | /// The current cursor [INFO] [stdout] 16 | cursor: RwLock, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `HintsData` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Hints` is never constructed [INFO] [stdout] --> src/lsp/hints.rs:33:12 [INFO] [stdout] | [INFO] [stdout] 33 | pub struct Hints<'a> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `add` is never used [INFO] [stdout] --> src/lsp/hints.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 41 | impl<'a> Hints<'a> { [INFO] [stdout] | ------------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 86 | pub fn add(&self, position: usize, label: String) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `original_source` and `source` are never read [INFO] [stdout] --> src/lsp/hover.rs:27:2 [INFO] [stdout] | [INFO] [stdout] 24 | pub struct Hover<'lsp> { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 27 | original_source: Arc, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 28 | /// The resolved parent source [INFO] [stdout] 29 | source: Arc, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `StyleParams` is never constructed [INFO] [stdout] --> src/lsp/styles.rs:17:12 [INFO] [stdout] | [INFO] [stdout] 17 | pub struct StyleParams { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Styles` is never constructed [INFO] [stdout] --> src/lsp/styles.rs:44:12 [INFO] [stdout] | [INFO] [stdout] 44 | pub struct Styles<'a> { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `add` is never used [INFO] [stdout] --> src/lsp/styles.rs:97:9 [INFO] [stdout] | [INFO] [stdout] 52 | impl<'a> Styles<'a> { [INFO] [stdout] | ------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 97 | pub fn add(&self, range: Range, style: Style) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `original_source` and `source` are never read [INFO] [stdout] --> src/lsp/ranges.rs:26:2 [INFO] [stdout] | [INFO] [stdout] 23 | pub struct Range<'lsp> { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 26 | original_source: Arc, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 27 | /// The resolved parent source [INFO] [stdout] 28 | source: Arc, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `UserDataElem` is never used [INFO] [stdout] --> src/lua/wrappers.rs:67:11 [INFO] [stdout] | [INFO] [stdout] 67 | pub trait UserDataElem [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `try_new` is never used [INFO] [stdout] --> src/lua/kernel.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 26 | impl KernelName { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 33 | pub fn try_new(s: &str) -> Result<&KernelName, String> [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `source` and `content` are never read [INFO] [stdout] --> src/lua/kernel.rs:114:6 [INFO] [stdout] | [INFO] [stdout] 112 | pub struct KernelRedirect { [INFO] [stdout] | -------------- fields in this struct [INFO] [stdout] 113 | /// Message source e.g print() [INFO] [stdout] 114 | pub source: String, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 115 | /// Message content [INFO] [stdout] 116 | pub content: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `reports` is never read [INFO] [stdout] --> src/lua/kernel.rs:125:6 [INFO] [stdout] | [INFO] [stdout] 120 | pub struct KernelContext<'ctx> { [INFO] [stdout] | ------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 125 | pub reports: Vec, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `export_table` is never used [INFO] [stdout] --> src/lua/kernel.rs:319:9 [INFO] [stdout] | [INFO] [stdout] 150 | impl Kernel { [INFO] [stdout] | ----------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 319 | pub fn export_table( [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `ParserRuleAccessor` is never used [INFO] [stdout] --> src/parser/parser.rs:232:11 [INFO] [stdout] | [INFO] [stdout] 232 | pub trait ParserRuleAccessor { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `path` is never used [INFO] [stdout] --> src/parser/source.rs:115:9 [INFO] [stdout] | [INFO] [stdout] 76 | impl SourceFile { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 115 | pub fn path(&self) -> &PathBuf { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_position` is never used [INFO] [stdout] --> src/parser/source.rs:384:9 [INFO] [stdout] | [INFO] [stdout] 371 | impl LineCursor { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 384 | pub fn from_position( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Global`, `Scope`, and `Paragraph` are never constructed [INFO] [stdout] --> src/parser/state.rs:79:2 [INFO] [stdout] | [INFO] [stdout] 77 | pub enum StateScope { [INFO] [stdout] | ---------- variants in this enum [INFO] [stdout] 78 | /// Global state [INFO] [stdout] 79 | Global = 0, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 80 | /// Scope-local state [INFO] [stdout] 81 | Scope = 1, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 82 | /// Paragraph-local state [INFO] [stdout] 83 | Paragraph = 2, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `StateScope` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `on_remove` is never used [INFO] [stdout] --> src/parser/state.rs:91:5 [INFO] [stdout] | [INFO] [stdout] 86 | pub trait RuleState: Downcast { [INFO] [stdout] | --------- method in this trait [INFO] [stdout] ... [INFO] [stdout] 91 | fn on_remove<'u>(&self, unit: &mut TranslationUnit); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `RuleStateHolder` is never constructed [INFO] [stdout] --> src/parser/state.rs:103:12 [INFO] [stdout] | [INFO] [stdout] 103 | pub struct RuleStateHolder { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `insert`, `get`, and `on_scope_end` are never used [INFO] [stdout] --> src/parser/state.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 107 | impl RuleStateHolder { [INFO] [stdout] | -------------------- methods in this implementation [INFO] [stdout] 108 | pub fn insert( [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 120 | pub fn get>(&self, name: S) -> Option>> { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 127 | pub fn on_scope_end<'u>(&mut self, unit: &mut TranslationUnit, scope: StateScope) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `ElementStyle` is never used [INFO] [stdout] --> src/parser/style.rs:10:11 [INFO] [stdout] | [INFO] [stdout] 10 | pub trait ElementStyle: Downcast + core::fmt::Debug { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `StyleHolder` is never constructed [INFO] [stdout] --> src/parser/style.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 31 | pub struct StyleHolder { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `is_registered`, `current`, and `set_current` are never used [INFO] [stdout] --> src/parser/style.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 55 | impl StyleHolder { [INFO] [stdout] | ---------------- methods in this implementation [INFO] [stdout] 56 | /// Checks if a given style key is registered [INFO] [stdout] 57 | pub fn is_registered(&self, style_key: &str) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 68 | pub fn current(&self, style_key: &str) -> Rc { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 73 | pub fn set_current(&mut self, style: Rc) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `has_state` and `token` are never used [INFO] [stdout] --> src/unit/scope.rs:150:5 [INFO] [stdout] | [INFO] [stdout] 109 | pub trait ScopeAccessor { [INFO] [stdout] | ------------- methods in this trait [INFO] [stdout] ... [INFO] [stdout] 150 | fn has_state(&self, name: &str) -> bool; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 157 | fn token(&self) -> Token; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `input_path` is never used [INFO] [stdout] --> src/unit/unit.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 43 | impl<'u> OffloadedUnit<'u> { [INFO] [stdout] | -------------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 53 | pub fn input_path(&self) -> &PathBuf { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `value` is never used [INFO] [stdout] --> src/unit/variable.rs:211:9 [INFO] [stdout] | [INFO] [stdout] 210 | impl PropertyVariable { [INFO] [stdout] | --------------------- method in this implementation [INFO] [stdout] 211 | pub fn value(&self) -> &PropertyValue { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/cache/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod cache; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/cache/cache.rs:252:63 [INFO] [stdout] | [INFO] [stdout] 252 | pub fn export_ref_unit(&self, unit: &TranslationUnit, input: &PathBuf, output: &Option) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 252 - pub fn export_ref_unit(&self, unit: &TranslationUnit, input: &PathBuf, output: &Option) { [INFO] [stdout] 252 + pub fn export_ref_unit(&self, unit: &TranslationUnit, input: &Path, output: &Option) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `cloned` [INFO] [stdout] --> src/elements/import/elem.rs:49:16 [INFO] [stdout] | [INFO] [stdout] 49 | for scope in self.content.iter().cloned() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] help: remove any references to the binding [INFO] [stdout] | [INFO] [stdout] 49 - for scope in self.content.iter().cloned() { [INFO] [stdout] 49 + for scope in self.content.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `rusqlite::MappedRows<'_, {closure@src/cache/cache.rs:450:19: 450:24}>` [INFO] [stdout] --> src/cache/cache.rs:449:3 [INFO] [stdout] | [INFO] [stdout] 449 | / update [INFO] [stdout] 450 | | .query_map([], |row| { [INFO] [stdout] 451 | | Ok(( [INFO] [stdout] 452 | | row.get_unwrap::<_, String>(0), [INFO] [stdout] ... | [INFO] [stdout] 458 | | .unwrap() [INFO] [stdout] 459 | | .into_iter() [INFO] [stdout] | |________________________^ [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] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 449 ~ update [INFO] [stdout] 450 ~ .query_map([], |row| { [INFO] [stdout] 451 ~ Ok(( [INFO] [stdout] 452 ~ row.get_unwrap::<_, String>(0), [INFO] [stdout] 453 ~ row.get_unwrap::<_, usize>(1), [INFO] [stdout] 454 ~ row.get_unwrap::<_, usize>(2), [INFO] [stdout] 455 ~ row.get_unwrap::<_, String>(3), [INFO] [stdout] 456 ~ )) [INFO] [stdout] 457 ~ }) [INFO] [stdout] 458 ~ .unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/compiler/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod compiler; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `HTML` contains a capitalized acronym [INFO] [stdout] --> src/compiler/compiler.rs:21:2 [INFO] [stdout] | [INFO] [stdout] 21 | HTML, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Html` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `LATEX` contains a capitalized acronym [INFO] [stdout] --> src/compiler/compiler.rs:23:2 [INFO] [stdout] | [INFO] [stdout] 23 | LATEX, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Latex` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `extend` instead of `append` for adding the full range of a second vector [INFO] [stdout] --> src/compiler/compiler.rs:101:5 [INFO] [stdout] | [INFO] [stdout] 101 | reports.extend(reps.drain(..)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `reports.append(&mut reps)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain [INFO] [stdout] = note: `#[warn(clippy::extend_with_drain)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/compiler/compiler.rs:134:24 [INFO] [stdout] | [INFO] [stdout] 134 | output.add_content(&format!( [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 135 | | "{icon}{css}", [INFO] [stdout] 136 | | self.sanitize(html.language.as_str()) [INFO] [stdout] 137 | | )); [INFO] [stdout] | |_________________^ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 134 ~ output.add_content(format!( [INFO] [stdout] 135 ~ "{icon}{css}", [INFO] [stdout] 136 ~ self.sanitize(html.language.as_str()) [INFO] [stdout] 137 ~ )); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/compiler.rs:156:4 [INFO] [stdout] | [INFO] [stdout] 156 | &unit.colors(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `unit.colors()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/elements/list/completion.rs:53:22 [INFO] [stdout] | [INFO] [stdout] 53 | insert_text: Some(format!( [INFO] [stdout] | _______________________________^ [INFO] [stdout] 54 | | "* ${{1:CONTENT}}" [INFO] [stdout] 55 | | )), [INFO] [stdout] | |_____________^ help: consider using `.to_string()`: `"* ${1:CONTENT}".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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/compiler/links.rs:12:11 [INFO] [stdout] | [INFO] [stdout] 12 | refname: &String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 12 - refname: &String, [INFO] [stdout] 12 + refname: &str, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/elements/list/completion.rs:93:22 [INFO] [stdout] | [INFO] [stdout] 93 | insert_text: Some(format!( [INFO] [stdout] | _______________________________^ [INFO] [stdout] 94 | | "- ${{1:CONTENT}}" [INFO] [stdout] 95 | | )), [INFO] [stdout] | |_____________^ help: consider using `.to_string()`: `"- ${1:CONTENT}".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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/compiler/output.rs:125:39 [INFO] [stdout] | [INFO] [stdout] 125 | if task.result.get().is_some() || !task.handle.get().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `task.handle.get().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/elements/list/rule.rs:139:5 [INFO] [stdout] | [INFO] [stdout] 139 | parsed.last_mut().map(|last| last.offset = offset); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] = note: `#[warn(clippy::option_map_unit_fn)]` on by default [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 139 - parsed.last_mut().map(|last| last.offset = offset); [INFO] [stdout] 139 + if let Some(last) = parsed.last_mut() { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/compiler/output.rs:129:8 [INFO] [stdout] | [INFO] [stdout] 129 | if task [INFO] [stdout] | ____________________^ [INFO] [stdout] 130 | | .handle [INFO] [stdout] 131 | | .get() [INFO] [stdout] 132 | | .map_or(false, |handle| handle.is_finished()) [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_some_and` instead [INFO] [stdout] | [INFO] [stdout] 132 - .map_or(false, |handle| handle.is_finished()) [INFO] [stdout] 132 + .is_some_and(|handle| handle.is_finished()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `extend` instead of `append` for adding the full range of a second vector [INFO] [stdout] --> src/compiler/output.rs:186:4 [INFO] [stdout] | [INFO] [stdout] 186 | reports.extend(err.drain(..)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `reports.append(&mut err)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/elements/list/rule.rs:352:33 [INFO] [stdout] | [INFO] [stdout] 352 | span(token.range.clone(), err.into()) [INFO] [stdout] | ^^^^^^^^^^ help: consider removing `.into()`: `err` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same postfix: `Error` [INFO] [stdout] --> src/compiler/process.rs:30:1 [INFO] [stdout] | [INFO] [stdout] 30 | / pub enum ProcessError { [INFO] [stdout] 31 | | GeneralError(String), [INFO] [stdout] 32 | | InputError(String, PathBuf), [INFO] [stdout] 33 | | LinkError(Vec), [INFO] [stdout] 34 | | CompileError(Vec), [INFO] [stdout] 35 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/compiler/process.rs:148:48 [INFO] [stdout] | [INFO] [stdout] 148 | let Some(local_path) = pathdiff::diff_paths(&input, &self.project_path) else { [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/process.rs:182:35 [INFO] [stdout] | [INFO] [stdout] 182 | ProcessQueueMessage::Skipped(&input), [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/process.rs:188:34 [INFO] [stdout] | [INFO] [stdout] 188 | ProcessQueueMessage::Parsing(&input), [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/compiler/process.rs:261:13 [INFO] [stdout] | [INFO] [stdout] 261 | .map_err(|err| ProcessError::LinkError(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `ProcessError::LinkError` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/elements/list/elem.rs:146:6 [INFO] [stdout] | [INFO] [stdout] 146 | / match &entry.bullet { [INFO] [stdout] 147 | | BulletMarker::Checkbox(state) => match state { [INFO] [stdout] 148 | | CheckboxState::Unchecked => { [INFO] [stdout] 149 | | output.add_content( [INFO] [stdout] ... | [INFO] [stdout] 164 | | _ => {} [INFO] [stdout] 165 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 146 ~ if let BulletMarker::Checkbox(state) = &entry.bullet { match state { [INFO] [stdout] 147 ~ CheckboxState::Unchecked => { [INFO] [stdout] 148 ~ output.add_content( [INFO] [stdout] 149 ~ r#""#, [INFO] [stdout] 150 ~ ); [INFO] [stdout] 151 ~ } [INFO] [stdout] 152 ~ CheckboxState::Partial => { [INFO] [stdout] 153 ~ output.add_content( [INFO] [stdout] 154 ~ r#""#, [INFO] [stdout] 155 ~ ); [INFO] [stdout] 156 ~ } [INFO] [stdout] 157 ~ CheckboxState::Checked => { [INFO] [stdout] 158 ~ output.add_content( [INFO] [stdout] 159 ~ r#""#, [INFO] [stdout] 160 ~ ); [INFO] [stdout] 161 ~ } [INFO] [stdout] 162 ~ } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/elements/linebreak/rule.rs:52:3 [INFO] [stdout] | [INFO] [stdout] 52 | return !mode.paragraph_only; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 52 - return !mode.paragraph_only; [INFO] [stdout] 52 + !mode.paragraph_only [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/elements/anchor/elem.rs:78:16 [INFO] [stdout] | [INFO] [stdout] 78 | self.refname.to_string())) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `cloned` [INFO] [stdout] --> src/elements/import/elem.rs:49:16 [INFO] [stdout] | [INFO] [stdout] 49 | for scope in self.content.iter().cloned() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] help: remove any references to the binding [INFO] [stdout] | [INFO] [stdout] 49 - for scope in self.content.iter().cloned() { [INFO] [stdout] 49 + for scope in self.content.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/elements/internal_link/rule.rs:200:17 [INFO] [stdout] | [INFO] [stdout] 200 | link_refname.to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/elements/heading/elem.rs:73:14 [INFO] [stdout] | [INFO] [stdout] 73 | cause: Arc::new(mlua::Error::RuntimeError( [INFO] [stdout] | ________________________________^ [INFO] [stdout] 74 | | "Expected an internal reference name".into(), [INFO] [stdout] 75 | | )), [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Error` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Error` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] = note: `#[warn(clippy::arc_with_non_send_sync)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/elements/list/completion.rs:53:22 [INFO] [stdout] | [INFO] [stdout] 53 | insert_text: Some(format!( [INFO] [stdout] | _______________________________^ [INFO] [stdout] 54 | | "* ${{1:CONTENT}}" [INFO] [stdout] 55 | | )), [INFO] [stdout] | |_____________^ help: consider using `.to_string()`: `"* ${1:CONTENT}".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: useless use of `format!` [INFO] [stdout] --> src/elements/list/completion.rs:93:22 [INFO] [stdout] | [INFO] [stdout] 93 | insert_text: Some(format!( [INFO] [stdout] | _______________________________^ [INFO] [stdout] 94 | | "- ${{1:CONTENT}}" [INFO] [stdout] 95 | | )), [INFO] [stdout] | |_____________^ help: consider using `.to_string()`: `"- ${1:CONTENT}".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] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/elements/heading/elem.rs:133:14 [INFO] [stdout] | [INFO] [stdout] 133 | cause: Arc::new(mlua::Error::RuntimeError( [INFO] [stdout] | ________________________________^ [INFO] [stdout] 134 | | "Expected an internal reference name".into(), [INFO] [stdout] 135 | | )), [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Error` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Error` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/elements/list/rule.rs:139:5 [INFO] [stdout] | [INFO] [stdout] 139 | parsed.last_mut().map(|last| last.offset = offset); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] = note: `#[warn(clippy::option_map_unit_fn)]` on by default [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 139 - parsed.last_mut().map(|last| last.offset = offset); [INFO] [stdout] 139 + if let Some(last) = parsed.last_mut() { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/elements/list/rule.rs:352:33 [INFO] [stdout] | [INFO] [stdout] 352 | span(token.range.clone(), err.into()) [INFO] [stdout] | ^^^^^^^^^^ help: consider removing `.into()`: `err` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/elements/heading/elem.rs:201:26 [INFO] [stdout] | [INFO] [stdout] 201 | for (scope, elem) in (&self.display[0]).content_iter(false) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `self.display[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method chain can be written more clearly with `if .. else ..` [INFO] [stdout] --> src/elements/style/custom.rs:28:24 [INFO] [stdout] | [INFO] [stdout] 28 | ... Target::HTML => enable.then_some("").unwrap_or(""), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if enable { "" } else { "" }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else [INFO] [stdout] = note: `#[warn(clippy::obfuscated_if_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method chain can be written more clearly with `if .. else ..` [INFO] [stdout] --> src/elements/style/custom.rs:40:24 [INFO] [stdout] | [INFO] [stdout] 40 | ... Target::HTML => enable.then_some("").unwrap_or(""), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if enable { "" } else { "" }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method chain can be written more clearly with `if .. else ..` [INFO] [stdout] --> src/elements/style/custom.rs:52:24 [INFO] [stdout] | [INFO] [stdout] 52 | ... Target::HTML => enable.then_some("").unwrap_or(""), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if enable { "" } else { "" }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method chain can be written more clearly with `if .. else ..` [INFO] [stdout] --> src/elements/style/custom.rs:64:24 [INFO] [stdout] | [INFO] [stdout] 64 | ... Target::HTML => enable.then_some("").unwrap_or(""), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if enable { "" } else { "" }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/elements/style/rule.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::usize; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/elements/style/rule.rs:92:4 [INFO] [stdout] | [INFO] [stdout] 92 | / let Some(matched) = matched_rule else { [INFO] [stdout] 93 | | return None; [INFO] [stdout] 94 | | }; [INFO] [stdout] | |______________^ help: replace it with: `let matched = matched_rule?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/elements/style/state.rs:33:22 [INFO] [stdout] | [INFO] [stdout] 33 | pub(crate) compile: Arc< [INFO] [stdout] | _________________________^ [INFO] [stdout] 34 | | dyn Fn(bool, Arc>, &Compiler, &mut CompilerOutput) -> Result<(), Vec> [INFO] [stdout] 35 | | + Send [INFO] [stdout] 36 | | + Sync, [INFO] [stdout] 37 | | >, [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/elements/list/elem.rs:146:6 [INFO] [stdout] | [INFO] [stdout] 146 | / match &entry.bullet { [INFO] [stdout] 147 | | BulletMarker::Checkbox(state) => match state { [INFO] [stdout] 148 | | CheckboxState::Unchecked => { [INFO] [stdout] 149 | | output.add_content( [INFO] [stdout] ... | [INFO] [stdout] 164 | | _ => {} [INFO] [stdout] 165 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 146 ~ if let BulletMarker::Checkbox(state) = &entry.bullet { match state { [INFO] [stdout] 147 ~ CheckboxState::Unchecked => { [INFO] [stdout] 148 ~ output.add_content( [INFO] [stdout] 149 ~ r#""#, [INFO] [stdout] 150 ~ ); [INFO] [stdout] 151 ~ } [INFO] [stdout] 152 ~ CheckboxState::Partial => { [INFO] [stdout] 153 ~ output.add_content( [INFO] [stdout] 154 ~ r#""#, [INFO] [stdout] 155 ~ ); [INFO] [stdout] 156 ~ } [INFO] [stdout] 157 ~ CheckboxState::Checked => { [INFO] [stdout] 158 ~ output.add_content( [INFO] [stdout] 159 ~ r#""#, [INFO] [stdout] 160 ~ ); [INFO] [stdout] 161 ~ } [INFO] [stdout] 162 ~ } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/elements/linebreak/rule.rs:52:3 [INFO] [stdout] | [INFO] [stdout] 52 | return !mode.paragraph_only; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 52 - return !mode.paragraph_only; [INFO] [stdout] 52 + !mode.paragraph_only [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/elements/anchor/elem.rs:78:16 [INFO] [stdout] | [INFO] [stdout] 78 | self.refname.to_string())) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/elements/layout/custom.rs:162:25 [INFO] [stdout] | [INFO] [stdout] 162 | output.add_content(format!(r#"
"#)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `r#"
"#.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] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/elements/internal_link/rule.rs:200:17 [INFO] [stdout] | [INFO] [stdout] 200 | link_refname.to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/elements/heading/elem.rs:73:14 [INFO] [stdout] | [INFO] [stdout] 73 | cause: Arc::new(mlua::Error::RuntimeError( [INFO] [stdout] | ________________________________^ [INFO] [stdout] 74 | | "Expected an internal reference name".into(), [INFO] [stdout] 75 | | )), [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Error` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Error` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] = note: `#[warn(clippy::arc_with_non_send_sync)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method chain can be written more clearly with `if .. else ..` [INFO] [stdout] --> src/elements/lua/completion.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 67 | context_triggered(context, ":").then_some("").unwrap_or(":") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if context_triggered(context, ":") { "" } else { ":" }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/elements/lua/completion.rs:112:22 [INFO] [stdout] | [INFO] [stdout] 112 | insert_text: Some(format!("{{:lua ${{1:CONTENT}}:}}",)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"{:lua ${1:CONTENT}:}".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] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/elements/heading/elem.rs:133:14 [INFO] [stdout] | [INFO] [stdout] 133 | cause: Arc::new(mlua::Error::RuntimeError( [INFO] [stdout] | ________________________________^ [INFO] [stdout] 134 | | "Expected an internal reference name".into(), [INFO] [stdout] 135 | | )), [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Error` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Error` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/elements/lua/custom.rs:48:1 [INFO] [stdout] | [INFO] [stdout] 48 | / impl Default for LuaData { [INFO] [stdout] 49 | | fn default() -> Self { [INFO] [stdout] 50 | | Self { [INFO] [stdout] 51 | | registered: HashMap::default(), [INFO] [stdout] ... | [INFO] [stdout] 54 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 16 + #[derive(Default)] [INFO] [stdout] 17 | pub struct LuaData { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/elements/heading/elem.rs:201:26 [INFO] [stdout] | [INFO] [stdout] 201 | for (scope, elem) in (&self.display[0]).content_iter(false) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `self.display[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/elements/lua/rule.rs:143:61 [INFO] [stdout] | [INFO] [stdout] 143 | let Some(newline) = source.content()[content_end..].find(|c| c == '\n') else { [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider using a `char`: `'\n'` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] = note: `#[warn(clippy::manual_pattern_char_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method chain can be written more clearly with `if .. else ..` [INFO] [stdout] --> src/elements/style/custom.rs:28:24 [INFO] [stdout] | [INFO] [stdout] 28 | ... Target::HTML => enable.then_some("").unwrap_or(""), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if enable { "" } else { "" }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else [INFO] [stdout] = note: `#[warn(clippy::obfuscated_if_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method chain can be written more clearly with `if .. else ..` [INFO] [stdout] --> src/elements/style/custom.rs:40:24 [INFO] [stdout] | [INFO] [stdout] 40 | ... Target::HTML => enable.then_some("").unwrap_or(""), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if enable { "" } else { "" }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/elements/lua/rule.rs:191:62 [INFO] [stdout] | [INFO] [stdout] 191 | let ctx = KernelContext::new(lua_source.clone().into(), &*kernel, unit); [INFO] [stdout] | ^^^^^^^^ help: try: `&kernel` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method chain can be written more clearly with `if .. else ..` [INFO] [stdout] --> src/elements/style/custom.rs:52:24 [INFO] [stdout] | [INFO] [stdout] 52 | ... Target::HTML => enable.then_some("").unwrap_or(""), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if enable { "" } else { "" }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method chain can be written more clearly with `if .. else ..` [INFO] [stdout] --> src/elements/style/custom.rs:64:24 [INFO] [stdout] | [INFO] [stdout] 64 | ... Target::HTML => enable.then_some("").unwrap_or(""), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if enable { "" } else { "" }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/elements/style/rule.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::usize; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/elements/style/rule.rs:92:4 [INFO] [stdout] | [INFO] [stdout] 92 | / let Some(matched) = matched_rule else { [INFO] [stdout] 93 | | return None; [INFO] [stdout] 94 | | }; [INFO] [stdout] | |______________^ help: replace it with: `let matched = matched_rule?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/elements/style/state.rs:33:22 [INFO] [stdout] | [INFO] [stdout] 33 | pub(crate) compile: Arc< [INFO] [stdout] | _________________________^ [INFO] [stdout] 34 | | dyn Fn(bool, Arc>, &Compiler, &mut CompilerOutput) -> Result<(), Vec> [INFO] [stdout] 35 | | + Send [INFO] [stdout] 36 | | + Sync, [INFO] [stdout] 37 | | >, [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/elements/lua/rule.rs:396:62 [INFO] [stdout] | [INFO] [stdout] 396 | let ctx = KernelContext::new(lua_source.clone().into(), &*kernel, unit); [INFO] [stdout] | ^^^^^^^^ help: try: `&kernel` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/elements/layout/custom.rs:162:25 [INFO] [stdout] | [INFO] [stdout] 162 | output.add_content(format!(r#"
"#)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `r#"
"#.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] [INFO] [stdout] [INFO] [stdout] warning: this method chain can be written more clearly with `if .. else ..` [INFO] [stdout] --> src/elements/lua/completion.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 67 | context_triggered(context, ":").then_some("").unwrap_or(":") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if context_triggered(context, ":") { "" } else { ":" }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/elements/lua/completion.rs:112:22 [INFO] [stdout] | [INFO] [stdout] 112 | insert_text: Some(format!("{{:lua ${{1:CONTENT}}:}}",)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"{:lua ${1:CONTENT}:}".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] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/elements/lua/custom.rs:48:1 [INFO] [stdout] | [INFO] [stdout] 48 | / impl Default for LuaData { [INFO] [stdout] 49 | | fn default() -> Self { [INFO] [stdout] 50 | | Self { [INFO] [stdout] 51 | | registered: HashMap::default(), [INFO] [stdout] ... | [INFO] [stdout] 54 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 16 + #[derive(Default)] [INFO] [stdout] 17 | pub struct LuaData { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/elements/lua/rule.rs:143:61 [INFO] [stdout] | [INFO] [stdout] 143 | let Some(newline) = source.content()[content_end..].find(|c| c == '\n') else { [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider using a `char`: `'\n'` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] = note: `#[warn(clippy::manual_pattern_char_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/elements/lua/rule.rs:191:62 [INFO] [stdout] | [INFO] [stdout] 191 | let ctx = KernelContext::new(lua_source.clone().into(), &*kernel, unit); [INFO] [stdout] | ^^^^^^^^ help: try: `&kernel` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/elements/lua/rule.rs:396:62 [INFO] [stdout] | [INFO] [stdout] 396 | let ctx = KernelContext::new(lua_source.clone().into(), &*kernel, unit); [INFO] [stdout] | ^^^^^^^^ help: try: `&kernel` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/elements/lua/elem.rs:82:17 [INFO] [stdout] | [INFO] [stdout] 82 | pub fn process<'ctx>(&self, unit: &mut TranslationUnit) { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/elements/lua/elem.rs:90:63 [INFO] [stdout] | [INFO] [stdout] 90 | let ctx = KernelContext::new(self.source.clone().into(), &*kernel, unit); [INFO] [stdout] | ^^^^^^^^ help: try: `&kernel` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/elements/lua/elem.rs:172:24 [INFO] [stdout] | [INFO] [stdout] 172 | for (scope, elem) in (&content[0]).content_iter(false) { [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `content[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/elements/variable/rule.rs:41:3 [INFO] [stdout] | [INFO] [stdout] 41 | / let Some((pos, c)) = it.next() else { [INFO] [stdout] 42 | | return None; [INFO] [stdout] 43 | | }; [INFO] [stdout] | |__________^ help: replace it with: `let (pos, c) = it.next()?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/elements/variable/rule.rs:343:3 [INFO] [stdout] | [INFO] [stdout] 343 | return cursor.at(end_pos + value_len + 2 * delim.len()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 343 - return cursor.at(end_pos + value_len + 2 * delim.len()); [INFO] [stdout] 343 + cursor.at(end_pos + value_len + 2 * delim.len()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/elements/lua/elem.rs:82:17 [INFO] [stdout] | [INFO] [stdout] 82 | pub fn process<'ctx>(&self, unit: &mut TranslationUnit) { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/elements/lua/elem.rs:90:63 [INFO] [stdout] | [INFO] [stdout] 90 | let ctx = KernelContext::new(self.source.clone().into(), &*kernel, unit); [INFO] [stdout] | ^^^^^^^^ help: try: `&kernel` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/elements/variable/rule.rs:326:5 [INFO] [stdout] | [INFO] [stdout] 326 | content[content_range.clone()].to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `&content[content_range.clone()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/elements/lua/elem.rs:172:24 [INFO] [stdout] | [INFO] [stdout] 172 | for (scope, elem) in (&content[0]).content_iter(false) { [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `content[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/elements/variable/rule.rs:41:3 [INFO] [stdout] | [INFO] [stdout] 41 | / let Some((pos, c)) = it.next() else { [INFO] [stdout] 42 | | return None; [INFO] [stdout] 43 | | }; [INFO] [stdout] | |__________^ help: replace it with: `let (pos, c) = it.next()?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/elements/variable/rule.rs:343:3 [INFO] [stdout] | [INFO] [stdout] 343 | return cursor.at(end_pos + value_len + 2 * delim.len()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 343 - return cursor.at(end_pos + value_len + 2 * delim.len()); [INFO] [stdout] 343 + cursor.at(end_pos + value_len + 2 * delim.len()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'u [INFO] [stdout] --> src/elements/variable/rule.rs:383:20 [INFO] [stdout] | [INFO] [stdout] 383 | fn on_regex_match<'u>( [INFO] [stdout] | ^^ [INFO] [stdout] ... [INFO] [stdout] 386 | unit: &'u mut TranslationUnit, [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 383 ~ fn on_regex_match( [INFO] [stdout] 384 | &self, [INFO] [stdout] 385 | _index: usize, [INFO] [stdout] 386 ~ unit: &mut TranslationUnit, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/elements/media/rule.rs:86:3 [INFO] [stdout] | [INFO] [stdout] 86 | return !mode.paragraph_only; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 86 - return !mode.paragraph_only; [INFO] [stdout] 86 + !mode.paragraph_only [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/elements/media/rule.rs:137:34 [INFO] [stdout] | [INFO] [stdout] 137 | span(refname_group.range(), err.into()) [INFO] [stdout] | ^^^^^^^^^^ help: consider removing `.into()`: `err` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/elements/variable/rule.rs:326:5 [INFO] [stdout] | [INFO] [stdout] 326 | content[content_range.clone()].to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `&content[content_range.clone()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/elements/media/rule.rs:344:11 [INFO] [stdout] | [INFO] [stdout] 344 | if let Some(_) = elem.downcast_ref::() { [INFO] [stdout] | -------^^^^^^^------------------------------------ help: try: `if elem.downcast_ref::().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'u [INFO] [stdout] --> src/elements/variable/rule.rs:383:20 [INFO] [stdout] | [INFO] [stdout] 383 | fn on_regex_match<'u>( [INFO] [stdout] | ^^ [INFO] [stdout] ... [INFO] [stdout] 386 | unit: &'u mut TranslationUnit, [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 383 ~ fn on_regex_match( [INFO] [stdout] 384 | &self, [INFO] [stdout] 385 | _index: usize, [INFO] [stdout] 386 ~ unit: &mut TranslationUnit, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/elements/media/rule.rs:86:3 [INFO] [stdout] | [INFO] [stdout] 86 | return !mode.paragraph_only; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 86 - return !mode.paragraph_only; [INFO] [stdout] 86 + !mode.paragraph_only [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/elements/media/rule.rs:137:34 [INFO] [stdout] | [INFO] [stdout] 137 | span(refname_group.range(), err.into()) [INFO] [stdout] | ^^^^^^^^^^ help: consider removing `.into()`: `err` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/elements/media/rule.rs:344:11 [INFO] [stdout] | [INFO] [stdout] 344 | if let Some(_) = elem.downcast_ref::() { [INFO] [stdout] | -------^^^^^^^------------------------------------ help: try: `if elem.downcast_ref::().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CSS` contains a capitalized acronym [INFO] [stdout] --> src/layout/size.rs:10:2 [INFO] [stdout] | [INFO] [stdout] 10 | CSS, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Css` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value [INFO] [stdout] --> src/layout/size.rs:21:19 [INFO] [stdout] | [INFO] [stdout] 21 | pub fn to_output(&self, output: SizeOutput) -> String { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct implementation of `ToString` [INFO] [stdout] --> src/layout/size.rs:33:1 [INFO] [stdout] | [INFO] [stdout] 33 | / impl ToString for Size { [INFO] [stdout] 34 | | fn to_string(&self) -> String { [INFO] [stdout] 35 | | match self { [INFO] [stdout] 36 | | Size::Em(s) => format!("{s}em"), [INFO] [stdout] ... | [INFO] [stdout] 41 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] = note: `#[warn(clippy::to_string_trait_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/size.rs:64:12 [INFO] [stdout] | [INFO] [stdout] 64 | unit => return Err(format!("Unknown unit type: {}", unit)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 64 - unit => return Err(format!("Unknown unit type: {}", unit)), [INFO] [stdout] 64 + unit => Err(format!("Unknown unit type: {}", unit)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/layout/size.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | err.to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'lsp [INFO] [stdout] --> src/lsp/data.rs:105:20 [INFO] [stdout] | [INFO] [stdout] 105 | pub fn get_source<'lsp>(&'lsp self, name: &Path) -> Option> { [INFO] [stdout] | ^^^^ ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 105 - pub fn get_source<'lsp>(&'lsp self, name: &Path) -> Option> { [INFO] [stdout] 105 + pub fn get_source(&self, name: &Path) -> Option> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lsp/data.rs:124:3 [INFO] [stdout] | [INFO] [stdout] 124 | / match Semantics::from_source(source, self) { [INFO] [stdout] 125 | | Some(sems) => Some(f(&sems, &self.semantic_tokens)), [INFO] [stdout] 126 | | None => None, [INFO] [stdout] 127 | | } [INFO] [stdout] | |_________^ help: try: `Semantics::from_source(source, self).map(|sems| f(&sems, &self.semantic_tokens))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'lsp [INFO] [stdout] --> src/lsp/data.rs:130:24 [INFO] [stdout] | [INFO] [stdout] 130 | pub fn add_definition<'lsp>(&'lsp self, source: Token, target: &Token) { [INFO] [stdout] | ^^^^ ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 130 - pub fn add_definition<'lsp>(&'lsp self, source: Token, target: &Token) { [INFO] [stdout] 130 + pub fn add_definition(&self, source: Token, target: &Token) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'lsp [INFO] [stdout] --> src/lsp/data.rs:134:19 [INFO] [stdout] | [INFO] [stdout] 134 | pub fn add_hover<'lsp>(&'lsp self, range: Token, content: String) { [INFO] [stdout] | ^^^^ ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 134 - pub fn add_hover<'lsp>(&'lsp self, range: Token, content: String) { [INFO] [stdout] 134 + pub fn add_hover(&self, range: Token, content: String) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'lsp [INFO] [stdout] --> src/lsp/data.rs:145:21 [INFO] [stdout] | [INFO] [stdout] 145 | pub fn add_conceal<'lsp>(&'lsp self, range: Token, conceal: ConcealTarget) { [INFO] [stdout] | ^^^^ ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 145 - pub fn add_conceal<'lsp>(&'lsp self, range: Token, conceal: ConcealTarget) { [INFO] [stdout] 145 + pub fn add_conceal(&self, range: Token, conceal: ConcealTarget) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'lsp [INFO] [stdout] --> src/lsp/data.rs:153:19 [INFO] [stdout] | [INFO] [stdout] 153 | pub fn add_range<'lsp>( [INFO] [stdout] | ^^^^ [INFO] [stdout] 154 | &'lsp self, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 153 ~ pub fn add_range( [INFO] [stdout] 154 ~ &self, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'lsp [INFO] [stdout] --> src/lsp/definition.rs:26:21 [INFO] [stdout] | [INFO] [stdout] 26 | fn from_source_impl<'lsp>( [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 29 | lsp: &'lsp LangServerData, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 26 ~ fn from_source_impl( [INFO] [stdout] 27 | source: Arc, [INFO] [stdout] 28 | target: &Token, [INFO] [stdout] 29 ~ lsp: &LangServerData, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lsp/definition.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 46 | } else if !source.downcast_ref::().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `source.downcast_ref::().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'lsp [INFO] [stdout] --> src/lsp/definition.rs:104:27 [INFO] [stdout] | [INFO] [stdout] 104 | pub(crate) fn from_source<'lsp>(source: Token, target: &Token, lsp: &'lsp LangServerData) { [INFO] [stdout] | ^^^^ ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 104 - pub(crate) fn from_source<'lsp>(source: Token, target: &Token, lsp: &'lsp LangServerData) { [INFO] [stdout] 104 + pub(crate) fn from_source(source: Token, target: &Token, lsp: &LangServerData) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lsp/semantic.rs:264:22 [INFO] [stdout] | [INFO] [stdout] 264 | pub semantic_queue: RwLock, (u32, u32))>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'lsp [INFO] [stdout] --> src/lsp/data.rs:105:20 [INFO] [stdout] | [INFO] [stdout] 105 | pub fn get_source<'lsp>(&'lsp self, name: &Path) -> Option> { [INFO] [stdout] | ^^^^ ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 105 - pub fn get_source<'lsp>(&'lsp self, name: &Path) -> Option> { [INFO] [stdout] 105 + pub fn get_source(&self, name: &Path) -> Option> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lsp/data.rs:124:3 [INFO] [stdout] | [INFO] [stdout] 124 | / match Semantics::from_source(source, self) { [INFO] [stdout] 125 | | Some(sems) => Some(f(&sems, &self.semantic_tokens)), [INFO] [stdout] 126 | | None => None, [INFO] [stdout] 127 | | } [INFO] [stdout] | |_________^ help: try: `Semantics::from_source(source, self).map(|sems| f(&sems, &self.semantic_tokens))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'lsp [INFO] [stdout] --> src/lsp/data.rs:130:24 [INFO] [stdout] | [INFO] [stdout] 130 | pub fn add_definition<'lsp>(&'lsp self, source: Token, target: &Token) { [INFO] [stdout] | ^^^^ ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 130 - pub fn add_definition<'lsp>(&'lsp self, source: Token, target: &Token) { [INFO] [stdout] 130 + pub fn add_definition(&self, source: Token, target: &Token) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'lsp [INFO] [stdout] --> src/lsp/data.rs:134:19 [INFO] [stdout] | [INFO] [stdout] 134 | pub fn add_hover<'lsp>(&'lsp self, range: Token, content: String) { [INFO] [stdout] | ^^^^ ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 134 - pub fn add_hover<'lsp>(&'lsp self, range: Token, content: String) { [INFO] [stdout] 134 + pub fn add_hover(&self, range: Token, content: String) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'lsp [INFO] [stdout] --> src/lsp/data.rs:145:21 [INFO] [stdout] | [INFO] [stdout] 145 | pub fn add_conceal<'lsp>(&'lsp self, range: Token, conceal: ConcealTarget) { [INFO] [stdout] | ^^^^ ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 145 - pub fn add_conceal<'lsp>(&'lsp self, range: Token, conceal: ConcealTarget) { [INFO] [stdout] 145 + pub fn add_conceal(&self, range: Token, conceal: ConcealTarget) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'lsp [INFO] [stdout] --> src/lsp/data.rs:153:19 [INFO] [stdout] | [INFO] [stdout] 153 | pub fn add_range<'lsp>( [INFO] [stdout] | ^^^^ [INFO] [stdout] 154 | &'lsp self, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 153 ~ pub fn add_range( [INFO] [stdout] 154 ~ &self, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'lsp [INFO] [stdout] --> src/lsp/definition.rs:26:21 [INFO] [stdout] | [INFO] [stdout] 26 | fn from_source_impl<'lsp>( [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 29 | lsp: &'lsp LangServerData, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 26 ~ fn from_source_impl( [INFO] [stdout] 27 | source: Arc, [INFO] [stdout] 28 | target: &Token, [INFO] [stdout] 29 ~ lsp: &LangServerData, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lsp/definition.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 46 | } else if !source.downcast_ref::().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `source.downcast_ref::().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'lsp [INFO] [stdout] --> src/lsp/definition.rs:104:27 [INFO] [stdout] | [INFO] [stdout] 104 | pub(crate) fn from_source<'lsp>(source: Token, target: &Token, lsp: &'lsp LangServerData) { [INFO] [stdout] | ^^^^ ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 104 - pub(crate) fn from_source<'lsp>(source: Token, target: &Token, lsp: &'lsp LangServerData) { [INFO] [stdout] 104 + pub(crate) fn from_source(source: Token, target: &Token, lsp: &LangServerData) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/lua/wrappers/scope.rs:65:14 [INFO] [stdout] | [INFO] [stdout] 65 | cause: Arc::new(mlua::Error::RuntimeError("Index out of bounds".into())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Error` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Error` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lsp/semantic.rs:264:22 [INFO] [stdout] | [INFO] [stdout] 264 | pub semantic_queue: RwLock, (u32, u32))>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/lua/wrappers/scope.rs:65:14 [INFO] [stdout] | [INFO] [stdout] 65 | cause: Arc::new(mlua::Error::RuntimeError("Index out of bounds".into())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Error` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Error` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/lua/wrappers/internal_reference.rs:60:14 [INFO] [stdout] | [INFO] [stdout] 60 | cause: Arc::new(mlua::Error::RuntimeError( [INFO] [stdout] | ________________________________^ [INFO] [stdout] 61 | | "Expected an internal reference name".into(), [INFO] [stdout] 62 | | )), [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Error` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Error` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lua/wrappers.rs:48:32 [INFO] [stdout] | [INFO] [stdout] 48 | pub struct IteratorWrapper(pub Box>, Arc)>>); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lua/kernel.rs:42:16 [INFO] [stdout] | [INFO] [stdout] 42 | return Err(format!("Kernel names cannot contain control sequences")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Kernel names cannot contain control sequences".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] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lua/kernel.rs:91:16 [INFO] [stdout] | [INFO] [stdout] 91 | return Err(format!("Kernel names cannot contain control sequences")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Kernel names cannot contain control sequences".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] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lua/kernel.rs:204:53 [INFO] [stdout] | [INFO] [stdout] 204 | let wrapper = lua.create_userdata(UnitWrapper(&mut ctx_ref.unit))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `ctx_ref.unit` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/lua/kernel.rs:222:18 [INFO] [stdout] | [INFO] [stdout] 222 | ... .map_err(|err| mlua::Error::RuntimeError(err)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `mlua::Error::RuntimeError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lua/kernel.rs:399:11 [INFO] [stdout] | [INFO] [stdout] 399 | pub fun: std::sync::Arc< [INFO] [stdout] | ______________^ [INFO] [stdout] 400 | | dyn Fn(&Lua, mlua::MultiValue) -> mlua::Result [INFO] [stdout] 401 | | + Send [INFO] [stdout] 402 | | + Sync, [INFO] [stdout] 403 | | >, [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lua/kernel.rs:411:6 [INFO] [stdout] | [INFO] [stdout] 411 | ) -> std::sync::Arc< [INFO] [stdout] | ______^ [INFO] [stdout] 412 | | dyn Fn( [INFO] [stdout] 413 | | &mlua::Lua, [INFO] [stdout] 414 | | mlua::MultiValue, [INFO] [stdout] ... | [INFO] [stdout] 417 | | + Sync, [INFO] [stdout] 418 | | > [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lua/kernel.rs:452:6 [INFO] [stdout] | [INFO] [stdout] 452 | ) -> std::sync::Arc< [INFO] [stdout] | ______^ [INFO] [stdout] 453 | | dyn for<'lua> Fn( [INFO] [stdout] 454 | | &'lua mlua::Lua, [INFO] [stdout] 455 | | mlua::MultiValue, [INFO] [stdout] ... | [INFO] [stdout] 458 | | + Sync, [INFO] [stdout] 459 | | > [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lua/doc.rs:116:14 [INFO] [stdout] | [INFO] [stdout] 116 | args += &format!("{name}"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `name.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] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/lua/doc.rs:118:24 [INFO] [stdout] | [INFO] [stdout] 118 | if !doc.is_empty() { [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 119 | | docs += &format!("--- @param {arg} {doc}\n"); [INFO] [stdout] 120 | | } else { [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/lua/doc.rs:120:12 [INFO] [stdout] | [INFO] [stdout] 120 | } else { [INFO] [stdout] | ________________________^ [INFO] [stdout] 121 | | docs += &format!("--- @param {arg} {doc}\n"); [INFO] [stdout] 122 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lua/doc.rs:126:13 [INFO] [stdout] | [INFO] [stdout] 126 | args += format!("{arg}").as_str(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `arg.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] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/lua/wrappers/internal_reference.rs:60:14 [INFO] [stdout] | [INFO] [stdout] 60 | cause: Arc::new(mlua::Error::RuntimeError( [INFO] [stdout] | ________________________________^ [INFO] [stdout] 61 | | "Expected an internal reference name".into(), [INFO] [stdout] 62 | | )), [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Error` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Error` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/parser/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod parser; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/parser/parser.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::usize; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/parser/parser.rs:39:6 [INFO] [stdout] | [INFO] [stdout] 39 | /// If the winning match is None, it means that the document has no more [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 39 | /// If the winning match is None, it means that the document has no more [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/parser/parser.rs:40:6 [INFO] [stdout] | [INFO] [stdout] 40 | /// rule to match. I.e The rest of the content should be added as a [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 40 | /// rule to match. I.e The rest of the content should be added as a [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/parser/parser.rs:41:6 [INFO] [stdout] | [INFO] [stdout] 41 | /// [`crate::elements::text::elem::Text`] element. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 41 | /// [`crate::elements::text::elem::Text`] element. [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/parser/parser.rs:42:6 [INFO] [stdout] | [INFO] [stdout] 42 | /// The match data should be passed to the [`Rule::on_match`] method. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 42 | /// The match data should be passed to the [`Rule::on_match`] method. [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/parser/parser.rs:62:7 [INFO] [stdout] | [INFO] [stdout] 62 | ) -> Option<( [INFO] [stdout] | __________^ [INFO] [stdout] 63 | | Cursor, [INFO] [stdout] 64 | | &Box, [INFO] [stdout] 65 | | Box, [INFO] [stdout] 66 | | )> { [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lua/wrappers.rs:48:32 [INFO] [stdout] | [INFO] [stdout] 48 | pub struct IteratorWrapper(pub Box>, Arc)>>); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/parser/parser.rs:157:3 [INFO] [stdout] | [INFO] [stdout] 157 | return Some((cursor.at(next), &self.rules[best_idx], state.matches[best_idx].1.take().unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 157 - return Some((cursor.at(next), &self.rules[best_idx], state.matches[best_idx].1.take().unwrap())); [INFO] [stdout] 157 + Some((cursor.at(next), &self.rules[best_idx], state.matches[best_idx].1.take().unwrap())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lua/kernel.rs:42:16 [INFO] [stdout] | [INFO] [stdout] 42 | return Err(format!("Kernel names cannot contain control sequences")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Kernel names cannot contain control sequences".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] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'u [INFO] [stdout] --> src/parser/parser.rs:161:14 [INFO] [stdout] | [INFO] [stdout] 161 | fn add_text<'u>(&'u self, unit: &mut TranslationUnit, range: Range) { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 161 - fn add_text<'u>(&'u self, unit: &mut TranslationUnit, range: Range) { [INFO] [stdout] 161 + fn add_text(&self, unit: &mut TranslationUnit, range: Range) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/parser/parser.rs:190:37 [INFO] [stdout] | [INFO] [stdout] 190 | unit.add_content(Text::new(token, content.into())); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider removing `.into()`: `content` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::sync::Arc` [INFO] [stdout] --> src/parser/parser.rs:195:35 [INFO] [stdout] | [INFO] [stdout] 195 | let mut cursor = Cursor::new(0, Arc::as_ref(unit.get_scope()).read().source().into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `Arc::as_ref(unit.get_scope()).read().source()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lua/kernel.rs:91:16 [INFO] [stdout] | [INFO] [stdout] 91 | return Err(format!("Kernel names cannot contain control sequences")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Kernel names cannot contain control sequences".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] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/parser/property.rs:74:6 [INFO] [stdout] | [INFO] [stdout] 74 | /// (Note) In this case, reports should have been set [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 74 | /// (Note) In this case, reports should have been set [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lua/kernel.rs:204:53 [INFO] [stdout] | [INFO] [stdout] 204 | let wrapper = lua.create_userdata(UnitWrapper(&mut ctx_ref.unit))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `ctx_ref.unit` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/lua/kernel.rs:222:18 [INFO] [stdout] | [INFO] [stdout] 222 | ... .map_err(|err| mlua::Error::RuntimeError(err)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `mlua::Error::RuntimeError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/parser/property.rs:118:6 [INFO] [stdout] | [INFO] [stdout] 118 | /// (Note) In this case, reports should have been set [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 118 | /// (Note) In this case, reports should have been set [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/parser/property.rs:196:6 [INFO] [stdout] | [INFO] [stdout] 196 | /// (Note) In this case, reports should have been set [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 196 | /// (Note) In this case, reports should have been set [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/parser/property.rs:282:19 [INFO] [stdout] | [INFO] [stdout] 282 | pub fn parse<'s, 'u>( [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lua/kernel.rs:399:11 [INFO] [stdout] | [INFO] [stdout] 399 | pub fun: std::sync::Arc< [INFO] [stdout] | ______________^ [INFO] [stdout] 400 | | dyn Fn(&Lua, mlua::MultiValue) -> mlua::Result [INFO] [stdout] 401 | | + Send [INFO] [stdout] 402 | | + Sync, [INFO] [stdout] 403 | | >, [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lua/kernel.rs:411:6 [INFO] [stdout] | [INFO] [stdout] 411 | ) -> std::sync::Arc< [INFO] [stdout] | ______^ [INFO] [stdout] 412 | | dyn Fn( [INFO] [stdout] 413 | | &mlua::Lua, [INFO] [stdout] 414 | | mlua::MultiValue, [INFO] [stdout] ... | [INFO] [stdout] 417 | | + Sync, [INFO] [stdout] 418 | | > [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lua/kernel.rs:452:6 [INFO] [stdout] | [INFO] [stdout] 452 | ) -> std::sync::Arc< [INFO] [stdout] | ______^ [INFO] [stdout] 453 | | dyn for<'lua> Fn( [INFO] [stdout] 454 | | &'lua mlua::Lua, [INFO] [stdout] 455 | | mlua::MultiValue, [INFO] [stdout] ... | [INFO] [stdout] 458 | | + Sync, [INFO] [stdout] 459 | | > [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/parser/property.rs:366:9 [INFO] [stdout] | [INFO] [stdout] 366 | if escaped % 2 == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace with: `escaped.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lua/doc.rs:116:14 [INFO] [stdout] | [INFO] [stdout] 116 | args += &format!("{name}"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `name.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] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/lua/doc.rs:118:24 [INFO] [stdout] | [INFO] [stdout] 118 | if !doc.is_empty() { [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 119 | | docs += &format!("--- @param {arg} {doc}\n"); [INFO] [stdout] 120 | | } else { [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/lua/doc.rs:120:12 [INFO] [stdout] | [INFO] [stdout] 120 | } else { [INFO] [stdout] | ________________________^ [INFO] [stdout] 121 | | docs += &format!("--- @param {arg} {doc}\n"); [INFO] [stdout] 122 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lua/doc.rs:126:13 [INFO] [stdout] | [INFO] [stdout] 126 | args += format!("{arg}").as_str(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `arg.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] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/parser/property.rs:473:25 [INFO] [stdout] | [INFO] [stdout] 473 | pub fn parse_token<'s, 'u>( [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/parser/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod parser; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/parser/reports.rs:128:3 [INFO] [stdout] | [INFO] [stdout] 128 | self, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/parser/reports.rs:130:7 [INFO] [stdout] | [INFO] [stdout] 130 | ) -> ( [INFO] [stdout] | __________^ [INFO] [stdout] 131 | | ariadne::Report<'static, (Arc, Range)>, [INFO] [stdout] 132 | | impl ariadne::Cache>, [INFO] [stdout] 133 | | ) { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/parser/parser.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::usize; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/parser/parser.rs:39:6 [INFO] [stdout] | [INFO] [stdout] 39 | /// If the winning match is None, it means that the document has no more [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 39 | /// If the winning match is None, it means that the document has no more [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/parser/parser.rs:40:6 [INFO] [stdout] | [INFO] [stdout] 40 | /// rule to match. I.e The rest of the content should be added as a [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 40 | /// rule to match. I.e The rest of the content should be added as a [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/parser/parser.rs:41:6 [INFO] [stdout] | [INFO] [stdout] 41 | /// [`crate::elements::text::elem::Text`] element. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 41 | /// [`crate::elements::text::elem::Text`] element. [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/parser/parser.rs:42:6 [INFO] [stdout] | [INFO] [stdout] 42 | /// The match data should be passed to the [`Rule::on_match`] method. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 42 | /// The match data should be passed to the [`Rule::on_match`] method. [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/parser/parser.rs:62:7 [INFO] [stdout] | [INFO] [stdout] 62 | ) -> Option<( [INFO] [stdout] | __________^ [INFO] [stdout] 63 | | Cursor, [INFO] [stdout] 64 | | &Box, [INFO] [stdout] 65 | | Box, [INFO] [stdout] 66 | | )> { [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/parser/parser.rs:157:3 [INFO] [stdout] | [INFO] [stdout] 157 | return Some((cursor.at(next), &self.rules[best_idx], state.matches[best_idx].1.take().unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 157 - return Some((cursor.at(next), &self.rules[best_idx], state.matches[best_idx].1.take().unwrap())); [INFO] [stdout] 157 + Some((cursor.at(next), &self.rules[best_idx], state.matches[best_idx].1.take().unwrap())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/parser/reports.rs:180:24 [INFO] [stdout] | [INFO] [stdout] 180 | pub fn to_diagnostics(self, diagnostic_map: &DashMap>) { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'u [INFO] [stdout] --> src/parser/parser.rs:161:14 [INFO] [stdout] | [INFO] [stdout] 161 | fn add_text<'u>(&'u self, unit: &mut TranslationUnit, range: Range) { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 161 - fn add_text<'u>(&'u self, unit: &mut TranslationUnit, range: Range) { [INFO] [stdout] 161 + fn add_text(&self, unit: &mut TranslationUnit, range: Range) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser/resolver.rs:71:6 [INFO] [stdout] | [INFO] [stdout] 71 | / if previous.input_file != *loaded.input_path() { [INFO] [stdout] 72 | | let token = loaded.token(); [INFO] [stdout] 73 | | Err(make_err!( [INFO] [stdout] 74 | | token.source(), [INFO] [stdout] ... | [INFO] [stdout] 93 | | ))?; [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_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 69 ~ Some(OffloadedUnit::Unloaded(previous)) [INFO] [stdout] 70 | // Duplicate with a database unit [INFO] [stdout] 71 ~ if previous.input_file != *loaded.input_path() => { [INFO] [stdout] 72 | let token = loaded.token(); [INFO] [stdout] ... [INFO] [stdout] 93 | ))?; [INFO] [stdout] 94 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/parser/resolver.rs:90:9 [INFO] [stdout] | [INFO] [stdout] 90 | ... (&previous.input_file).display().fg(colors.info), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `previous.input_file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/parser/parser.rs:190:37 [INFO] [stdout] | [INFO] [stdout] 190 | unit.add_content(Text::new(token, content.into())); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider removing `.into()`: `content` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::sync::Arc` [INFO] [stdout] --> src/parser/parser.rs:195:35 [INFO] [stdout] | [INFO] [stdout] 195 | let mut cursor = Cursor::new(0, Arc::as_ref(unit.get_scope()).read().source().into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `Arc::as_ref(unit.get_scope()).read().source()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/parser/resolver.rs:141:20 [INFO] [stdout] | [INFO] [stdout] 141 | .get_reference(&name) [INFO] [stdout] | ^^^^^ help: change this to: `name` [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: doc list item without indentation [INFO] [stdout] --> src/parser/property.rs:74:6 [INFO] [stdout] | [INFO] [stdout] 74 | /// (Note) In this case, reports should have been set [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 74 | /// (Note) In this case, reports should have been set [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/parser/resolver.rs:171:39 [INFO] [stdout] | [INFO] [stdout] 171 | .query_reference(cache.clone(), &name) [INFO] [stdout] | ^^^^^ help: change this to: `name` [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: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/parser/resolver.rs:191:8 [INFO] [stdout] | [INFO] [stdout] 191 | / ... unit.query_reference(cache.clone(), &name) [INFO] [stdout] 192 | | ... .and_then(|reference| Some((reference, unit))) [INFO] [stdout] | |________________________________________________________________________^ help: try: `unit.query_reference(cache.clone(), &name).map(|reference| (reference, unit))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/parser/resolver.rs:191:44 [INFO] [stdout] | [INFO] [stdout] 191 | ... unit.query_reference(cache.clone(), &name) [INFO] [stdout] | ^^^^^ help: change this to: `name` [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: doc list item without indentation [INFO] [stdout] --> src/parser/property.rs:118:6 [INFO] [stdout] | [INFO] [stdout] 118 | /// (Note) In this case, reports should have been set [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 118 | /// (Note) In this case, reports should have been set [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/parser/resolver.rs:258:7 [INFO] [stdout] | [INFO] [stdout] 258 | ) -> Result>>, Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/parser/resolver.rs:269:33 [INFO] [stdout] | [INFO] [stdout] 269 | .filter_map(|(scope, elem)| elem.as_linkable().and_then(|link| Some((scope, link)))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `elem.as_linkable().map(|link| (scope, link))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/parser/property.rs:196:6 [INFO] [stdout] | [INFO] [stdout] 196 | /// (Note) In this case, reports should have been set [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 196 | /// (Note) In this case, reports should have been set [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/parser/property.rs:282:19 [INFO] [stdout] | [INFO] [stdout] 282 | pub fn parse<'s, 'u>( [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/parser/property.rs:366:9 [INFO] [stdout] | [INFO] [stdout] 366 | if escaped % 2 == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace with: `escaped.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/parser/rule.rs:171:14 [INFO] [stdout] | [INFO] [stdout] 171 | fn on_match<'u>( [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/parser/rule.rs:231:20 [INFO] [stdout] | [INFO] [stdout] 231 | fn on_regex_match<'u>( [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/parser/property.rs:473:25 [INFO] [stdout] | [INFO] [stdout] 473 | pub fn parse_token<'s, 'u>( [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused "map closure" when calling `Result::map_or_else` value [INFO] [stdout] --> src/parser/source.rs:81:18 [INFO] [stdout] | [INFO] [stdout] 81 | let absolute = path [INFO] [stdout] | ________________________^ [INFO] [stdout] 82 | | .canonicalize() [INFO] [stdout] 83 | | .map_or_else(|_| path.to_path_buf(), |p| p); [INFO] [stdout] | |_______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_result_map_or_else [INFO] [stdout] = note: `#[warn(clippy::unnecessary_result_map_or_else)]` on by default [INFO] [stdout] help: consider using `unwrap_or_else` [INFO] [stdout] | [INFO] [stdout] 81 ~ let absolute = path [INFO] [stdout] 82 ~ .canonicalize().unwrap_or_else(|_| path.to_path_buf()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/parser/reports.rs:128:3 [INFO] [stdout] | [INFO] [stdout] 128 | self, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/parser/reports.rs:130:7 [INFO] [stdout] | [INFO] [stdout] 130 | ) -> ( [INFO] [stdout] | __________^ [INFO] [stdout] 131 | | ariadne::Report<'static, (Arc, Range)>, [INFO] [stdout] 132 | | impl ariadne::Cache>, [INFO] [stdout] 133 | | ) { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/parser/reports.rs:180:24 [INFO] [stdout] | [INFO] [stdout] 180 | pub fn to_diagnostics(self, diagnostic_map: &DashMap>) { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser/resolver.rs:71:6 [INFO] [stdout] | [INFO] [stdout] 71 | / if previous.input_file != *loaded.input_path() { [INFO] [stdout] 72 | | let token = loaded.token(); [INFO] [stdout] 73 | | Err(make_err!( [INFO] [stdout] 74 | | token.source(), [INFO] [stdout] ... | [INFO] [stdout] 93 | | ))?; [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_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 69 ~ Some(OffloadedUnit::Unloaded(previous)) [INFO] [stdout] 70 | // Duplicate with a database unit [INFO] [stdout] 71 ~ if previous.input_file != *loaded.input_path() => { [INFO] [stdout] 72 | let token = loaded.token(); [INFO] [stdout] ... [INFO] [stdout] 93 | ))?; [INFO] [stdout] 94 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/parser/resolver.rs:90:9 [INFO] [stdout] | [INFO] [stdout] 90 | ... (&previous.input_file).display().fg(colors.info), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `previous.input_file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/parser/resolver.rs:141:20 [INFO] [stdout] | [INFO] [stdout] 141 | .get_reference(&name) [INFO] [stdout] | ^^^^^ help: change this to: `name` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/parser/resolver.rs:171:39 [INFO] [stdout] | [INFO] [stdout] 171 | .query_reference(cache.clone(), &name) [INFO] [stdout] | ^^^^^ help: change this to: `name` [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: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/parser/resolver.rs:191:8 [INFO] [stdout] | [INFO] [stdout] 191 | / ... unit.query_reference(cache.clone(), &name) [INFO] [stdout] 192 | | ... .and_then(|reference| Some((reference, unit))) [INFO] [stdout] | |________________________________________________________________________^ help: try: `unit.query_reference(cache.clone(), &name).map(|reference| (reference, unit))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/parser/resolver.rs:191:44 [INFO] [stdout] | [INFO] [stdout] 191 | ... unit.query_reference(cache.clone(), &name) [INFO] [stdout] | ^^^^^ help: change this to: `name` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/parser/resolver.rs:258:7 [INFO] [stdout] | [INFO] [stdout] 258 | ) -> Result>>, Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/parser/resolver.rs:269:33 [INFO] [stdout] | [INFO] [stdout] 269 | .filter_map(|(scope, elem)| elem.as_linkable().and_then(|link| Some((scope, link)))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `elem.as_linkable().map(|link| (scope, link))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/parser/state.rs:52:15 [INFO] [stdout] | [INFO] [stdout] 52 | pub matches: Vec<(Range, Option>)>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/parser/state.rs:91:15 [INFO] [stdout] | [INFO] [stdout] 91 | fn on_remove<'u>(&self, unit: &mut TranslationUnit); [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/parser/state.rs:127:22 [INFO] [stdout] | [INFO] [stdout] 127 | pub fn on_scope_end<'u>(&mut self, unit: &mut TranslationUnit, scope: StateScope) { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/parser/style.rs:19:15 [INFO] [stdout] | [INFO] [stdout] 19 | fn from_json(&self, json: &str) -> Result, String>; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/parser/style.rs:23:3 [INFO] [stdout] | [INFO] [stdout] 23 | &self, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/parser/style.rs:47:1 [INFO] [stdout] | [INFO] [stdout] 47 | / impl Default for StyleHolder { [INFO] [stdout] 48 | | fn default() -> Self { [INFO] [stdout] 49 | | Self { [INFO] [stdout] 50 | | styles: HashMap::default(), //make_styles(), [INFO] [stdout] ... | [INFO] [stdout] 53 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 31 + #[derive(Default)] [INFO] [stdout] 32 | pub struct StyleHolder { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/parser/rule.rs:171:14 [INFO] [stdout] | [INFO] [stdout] 171 | fn on_match<'u>( [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/parser/util.rs:227:33 [INFO] [stdout] | [INFO] [stdout] 227 | } else if escaped % 2 == 1 && token_it.peek().map_or(false, |p| *p == c) { [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_some_and` instead [INFO] [stdout] | [INFO] [stdout] 227 - } else if escaped % 2 == 1 && token_it.peek().map_or(false, |p| *p == c) { [INFO] [stdout] 227 + } else if escaped % 2 == 1 && token_it.peek().is_some_and(|p| *p == c) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/parser/rule.rs:231:20 [INFO] [stdout] | [INFO] [stdout] 231 | fn on_regex_match<'u>( [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/parser/util.rs:267:4 [INFO] [stdout] | [INFO] [stdout] 267 | while let Some(_elem) = iter.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _elem in iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused "map closure" when calling `Result::map_or_else` value [INFO] [stdout] --> src/parser/source.rs:81:18 [INFO] [stdout] | [INFO] [stdout] 81 | let absolute = path [INFO] [stdout] | ________________________^ [INFO] [stdout] 82 | | .canonicalize() [INFO] [stdout] 83 | | .map_or_else(|_| path.to_path_buf(), |p| p); [INFO] [stdout] | |_______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_result_map_or_else [INFO] [stdout] = note: `#[warn(clippy::unnecessary_result_map_or_else)]` on by default [INFO] [stdout] help: consider using `unwrap_or_else` [INFO] [stdout] | [INFO] [stdout] 81 ~ let absolute = path [INFO] [stdout] 82 ~ .canonicalize().unwrap_or_else(|_| path.to_path_buf()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/unit/scope.rs:122:49 [INFO] [stdout] | [INFO] [stdout] 122 | fn get_variable(&self, name: &VariableName) -> Option<(Arc, Arc>)>; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the impl [INFO] [stdout] --> src/unit/scope.rs:160:6 [INFO] [stdout] | [INFO] [stdout] 160 | impl<'s> ScopeAccessor for Arc> { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take` [INFO] [stdout] --> src/unit/scope.rs:177:4 [INFO] [stdout] | [INFO] [stdout] 177 | std::mem::replace(&mut scope.parser_state.states, HashMap::default()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut scope.parser_state.states)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default [INFO] [stdout] = note: `#[warn(clippy::mem_replace_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/unit/scope.rs:200:3 [INFO] [stdout] | [INFO] [stdout] 200 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 200 - return None; [INFO] [stdout] 200 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/parser/state.rs:52:15 [INFO] [stdout] | [INFO] [stdout] 52 | pub matches: Vec<(Range, Option>)>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/parser/state.rs:91:15 [INFO] [stdout] | [INFO] [stdout] 91 | fn on_remove<'u>(&self, unit: &mut TranslationUnit); [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/unit/scope.rs:337:3 [INFO] [stdout] | [INFO] [stdout] 337 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 337 - return None; [INFO] [stdout] 337 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/parser/state.rs:127:22 [INFO] [stdout] | [INFO] [stdout] 127 | pub fn on_scope_end<'u>(&mut self, unit: &mut TranslationUnit, scope: StateScope) { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/parser/style.rs:19:15 [INFO] [stdout] | [INFO] [stdout] 19 | fn from_json(&self, json: &str) -> Result, String>; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/unit/translation.rs:106:5 [INFO] [stdout] | [INFO] [stdout] 106 | /// Whenever a variable is defined, it will overwrite the previously defined variable, if they have the same key in the current scope. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 106 | /// Whenever a variable is defined, it will overwrite the previously defined variable, if they have the same key in the current scope. [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/parser/style.rs:23:3 [INFO] [stdout] | [INFO] [stdout] 23 | &self, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/parser/style.rs:47:1 [INFO] [stdout] | [INFO] [stdout] 47 | / impl Default for StyleHolder { [INFO] [stdout] 48 | | fn default() -> Self { [INFO] [stdout] 49 | | Self { [INFO] [stdout] 50 | | styles: HashMap::default(), //make_styles(), [INFO] [stdout] ... | [INFO] [stdout] 53 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 31 + #[derive(Default)] [INFO] [stdout] 32 | pub struct StyleHolder { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 's [INFO] [stdout] --> src/unit/translation.rs:281:16 [INFO] [stdout] | [INFO] [stdout] 281 | pub fn colors<'s>(&'s self) -> &'s ReportColors { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 281 - pub fn colors<'s>(&'s self) -> &'s ReportColors { [INFO] [stdout] 281 + pub fn colors(&self) -> &ReportColors { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/parser/util.rs:227:33 [INFO] [stdout] | [INFO] [stdout] 227 | } else if escaped % 2 == 1 && token_it.peek().map_or(false, |p| *p == c) { [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_some_and` instead [INFO] [stdout] | [INFO] [stdout] 227 - } else if escaped % 2 == 1 && token_it.peek().map_or(false, |p| *p == c) { [INFO] [stdout] 227 + } else if escaped % 2 == 1 && token_it.peek().is_some_and(|p| *p == c) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/unit/translation.rs:313:25 [INFO] [stdout] | [INFO] [stdout] 313 | cache.export_ref_unit(&self, &output.input_file, &output.output_file); [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/parser/util.rs:267:4 [INFO] [stdout] | [INFO] [stdout] 267 | while let Some(_elem) = iter.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _elem in iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/unit/mod.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | pub mod unit; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/unit/variable.rs:37:3 [INFO] [stdout] | [INFO] [stdout] 37 | while let Some(c) = it.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for c in it` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/unit/variable.rs:114:12 [INFO] [stdout] | [INFO] [stdout] 114 | fn expand<'u>(&self, unit: &mut TranslationUnit, location: Token) -> Arc>; [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/unit/scope.rs:122:49 [INFO] [stdout] | [INFO] [stdout] 122 | fn get_variable(&self, name: &VariableName) -> Option<(Arc, Arc>)>; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/unit/variable.rs:154:56 [INFO] [stdout] | [INFO] [stdout] 154 | self.content.location().map_or(&self.location, |loc| &loc) [INFO] [stdout] | ^^^^ help: change this to: `loc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the impl [INFO] [stdout] --> src/unit/scope.rs:160:6 [INFO] [stdout] | [INFO] [stdout] 160 | impl<'s> ScopeAccessor for Arc> { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/unit/variable.rs:168:3 [INFO] [stdout] | [INFO] [stdout] 159 | / let content = unit.with_child( [INFO] [stdout] 160 | | self.content.clone(), [INFO] [stdout] 161 | | ParseMode::default(), [INFO] [stdout] 162 | | true, [INFO] [stdout] ... | [INFO] [stdout] 166 | | }, [INFO] [stdout] 167 | | ); [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 168 | content [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 159 ~ [INFO] [stdout] 160 ~ unit.with_child( [INFO] [stdout] 161 ~ self.content.clone(), [INFO] [stdout] 162 ~ ParseMode::default(), [INFO] [stdout] 163 ~ true, [INFO] [stdout] 164 ~ |unit, scope| { [INFO] [stdout] 165 ~ unit.parser.clone().parse(unit); [INFO] [stdout] 166 ~ scope [INFO] [stdout] 167 ~ }, [INFO] [stdout] 168 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct implementation of `ToString` [INFO] [stdout] --> src/unit/variable.rs:188:1 [INFO] [stdout] | [INFO] [stdout] 188 | / impl ToString for PropertyValue { [INFO] [stdout] 189 | | fn to_string(&self) -> String { [INFO] [stdout] 190 | | match self { [INFO] [stdout] 191 | | PropertyValue::Integer(i) => i.to_string(), [INFO] [stdout] ... | [INFO] [stdout] 196 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take` [INFO] [stdout] --> src/unit/scope.rs:177:4 [INFO] [stdout] | [INFO] [stdout] 177 | std::mem::replace(&mut scope.parser_state.states, HashMap::default()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut scope.parser_state.states)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default [INFO] [stdout] = note: `#[warn(clippy::mem_replace_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/unit/scope.rs:200:3 [INFO] [stdout] | [INFO] [stdout] 200 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 200 - return None; [INFO] [stdout] 200 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/unit/variable.rs:261:3 [INFO] [stdout] | [INFO] [stdout] 249 | / let content = unit.with_child( [INFO] [stdout] 250 | | definition_source.clone(), [INFO] [stdout] 251 | | ParseMode::default(), [INFO] [stdout] 252 | | true, [INFO] [stdout] ... | [INFO] [stdout] 259 | | }, [INFO] [stdout] 260 | | ); [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 261 | content [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 249 ~ [INFO] [stdout] 250 ~ unit.with_child( [INFO] [stdout] 251 ~ definition_source.clone(), [INFO] [stdout] 252 ~ ParseMode::default(), [INFO] [stdout] 253 ~ true, [INFO] [stdout] 254 ~ |_unit, scope| { [INFO] [stdout] 255 ~ scope.add_content(Arc::new(Text { [INFO] [stdout] 256 ~ location: definition_source.into(), [INFO] [stdout] 257 ~ content: self.value.to_string(), [INFO] [stdout] 258 ~ })); [INFO] [stdout] 259 ~ scope [INFO] [stdout] 260 ~ }, [INFO] [stdout] 261 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/unit/scope.rs:337:3 [INFO] [stdout] | [INFO] [stdout] 337 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 337 - return None; [INFO] [stdout] 337 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/unit/translation.rs:106:5 [INFO] [stdout] | [INFO] [stdout] 106 | /// Whenever a variable is defined, it will overwrite the previously defined variable, if they have the same key in the current scope. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 106 | /// Whenever a variable is defined, it will overwrite the previously defined variable, if they have the same key in the current scope. [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 's [INFO] [stdout] --> src/unit/translation.rs:281:16 [INFO] [stdout] | [INFO] [stdout] 281 | pub fn colors<'s>(&'s self) -> &'s ReportColors { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 281 - pub fn colors<'s>(&'s self) -> &'s ReportColors { [INFO] [stdout] 281 + pub fn colors(&self) -> &ReportColors { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/unit/translation.rs:313:25 [INFO] [stdout] | [INFO] [stdout] 313 | cache.export_ref_unit(&self, &output.input_file, &output.output_file); [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::path::PathBuf` [INFO] [stdout] --> src/util/settings.rs:55:15 [INFO] [stdout] | [INFO] [stdout] 55 | .unwrap_or(PathBuf::from(path.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `PathBuf::from()`: `path.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/unit/mod.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | pub mod unit; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::path::PathBuf` [INFO] [stdout] --> src/util/settings.rs:62:15 [INFO] [stdout] | [INFO] [stdout] 62 | .unwrap_or(PathBuf::from(output_buf.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `PathBuf::from()`: `output_buf.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/util/settings.rs:67:37 [INFO] [stdout] | [INFO] [stdout] 67 | *icon = get_path(diff.clone(), &icon)?; [INFO] [stdout] | ^^^^^ help: change this to: `icon` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/util/settings.rs:72:36 [INFO] [stdout] | [INFO] [stdout] 72 | *css = get_path(diff.clone(), &css)?; [INFO] [stdout] | ^^^^ help: change this to: `css` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/util/mod.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub mod util; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/util/util.rs:10:3 [INFO] [stdout] | [INFO] [stdout] 10 | &self [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/main.rs:173:2 [INFO] [stdout] | [INFO] [stdout] 173 | settings.db_path = db_path.unwrap_or(PathBuf::from("")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `util::settings::ProjectSettings { db_path: db_path.unwrap_or(PathBuf::from("")), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/main.rs:172:2 [INFO] [stdout] | [INFO] [stdout] 172 | let mut settings = ProjectSettings::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:80:17 [INFO] [stdout] | [INFO] [stdout] 80 | return Err(format!( [INFO] [stdout] | ________________________________^ [INFO] [stdout] 81 | | "Input is a directory, but ouput is not a directory, halting" [INFO] [stdout] 82 | | )); [INFO] [stdout] | |_____________________^ help: consider using `.to_string()`: `"Input is a directory, but ouput is not a directory, halting".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] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:134:15 [INFO] [stdout] | [INFO] [stdout] 134 | return Err(format!("Directory mode requires a database (-d)")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Directory mode requires a database (-d)".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] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/unit/variable.rs:37:3 [INFO] [stdout] | [INFO] [stdout] 37 | while let Some(c) = it.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for c in it` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/main.rs:333:2 [INFO] [stdout] | [INFO] [stdout] 333 | options.force_rebuild = matches.opt_present("force-rebuild"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [WARN] too many lines in the log, truncating it