[INFO] cloning repository https://github.com/malezjaa/marston [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/malezjaa/marston" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmalezjaa%2Fmarston", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmalezjaa%2Fmarston'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] d8574c0b3765ecfe60abf8c12461cc257c9acfb2 [INFO] linting malezjaa/marston against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmalezjaa%2Fmarston" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/malezjaa/marston [INFO] finished tweaking git repo https://github.com/malezjaa/marston [INFO] tweaked toml for git repo https://github.com/malezjaa/marston written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/malezjaa/marston 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/malezjaa/marston 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 terminal_size v0.4.2 [INFO] [stderr] Downloaded ariadne v0.5.1 [INFO] [stderr] Downloaded lasso v0.7.3 [INFO] [stderr] Downloaded sysinfo v0.35.2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 7342e7159068cfb3de0480f53e03008eee93f3d44b49b43e918f822dc9038173 [INFO] running `Command { std: "docker" "start" "-a" "7342e7159068cfb3de0480f53e03008eee93f3d44b49b43e918f822dc9038173", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "7342e7159068cfb3de0480f53e03008eee93f3d44b49b43e918f822dc9038173", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "7342e7159068cfb3de0480f53e03008eee93f3d44b49b43e918f822dc9038173", kill_on_drop: false }` [INFO] [stdout] 7342e7159068cfb3de0480f53e03008eee93f3d44b49b43e918f822dc9038173 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 781c46624f52b08c3670efc69a486348c3fc13a333c922dc1625471d535693f1 [INFO] running `Command { std: "docker" "start" "-a" "781c46624f52b08c3670efc69a486348c3fc13a333c922dc1625471d535693f1", kill_on_drop: false }` [INFO] [stderr] Compiling semver v1.0.26 [INFO] [stderr] Compiling beef v0.5.2 [INFO] [stderr] Compiling lazy_static v1.5.0 [INFO] [stderr] Compiling syn v2.0.101 [INFO] [stderr] Checking parking_lot_core v0.9.11 [INFO] [stderr] Compiling fs-err v3.1.0 [INFO] [stderr] Checking hashbrown v0.14.5 [INFO] [stderr] Compiling v_htmlescape v0.15.8 [INFO] [stderr] Checking anstyle-query v1.1.3 [INFO] [stderr] Compiling camino v1.1.10 [INFO] [stderr] Compiling rustix v1.0.7 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Checking ariadne v0.5.1 [INFO] [stderr] Checking clap_lex v0.7.4 [INFO] [stderr] Checking gimli v0.31.1 [INFO] [stderr] Checking miniz_oxide v0.8.8 [INFO] [stderr] Checking object v0.36.7 [INFO] [stderr] Checking rustc-demangle v0.1.24 [INFO] [stderr] Checking anstream v0.6.19 [INFO] [stderr] Compiling rustc_version v0.4.1 [INFO] [stderr] Checking fern v0.7.1 [INFO] [stderr] Checking sysinfo v0.35.2 [INFO] [stderr] Checking colored v3.0.0 [INFO] [stderr] Checking clap_builder v4.5.39 [INFO] [stderr] Compiling logos-codegen v0.15.0 [INFO] [stderr] Checking dashmap v6.1.0 [INFO] [stderr] Checking lasso v0.7.3 [INFO] [stderr] Checking terminal_size v0.4.2 [INFO] [stderr] Checking clap v4.5.39 [INFO] [stderr] Checking addr2line v0.24.2 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Checking backtrace v0.3.75 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.0 [INFO] [stderr] Compiling zerovec-derive v0.11.1 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling logos-derive v0.15.0 [INFO] [stderr] Checking logos v0.15.0 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking yoke v0.8.0 [INFO] [stderr] Checking zerovec v0.11.2 [INFO] [stderr] Checking zerotrie v0.2.2 [INFO] [stderr] Checking tinystr v0.8.1 [INFO] [stderr] Checking potential_utf v0.1.2 [INFO] [stderr] Checking serde v1.0.219 [INFO] [stderr] Checking icu_locale_core v2.0.0 [INFO] [stderr] Checking unic-langid-impl v0.9.6 [INFO] [stderr] Checking icu_collections v2.0.0 [INFO] [stderr] Checking unic-langid v0.9.6 [INFO] [stderr] Checking icu_provider v2.0.0 [INFO] [stderr] Checking icu_properties v2.0.1 [INFO] [stderr] Checking icu_normalizer v2.0.0 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking idna v1.0.3 [INFO] [stderr] Checking url v2.5.4 [INFO] [stderr] Checking serde_spanned v0.6.9 [INFO] [stderr] Checking toml_datetime v0.6.11 [INFO] [stderr] Checking toml_edit v0.22.27 [INFO] [stderr] Checking toml v0.8.23 [INFO] [stderr] Checking marston-core v0.1.0 (/opt/rustwide/workdir/marston) [INFO] [stdout] warning: unused import: `resolve` [INFO] [stdout] --> marston/src/ast/mod.rs:3:39 [INFO] [stdout] | [INFO] [stdout] 3 | ast::ident_table::{get_or_intern, resolve}, [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: `Key` [INFO] [stdout] --> marston/src/ast/mod.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | use lasso::{Key, Spur}; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rustc_hash::FxHashMap` [INFO] [stdout] --> marston/src/ast/mod.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use rustc_hash::FxHashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Rodeo` [INFO] [stdout] --> marston/src/ast/ident_table.rs:1:13 [INFO] [stdout] | [INFO] [stdout] 1 | use lasso::{Rodeo, Spur, ThreadedRodeo}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/ast/parser.rs:415:25 [INFO] [stdout] | [INFO] [stdout] 415 | ReportsBag::add(report!( [INFO] [stdout] | _________________________- [INFO] [stdout] 416 | | kind: ReportKind::Error, [INFO] [stdout] 417 | | message: message, [INFO] [stdout] 418 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 421 | | )); [INFO] [stdout] | |_________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: requested on the command line with `-W clippy::allow-attributes` [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/ast/parser.rs:425:25 [INFO] [stdout] | [INFO] [stdout] 425 | ReportsBag::add(report!( [INFO] [stdout] | _________________________- [INFO] [stdout] 426 | | kind: ReportKind::Error, [INFO] [stdout] 427 | | message: message, [INFO] [stdout] 428 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 431 | | )); [INFO] [stdout] | |_________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/ast/parser.rs:436:29 [INFO] [stdout] | [INFO] [stdout] 436 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________- [INFO] [stdout] 437 | | kind: ReportKind::Error, [INFO] [stdout] 438 | | message: message, [INFO] [stdout] 439 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 442 | | )); [INFO] [stdout] | |_____________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/ast/parser.rs:451:25 [INFO] [stdout] | [INFO] [stdout] 451 | ReportsBag::add(report!( [INFO] [stdout] | _________________________- [INFO] [stdout] 452 | | kind: ReportKind::Error, [INFO] [stdout] 453 | | message: format!("Unexpected end of input: {}", message), [INFO] [stdout] 454 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 457 | | )); [INFO] [stdout] | |_________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/ast/parser.rs:461:25 [INFO] [stdout] | [INFO] [stdout] 461 | ReportsBag::add(report!( [INFO] [stdout] | _________________________- [INFO] [stdout] 462 | | kind: ReportKind::Error, [INFO] [stdout] 463 | | message: message, [INFO] [stdout] 464 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 467 | | )); [INFO] [stdout] | |_________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/ast/parser.rs:471:25 [INFO] [stdout] | [INFO] [stdout] 471 | ReportsBag::add(report!( [INFO] [stdout] | _________________________- [INFO] [stdout] 472 | | kind: ReportKind::Error, [INFO] [stdout] 473 | | message: message, [INFO] [stdout] 474 | | notes: [note] [INFO] [stdout] 475 | | )); [INFO] [stdout] | |_________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Block`, `MarstonDocument`, `Node`, and `get_or_intern` [INFO] [stdout] --> marston/src/codegen/generator.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | Block, MarstonDocument, Node, ValueKind, [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^ ^^^^ [INFO] [stdout] 4 | ident_table::{get_or_intern, resolve}, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ast::MarstonDocument` [INFO] [stdout] --> marston/src/codegen/mod.rs:3:29 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::{MPath, MResult, ast::MarstonDocument}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `path::Path` and `self` [INFO] [stdout] --> marston/src/codegen/mod.rs:5:10 [INFO] [stdout] | [INFO] [stdout] 5 | fs::{self, File, create_dir_all}, [INFO] [stdout] | ^^^^ [INFO] [stdout] 6 | io::{BufWriter, Write}, [INFO] [stdout] 7 | path::Path, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `MarstonDocument`, `Token`, and `ident_table::IdentTable` [INFO] [stdout] --> marston/src/context.rs:3:11 [INFO] [stdout] | [INFO] [stdout] 3 | ast::{MarstonDocument, ident_table::IdentTable, parser::Parser}, [INFO] [stdout] | ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 9 | lexer::{Token, TokenKind}, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `logos::Logos` [INFO] [stdout] --> marston/src/context.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | use logos::Logos; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant else block [INFO] [stdout] --> marston/src/html/ir.rs:394:22 [INFO] [stdout] | [INFO] [stdout] 394 | } else { [INFO] [stdout] | ______________________^ [INFO] [stdout] 395 | | panic!("keywords must be an array. should be checked in the validators"); [INFO] [stdout] 396 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_else [INFO] [stdout] = note: `-W clippy::redundant-else` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::redundant_else)]` [INFO] [stdout] help: remove the `else` block and move the contents out [INFO] [stdout] | [INFO] [stdout] 394 ~ } [INFO] [stdout] 395 + panic!("keywords must be an array. should be checked in the validators"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `MPath` [INFO] [stdout] --> marston/src/info.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | MPath, Span, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashSet` [INFO] [stdout] --> marston/src/info.rs:9:33 [INFO] [stdout] | [INFO] [stdout] 9 | use std::collections::{HashMap, HashSet}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Lexer` and `Span` [INFO] [stdout] --> marston/src/lexer.rs:1:13 [INFO] [stdout] | [INFO] [stdout] 1 | use logos::{Lexer, Logos, Span}; [INFO] [stdout] | ^^^^^ ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Span` [INFO] [stdout] --> marston/src/reports.rs:1:20 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::{MPath, Span}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `borrow::Cow` [INFO] [stdout] --> marston/src/reports.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | borrow::Cow, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `AttributeEquals`, `BlockInfo`, and `tags::is_unique_tag` [INFO] [stdout] --> marston/src/validator/mod.rs:7:45 [INFO] [stdout] | [INFO] [stdout] 7 | html::{lang::is_valid_language_pattern, tags::is_unique_tag}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 8 | info::{BlockInfo, Info}, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 12 | conditions::{AttributeEquals, Condition, ValidationContext}, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `::url::Url` [INFO] [stdout] --> marston/src/validator/mod.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | use ::url::Url; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `collections::HashSet`, `fmt::format`, and `path::PathBuf` [INFO] [stdout] --> marston/src/validator/mod.rs:20:11 [INFO] [stdout] | [INFO] [stdout] 20 | use std::{collections::HashSet, fmt::format, path::PathBuf}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Span` and `Value` [INFO] [stdout] --> marston/src/validator/conditions.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | Span, [INFO] [stdout] | ^^^^ [INFO] [stdout] 3 | ast::{Block, Value}, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `collections::HashMap` [INFO] [stdout] --> marston/src/validator/conditions.rs:6:11 [INFO] [stdout] | [INFO] [stdout] 6 | use std::{collections::HashMap, fmt::Debug}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `MarstonDocument` and `get_or_intern` [INFO] [stdout] --> marston/src/validator/rules/block.rs:4:16 [INFO] [stdout] | [INFO] [stdout] 4 | Block, MarstonDocument, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 5 | ident_table::{get_or_intern, resolve}, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/rules/block.rs:43:29 [INFO] [stdout] | [INFO] [stdout] 43 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________- [INFO] [stdout] 44 | | kind: ReportKind::Error, [INFO] [stdout] 45 | | message: format!("Duplicate attribute '{}' found in '{block_name}'", attr), [INFO] [stdout] 46 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 49 | | label_vec: spans.iter().skip(1).map(|s| (s.clone(), "Attribute redefined here")).collect_vec() => Color::Yellow, [INFO] [stdout] 50 | | )) [INFO] [stdout] | |_____________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Attribute`, `Block`, `GenericValidator`, `ValueKind`, and `Value` [INFO] [stdout] --> marston/src/validator/rules/document.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | Attribute, Block, MarstonDocument, Value, ValueKind, [INFO] [stdout] | ^^^^^^^^^ ^^^^^ ^^^^^ ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 12 | GenericValidator, Validate, ValidationRule, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `lasso::Spur` [INFO] [stdout] --> marston/src/validator/rules/document.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | use lasso::Spur; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `fmt::format` and `sync::Arc` [INFO] [stdout] --> marston/src/validator/rules/document.rs:27:33 [INFO] [stdout] | [INFO] [stdout] 27 | use std::{collections::HashMap, fmt::format, sync::Arc}; [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> marston/src/validator/rules/document.rs:70:12 [INFO] [stdout] | [INFO] [stdout] 70 | if (!is_unique_tag(name.as_str())) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 70 - if (!is_unique_tag(name.as_str())) { [INFO] [stdout] 70 + if !is_unique_tag(name.as_str()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/rules/document.rs:74:25 [INFO] [stdout] | [INFO] [stdout] 74 | ReportsBag::add(report!( [INFO] [stdout] | _________________________- [INFO] [stdout] 75 | | kind: ReportKind::Error, [INFO] [stdout] 76 | | message: format!("Duplicate block name '{}' found", name), [INFO] [stdout] 77 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 81 | | notes: [format!("'{name}' is a block that should occur only once per document")] [INFO] [stdout] 82 | | )); [INFO] [stdout] | |_________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/rules/document.rs:101:25 [INFO] [stdout] | [INFO] [stdout] 101 | ReportsBag::add(report!( [INFO] [stdout] | _________________________- [INFO] [stdout] 102 | | kind: ReportKind::Error, [INFO] [stdout] 103 | | message: format!("Missing required tags: {}", missing_tags.iter().join(", ")), [INFO] [stdout] 104 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 107 | | notes: ["Ensure that your document includes all required tags in its root"] [INFO] [stdout] 108 | | )); [INFO] [stdout] | |_________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Attribute`, `BlockInfo`, `Block`, `ValidationRule`, `Value`, `conditions::AttributeEquals`, `get_or_intern`, `html::tags::is_unique_tag`, `resolve`, `rules::scripts::validate_script`, and `validate_block_no_children` [INFO] [stdout] --> marston/src/validator/rules/head.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | Attribute, Block, MarstonDocument, Value, ValueKind, [INFO] [stdout] | ^^^^^^^^^ ^^^^^ ^^^^^ [INFO] [stdout] 5 | ident_table::{get_or_intern, resolve}, [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^ [INFO] [stdout] 6 | }, [INFO] [stdout] 7 | html::tags::is_unique_tag, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 8 | info::{BlockInfo, Info}, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 12 | GenericValidator, Validate, ValidationRule, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 13 | conditions::AttributeEquals, rules::scripts::validate_script, validate_block_no_children, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `lasso::Spur` [INFO] [stdout] --> marston/src/validator/rules/head.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | use lasso::Spur; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `collections::HashMap`, `fmt::format`, and `sync::Arc` [INFO] [stdout] --> marston/src/validator/rules/head.rs:19:11 [INFO] [stdout] | [INFO] [stdout] 19 | use std::{collections::HashMap, fmt::format, sync::Arc}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `RequiredExtension` [INFO] [stdout] --> marston/src/validator/rules/head.rs:20:29 [INFO] [stdout] | [INFO] [stdout] 20 | use crate::validator::url::{RequiredExtension, UrlValidation}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> marston/src/validator/rules/head.rs:46:8 [INFO] [stdout] | [INFO] [stdout] 46 | if (info.no_head) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 46 - if (info.no_head) { [INFO] [stdout] 46 + if info.no_head { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> marston/src/validator/rules/head.rs:61:8 [INFO] [stdout] | [INFO] [stdout] 61 | if (info.no_head) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 61 - if (info.no_head) { [INFO] [stdout] 61 + if info.no_head { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/rules/head.rs:73:41 [INFO] [stdout] | [INFO] [stdout] 73 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________________- [INFO] [stdout] 74 | | kind: ReportKind::Warning, [INFO] [stdout] 75 | | message: "Empty keyword found".to_string(), [INFO] [stdout] 76 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 79 | | notes: ["Consider removing empty keywords from the list"] [INFO] [stdout] 80 | | )); [INFO] [stdout] | |_________________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> marston/src/validator/rules/head.rs:89:8 [INFO] [stdout] | [INFO] [stdout] 89 | if (info.no_head) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 89 - if (info.no_head) { [INFO] [stdout] 89 + if info.no_head { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/rules/head.rs:103:37 [INFO] [stdout] | [INFO] [stdout] 103 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________________- [INFO] [stdout] 104 | | kind: ReportKind::Warning, [INFO] [stdout] 105 | | message: "Uncommon character encoding".to_string(), [INFO] [stdout] 106 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 109 | | notes: ["UTF-8 is the recommended encoding for web documents"] [INFO] [stdout] 110 | | )); [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> marston/src/validator/rules/head.rs:118:8 [INFO] [stdout] | [INFO] [stdout] 118 | if (info.no_head) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 118 - if (info.no_head) { [INFO] [stdout] 118 + if info.no_head { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/rules/head.rs:129:33 [INFO] [stdout] | [INFO] [stdout] 129 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________- [INFO] [stdout] 130 | | kind: ReportKind::Warning, [INFO] [stdout] 131 | | message: "Viewport should include 'width=device-width' for mobile compatibility".to_string(), [INFO] [stdout] 132 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 135 | | notes: ["Example: 'width=device-width, initial-scale=1.0'"] [INFO] [stdout] 136 | | )); [INFO] [stdout] | |_________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> marston/src/validator/rules/head.rs:142:8 [INFO] [stdout] | [INFO] [stdout] 142 | if (info.no_head) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 142 - if (info.no_head) { [INFO] [stdout] 142 + if info.no_head { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> marston/src/validator/rules/head.rs:168:8 [INFO] [stdout] | [INFO] [stdout] 168 | if (info.no_head) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 168 - if (info.no_head) { [INFO] [stdout] 168 + if info.no_head { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Block` and `ident_table::get_or_intern` [INFO] [stdout] --> marston/src/validator/rules/link.rs:3:11 [INFO] [stdout] | [INFO] [stdout] 3 | ast::{Block, MarstonDocument, ident_table::get_or_intern}, [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/rules/link.rs:90:33 [INFO] [stdout] | [INFO] [stdout] 90 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________- [INFO] [stdout] 91 | | kind: ReportKind::Error, [INFO] [stdout] 92 | | message: format!("Found invalid MIME type: {val}. {err}"), [INFO] [stdout] 93 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 96 | | )); [INFO] [stdout] | |_________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Block` and `Span` [INFO] [stdout] --> marston/src/validator/rules/scripts.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | Span, [INFO] [stdout] | ^^^^ [INFO] [stdout] 3 | ast::{Block, MarstonDocument, ident_table::get_or_intern}, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ValidationContext` [INFO] [stdout] --> marston/src/validator/url.rs:8:33 [INFO] [stdout] | [INFO] [stdout] 8 | conditions::{Condition, ValidationContext}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/url.rs:54:37 [INFO] [stdout] | [INFO] [stdout] 54 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________________- [INFO] [stdout] 55 | | kind: ReportKind::Error, [INFO] [stdout] 56 | | message: format!("URL should have '.{}' extension. {}", extension, result.messages.first().unwrap()), [INFO] [stdout] 57 | | labels: { [INFO] [stdout] 58 | | span.clone() => "invalid URL extension" => Color::BrightRed [INFO] [stdout] 59 | | }, [INFO] [stdout] 60 | | )); [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/url.rs:76:45 [INFO] [stdout] | [INFO] [stdout] 76 | ... ReportsBag::add(report!( [INFO] [stdout] | _______________________________________- [INFO] [stdout] 77 | | ... kind: ReportKind::Error, [INFO] [stdout] 78 | | ... message: format!("Found disallowed URL protocol: {}.", url.scheme()), [INFO] [stdout] 79 | | ... labels: { [INFO] [stdout] 80 | | ... span.clone() => "disallowed invalid URL" => Color::BrightRed [INFO] [stdout] 81 | | ... }, [INFO] [stdout] 82 | | ... )); [INFO] [stdout] | |_______________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/url.rs:98:41 [INFO] [stdout] | [INFO] [stdout] 98 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________________- [INFO] [stdout] 99 | | kind: ReportKind::Error, [INFO] [stdout] 100 | | message: format!("Value should be a valid URL or path. {err}"), [INFO] [stdout] 101 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 108 | | )); [INFO] [stdout] | |_________________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/url.rs:121:37 [INFO] [stdout] | [INFO] [stdout] 121 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________________- [INFO] [stdout] 122 | | kind: ReportKind::Warning, [INFO] [stdout] 123 | | message: "Consider using HTTPS instead of HTTP".to_string(), [INFO] [stdout] 124 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 131 | | )); [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:123:33 [INFO] [stdout] | [INFO] [stdout] 123 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________- [INFO] [stdout] 124 | | kind: ReportKind::Error, [INFO] [stdout] 125 | | message: "Value must be a string".to_string(), [INFO] [stdout] 126 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 129 | | notes: ["Use quotes to define a string value, e.g., \"my value\""] [INFO] [stdout] 130 | | )); [INFO] [stdout] | |_________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:142:33 [INFO] [stdout] | [INFO] [stdout] 142 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________- [INFO] [stdout] 143 | | kind: ReportKind::Error, [INFO] [stdout] 144 | | message: "Value must be a number".to_string(), [INFO] [stdout] 145 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 148 | | notes: ["Use a numeric value, e.g., 42 or 3.14"] [INFO] [stdout] 149 | | )); [INFO] [stdout] | |_________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:161:33 [INFO] [stdout] | [INFO] [stdout] 161 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________- [INFO] [stdout] 162 | | kind: ReportKind::Error, [INFO] [stdout] 163 | | message: "Value must be a boolean".to_string(), [INFO] [stdout] 164 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 167 | | notes: ["Use 'true' or 'false' as the value"] [INFO] [stdout] 168 | | )); [INFO] [stdout] | |_________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:183:45 [INFO] [stdout] | [INFO] [stdout] 183 | ... ReportsBag::add(report!( [INFO] [stdout] | _______________________________________- [INFO] [stdout] 184 | | ... kind: ReportKind::Error, [INFO] [stdout] 185 | | ... message: format!("Array item must be of type {:?}", inner_ty), [INFO] [stdout] 186 | | ... labels: { [INFO] [stdout] ... | [INFO] [stdout] 189 | | ... notes: ["Ensure all items in the array match the expected type"] [INFO] [stdout] 190 | | ... )); [INFO] [stdout] | |_______________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:197:33 [INFO] [stdout] | [INFO] [stdout] 197 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________- [INFO] [stdout] 198 | | kind: ReportKind::Error, [INFO] [stdout] 199 | | message: "Value must be an array".to_string(), [INFO] [stdout] 200 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 203 | | notes: ["Use square brackets to define an array, e.g., [1, 2, 3]"] [INFO] [stdout] 204 | | )); [INFO] [stdout] | |_________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:224:33 [INFO] [stdout] | [INFO] [stdout] 224 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________- [INFO] [stdout] 225 | | kind: ReportKind::Error, [INFO] [stdout] 226 | | message: "String cannot be empty".to_string(), [INFO] [stdout] 227 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 230 | | notes: ["Provide a meaningful non-empty value"] [INFO] [stdout] 231 | | )); [INFO] [stdout] | |_________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:244:41 [INFO] [stdout] | [INFO] [stdout] 244 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________________- [INFO] [stdout] 245 | | kind: ReportKind::Error, [INFO] [stdout] 246 | | message: format!("Disallowed character found: '{}'", char), [INFO] [stdout] 247 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 250 | | notes: ["Remove the disallowed character"] [INFO] [stdout] 251 | | )); [INFO] [stdout] | |_________________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:262:37 [INFO] [stdout] | [INFO] [stdout] 262 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________________- [INFO] [stdout] 263 | | kind: ReportKind::Error, [INFO] [stdout] 264 | | message: "Array cannot be empty".to_string(), [INFO] [stdout] 265 | | labels: { [INFO] [stdout] 266 | | span.clone() => "This array must not be empty" => Color::BrightRed [INFO] [stdout] 267 | | }, [INFO] [stdout] 268 | | )) [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:279:37 [INFO] [stdout] | [INFO] [stdout] 279 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________________- [INFO] [stdout] 280 | | kind: ReportKind::Warning, [INFO] [stdout] 281 | | message: format!("String too short (minimum {} characters)", min), [INFO] [stdout] 282 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 285 | | notes: [format!("Minimum recommended length is {} characters", min)] [INFO] [stdout] 286 | | )); [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:297:37 [INFO] [stdout] | [INFO] [stdout] 297 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________________- [INFO] [stdout] 298 | | kind: ReportKind::Error, [INFO] [stdout] 299 | | message: format!("String too short (minimum {} characters)", min), [INFO] [stdout] 300 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 303 | | notes: [format!("Minimum required length is {} characters", min)] [INFO] [stdout] 304 | | )); [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:315:37 [INFO] [stdout] | [INFO] [stdout] 315 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________________- [INFO] [stdout] 316 | | kind: ReportKind::Warning, [INFO] [stdout] 317 | | message: format!("String exceeds {} characters", max), [INFO] [stdout] 318 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 321 | | notes: [format!("Maximum recommended length is {} characters", max)] [INFO] [stdout] 322 | | )); [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:333:37 [INFO] [stdout] | [INFO] [stdout] 333 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________________- [INFO] [stdout] 334 | | kind: ReportKind::Error, [INFO] [stdout] 335 | | message: format!("String exceeds {} characters", max), [INFO] [stdout] 336 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 339 | | notes: [format!("Maximum allowed length is {} characters", max)] [INFO] [stdout] 340 | | )); [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:351:37 [INFO] [stdout] | [INFO] [stdout] 351 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________________- [INFO] [stdout] 352 | | kind: ReportKind::Warning, [INFO] [stdout] 353 | | message: "Generic or uninformative value".to_string(), [INFO] [stdout] 354 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 357 | | notes: ["Generic values provide little context or value"] [INFO] [stdout] 358 | | )); [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:370:37 [INFO] [stdout] | [INFO] [stdout] 370 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________________- [INFO] [stdout] 371 | | kind: ReportKind::Warning, [INFO] [stdout] 372 | | message: "Potentially invalid language code".to_string(), [INFO] [stdout] 373 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 380 | | )); [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:389:33 [INFO] [stdout] | [INFO] [stdout] 389 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________- [INFO] [stdout] 390 | | kind: ReportKind::Error, [INFO] [stdout] 391 | | message: format!("Number must be at least {}", min), [INFO] [stdout] 392 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 395 | | notes: [format!("Minimum allowed value is {}", min)] [INFO] [stdout] 396 | | )); [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:404:33 [INFO] [stdout] | [INFO] [stdout] 404 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________- [INFO] [stdout] 405 | | kind: ReportKind::Error, [INFO] [stdout] 406 | | message: format!("Number must be at most {}", max), [INFO] [stdout] 407 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 410 | | notes: [format!("Maximum allowed value is {}", max)] [INFO] [stdout] 411 | | )); [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:497:29 [INFO] [stdout] | [INFO] [stdout] 497 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________- [INFO] [stdout] 498 | | kind: ReportKind::Error, [INFO] [stdout] 499 | | message: format!("'{}' should not have children", name_str), [INFO] [stdout] 500 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 503 | | notes: [format!("Remove any child blocks or attributes from '{}'", name_str)] [INFO] [stdout] 504 | | )); [INFO] [stdout] | |_____________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:517:33 [INFO] [stdout] | [INFO] [stdout] 517 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________- [INFO] [stdout] 518 | | kind: ReportKind::Error, [INFO] [stdout] 519 | | message: format!("'{}' should have one of the following attributes: {:?}", name_str, required), [INFO] [stdout] 520 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 523 | | notes: [format!("Add one of the following attributes to '{}': {:?}", name_str, required)] [INFO] [stdout] 524 | | )) [INFO] [stdout] | |_________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnested or-patterns [INFO] [stdout] --> marston/src/validator/mod.rs:541:13 [INFO] [stdout] | [INFO] [stdout] 541 | (Some(attr), None, TargetType::Attribute) | (Some(attr), None, TargetType::Either) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns [INFO] [stdout] = note: `-W clippy::unnested-or-patterns` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::unnested_or_patterns)]` [INFO] [stdout] help: nest the patterns [INFO] [stdout] | [INFO] [stdout] 541 - (Some(attr), None, TargetType::Attribute) | (Some(attr), None, TargetType::Either) => { [INFO] [stdout] 541 + (Some(attr), None, TargetType::Attribute | TargetType::Either) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnested or-patterns [INFO] [stdout] --> marston/src/validator/mod.rs:544:13 [INFO] [stdout] | [INFO] [stdout] 544 | (None, Some(blocks), TargetType::Block) | (None, Some(blocks), TargetType::Either) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns [INFO] [stdout] help: nest the patterns [INFO] [stdout] | [INFO] [stdout] 544 - (None, Some(blocks), TargetType::Block) | (None, Some(blocks), TargetType::Either) => { [INFO] [stdout] 544 + (None, Some(blocks), TargetType::Block | TargetType::Either) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:547:41 [INFO] [stdout] | [INFO] [stdout] 547 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________________- [INFO] [stdout] 548 | | kind: ReportKind::Error, [INFO] [stdout] 549 | | message: format!("'{}' should not be used", name_str), [INFO] [stdout] 550 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 553 | | notes: [format!("Remove '{}' from '{}'", name_str, parent_name)] [INFO] [stdout] 554 | | )); [INFO] [stdout] | |_________________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:561:33 [INFO] [stdout] | [INFO] [stdout] 561 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________- [INFO] [stdout] 562 | | kind: ReportKind::Error, [INFO] [stdout] 563 | | message: format!("'{}' should be a block, not an attribute", name_str), [INFO] [stdout] 564 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 567 | | notes: [format!("Define '{}' as a block instead of an attribute", name_str)] [INFO] [stdout] 568 | | )); [INFO] [stdout] | |_________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:577:37 [INFO] [stdout] | [INFO] [stdout] 577 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________________- [INFO] [stdout] 578 | | kind: ReportKind::Error, [INFO] [stdout] 579 | | message: format!("'{}' should be an attribute, not a block", name_str), [INFO] [stdout] 580 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 583 | | notes: [format!("Define '{}' as an attribute instead of a block", name_str)] [INFO] [stdout] 584 | | )); [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:589:37 [INFO] [stdout] | [INFO] [stdout] 589 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________________- [INFO] [stdout] 590 | | kind: ReportKind::Error, [INFO] [stdout] 591 | | message: format!("'{}' defined as both attribute and block", name_str), [INFO] [stdout] 592 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 596 | | notes: [format!("'{}' should be defined only once, either as attribute or block", name_str)] [INFO] [stdout] 597 | | )); [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:607:30 [INFO] [stdout] | [INFO] [stdout] 607 | let report = report!( [INFO] [stdout] | ______________________________- [INFO] [stdout] 608 | | kind: ReportKind::Error, [INFO] [stdout] 609 | | message: format!("Missing required {} '{}'", expected_type, name_str), [INFO] [stdout] 610 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 613 | | notes: [format!("Add the required '{}' {}", name_str, expected_type)] [INFO] [stdout] 614 | | ); [INFO] [stdout] | |_________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:650:33 [INFO] [stdout] | [INFO] [stdout] 650 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________- [INFO] [stdout] 651 | | kind: ReportKind::Error, [INFO] [stdout] 652 | | message: format!("Attribute '{}' is not valid in this context.", resolve(attr.key.key)), [INFO] [stdout] 653 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 656 | | notes: [result.messages.join(". ")] [INFO] [stdout] 657 | | )) [INFO] [stdout] | |_________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:669:37 [INFO] [stdout] | [INFO] [stdout] 669 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________________- [INFO] [stdout] 670 | | kind: ReportKind::Warning, [INFO] [stdout] 671 | | message: format!("File should have {} extension", expected_ext), [INFO] [stdout] 672 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 675 | | notes: [format!("Ensure the file has a {} extension", expected_ext)] [INFO] [stdout] 676 | | )); [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:689:41 [INFO] [stdout] | [INFO] [stdout] 689 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________________- [INFO] [stdout] 690 | | kind: ReportKind::Error, [INFO] [stdout] 691 | | message: format!("Unknown value '{}' specified", s.trim()), [INFO] [stdout] 692 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 698 | | )); [INFO] [stdout] | |_________________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:700:41 [INFO] [stdout] | [INFO] [stdout] 700 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________________- [INFO] [stdout] 701 | | kind: ReportKind::Error, [INFO] [stdout] 702 | | message: format!("Uncommon value '{}' specified", s.trim()), [INFO] [stdout] 703 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 710 | | )); [INFO] [stdout] | |_________________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:725:25 [INFO] [stdout] | [INFO] [stdout] 725 | ReportsBag::add(report!( [INFO] [stdout] | _________________________- [INFO] [stdout] 726 | | kind: ReportKind::Error, [INFO] [stdout] 727 | | message: format!("{} blocks should not contain any children", block_type), [INFO] [stdout] 728 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 735 | | )); [INFO] [stdout] | |_________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:785:25 [INFO] [stdout] | [INFO] [stdout] 785 | ReportsBag::add(report!( [INFO] [stdout] | _________________________- [INFO] [stdout] 786 | | kind: ReportKind::Warning, [INFO] [stdout] 787 | | message: format!("{} block appears to be empty", block_type), [INFO] [stdout] 788 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 795 | | )); [INFO] [stdout] | |_________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![feature]` [INFO] [stdout] --> marston/src/lib.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | #[feature(let_chains)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this attribute does not have an `!`, which means it is applied to this use [INFO] [stdout] --> marston/src/lib.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | use camino::Utf8PathBuf; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(unused_attributes)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `resolve` [INFO] [stdout] --> marston/src/ast/mod.rs:3:39 [INFO] [stdout] | [INFO] [stdout] 3 | ast::ident_table::{get_or_intern, resolve}, [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: `Key` [INFO] [stdout] --> marston/src/ast/mod.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | use lasso::{Key, Spur}; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rustc_hash::FxHashMap` [INFO] [stdout] --> marston/src/ast/mod.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use rustc_hash::FxHashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Rodeo` [INFO] [stdout] --> marston/src/ast/ident_table.rs:1:13 [INFO] [stdout] | [INFO] [stdout] 1 | use lasso::{Rodeo, Spur, ThreadedRodeo}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/ast/parser.rs:415:25 [INFO] [stdout] | [INFO] [stdout] 415 | ReportsBag::add(report!( [INFO] [stdout] | _________________________- [INFO] [stdout] 416 | | kind: ReportKind::Error, [INFO] [stdout] 417 | | message: message, [INFO] [stdout] 418 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 421 | | )); [INFO] [stdout] | |_________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: requested on the command line with `-W clippy::allow-attributes` [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/ast/parser.rs:425:25 [INFO] [stdout] | [INFO] [stdout] 425 | ReportsBag::add(report!( [INFO] [stdout] | _________________________- [INFO] [stdout] 426 | | kind: ReportKind::Error, [INFO] [stdout] 427 | | message: message, [INFO] [stdout] 428 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 431 | | )); [INFO] [stdout] | |_________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/ast/parser.rs:436:29 [INFO] [stdout] | [INFO] [stdout] 436 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________- [INFO] [stdout] 437 | | kind: ReportKind::Error, [INFO] [stdout] 438 | | message: message, [INFO] [stdout] 439 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 442 | | )); [INFO] [stdout] | |_____________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/ast/parser.rs:451:25 [INFO] [stdout] | [INFO] [stdout] 451 | ReportsBag::add(report!( [INFO] [stdout] | _________________________- [INFO] [stdout] 452 | | kind: ReportKind::Error, [INFO] [stdout] 453 | | message: format!("Unexpected end of input: {}", message), [INFO] [stdout] 454 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 457 | | )); [INFO] [stdout] | |_________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/ast/parser.rs:461:25 [INFO] [stdout] | [INFO] [stdout] 461 | ReportsBag::add(report!( [INFO] [stdout] | _________________________- [INFO] [stdout] 462 | | kind: ReportKind::Error, [INFO] [stdout] 463 | | message: message, [INFO] [stdout] 464 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 467 | | )); [INFO] [stdout] | |_________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/ast/parser.rs:471:25 [INFO] [stdout] | [INFO] [stdout] 471 | ReportsBag::add(report!( [INFO] [stdout] | _________________________- [INFO] [stdout] 472 | | kind: ReportKind::Error, [INFO] [stdout] 473 | | message: message, [INFO] [stdout] 474 | | notes: [note] [INFO] [stdout] 475 | | )); [INFO] [stdout] | |_________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Block`, `MarstonDocument`, `Node`, and `get_or_intern` [INFO] [stdout] --> marston/src/codegen/generator.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | Block, MarstonDocument, Node, ValueKind, [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^ ^^^^ [INFO] [stdout] 4 | ident_table::{get_or_intern, resolve}, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ast::MarstonDocument` [INFO] [stdout] --> marston/src/codegen/mod.rs:3:29 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::{MPath, MResult, ast::MarstonDocument}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `path::Path` and `self` [INFO] [stdout] --> marston/src/codegen/mod.rs:5:10 [INFO] [stdout] | [INFO] [stdout] 5 | fs::{self, File, create_dir_all}, [INFO] [stdout] | ^^^^ [INFO] [stdout] 6 | io::{BufWriter, Write}, [INFO] [stdout] 7 | path::Path, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `MarstonDocument`, `Token`, and `ident_table::IdentTable` [INFO] [stdout] --> marston/src/context.rs:3:11 [INFO] [stdout] | [INFO] [stdout] 3 | ast::{MarstonDocument, ident_table::IdentTable, parser::Parser}, [INFO] [stdout] | ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 9 | lexer::{Token, TokenKind}, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `logos::Logos` [INFO] [stdout] --> marston/src/context.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | use logos::Logos; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant else block [INFO] [stdout] --> marston/src/html/ir.rs:394:22 [INFO] [stdout] | [INFO] [stdout] 394 | } else { [INFO] [stdout] | ______________________^ [INFO] [stdout] 395 | | panic!("keywords must be an array. should be checked in the validators"); [INFO] [stdout] 396 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_else [INFO] [stdout] = note: `-W clippy::redundant-else` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::redundant_else)]` [INFO] [stdout] help: remove the `else` block and move the contents out [INFO] [stdout] | [INFO] [stdout] 394 ~ } [INFO] [stdout] 395 + panic!("keywords must be an array. should be checked in the validators"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `MPath` [INFO] [stdout] --> marston/src/info.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | MPath, Span, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashSet` [INFO] [stdout] --> marston/src/info.rs:9:33 [INFO] [stdout] | [INFO] [stdout] 9 | use std::collections::{HashMap, HashSet}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Lexer` and `Span` [INFO] [stdout] --> marston/src/lexer.rs:1:13 [INFO] [stdout] | [INFO] [stdout] 1 | use logos::{Lexer, Logos, Span}; [INFO] [stdout] | ^^^^^ ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Span` [INFO] [stdout] --> marston/src/reports.rs:1:20 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::{MPath, Span}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `borrow::Cow` [INFO] [stdout] --> marston/src/reports.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | borrow::Cow, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `AttributeEquals`, `BlockInfo`, and `tags::is_unique_tag` [INFO] [stdout] --> marston/src/validator/mod.rs:7:45 [INFO] [stdout] | [INFO] [stdout] 7 | html::{lang::is_valid_language_pattern, tags::is_unique_tag}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 8 | info::{BlockInfo, Info}, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 12 | conditions::{AttributeEquals, Condition, ValidationContext}, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `::url::Url` [INFO] [stdout] --> marston/src/validator/mod.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | use ::url::Url; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `collections::HashSet`, `fmt::format`, and `path::PathBuf` [INFO] [stdout] --> marston/src/validator/mod.rs:20:11 [INFO] [stdout] | [INFO] [stdout] 20 | use std::{collections::HashSet, fmt::format, path::PathBuf}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Span` and `Value` [INFO] [stdout] --> marston/src/validator/conditions.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | Span, [INFO] [stdout] | ^^^^ [INFO] [stdout] 3 | ast::{Block, Value}, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `collections::HashMap` [INFO] [stdout] --> marston/src/validator/conditions.rs:6:11 [INFO] [stdout] | [INFO] [stdout] 6 | use std::{collections::HashMap, fmt::Debug}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `MarstonDocument` and `get_or_intern` [INFO] [stdout] --> marston/src/validator/rules/block.rs:4:16 [INFO] [stdout] | [INFO] [stdout] 4 | Block, MarstonDocument, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 5 | ident_table::{get_or_intern, resolve}, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/rules/block.rs:43:29 [INFO] [stdout] | [INFO] [stdout] 43 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________- [INFO] [stdout] 44 | | kind: ReportKind::Error, [INFO] [stdout] 45 | | message: format!("Duplicate attribute '{}' found in '{block_name}'", attr), [INFO] [stdout] 46 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 49 | | label_vec: spans.iter().skip(1).map(|s| (s.clone(), "Attribute redefined here")).collect_vec() => Color::Yellow, [INFO] [stdout] 50 | | )) [INFO] [stdout] | |_____________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Attribute`, `Block`, `GenericValidator`, `ValueKind`, and `Value` [INFO] [stdout] --> marston/src/validator/rules/document.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | Attribute, Block, MarstonDocument, Value, ValueKind, [INFO] [stdout] | ^^^^^^^^^ ^^^^^ ^^^^^ ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 12 | GenericValidator, Validate, ValidationRule, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `lasso::Spur` [INFO] [stdout] --> marston/src/validator/rules/document.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | use lasso::Spur; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `fmt::format` and `sync::Arc` [INFO] [stdout] --> marston/src/validator/rules/document.rs:27:33 [INFO] [stdout] | [INFO] [stdout] 27 | use std::{collections::HashMap, fmt::format, sync::Arc}; [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> marston/src/validator/rules/document.rs:70:12 [INFO] [stdout] | [INFO] [stdout] 70 | if (!is_unique_tag(name.as_str())) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 70 - if (!is_unique_tag(name.as_str())) { [INFO] [stdout] 70 + if !is_unique_tag(name.as_str()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/rules/document.rs:74:25 [INFO] [stdout] | [INFO] [stdout] 74 | ReportsBag::add(report!( [INFO] [stdout] | _________________________- [INFO] [stdout] 75 | | kind: ReportKind::Error, [INFO] [stdout] 76 | | message: format!("Duplicate block name '{}' found", name), [INFO] [stdout] 77 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 81 | | notes: [format!("'{name}' is a block that should occur only once per document")] [INFO] [stdout] 82 | | )); [INFO] [stdout] | |_________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/rules/document.rs:101:25 [INFO] [stdout] | [INFO] [stdout] 101 | ReportsBag::add(report!( [INFO] [stdout] | _________________________- [INFO] [stdout] 102 | | kind: ReportKind::Error, [INFO] [stdout] 103 | | message: format!("Missing required tags: {}", missing_tags.iter().join(", ")), [INFO] [stdout] 104 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 107 | | notes: ["Ensure that your document includes all required tags in its root"] [INFO] [stdout] 108 | | )); [INFO] [stdout] | |_________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Attribute`, `BlockInfo`, `Block`, `ValidationRule`, `Value`, `conditions::AttributeEquals`, `get_or_intern`, `html::tags::is_unique_tag`, `resolve`, `rules::scripts::validate_script`, and `validate_block_no_children` [INFO] [stdout] --> marston/src/validator/rules/head.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | Attribute, Block, MarstonDocument, Value, ValueKind, [INFO] [stdout] | ^^^^^^^^^ ^^^^^ ^^^^^ [INFO] [stdout] 5 | ident_table::{get_or_intern, resolve}, [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^ [INFO] [stdout] 6 | }, [INFO] [stdout] 7 | html::tags::is_unique_tag, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 8 | info::{BlockInfo, Info}, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 12 | GenericValidator, Validate, ValidationRule, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 13 | conditions::AttributeEquals, rules::scripts::validate_script, validate_block_no_children, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `lasso::Spur` [INFO] [stdout] --> marston/src/validator/rules/head.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | use lasso::Spur; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `collections::HashMap`, `fmt::format`, and `sync::Arc` [INFO] [stdout] --> marston/src/validator/rules/head.rs:19:11 [INFO] [stdout] | [INFO] [stdout] 19 | use std::{collections::HashMap, fmt::format, sync::Arc}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `RequiredExtension` [INFO] [stdout] --> marston/src/validator/rules/head.rs:20:29 [INFO] [stdout] | [INFO] [stdout] 20 | use crate::validator::url::{RequiredExtension, UrlValidation}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> marston/src/validator/rules/head.rs:46:8 [INFO] [stdout] | [INFO] [stdout] 46 | if (info.no_head) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 46 - if (info.no_head) { [INFO] [stdout] 46 + if info.no_head { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> marston/src/validator/rules/head.rs:61:8 [INFO] [stdout] | [INFO] [stdout] 61 | if (info.no_head) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 61 - if (info.no_head) { [INFO] [stdout] 61 + if info.no_head { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/rules/head.rs:73:41 [INFO] [stdout] | [INFO] [stdout] 73 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________________- [INFO] [stdout] 74 | | kind: ReportKind::Warning, [INFO] [stdout] 75 | | message: "Empty keyword found".to_string(), [INFO] [stdout] 76 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 79 | | notes: ["Consider removing empty keywords from the list"] [INFO] [stdout] 80 | | )); [INFO] [stdout] | |_________________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> marston/src/validator/rules/head.rs:89:8 [INFO] [stdout] | [INFO] [stdout] 89 | if (info.no_head) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 89 - if (info.no_head) { [INFO] [stdout] 89 + if info.no_head { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/rules/head.rs:103:37 [INFO] [stdout] | [INFO] [stdout] 103 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________________- [INFO] [stdout] 104 | | kind: ReportKind::Warning, [INFO] [stdout] 105 | | message: "Uncommon character encoding".to_string(), [INFO] [stdout] 106 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 109 | | notes: ["UTF-8 is the recommended encoding for web documents"] [INFO] [stdout] 110 | | )); [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> marston/src/validator/rules/head.rs:118:8 [INFO] [stdout] | [INFO] [stdout] 118 | if (info.no_head) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 118 - if (info.no_head) { [INFO] [stdout] 118 + if info.no_head { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/rules/head.rs:129:33 [INFO] [stdout] | [INFO] [stdout] 129 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________- [INFO] [stdout] 130 | | kind: ReportKind::Warning, [INFO] [stdout] 131 | | message: "Viewport should include 'width=device-width' for mobile compatibility".to_string(), [INFO] [stdout] 132 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 135 | | notes: ["Example: 'width=device-width, initial-scale=1.0'"] [INFO] [stdout] 136 | | )); [INFO] [stdout] | |_________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> marston/src/validator/rules/head.rs:142:8 [INFO] [stdout] | [INFO] [stdout] 142 | if (info.no_head) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 142 - if (info.no_head) { [INFO] [stdout] 142 + if info.no_head { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> marston/src/validator/rules/head.rs:168:8 [INFO] [stdout] | [INFO] [stdout] 168 | if (info.no_head) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 168 - if (info.no_head) { [INFO] [stdout] 168 + if info.no_head { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Block` and `ident_table::get_or_intern` [INFO] [stdout] --> marston/src/validator/rules/link.rs:3:11 [INFO] [stdout] | [INFO] [stdout] 3 | ast::{Block, MarstonDocument, ident_table::get_or_intern}, [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/rules/link.rs:90:33 [INFO] [stdout] | [INFO] [stdout] 90 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________- [INFO] [stdout] 91 | | kind: ReportKind::Error, [INFO] [stdout] 92 | | message: format!("Found invalid MIME type: {val}. {err}"), [INFO] [stdout] 93 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 96 | | )); [INFO] [stdout] | |_________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Block` and `Span` [INFO] [stdout] --> marston/src/validator/rules/scripts.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | Span, [INFO] [stdout] | ^^^^ [INFO] [stdout] 3 | ast::{Block, MarstonDocument, ident_table::get_or_intern}, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ValidationContext` [INFO] [stdout] --> marston/src/validator/url.rs:8:33 [INFO] [stdout] | [INFO] [stdout] 8 | conditions::{Condition, ValidationContext}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/url.rs:54:37 [INFO] [stdout] | [INFO] [stdout] 54 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________________- [INFO] [stdout] 55 | | kind: ReportKind::Error, [INFO] [stdout] 56 | | message: format!("URL should have '.{}' extension. {}", extension, result.messages.first().unwrap()), [INFO] [stdout] 57 | | labels: { [INFO] [stdout] 58 | | span.clone() => "invalid URL extension" => Color::BrightRed [INFO] [stdout] 59 | | }, [INFO] [stdout] 60 | | )); [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/url.rs:76:45 [INFO] [stdout] | [INFO] [stdout] 76 | ... ReportsBag::add(report!( [INFO] [stdout] | _______________________________________- [INFO] [stdout] 77 | | ... kind: ReportKind::Error, [INFO] [stdout] 78 | | ... message: format!("Found disallowed URL protocol: {}.", url.scheme()), [INFO] [stdout] 79 | | ... labels: { [INFO] [stdout] 80 | | ... span.clone() => "disallowed invalid URL" => Color::BrightRed [INFO] [stdout] 81 | | ... }, [INFO] [stdout] 82 | | ... )); [INFO] [stdout] | |_______________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/url.rs:98:41 [INFO] [stdout] | [INFO] [stdout] 98 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________________- [INFO] [stdout] 99 | | kind: ReportKind::Error, [INFO] [stdout] 100 | | message: format!("Value should be a valid URL or path. {err}"), [INFO] [stdout] 101 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 108 | | )); [INFO] [stdout] | |_________________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/url.rs:121:37 [INFO] [stdout] | [INFO] [stdout] 121 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________________- [INFO] [stdout] 122 | | kind: ReportKind::Warning, [INFO] [stdout] 123 | | message: "Consider using HTTPS instead of HTTP".to_string(), [INFO] [stdout] 124 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 131 | | )); [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:123:33 [INFO] [stdout] | [INFO] [stdout] 123 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________- [INFO] [stdout] 124 | | kind: ReportKind::Error, [INFO] [stdout] 125 | | message: "Value must be a string".to_string(), [INFO] [stdout] 126 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 129 | | notes: ["Use quotes to define a string value, e.g., \"my value\""] [INFO] [stdout] 130 | | )); [INFO] [stdout] | |_________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:142:33 [INFO] [stdout] | [INFO] [stdout] 142 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________- [INFO] [stdout] 143 | | kind: ReportKind::Error, [INFO] [stdout] 144 | | message: "Value must be a number".to_string(), [INFO] [stdout] 145 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 148 | | notes: ["Use a numeric value, e.g., 42 or 3.14"] [INFO] [stdout] 149 | | )); [INFO] [stdout] | |_________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:161:33 [INFO] [stdout] | [INFO] [stdout] 161 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________- [INFO] [stdout] 162 | | kind: ReportKind::Error, [INFO] [stdout] 163 | | message: "Value must be a boolean".to_string(), [INFO] [stdout] 164 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 167 | | notes: ["Use 'true' or 'false' as the value"] [INFO] [stdout] 168 | | )); [INFO] [stdout] | |_________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:183:45 [INFO] [stdout] | [INFO] [stdout] 183 | ... ReportsBag::add(report!( [INFO] [stdout] | _______________________________________- [INFO] [stdout] 184 | | ... kind: ReportKind::Error, [INFO] [stdout] 185 | | ... message: format!("Array item must be of type {:?}", inner_ty), [INFO] [stdout] 186 | | ... labels: { [INFO] [stdout] ... | [INFO] [stdout] 189 | | ... notes: ["Ensure all items in the array match the expected type"] [INFO] [stdout] 190 | | ... )); [INFO] [stdout] | |_______________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:197:33 [INFO] [stdout] | [INFO] [stdout] 197 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________- [INFO] [stdout] 198 | | kind: ReportKind::Error, [INFO] [stdout] 199 | | message: "Value must be an array".to_string(), [INFO] [stdout] 200 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 203 | | notes: ["Use square brackets to define an array, e.g., [1, 2, 3]"] [INFO] [stdout] 204 | | )); [INFO] [stdout] | |_________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:224:33 [INFO] [stdout] | [INFO] [stdout] 224 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________- [INFO] [stdout] 225 | | kind: ReportKind::Error, [INFO] [stdout] 226 | | message: "String cannot be empty".to_string(), [INFO] [stdout] 227 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 230 | | notes: ["Provide a meaningful non-empty value"] [INFO] [stdout] 231 | | )); [INFO] [stdout] | |_________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:244:41 [INFO] [stdout] | [INFO] [stdout] 244 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________________- [INFO] [stdout] 245 | | kind: ReportKind::Error, [INFO] [stdout] 246 | | message: format!("Disallowed character found: '{}'", char), [INFO] [stdout] 247 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 250 | | notes: ["Remove the disallowed character"] [INFO] [stdout] 251 | | )); [INFO] [stdout] | |_________________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:262:37 [INFO] [stdout] | [INFO] [stdout] 262 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________________- [INFO] [stdout] 263 | | kind: ReportKind::Error, [INFO] [stdout] 264 | | message: "Array cannot be empty".to_string(), [INFO] [stdout] 265 | | labels: { [INFO] [stdout] 266 | | span.clone() => "This array must not be empty" => Color::BrightRed [INFO] [stdout] 267 | | }, [INFO] [stdout] 268 | | )) [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:279:37 [INFO] [stdout] | [INFO] [stdout] 279 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________________- [INFO] [stdout] 280 | | kind: ReportKind::Warning, [INFO] [stdout] 281 | | message: format!("String too short (minimum {} characters)", min), [INFO] [stdout] 282 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 285 | | notes: [format!("Minimum recommended length is {} characters", min)] [INFO] [stdout] 286 | | )); [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:297:37 [INFO] [stdout] | [INFO] [stdout] 297 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________________- [INFO] [stdout] 298 | | kind: ReportKind::Error, [INFO] [stdout] 299 | | message: format!("String too short (minimum {} characters)", min), [INFO] [stdout] 300 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 303 | | notes: [format!("Minimum required length is {} characters", min)] [INFO] [stdout] 304 | | )); [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:315:37 [INFO] [stdout] | [INFO] [stdout] 315 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________________- [INFO] [stdout] 316 | | kind: ReportKind::Warning, [INFO] [stdout] 317 | | message: format!("String exceeds {} characters", max), [INFO] [stdout] 318 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 321 | | notes: [format!("Maximum recommended length is {} characters", max)] [INFO] [stdout] 322 | | )); [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:333:37 [INFO] [stdout] | [INFO] [stdout] 333 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________________- [INFO] [stdout] 334 | | kind: ReportKind::Error, [INFO] [stdout] 335 | | message: format!("String exceeds {} characters", max), [INFO] [stdout] 336 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 339 | | notes: [format!("Maximum allowed length is {} characters", max)] [INFO] [stdout] 340 | | )); [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:351:37 [INFO] [stdout] | [INFO] [stdout] 351 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________________- [INFO] [stdout] 352 | | kind: ReportKind::Warning, [INFO] [stdout] 353 | | message: "Generic or uninformative value".to_string(), [INFO] [stdout] 354 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 357 | | notes: ["Generic values provide little context or value"] [INFO] [stdout] 358 | | )); [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:370:37 [INFO] [stdout] | [INFO] [stdout] 370 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________________- [INFO] [stdout] 371 | | kind: ReportKind::Warning, [INFO] [stdout] 372 | | message: "Potentially invalid language code".to_string(), [INFO] [stdout] 373 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 380 | | )); [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:389:33 [INFO] [stdout] | [INFO] [stdout] 389 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________- [INFO] [stdout] 390 | | kind: ReportKind::Error, [INFO] [stdout] 391 | | message: format!("Number must be at least {}", min), [INFO] [stdout] 392 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 395 | | notes: [format!("Minimum allowed value is {}", min)] [INFO] [stdout] 396 | | )); [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:404:33 [INFO] [stdout] | [INFO] [stdout] 404 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________- [INFO] [stdout] 405 | | kind: ReportKind::Error, [INFO] [stdout] 406 | | message: format!("Number must be at most {}", max), [INFO] [stdout] 407 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 410 | | notes: [format!("Maximum allowed value is {}", max)] [INFO] [stdout] 411 | | )); [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:497:29 [INFO] [stdout] | [INFO] [stdout] 497 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________- [INFO] [stdout] 498 | | kind: ReportKind::Error, [INFO] [stdout] 499 | | message: format!("'{}' should not have children", name_str), [INFO] [stdout] 500 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 503 | | notes: [format!("Remove any child blocks or attributes from '{}'", name_str)] [INFO] [stdout] 504 | | )); [INFO] [stdout] | |_____________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:517:33 [INFO] [stdout] | [INFO] [stdout] 517 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________- [INFO] [stdout] 518 | | kind: ReportKind::Error, [INFO] [stdout] 519 | | message: format!("'{}' should have one of the following attributes: {:?}", name_str, required), [INFO] [stdout] 520 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 523 | | notes: [format!("Add one of the following attributes to '{}': {:?}", name_str, required)] [INFO] [stdout] 524 | | )) [INFO] [stdout] | |_________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnested or-patterns [INFO] [stdout] --> marston/src/validator/mod.rs:541:13 [INFO] [stdout] | [INFO] [stdout] 541 | (Some(attr), None, TargetType::Attribute) | (Some(attr), None, TargetType::Either) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns [INFO] [stdout] = note: `-W clippy::unnested-or-patterns` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::unnested_or_patterns)]` [INFO] [stdout] help: nest the patterns [INFO] [stdout] | [INFO] [stdout] 541 - (Some(attr), None, TargetType::Attribute) | (Some(attr), None, TargetType::Either) => { [INFO] [stdout] 541 + (Some(attr), None, TargetType::Attribute | TargetType::Either) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnested or-patterns [INFO] [stdout] --> marston/src/validator/mod.rs:544:13 [INFO] [stdout] | [INFO] [stdout] 544 | (None, Some(blocks), TargetType::Block) | (None, Some(blocks), TargetType::Either) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns [INFO] [stdout] help: nest the patterns [INFO] [stdout] | [INFO] [stdout] 544 - (None, Some(blocks), TargetType::Block) | (None, Some(blocks), TargetType::Either) => { [INFO] [stdout] 544 + (None, Some(blocks), TargetType::Block | TargetType::Either) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:547:41 [INFO] [stdout] | [INFO] [stdout] 547 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________________- [INFO] [stdout] 548 | | kind: ReportKind::Error, [INFO] [stdout] 549 | | message: format!("'{}' should not be used", name_str), [INFO] [stdout] 550 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 553 | | notes: [format!("Remove '{}' from '{}'", name_str, parent_name)] [INFO] [stdout] 554 | | )); [INFO] [stdout] | |_________________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:561:33 [INFO] [stdout] | [INFO] [stdout] 561 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________- [INFO] [stdout] 562 | | kind: ReportKind::Error, [INFO] [stdout] 563 | | message: format!("'{}' should be a block, not an attribute", name_str), [INFO] [stdout] 564 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 567 | | notes: [format!("Define '{}' as a block instead of an attribute", name_str)] [INFO] [stdout] 568 | | )); [INFO] [stdout] | |_________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:577:37 [INFO] [stdout] | [INFO] [stdout] 577 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________________- [INFO] [stdout] 578 | | kind: ReportKind::Error, [INFO] [stdout] 579 | | message: format!("'{}' should be an attribute, not a block", name_str), [INFO] [stdout] 580 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 583 | | notes: [format!("Define '{}' as an attribute instead of a block", name_str)] [INFO] [stdout] 584 | | )); [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:589:37 [INFO] [stdout] | [INFO] [stdout] 589 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________________- [INFO] [stdout] 590 | | kind: ReportKind::Error, [INFO] [stdout] 591 | | message: format!("'{}' defined as both attribute and block", name_str), [INFO] [stdout] 592 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 596 | | notes: [format!("'{}' should be defined only once, either as attribute or block", name_str)] [INFO] [stdout] 597 | | )); [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:607:30 [INFO] [stdout] | [INFO] [stdout] 607 | let report = report!( [INFO] [stdout] | ______________________________- [INFO] [stdout] 608 | | kind: ReportKind::Error, [INFO] [stdout] 609 | | message: format!("Missing required {} '{}'", expected_type, name_str), [INFO] [stdout] 610 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 613 | | notes: [format!("Add the required '{}' {}", name_str, expected_type)] [INFO] [stdout] 614 | | ); [INFO] [stdout] | |_________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:650:33 [INFO] [stdout] | [INFO] [stdout] 650 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________- [INFO] [stdout] 651 | | kind: ReportKind::Error, [INFO] [stdout] 652 | | message: format!("Attribute '{}' is not valid in this context.", resolve(attr.key.key)), [INFO] [stdout] 653 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 656 | | notes: [result.messages.join(". ")] [INFO] [stdout] 657 | | )) [INFO] [stdout] | |_________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:669:37 [INFO] [stdout] | [INFO] [stdout] 669 | ReportsBag::add(report!( [INFO] [stdout] | _____________________________________- [INFO] [stdout] 670 | | kind: ReportKind::Warning, [INFO] [stdout] 671 | | message: format!("File should have {} extension", expected_ext), [INFO] [stdout] 672 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 675 | | notes: [format!("Ensure the file has a {} extension", expected_ext)] [INFO] [stdout] 676 | | )); [INFO] [stdout] | |_____________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:689:41 [INFO] [stdout] | [INFO] [stdout] 689 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________________- [INFO] [stdout] 690 | | kind: ReportKind::Error, [INFO] [stdout] 691 | | message: format!("Unknown value '{}' specified", s.trim()), [INFO] [stdout] 692 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 698 | | )); [INFO] [stdout] | |_________________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:700:41 [INFO] [stdout] | [INFO] [stdout] 700 | ReportsBag::add(report!( [INFO] [stdout] | _________________________________________- [INFO] [stdout] 701 | | kind: ReportKind::Error, [INFO] [stdout] 702 | | message: format!("Uncommon value '{}' specified", s.trim()), [INFO] [stdout] 703 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 710 | | )); [INFO] [stdout] | |_________________________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:725:25 [INFO] [stdout] | [INFO] [stdout] 725 | ReportsBag::add(report!( [INFO] [stdout] | _________________________- [INFO] [stdout] 726 | | kind: ReportKind::Error, [INFO] [stdout] 727 | | message: format!("{} blocks should not contain any children", block_type), [INFO] [stdout] 728 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 735 | | )); [INFO] [stdout] | |_________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[allow] attribute found [INFO] [stdout] --> marston/src/reports.rs:87:11 [INFO] [stdout] | [INFO] [stdout] 87 | #[allow(unused_mut)] [INFO] [stdout] | ^^^^^ help: replace it with: `expect` [INFO] [stdout] | [INFO] [stdout] ::: marston/src/validator/mod.rs:785:25 [INFO] [stdout] | [INFO] [stdout] 785 | ReportsBag::add(report!( [INFO] [stdout] | _________________________- [INFO] [stdout] 786 | | kind: ReportKind::Warning, [INFO] [stdout] 787 | | message: format!("{} block appears to be empty", block_type), [INFO] [stdout] 788 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 795 | | )); [INFO] [stdout] | |_________- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes [INFO] [stdout] = note: this warning originates in the macro `report` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![feature]` [INFO] [stdout] --> marston/src/lib.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | #[feature(let_chains)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this attribute does not have an `!`, which means it is applied to this use [INFO] [stdout] --> marston/src/lib.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | use camino::Utf8PathBuf; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(unused_attributes)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Validate` [INFO] [stdout] --> marston/src/validator/rules/head.rs:12:27 [INFO] [stdout] | [INFO] [stdout] 12 | GenericValidator, Validate, ValidationRule, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `itertools::Itertools` [INFO] [stdout] --> marston/src/validator/rules/head.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | use itertools::Itertools; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `info` [INFO] [stdout] --> marston/src/validator/rules/block.rs:28:54 [INFO] [stdout] | [INFO] [stdout] 28 | pub fn validate_attributes_uniqueness(block: &Block, info: &mut Info) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_info` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `doc` [INFO] [stdout] --> marston/src/validator/rules/document.rs:86:29 [INFO] [stdout] | [INFO] [stdout] 86 | pub fn ensure_required_tags(doc: &MarstonDocument, info: &mut Info) { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_doc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `span` [INFO] [stdout] --> marston/src/validator/rules/head.rs:69:30 [INFO] [stdout] | [INFO] [stdout] 69 | .check_value(|value, span, _| { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_span` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `ValueKindHelper` is never used [INFO] [stdout] --> marston/src/ast/mod.rs:122:10 [INFO] [stdout] | [INFO] [stdout] 122 | pub enum ValueKindHelper { [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 `ctx` is never read [INFO] [stdout] --> marston/src/ast/parser.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 19 | pub struct Parser<'a> { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] 20 | pub ctx: &'a Context, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Parser` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> marston/src/ast/parser.rs:234:12 [INFO] [stdout] | [INFO] [stdout] 27 | impl<'a> Parser<'a> { [INFO] [stdout] | ------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 234 | pub fn check_any(&self, token_types: &[TokenKind]) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 249 | pub fn match_any(&mut self, token_types: &[TokenKind]) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 284 | pub fn consume_any(&mut self, token_types: &[TokenKind], message: &str) -> Option<&Token> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 294 | pub fn consume_any_with_span( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 322 | pub fn consume_identifier_with_span( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 338 | pub fn consume_specific_identifier(&mut self, expected: &str, message: &str) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 350 | pub fn skip_until(&mut self, token_types: &[TokenKind]) -> bool { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 373 | fn error_expected_any_token(&mut self, expected: &[TokenKind], message: &str) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 383 | fn error_expected_any_token_at_span( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 406 | fn error_expected_identifier_at_span(&mut self, message: &str, span: Range) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 434 | pub fn error_at_previous(&self, message: &str) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 448 | fn error_at_end(&self, message: &str) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 460 | pub fn error_with_label(&self, message: &str, label_span: Range, label_message: &str) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 470 | pub fn error_with_note(&self, message: &str, note: &str) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 479 | pub fn check_sequence(&self, sequence: &[TokenKind]) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `write` and `newline` are never used [INFO] [stdout] --> marston/src/codegen/mod.rs:33:12 [INFO] [stdout] | [INFO] [stdout] 17 | impl Codegen { [INFO] [stdout] | ------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 33 | pub fn write(&mut self, text: &str) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 44 | pub fn newline(&mut self) -> &mut Self { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `cwd` is never read [INFO] [stdout] --> marston/src/context.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 18 | pub struct Context { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] 19 | config: Config, [INFO] [stdout] 20 | cwd: MPath, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Context` 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 `find_element` is never used [INFO] [stdout] --> marston/src/html/ir.rs:353:4 [INFO] [stdout] | [INFO] [stdout] 353 | fn find_element(elements: &mut [IrNode], tag: Spur) -> &mut IrElement { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `BlockId` is never constructed [INFO] [stdout] --> marston/src/info.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 2 | pub struct BlockId(pub usize); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `id`, `depth`, and `parent` are never read [INFO] [stdout] --> marston/src/info.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 12 | pub struct BlockInfo { [INFO] [stdout] | --------- fields in this struct [INFO] [stdout] 13 | pub id: usize, [INFO] [stdout] | ^^ [INFO] [stdout] ... [INFO] [stdout] 16 | pub depth: usize, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 17 | pub parent: Option, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `BlockInfo` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `all_blocks_named` and `find_blocks_by_name_and_parent` are never used [INFO] [stdout] --> marston/src/info.rs:47:12 [INFO] [stdout] | [INFO] [stdout] 31 | impl Info { [INFO] [stdout] | --------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 47 | pub fn all_blocks_named(&self, name: Spur) -> Vec<&BlockInfo> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 54 | pub fn find_blocks_by_name_and_parent(&self, name: Spur, parent_name: Spur) -> Vec<&BlockInfo> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `to_start`, `move_by`, and `move_back_by` are never used [INFO] [stdout] --> marston/src/span.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait SpanUtils { [INFO] [stdout] | --------- methods in this trait [INFO] [stdout] 4 | fn to_start(&self) -> Range; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 8 | fn move_by(&self, offset: usize) -> Range; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 9 | fn move_back_by(&self, offset: usize) -> Range; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `url_validation` is never read [INFO] [stdout] --> marston/src/validator/mod.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 48 | pub struct GenericValidator { [INFO] [stdout] | ---------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 59 | url_validation: Option, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `must_be_number`, `string_min_length_error`, `string_max_length_error`, `number_min`, `number_max`, and `number_positive` are never used [INFO] [stdout] --> marston/src/validator/mod.rs:139:12 [INFO] [stdout] | [INFO] [stdout] 64 | impl GenericValidator { [INFO] [stdout] | --------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 139 | pub fn must_be_number(mut self) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 292 | pub fn string_min_length_error(self, min: usize) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 328 | pub fn string_max_length_error(self, max: usize) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 386 | pub fn number_min(self, min: f64) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 401 | pub fn number_max(self, max: f64) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 416 | pub fn number_positive(self) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `join` is never used [INFO] [stdout] --> marston/src/validator/conditions.rs:21:12 [INFO] [stdout] | [INFO] [stdout] 13 | impl ConditionResult { [INFO] [stdout] | -------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 21 | pub fn join(self, other: ConditionResult) -> Self { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `And` is never constructed [INFO] [stdout] --> marston/src/validator/conditions.rs:72:12 [INFO] [stdout] | [INFO] [stdout] 72 | pub struct And { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `is_required` is never used [INFO] [stdout] --> marston/src/validator/conditions.rs:89:12 [INFO] [stdout] | [INFO] [stdout] 83 | impl GenericValidator { [INFO] [stdout] | --------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 89 | pub fn is_required(&self, context: &ValidationContext) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: package `marston` is missing `package.description` metadata [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata [INFO] [stdout] = note: `-W clippy::cargo-common-metadata` implied by `-W clippy::cargo` [INFO] [stdout] = help: to override `-W clippy::cargo` add `#[allow(clippy::cargo_common_metadata)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: package `marston` is missing `either package.license or package.license_file` metadata [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: package `marston` is missing `package.repository` metadata [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: package `marston` is missing `package.readme` metadata [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: package `marston` is missing `package.keywords` metadata [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: package `marston` is missing `package.categories` metadata [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: package `marston-core` is missing `package.description` metadata [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: package `marston-core` is missing `either package.license or package.license_file` metadata [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: package `marston-core` is missing `package.repository` metadata [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: package `marston-core` is missing `package.readme` metadata [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: package `marston-core` is missing `package.keywords` metadata [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: package `marston-core` is missing `package.categories` metadata [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> marston/src/ast/parser.rs:171:20 [INFO] [stdout] | [INFO] [stdout] 171 | if !self [INFO] [stdout] | ____________________^ [INFO] [stdout] 172 | | .consume(&TokenKind::BracketClose, "Expected closing bracket after array") [INFO] [stdout] 173 | | .is_some() [INFO] [stdout] | |______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `-W clippy::nonminimal-bool` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::nonminimal_bool)]` [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 171 ~ if self [INFO] [stdout] 172 + .consume(&TokenKind::BracketClose, "Expected closing bracket after array").is_none() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `self` argument [INFO] [stdout] --> marston/src/ast/parser.rs:424:21 [INFO] [stdout] | [INFO] [stdout] 424 | pub fn error_at(&self, message: &str, span: Range) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider refactoring to an associated function [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_self [INFO] [stdout] = note: `-W clippy::unused-self` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::unused_self)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `self` argument [INFO] [stdout] --> marston/src/ast/parser.rs:460:29 [INFO] [stdout] | [INFO] [stdout] 460 | pub fn error_with_label(&self, message: &str, label_span: Range, label_message: &str) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider refactoring to an associated function [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_self [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `self` argument [INFO] [stdout] --> marston/src/ast/parser.rs:470:28 [INFO] [stdout] | [INFO] [stdout] 470 | pub fn error_with_note(&self, message: &str, note: &str) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider refactoring to an associated function [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_self [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> marston/src/ast/mod.rs:22:41 [INFO] [stdout] | [INFO] [stdout] 22 | pub fn find_in_parent(&self, names: &Vec) -> Vec<&Block> { [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: `-W clippy::ptr-arg` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::ptr_arg)]` [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 22 - pub fn find_in_parent(&self, names: &Vec) -> Vec<&Block> { [INFO] [stdout] 22 + pub fn find_in_parent(&self, names: &[Spur]) -> Vec<&Block> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/ast/mod.rs:31:13 [INFO] [stdout] | [INFO] [stdout] 31 | / if let Some(ref interned) = block.name { [INFO] [stdout] 32 | | if interned.key == first_name { [INFO] [stdout] 33 | | current_blocks.push(block); [INFO] [stdout] 34 | | } [INFO] [stdout] 35 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `-W clippy::collapsible-if` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::collapsible_if)]` [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 31 ~ if let Some(ref interned) = block.name [INFO] [stdout] 32 ~ && interned.key == first_name { [INFO] [stdout] 33 | current_blocks.push(block); [INFO] [stdout] 34 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/ast/mod.rs:42:21 [INFO] [stdout] | [INFO] [stdout] 42 | / if let Node::Block(child_block) = child { [INFO] [stdout] 43 | | if let Some(ref interned) = child_block.name { [INFO] [stdout] 44 | | if interned.key == *name { [INFO] [stdout] 45 | | next_blocks.push(child_block); [INFO] [stdout] ... | [INFO] [stdout] 48 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 42 ~ if let Node::Block(child_block) = child [INFO] [stdout] 43 ~ && let Some(ref interned) = child_block.name { [INFO] [stdout] 44 | if interned.key == *name { [INFO] [stdout] 45 | next_blocks.push(child_block); [INFO] [stdout] 46 | } [INFO] [stdout] 47 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/ast/mod.rs:43:25 [INFO] [stdout] | [INFO] [stdout] 43 | / if let Some(ref interned) = child_block.name { [INFO] [stdout] 44 | | if interned.key == *name { [INFO] [stdout] 45 | | next_blocks.push(child_block); [INFO] [stdout] 46 | | } [INFO] [stdout] 47 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 43 ~ if let Some(ref interned) = child_block.name [INFO] [stdout] 44 ~ && interned.key == *name { [INFO] [stdout] 45 | next_blocks.push(child_block); [INFO] [stdout] 46 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/ast/mod.rs:87:9 [INFO] [stdout] | [INFO] [stdout] 87 | / if let Some(n) = &self.name { [INFO] [stdout] 88 | | if n.key == name { [INFO] [stdout] 89 | | results.push(self); [INFO] [stdout] 90 | | } [INFO] [stdout] 91 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 87 ~ if let Some(n) = &self.name [INFO] [stdout] 88 ~ && n.key == name { [INFO] [stdout] 89 | results.push(self); [INFO] [stdout] 90 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/ast/mod.rs:108:13 [INFO] [stdout] | [INFO] [stdout] 108 | / if let Node::Block(child) = child { [INFO] [stdout] 109 | | if let Some(child_name) = &child.name [INFO] [stdout] 110 | | && child_name.key == name [INFO] [stdout] ... | [INFO] [stdout] 114 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 108 ~ if let Node::Block(child) = child [INFO] [stdout] 109 ~ && let Some(child_name) = &child.name [INFO] [stdout] 110 | && child_name.key == name [INFO] [stdout] 111 | { [INFO] [stdout] 112 | results.push(child); [INFO] [stdout] 113 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> marston/src/ast/mod.rs:165:9 [INFO] [stdout] | [INFO] [stdout] 165 | / match (self, other) { [INFO] [stdout] 166 | | (ValueKind::String(_), ValueKind::String(_)) => true, [INFO] [stdout] 167 | | (ValueKind::Number(_), ValueKind::Number(_)) => true, [INFO] [stdout] 168 | | (ValueKind::Boolean(_), ValueKind::Boolean(_)) => true, [INFO] [stdout] 169 | | (ValueKind::Array(_), ValueKind::Array(_)) => true, [INFO] [stdout] 170 | | _ => false, [INFO] [stdout] 171 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `-W clippy::match-like-matches-macro` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::match_like_matches_macro)]` [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 165 - match (self, other) { [INFO] [stdout] 166 - (ValueKind::String(_), ValueKind::String(_)) => true, [INFO] [stdout] 167 - (ValueKind::Number(_), ValueKind::Number(_)) => true, [INFO] [stdout] 168 - (ValueKind::Boolean(_), ValueKind::Boolean(_)) => true, [INFO] [stdout] 169 - (ValueKind::Array(_), ValueKind::Array(_)) => true, [INFO] [stdout] 170 - _ => false, [INFO] [stdout] 171 - } [INFO] [stdout] 165 + matches!((self, other), (ValueKind::String(_), ValueKind::String(_)) | (ValueKind::Number(_), ValueKind::Number(_)) | (ValueKind::Boolean(_), ValueKind::Boolean(_)) | (ValueKind::Array(_), ValueKind::Array(_))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty String is being created manually [INFO] [stdout] --> marston/src/ast/mod.rs:175:22 [INFO] [stdout] | [INFO] [stdout] 175 | Self::String("".to_string()) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using: `String::new()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_string_new [INFO] [stdout] = note: `-W clippy::manual-string-new` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::manual_string_new)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> marston/src/ast/mod.rs:182:37 [INFO] [stdout] | [INFO] [stdout] 182 | ValueKind::String(s) => write!(f, "{}", s), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] = note: `-W clippy::uninlined-format-args` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::uninlined_format_args)]` [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 182 - ValueKind::String(s) => write!(f, "{}", s), [INFO] [stdout] 182 + ValueKind::String(s) => write!(f, "{s}"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> marston/src/ast/mod.rs:183:37 [INFO] [stdout] | [INFO] [stdout] 183 | ValueKind::Number(n) => write!(f, "{}", n), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 183 - ValueKind::Number(n) => write!(f, "{}", n), [INFO] [stdout] 183 + ValueKind::Number(n) => write!(f, "{n}"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> marston/src/ast/mod.rs:184:38 [INFO] [stdout] | [INFO] [stdout] 184 | ValueKind::Boolean(b) => write!(f, "{}", b), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 184 - ValueKind::Boolean(b) => write!(f, "{}", b), [INFO] [stdout] 184 + ValueKind::Boolean(b) => write!(f, "{b}"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> marston/src/codegen/generator.rs:33:39 [INFO] [stdout] | [INFO] [stdout] 33 | ... if bool { format!("{}", resolve(attr.key)) } else { "".to_string() } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `resolve(attr.key).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: `-W clippy::useless-format` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::useless_format)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty String is being created manually [INFO] [stdout] --> marston/src/codegen/generator.rs:33:81 [INFO] [stdout] | [INFO] [stdout] 33 | ... if bool { format!("{}", resolve(attr.key)) } else { "".to_string() } [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using: `String::new()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_string_new [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Validate` [INFO] [stdout] --> marston/src/validator/rules/head.rs:12:27 [INFO] [stdout] | [INFO] [stdout] 12 | GenericValidator, Validate, ValidationRule, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `itertools::Itertools` [INFO] [stdout] --> marston/src/validator/rules/head.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | use itertools::Itertools; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: docs for function which may panic missing `# Panics` section [INFO] [stdout] --> marston/src/context.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | pub fn file(&self) -> Arc { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: first possible panic found here [INFO] [stdout] --> marston/src/context.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | self.current_file.clone().unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc [INFO] [stdout] = note: `-W clippy::missing-panics-doc` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::missing_panics_doc)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: docs for function which may panic missing `# Panics` section [INFO] [stdout] --> marston/src/context.rs:51:5 [INFO] [stdout] | [INFO] [stdout] 51 | pub fn process_file(&mut self, file: &MPath) -> MResult<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: first possible panic found here [INFO] [stdout] --> marston/src/context.rs:55:26 [INFO] [stdout] | [INFO] [stdout] 55 | ReportsBag::init(self.current_file.clone().unwrap(), Arc::::from(content.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `IrTransformBuilder` [INFO] [stdout] --> marston/src/html/ir.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | / pub fn new() -> Self { [INFO] [stdout] 48 | | Self { transformations: vec![] } [INFO] [stdout] 49 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `-W clippy::new-without-default` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::new_without_default)]` [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 46 + impl Default for IrTransformBuilder { [INFO] [stdout] 47 + fn default() -> Self { [INFO] [stdout] 48 + Self::new() [INFO] [stdout] 49 + } [INFO] [stdout] 50 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing `#[must_use]` attribute on a method returning `Self` [INFO] [stdout] --> marston/src/html/ir.rs:51:5 [INFO] [stdout] | [INFO] [stdout] 51 | / pub fn add_transformation(mut self, transformation: Box) -> Self { [INFO] [stdout] 52 | | self.transformations.push(transformation); [INFO] [stdout] 53 | | self [INFO] [stdout] 54 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use [INFO] [stdout] = note: `-W clippy::return-self-not-must-use` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::return_self_not_must_use)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing `#[must_use]` attribute on a method returning `Self` [INFO] [stdout] --> marston/src/html/ir.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | / pub fn attribute_to_tag( [INFO] [stdout] 57 | | self, [INFO] [stdout] 58 | | source_tag: &str, [INFO] [stdout] 59 | | attr_key: &str, [INFO] [stdout] ... | [INFO] [stdout] 71 | | })) [INFO] [stdout] 72 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing `#[must_use]` attribute on a method returning `Self` [INFO] [stdout] --> marston/src/html/ir.rs:74:5 [INFO] [stdout] | [INFO] [stdout] 74 | / pub fn move_attribute_to_root(self, from_tag: &str, attr_key: &str) -> Self { [INFO] [stdout] 75 | | self.add_transformation(Box::new(MoveAttributeToRootTransform { [INFO] [stdout] 76 | | from_tag: get_or_intern(from_tag), [INFO] [stdout] 77 | | attr_key: get_or_intern(attr_key), [INFO] [stdout] 78 | | })) [INFO] [stdout] 79 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing `#[must_use]` attribute on a method returning `Self` [INFO] [stdout] --> marston/src/html/ir.rs:81:5 [INFO] [stdout] | [INFO] [stdout] 81 | / pub fn move_attribute(self, from_tag: &str, to_tag: &str, attr_key: &str) -> Self { [INFO] [stdout] 82 | | self.add_transformation(Box::new(MoveAttributeTransform { [INFO] [stdout] 83 | | from_tag: get_or_intern(from_tag), [INFO] [stdout] 84 | | to_tag: get_or_intern(to_tag), [INFO] [stdout] 85 | | attr_key: get_or_intern(attr_key), [INFO] [stdout] 86 | | })) [INFO] [stdout] 87 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing `#[must_use]` attribute on a method returning `Self` [INFO] [stdout] --> marston/src/html/ir.rs:89:5 [INFO] [stdout] | [INFO] [stdout] 89 | / pub fn remove_attribute(self, tag: &str, attr_key: &str) -> Self { [INFO] [stdout] 90 | | self.add_transformation(Box::new(RemoveAttributeTransform { [INFO] [stdout] 91 | | tag: get_or_intern(tag), [INFO] [stdout] 92 | | attr_key: get_or_intern(attr_key), [INFO] [stdout] 93 | | })) [INFO] [stdout] 94 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing `#[must_use]` attribute on a method returning `Self` [INFO] [stdout] --> marston/src/html/ir.rs:96:5 [INFO] [stdout] | [INFO] [stdout] 96 | / pub fn attribute_to_element(self, source_tag: &str, attr_key: &str, target_tag: &str) -> Self { [INFO] [stdout] 97 | | self.add_transformation(Box::new(AttributeToElementTransform { [INFO] [stdout] 98 | | source_tag: get_or_intern(source_tag), [INFO] [stdout] 99 | | attr_key: get_or_intern(attr_key), [INFO] [stdout] 100 | | target_tag: get_or_intern(target_tag), [INFO] [stdout] 101 | | })) [INFO] [stdout] 102 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> marston/src/html/ir.rs:109:23 [INFO] [stdout] | [INFO] [stdout] 109 | value_mapper: Option ValueKind>>, [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: `-W clippy::type-complexity` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::type_complexity)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing `#[must_use]` attribute on a method returning `Self` [INFO] [stdout] --> marston/src/html/ir.rs:104:5 [INFO] [stdout] | [INFO] [stdout] 104 | / pub fn attribute_to_meta_tag( [INFO] [stdout] 105 | | self, [INFO] [stdout] 106 | | source_tag: &str, [INFO] [stdout] 107 | | attr_key: &str, [INFO] [stdout] ... | [INFO] [stdout] 116 | | })) [INFO] [stdout] 117 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> marston/src/html/ir.rs:134:19 [INFO] [stdout] | [INFO] [stdout] 134 | value_mapper: Box 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 `if` statement can be collapsed [INFO] [stdout] --> marston/src/html/ir.rs:145:9 [INFO] [stdout] | [INFO] [stdout] 145 | / if element.tag == self.source_tag { [INFO] [stdout] 146 | | if let Some(attr) = element.get_attribute(self.attr_key) { [INFO] [stdout] 147 | | if let Some(children) = (self.value_mapper)(&attr.value) { [INFO] [stdout] 148 | | let mut new_element = IrElement::new(self.target_tag); [INFO] [stdout] ... | [INFO] [stdout] 153 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 145 ~ if element.tag == self.source_tag [INFO] [stdout] 146 ~ && let Some(attr) = element.get_attribute(self.attr_key) { [INFO] [stdout] 147 | if let Some(children) = (self.value_mapper)(&attr.value) { [INFO] [stdout] ... [INFO] [stdout] 151 | } [INFO] [stdout] 152 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/html/ir.rs:146:13 [INFO] [stdout] | [INFO] [stdout] 146 | / if let Some(attr) = element.get_attribute(self.attr_key) { [INFO] [stdout] 147 | | if let Some(children) = (self.value_mapper)(&attr.value) { [INFO] [stdout] 148 | | let mut new_element = IrElement::new(self.target_tag); [INFO] [stdout] 149 | | new_element.children = children; [INFO] [stdout] ... | [INFO] [stdout] 152 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 146 ~ if let Some(attr) = element.get_attribute(self.attr_key) [INFO] [stdout] 147 ~ && let Some(children) = (self.value_mapper)(&attr.value) { [INFO] [stdout] 148 | let mut new_element = IrElement::new(self.target_tag); [INFO] [stdout] 149 | new_element.children = children; [INFO] [stdout] 150 | element.children.push(IrNode::Element(new_element)); [INFO] [stdout] 151 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/html/ir.rs:184:9 [INFO] [stdout] | [INFO] [stdout] 184 | / if element.tag == self.from_tag { [INFO] [stdout] 185 | | if let Some(pos) = element.attributes.iter().position(|attr| attr.key == self.attr_key) [INFO] [stdout] 186 | | { [INFO] [stdout] 187 | | attrs_to_move.push(element.attributes.remove(pos)); [INFO] [stdout] 188 | | } [INFO] [stdout] 189 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 184 ~ if element.tag == self.from_tag [INFO] [stdout] 185 ~ && let Some(pos) = element.attributes.iter().position(|attr| attr.key == self.attr_key) [INFO] [stdout] 186 | { [INFO] [stdout] 187 | attrs_to_move.push(element.attributes.remove(pos)); [INFO] [stdout] 188 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/html/ir.rs:215:9 [INFO] [stdout] | [INFO] [stdout] 215 | / if element.tag == self.from_tag { [INFO] [stdout] 216 | | if let Some(pos) = element.attributes.iter().position(|attr| attr.key == self.attr_key) [INFO] [stdout] 217 | | { [INFO] [stdout] 218 | | attr_to_move = Some(element.attributes.remove(pos)); [INFO] [stdout] 219 | | } [INFO] [stdout] 220 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 215 ~ if element.tag == self.from_tag [INFO] [stdout] 216 ~ && let Some(pos) = element.attributes.iter().position(|attr| attr.key == self.attr_key) [INFO] [stdout] 217 | { [INFO] [stdout] 218 | attr_to_move = Some(element.attributes.remove(pos)); [INFO] [stdout] 219 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/html/ir.rs:222:9 [INFO] [stdout] | [INFO] [stdout] 222 | / if let Some(attr) = attr_to_move { [INFO] [stdout] 223 | | if let Some(target_element) = self.find_element_mut(element, self.to_tag) { [INFO] [stdout] 224 | | target_element.attributes.push(attr); [INFO] [stdout] 225 | | } [INFO] [stdout] 226 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 222 ~ if let Some(attr) = attr_to_move [INFO] [stdout] 223 ~ && let Some(target_element) = self.find_element_mut(element, self.to_tag) { [INFO] [stdout] 224 | target_element.attributes.push(attr); [INFO] [stdout] 225 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/html/ir.rs:245:13 [INFO] [stdout] | [INFO] [stdout] 245 | / if let IrNode::Element(child_element) = child { [INFO] [stdout] 246 | | if let Some(found) = self.find_element_mut(child_element, tag) { [INFO] [stdout] 247 | | return Some(found); [INFO] [stdout] 248 | | } [INFO] [stdout] 249 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 245 ~ if let IrNode::Element(child_element) = child [INFO] [stdout] 246 ~ && let Some(found) = self.find_element_mut(child_element, tag) { [INFO] [stdout] 247 | return Some(found); [INFO] [stdout] 248 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `self` is only used in recursion [INFO] [stdout] --> marston/src/html/ir.rs:236:10 [INFO] [stdout] | [INFO] [stdout] 236 | &self, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] note: `self` used here [INFO] [stdout] --> marston/src/html/ir.rs:246:38 [INFO] [stdout] | [INFO] [stdout] 246 | if let Some(found) = self.find_element_mut(child_element, tag) { [INFO] [stdout] | ^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#self_only_used_in_recursion [INFO] [stdout] = note: `-W clippy::self-only-used-in-recursion` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::self_only_used_in_recursion)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/html/ir.rs:269:9 [INFO] [stdout] | [INFO] [stdout] 269 | / if element.tag == self.source_tag { [INFO] [stdout] 270 | | if let Some(attr) = element.get_attribute(self.attr_key) { [INFO] [stdout] 271 | | let mut new_element = IrElement::new(self.target_tag); [INFO] [stdout] 272 | | new_element [INFO] [stdout] ... | [INFO] [stdout] 277 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 269 ~ if element.tag == self.source_tag [INFO] [stdout] 270 ~ && let Some(attr) = element.get_attribute(self.attr_key) { [INFO] [stdout] 271 | let mut new_element = IrElement::new(self.target_tag); [INFO] [stdout] ... [INFO] [stdout] 275 | element.children.push(IrNode::Element(new_element)); [INFO] [stdout] 276 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> marston/src/html/ir.rs:291:19 [INFO] [stdout] | [INFO] [stdout] 291 | value_mapper: Option ValueKind>>, [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: redundant clone [INFO] [stdout] --> marston/src/html/ir.rs:307:69 [INFO] [stdout] | [INFO] [stdout] 307 | value: ValueKind::String(resolve(self.meta_name).to_string()), [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] note: this value is dropped without further use [INFO] [stdout] --> marston/src/html/ir.rs:307:46 [INFO] [stdout] | [INFO] [stdout] 307 | value: ValueKind::String(resolve(self.meta_name).to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone [INFO] [stdout] = note: requested on the command line with `-W clippy::redundant-clone` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/html/ir.rs:302:9 [INFO] [stdout] | [INFO] [stdout] 302 | / if element.tag == self.source_tag { [INFO] [stdout] 303 | | if let Some(attr) = element.get_attribute(self.attr_key) { [INFO] [stdout] 304 | | let mut new_element = IrElement::new(get_or_intern("meta")); [INFO] [stdout] 305 | | new_element.attributes.push(IrAttribute { [INFO] [stdout] ... | [INFO] [stdout] 318 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 302 ~ if element.tag == self.source_tag [INFO] [stdout] 303 ~ && let Some(attr) = element.get_attribute(self.attr_key) { [INFO] [stdout] 304 | let mut new_element = IrElement::new(get_or_intern("meta")); [INFO] [stdout] ... [INFO] [stdout] 316 | element.children.push(IrNode::Element(new_element)); [INFO] [stdout] 317 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implicitly cloning a `String` by calling `to_string` on its dereferenced type [INFO] [stdout] --> marston/src/html/ir.rs:307:46 [INFO] [stdout] | [INFO] [stdout] 307 | value: ValueKind::String(resolve(self.meta_name).to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `resolve(self.meta_name).clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_clone [INFO] [stdout] = note: `-W clippy::implicit-clone` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::implicit_clone)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty String is being created manually [INFO] [stdout] --> marston/src/html/ir.rs:376:69 [INFO] [stdout] | [INFO] [stdout] 376 | Some(vec![IrNode::Text(value.as_string().unwrap_or(&"".to_string()).clone())]) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using: `String::new()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_string_new [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> marston/src/html/ir.rs:391:25 [INFO] [stdout] | [INFO] [stdout] 391 | / return ValueKind::String( [INFO] [stdout] 392 | | value.iter().map(|v| v.kind.as_string().unwrap()).join(", "), [INFO] [stdout] 393 | | ); [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: `-W clippy::needless-return` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::needless_return)]` [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 391 ~ ValueKind::String( [INFO] [stdout] 392 + value.iter().map(|v| v.kind.as_string().unwrap()).join(", "), [INFO] [stdout] 393 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> marston/src/html/ir.rs:413:52 [INFO] [stdout] | [INFO] [stdout] 413 | attributes: self.attributes.iter().map(|a| a.to_html_attr()).collect(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `super::super::ast::Attribute::to_html_attr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls [INFO] [stdout] = note: `-W clippy::redundant-closure-for-method-calls` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::redundant_closure_for_method_calls)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> marston/src/html/ir.rs:414:48 [INFO] [stdout] | [INFO] [stdout] 414 | children: self.children.iter().map(|n| n.to_html_node()).collect(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `super::super::ast::Node::to_html_node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `info` [INFO] [stdout] --> marston/src/validator/rules/block.rs:28:54 [INFO] [stdout] | [INFO] [stdout] 28 | pub fn validate_attributes_uniqueness(block: &Block, info: &mut Info) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_info` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `doc` [INFO] [stdout] --> marston/src/validator/rules/document.rs:86:29 [INFO] [stdout] | [INFO] [stdout] 86 | pub fn ensure_required_tags(doc: &MarstonDocument, info: &mut Info) { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_doc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `span` [INFO] [stdout] --> marston/src/validator/rules/head.rs:69:30 [INFO] [stdout] | [INFO] [stdout] 69 | .check_value(|value, span, _| { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_span` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `ValueKindHelper` is never used [INFO] [stdout] --> marston/src/ast/mod.rs:122:10 [INFO] [stdout] | [INFO] [stdout] 122 | pub enum ValueKindHelper { [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 `ctx` is never read [INFO] [stdout] --> marston/src/ast/parser.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 19 | pub struct Parser<'a> { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] 20 | pub ctx: &'a Context, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Parser` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> marston/src/ast/parser.rs:234:12 [INFO] [stdout] | [INFO] [stdout] 27 | impl<'a> Parser<'a> { [INFO] [stdout] | ------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 234 | pub fn check_any(&self, token_types: &[TokenKind]) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 249 | pub fn match_any(&mut self, token_types: &[TokenKind]) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 284 | pub fn consume_any(&mut self, token_types: &[TokenKind], message: &str) -> Option<&Token> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 294 | pub fn consume_any_with_span( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 322 | pub fn consume_identifier_with_span( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 338 | pub fn consume_specific_identifier(&mut self, expected: &str, message: &str) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 350 | pub fn skip_until(&mut self, token_types: &[TokenKind]) -> bool { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 373 | fn error_expected_any_token(&mut self, expected: &[TokenKind], message: &str) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 383 | fn error_expected_any_token_at_span( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 406 | fn error_expected_identifier_at_span(&mut self, message: &str, span: Range) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 434 | pub fn error_at_previous(&self, message: &str) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 448 | fn error_at_end(&self, message: &str) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 460 | pub fn error_with_label(&self, message: &str, label_span: Range, label_message: &str) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 470 | pub fn error_with_note(&self, message: &str, note: &str) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 479 | pub fn check_sequence(&self, sequence: &[TokenKind]) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `write` and `newline` are never used [INFO] [stdout] --> marston/src/codegen/mod.rs:33:12 [INFO] [stdout] | [INFO] [stdout] 17 | impl Codegen { [INFO] [stdout] | ------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 33 | pub fn write(&mut self, text: &str) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 44 | pub fn newline(&mut self) -> &mut Self { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `cwd` is never read [INFO] [stdout] --> marston/src/context.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 18 | pub struct Context { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] 19 | config: Config, [INFO] [stdout] 20 | cwd: MPath, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Context` 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 `find_element` is never used [INFO] [stdout] --> marston/src/html/ir.rs:353:4 [INFO] [stdout] | [INFO] [stdout] 353 | fn find_element(elements: &mut [IrNode], tag: Spur) -> &mut IrElement { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `BlockId` is never constructed [INFO] [stdout] --> marston/src/info.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 2 | pub struct BlockId(pub usize); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `id`, `depth`, and `parent` are never read [INFO] [stdout] --> marston/src/info.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 12 | pub struct BlockInfo { [INFO] [stdout] | --------- fields in this struct [INFO] [stdout] 13 | pub id: usize, [INFO] [stdout] | ^^ [INFO] [stdout] ... [INFO] [stdout] 16 | pub depth: usize, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 17 | pub parent: Option, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `BlockInfo` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `all_blocks_named` and `find_blocks_by_name_and_parent` are never used [INFO] [stdout] --> marston/src/info.rs:47:12 [INFO] [stdout] | [INFO] [stdout] 31 | impl Info { [INFO] [stdout] | --------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 47 | pub fn all_blocks_named(&self, name: Spur) -> Vec<&BlockInfo> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 54 | pub fn find_blocks_by_name_and_parent(&self, name: Spur, parent_name: Spur) -> Vec<&BlockInfo> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `to_start`, `move_by`, and `move_back_by` are never used [INFO] [stdout] --> marston/src/span.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait SpanUtils { [INFO] [stdout] | --------- methods in this trait [INFO] [stdout] 4 | fn to_start(&self) -> Range; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 8 | fn move_by(&self, offset: usize) -> Range; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 9 | fn move_back_by(&self, offset: usize) -> Range; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `url_validation` is never read [INFO] [stdout] --> marston/src/validator/mod.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 48 | pub struct GenericValidator { [INFO] [stdout] | ---------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 59 | url_validation: Option, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `must_be_number`, `string_min_length_error`, `string_max_length_error`, `number_min`, `number_max`, and `number_positive` are never used [INFO] [stdout] --> marston/src/validator/mod.rs:139:12 [INFO] [stdout] | [INFO] [stdout] 64 | impl GenericValidator { [INFO] [stdout] | --------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 139 | pub fn must_be_number(mut self) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 292 | pub fn string_min_length_error(self, min: usize) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 328 | pub fn string_max_length_error(self, max: usize) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 386 | pub fn number_min(self, min: f64) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 401 | pub fn number_max(self, max: f64) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 416 | pub fn number_positive(self) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `join` is never used [INFO] [stdout] --> marston/src/validator/conditions.rs:21:12 [INFO] [stdout] | [INFO] [stdout] 13 | impl ConditionResult { [INFO] [stdout] | -------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 21 | pub fn join(self, other: ConditionResult) -> Self { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `And` is never constructed [INFO] [stdout] --> marston/src/validator/conditions.rs:72:12 [INFO] [stdout] | [INFO] [stdout] 72 | pub struct And { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `is_required` is never used [INFO] [stdout] --> marston/src/validator/conditions.rs:89:12 [INFO] [stdout] | [INFO] [stdout] 83 | impl GenericValidator { [INFO] [stdout] | --------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 89 | pub fn is_required(&self, context: &ValidationContext) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: package `marston` is missing `package.description` metadata [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata [INFO] [stdout] = note: `-W clippy::cargo-common-metadata` implied by `-W clippy::cargo` [INFO] [stdout] = help: to override `-W clippy::cargo` add `#[allow(clippy::cargo_common_metadata)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: package `marston` is missing `either package.license or package.license_file` metadata [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: package `marston` is missing `package.repository` metadata [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: package `marston` is missing `package.readme` metadata [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: package `marston` is missing `package.keywords` metadata [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: package `marston` is missing `package.categories` metadata [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: package `marston-core` is missing `package.description` metadata [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: package `marston-core` is missing `either package.license or package.license_file` metadata [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: package `marston-core` is missing `package.repository` metadata [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: package `marston-core` is missing `package.readme` metadata [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: package `marston-core` is missing `package.keywords` metadata [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: package `marston-core` is missing `package.categories` metadata [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> marston/src/ast/parser.rs:171:20 [INFO] [stdout] | [INFO] [stdout] 171 | if !self [INFO] [stdout] | ____________________^ [INFO] [stdout] 172 | | .consume(&TokenKind::BracketClose, "Expected closing bracket after array") [INFO] [stdout] 173 | | .is_some() [INFO] [stdout] | |______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `-W clippy::nonminimal-bool` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::nonminimal_bool)]` [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 171 ~ if self [INFO] [stdout] 172 + .consume(&TokenKind::BracketClose, "Expected closing bracket after array").is_none() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `self` argument [INFO] [stdout] --> marston/src/ast/parser.rs:424:21 [INFO] [stdout] | [INFO] [stdout] 424 | pub fn error_at(&self, message: &str, span: Range) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider refactoring to an associated function [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_self [INFO] [stdout] = note: `-W clippy::unused-self` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::unused_self)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `self` argument [INFO] [stdout] --> marston/src/ast/parser.rs:460:29 [INFO] [stdout] | [INFO] [stdout] 460 | pub fn error_with_label(&self, message: &str, label_span: Range, label_message: &str) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider refactoring to an associated function [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_self [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `self` argument [INFO] [stdout] --> marston/src/ast/parser.rs:470:28 [INFO] [stdout] | [INFO] [stdout] 470 | pub fn error_with_note(&self, message: &str, note: &str) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider refactoring to an associated function [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_self [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> marston/src/ast/mod.rs:22:41 [INFO] [stdout] | [INFO] [stdout] 22 | pub fn find_in_parent(&self, names: &Vec) -> Vec<&Block> { [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: `-W clippy::ptr-arg` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::ptr_arg)]` [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 22 - pub fn find_in_parent(&self, names: &Vec) -> Vec<&Block> { [INFO] [stdout] 22 + pub fn find_in_parent(&self, names: &[Spur]) -> Vec<&Block> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/ast/mod.rs:31:13 [INFO] [stdout] | [INFO] [stdout] 31 | / if let Some(ref interned) = block.name { [INFO] [stdout] 32 | | if interned.key == first_name { [INFO] [stdout] 33 | | current_blocks.push(block); [INFO] [stdout] 34 | | } [INFO] [stdout] 35 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `-W clippy::collapsible-if` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::collapsible_if)]` [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 31 ~ if let Some(ref interned) = block.name [INFO] [stdout] 32 ~ && interned.key == first_name { [INFO] [stdout] 33 | current_blocks.push(block); [INFO] [stdout] 34 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/ast/mod.rs:42:21 [INFO] [stdout] | [INFO] [stdout] 42 | / if let Node::Block(child_block) = child { [INFO] [stdout] 43 | | if let Some(ref interned) = child_block.name { [INFO] [stdout] 44 | | if interned.key == *name { [INFO] [stdout] 45 | | next_blocks.push(child_block); [INFO] [stdout] ... | [INFO] [stdout] 48 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 42 ~ if let Node::Block(child_block) = child [INFO] [stdout] 43 ~ && let Some(ref interned) = child_block.name { [INFO] [stdout] 44 | if interned.key == *name { [INFO] [stdout] 45 | next_blocks.push(child_block); [INFO] [stdout] 46 | } [INFO] [stdout] 47 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/ast/mod.rs:43:25 [INFO] [stdout] | [INFO] [stdout] 43 | / if let Some(ref interned) = child_block.name { [INFO] [stdout] 44 | | if interned.key == *name { [INFO] [stdout] 45 | | next_blocks.push(child_block); [INFO] [stdout] 46 | | } [INFO] [stdout] 47 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 43 ~ if let Some(ref interned) = child_block.name [INFO] [stdout] 44 ~ && interned.key == *name { [INFO] [stdout] 45 | next_blocks.push(child_block); [INFO] [stdout] 46 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/ast/mod.rs:87:9 [INFO] [stdout] | [INFO] [stdout] 87 | / if let Some(n) = &self.name { [INFO] [stdout] 88 | | if n.key == name { [INFO] [stdout] 89 | | results.push(self); [INFO] [stdout] 90 | | } [INFO] [stdout] 91 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 87 ~ if let Some(n) = &self.name [INFO] [stdout] 88 ~ && n.key == name { [INFO] [stdout] 89 | results.push(self); [INFO] [stdout] 90 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/ast/mod.rs:108:13 [INFO] [stdout] | [INFO] [stdout] 108 | / if let Node::Block(child) = child { [INFO] [stdout] 109 | | if let Some(child_name) = &child.name [INFO] [stdout] 110 | | && child_name.key == name [INFO] [stdout] ... | [INFO] [stdout] 114 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 108 ~ if let Node::Block(child) = child [INFO] [stdout] 109 ~ && let Some(child_name) = &child.name [INFO] [stdout] 110 | && child_name.key == name [INFO] [stdout] 111 | { [INFO] [stdout] 112 | results.push(child); [INFO] [stdout] 113 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> marston/src/ast/mod.rs:165:9 [INFO] [stdout] | [INFO] [stdout] 165 | / match (self, other) { [INFO] [stdout] 166 | | (ValueKind::String(_), ValueKind::String(_)) => true, [INFO] [stdout] 167 | | (ValueKind::Number(_), ValueKind::Number(_)) => true, [INFO] [stdout] 168 | | (ValueKind::Boolean(_), ValueKind::Boolean(_)) => true, [INFO] [stdout] 169 | | (ValueKind::Array(_), ValueKind::Array(_)) => true, [INFO] [stdout] 170 | | _ => false, [INFO] [stdout] 171 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `-W clippy::match-like-matches-macro` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::match_like_matches_macro)]` [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 165 - match (self, other) { [INFO] [stdout] 166 - (ValueKind::String(_), ValueKind::String(_)) => true, [INFO] [stdout] 167 - (ValueKind::Number(_), ValueKind::Number(_)) => true, [INFO] [stdout] 168 - (ValueKind::Boolean(_), ValueKind::Boolean(_)) => true, [INFO] [stdout] 169 - (ValueKind::Array(_), ValueKind::Array(_)) => true, [INFO] [stdout] 170 - _ => false, [INFO] [stdout] 171 - } [INFO] [stdout] 165 + matches!((self, other), (ValueKind::String(_), ValueKind::String(_)) | (ValueKind::Number(_), ValueKind::Number(_)) | (ValueKind::Boolean(_), ValueKind::Boolean(_)) | (ValueKind::Array(_), ValueKind::Array(_))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty String is being created manually [INFO] [stdout] --> marston/src/ast/mod.rs:175:22 [INFO] [stdout] | [INFO] [stdout] 175 | Self::String("".to_string()) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using: `String::new()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_string_new [INFO] [stdout] = note: `-W clippy::manual-string-new` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::manual_string_new)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> marston/src/ast/mod.rs:182:37 [INFO] [stdout] | [INFO] [stdout] 182 | ValueKind::String(s) => write!(f, "{}", s), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] = note: `-W clippy::uninlined-format-args` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::uninlined_format_args)]` [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 182 - ValueKind::String(s) => write!(f, "{}", s), [INFO] [stdout] 182 + ValueKind::String(s) => write!(f, "{s}"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> marston/src/ast/mod.rs:183:37 [INFO] [stdout] | [INFO] [stdout] 183 | ValueKind::Number(n) => write!(f, "{}", n), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 183 - ValueKind::Number(n) => write!(f, "{}", n), [INFO] [stdout] 183 + ValueKind::Number(n) => write!(f, "{n}"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> marston/src/ast/mod.rs:184:38 [INFO] [stdout] | [INFO] [stdout] 184 | ValueKind::Boolean(b) => write!(f, "{}", b), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 184 - ValueKind::Boolean(b) => write!(f, "{}", b), [INFO] [stdout] 184 + ValueKind::Boolean(b) => write!(f, "{b}"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> marston/src/codegen/generator.rs:33:39 [INFO] [stdout] | [INFO] [stdout] 33 | ... if bool { format!("{}", resolve(attr.key)) } else { "".to_string() } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `resolve(attr.key).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: `-W clippy::useless-format` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::useless_format)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty String is being created manually [INFO] [stdout] --> marston/src/codegen/generator.rs:33:81 [INFO] [stdout] | [INFO] [stdout] 33 | ... if bool { format!("{}", resolve(attr.key)) } else { "".to_string() } [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using: `String::new()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_string_new [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: docs for function which may panic missing `# Panics` section [INFO] [stdout] --> marston/src/context.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | pub fn file(&self) -> Arc { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: first possible panic found here [INFO] [stdout] --> marston/src/context.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | self.current_file.clone().unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc [INFO] [stdout] = note: `-W clippy::missing-panics-doc` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::missing_panics_doc)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: docs for function which may panic missing `# Panics` section [INFO] [stdout] --> marston/src/context.rs:51:5 [INFO] [stdout] | [INFO] [stdout] 51 | pub fn process_file(&mut self, file: &MPath) -> MResult<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: first possible panic found here [INFO] [stdout] --> marston/src/context.rs:55:26 [INFO] [stdout] | [INFO] [stdout] 55 | ReportsBag::init(self.current_file.clone().unwrap(), Arc::::from(content.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `IrTransformBuilder` [INFO] [stdout] --> marston/src/html/ir.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | / pub fn new() -> Self { [INFO] [stdout] 48 | | Self { transformations: vec![] } [INFO] [stdout] 49 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `-W clippy::new-without-default` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::new_without_default)]` [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 46 + impl Default for IrTransformBuilder { [INFO] [stdout] 47 + fn default() -> Self { [INFO] [stdout] 48 + Self::new() [INFO] [stdout] 49 + } [INFO] [stdout] 50 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing `#[must_use]` attribute on a method returning `Self` [INFO] [stdout] --> marston/src/html/ir.rs:51:5 [INFO] [stdout] | [INFO] [stdout] 51 | / pub fn add_transformation(mut self, transformation: Box) -> Self { [INFO] [stdout] 52 | | self.transformations.push(transformation); [INFO] [stdout] 53 | | self [INFO] [stdout] 54 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use [INFO] [stdout] = note: `-W clippy::return-self-not-must-use` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::return_self_not_must_use)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing `#[must_use]` attribute on a method returning `Self` [INFO] [stdout] --> marston/src/html/ir.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | / pub fn attribute_to_tag( [INFO] [stdout] 57 | | self, [INFO] [stdout] 58 | | source_tag: &str, [INFO] [stdout] 59 | | attr_key: &str, [INFO] [stdout] ... | [INFO] [stdout] 71 | | })) [INFO] [stdout] 72 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing `#[must_use]` attribute on a method returning `Self` [INFO] [stdout] --> marston/src/html/ir.rs:74:5 [INFO] [stdout] | [INFO] [stdout] 74 | / pub fn move_attribute_to_root(self, from_tag: &str, attr_key: &str) -> Self { [INFO] [stdout] 75 | | self.add_transformation(Box::new(MoveAttributeToRootTransform { [INFO] [stdout] 76 | | from_tag: get_or_intern(from_tag), [INFO] [stdout] 77 | | attr_key: get_or_intern(attr_key), [INFO] [stdout] 78 | | })) [INFO] [stdout] 79 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing `#[must_use]` attribute on a method returning `Self` [INFO] [stdout] --> marston/src/html/ir.rs:81:5 [INFO] [stdout] | [INFO] [stdout] 81 | / pub fn move_attribute(self, from_tag: &str, to_tag: &str, attr_key: &str) -> Self { [INFO] [stdout] 82 | | self.add_transformation(Box::new(MoveAttributeTransform { [INFO] [stdout] 83 | | from_tag: get_or_intern(from_tag), [INFO] [stdout] 84 | | to_tag: get_or_intern(to_tag), [INFO] [stdout] 85 | | attr_key: get_or_intern(attr_key), [INFO] [stdout] 86 | | })) [INFO] [stdout] 87 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing `#[must_use]` attribute on a method returning `Self` [INFO] [stdout] --> marston/src/html/ir.rs:89:5 [INFO] [stdout] | [INFO] [stdout] 89 | / pub fn remove_attribute(self, tag: &str, attr_key: &str) -> Self { [INFO] [stdout] 90 | | self.add_transformation(Box::new(RemoveAttributeTransform { [INFO] [stdout] 91 | | tag: get_or_intern(tag), [INFO] [stdout] 92 | | attr_key: get_or_intern(attr_key), [INFO] [stdout] 93 | | })) [INFO] [stdout] 94 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing `#[must_use]` attribute on a method returning `Self` [INFO] [stdout] --> marston/src/html/ir.rs:96:5 [INFO] [stdout] | [INFO] [stdout] 96 | / pub fn attribute_to_element(self, source_tag: &str, attr_key: &str, target_tag: &str) -> Self { [INFO] [stdout] 97 | | self.add_transformation(Box::new(AttributeToElementTransform { [INFO] [stdout] 98 | | source_tag: get_or_intern(source_tag), [INFO] [stdout] 99 | | attr_key: get_or_intern(attr_key), [INFO] [stdout] 100 | | target_tag: get_or_intern(target_tag), [INFO] [stdout] 101 | | })) [INFO] [stdout] 102 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> marston/src/html/ir.rs:109:23 [INFO] [stdout] | [INFO] [stdout] 109 | value_mapper: Option ValueKind>>, [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: `-W clippy::type-complexity` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::type_complexity)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing `#[must_use]` attribute on a method returning `Self` [INFO] [stdout] --> marston/src/html/ir.rs:104:5 [INFO] [stdout] | [INFO] [stdout] 104 | / pub fn attribute_to_meta_tag( [INFO] [stdout] 105 | | self, [INFO] [stdout] 106 | | source_tag: &str, [INFO] [stdout] 107 | | attr_key: &str, [INFO] [stdout] ... | [INFO] [stdout] 116 | | })) [INFO] [stdout] 117 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> marston/src/html/ir.rs:134:19 [INFO] [stdout] | [INFO] [stdout] 134 | value_mapper: Box 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 `if` statement can be collapsed [INFO] [stdout] --> marston/src/html/ir.rs:145:9 [INFO] [stdout] | [INFO] [stdout] 145 | / if element.tag == self.source_tag { [INFO] [stdout] 146 | | if let Some(attr) = element.get_attribute(self.attr_key) { [INFO] [stdout] 147 | | if let Some(children) = (self.value_mapper)(&attr.value) { [INFO] [stdout] 148 | | let mut new_element = IrElement::new(self.target_tag); [INFO] [stdout] ... | [INFO] [stdout] 153 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 145 ~ if element.tag == self.source_tag [INFO] [stdout] 146 ~ && let Some(attr) = element.get_attribute(self.attr_key) { [INFO] [stdout] 147 | if let Some(children) = (self.value_mapper)(&attr.value) { [INFO] [stdout] ... [INFO] [stdout] 151 | } [INFO] [stdout] 152 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/html/ir.rs:146:13 [INFO] [stdout] | [INFO] [stdout] 146 | / if let Some(attr) = element.get_attribute(self.attr_key) { [INFO] [stdout] 147 | | if let Some(children) = (self.value_mapper)(&attr.value) { [INFO] [stdout] 148 | | let mut new_element = IrElement::new(self.target_tag); [INFO] [stdout] 149 | | new_element.children = children; [INFO] [stdout] ... | [INFO] [stdout] 152 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 146 ~ if let Some(attr) = element.get_attribute(self.attr_key) [INFO] [stdout] 147 ~ && let Some(children) = (self.value_mapper)(&attr.value) { [INFO] [stdout] 148 | let mut new_element = IrElement::new(self.target_tag); [INFO] [stdout] 149 | new_element.children = children; [INFO] [stdout] 150 | element.children.push(IrNode::Element(new_element)); [INFO] [stdout] 151 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/html/ir.rs:184:9 [INFO] [stdout] | [INFO] [stdout] 184 | / if element.tag == self.from_tag { [INFO] [stdout] 185 | | if let Some(pos) = element.attributes.iter().position(|attr| attr.key == self.attr_key) [INFO] [stdout] 186 | | { [INFO] [stdout] 187 | | attrs_to_move.push(element.attributes.remove(pos)); [INFO] [stdout] 188 | | } [INFO] [stdout] 189 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 184 ~ if element.tag == self.from_tag [INFO] [stdout] 185 ~ && let Some(pos) = element.attributes.iter().position(|attr| attr.key == self.attr_key) [INFO] [stdout] 186 | { [INFO] [stdout] 187 | attrs_to_move.push(element.attributes.remove(pos)); [INFO] [stdout] 188 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/html/ir.rs:215:9 [INFO] [stdout] | [INFO] [stdout] 215 | / if element.tag == self.from_tag { [INFO] [stdout] 216 | | if let Some(pos) = element.attributes.iter().position(|attr| attr.key == self.attr_key) [INFO] [stdout] 217 | | { [INFO] [stdout] 218 | | attr_to_move = Some(element.attributes.remove(pos)); [INFO] [stdout] 219 | | } [INFO] [stdout] 220 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 215 ~ if element.tag == self.from_tag [INFO] [stdout] 216 ~ && let Some(pos) = element.attributes.iter().position(|attr| attr.key == self.attr_key) [INFO] [stdout] 217 | { [INFO] [stdout] 218 | attr_to_move = Some(element.attributes.remove(pos)); [INFO] [stdout] 219 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/html/ir.rs:222:9 [INFO] [stdout] | [INFO] [stdout] 222 | / if let Some(attr) = attr_to_move { [INFO] [stdout] 223 | | if let Some(target_element) = self.find_element_mut(element, self.to_tag) { [INFO] [stdout] 224 | | target_element.attributes.push(attr); [INFO] [stdout] 225 | | } [INFO] [stdout] 226 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 222 ~ if let Some(attr) = attr_to_move [INFO] [stdout] 223 ~ && let Some(target_element) = self.find_element_mut(element, self.to_tag) { [INFO] [stdout] 224 | target_element.attributes.push(attr); [INFO] [stdout] 225 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/html/ir.rs:245:13 [INFO] [stdout] | [INFO] [stdout] 245 | / if let IrNode::Element(child_element) = child { [INFO] [stdout] 246 | | if let Some(found) = self.find_element_mut(child_element, tag) { [INFO] [stdout] 247 | | return Some(found); [INFO] [stdout] 248 | | } [INFO] [stdout] 249 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 245 ~ if let IrNode::Element(child_element) = child [INFO] [stdout] 246 ~ && let Some(found) = self.find_element_mut(child_element, tag) { [INFO] [stdout] 247 | return Some(found); [INFO] [stdout] 248 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `self` is only used in recursion [INFO] [stdout] --> marston/src/html/ir.rs:236:10 [INFO] [stdout] | [INFO] [stdout] 236 | &self, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] note: `self` used here [INFO] [stdout] --> marston/src/html/ir.rs:246:38 [INFO] [stdout] | [INFO] [stdout] 246 | if let Some(found) = self.find_element_mut(child_element, tag) { [INFO] [stdout] | ^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#self_only_used_in_recursion [INFO] [stdout] = note: `-W clippy::self-only-used-in-recursion` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::self_only_used_in_recursion)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/html/ir.rs:269:9 [INFO] [stdout] | [INFO] [stdout] 269 | / if element.tag == self.source_tag { [INFO] [stdout] 270 | | if let Some(attr) = element.get_attribute(self.attr_key) { [INFO] [stdout] 271 | | let mut new_element = IrElement::new(self.target_tag); [INFO] [stdout] 272 | | new_element [INFO] [stdout] ... | [INFO] [stdout] 277 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 269 ~ if element.tag == self.source_tag [INFO] [stdout] 270 ~ && let Some(attr) = element.get_attribute(self.attr_key) { [INFO] [stdout] 271 | let mut new_element = IrElement::new(self.target_tag); [INFO] [stdout] ... [INFO] [stdout] 275 | element.children.push(IrNode::Element(new_element)); [INFO] [stdout] 276 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> marston/src/html/ir.rs:291:19 [INFO] [stdout] | [INFO] [stdout] 291 | value_mapper: Option ValueKind>>, [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: redundant clone [INFO] [stdout] --> marston/src/html/ir.rs:307:69 [INFO] [stdout] | [INFO] [stdout] 307 | value: ValueKind::String(resolve(self.meta_name).to_string()), [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] note: this value is dropped without further use [INFO] [stdout] --> marston/src/html/ir.rs:307:46 [INFO] [stdout] | [INFO] [stdout] 307 | value: ValueKind::String(resolve(self.meta_name).to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone [INFO] [stdout] = note: requested on the command line with `-W clippy::redundant-clone` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/html/ir.rs:302:9 [INFO] [stdout] | [INFO] [stdout] 302 | / if element.tag == self.source_tag { [INFO] [stdout] 303 | | if let Some(attr) = element.get_attribute(self.attr_key) { [INFO] [stdout] 304 | | let mut new_element = IrElement::new(get_or_intern("meta")); [INFO] [stdout] 305 | | new_element.attributes.push(IrAttribute { [INFO] [stdout] ... | [INFO] [stdout] 318 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 302 ~ if element.tag == self.source_tag [INFO] [stdout] 303 ~ && let Some(attr) = element.get_attribute(self.attr_key) { [INFO] [stdout] 304 | let mut new_element = IrElement::new(get_or_intern("meta")); [INFO] [stdout] ... [INFO] [stdout] 316 | element.children.push(IrNode::Element(new_element)); [INFO] [stdout] 317 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implicitly cloning a `String` by calling `to_string` on its dereferenced type [INFO] [stdout] --> marston/src/html/ir.rs:307:46 [INFO] [stdout] | [INFO] [stdout] 307 | value: ValueKind::String(resolve(self.meta_name).to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `resolve(self.meta_name).clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_clone [INFO] [stdout] = note: `-W clippy::implicit-clone` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::implicit_clone)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty String is being created manually [INFO] [stdout] --> marston/src/html/ir.rs:376:69 [INFO] [stdout] | [INFO] [stdout] 376 | Some(vec![IrNode::Text(value.as_string().unwrap_or(&"".to_string()).clone())]) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using: `String::new()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_string_new [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> marston/src/html/ir.rs:391:25 [INFO] [stdout] | [INFO] [stdout] 391 | / return ValueKind::String( [INFO] [stdout] 392 | | value.iter().map(|v| v.kind.as_string().unwrap()).join(", "), [INFO] [stdout] 393 | | ); [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: `-W clippy::needless-return` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::needless_return)]` [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 391 ~ ValueKind::String( [INFO] [stdout] 392 + value.iter().map(|v| v.kind.as_string().unwrap()).join(", "), [INFO] [stdout] 393 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> marston/src/html/ir.rs:413:52 [INFO] [stdout] | [INFO] [stdout] 413 | attributes: self.attributes.iter().map(|a| a.to_html_attr()).collect(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `super::super::ast::Attribute::to_html_attr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls [INFO] [stdout] = note: `-W clippy::redundant-closure-for-method-calls` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::redundant_closure_for_method_calls)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> marston/src/html/ir.rs:414:48 [INFO] [stdout] | [INFO] [stdout] 414 | children: self.children.iter().map(|n| n.to_html_node()).collect(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `super::super::ast::Node::to_html_node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.clone()` on a ref-counted pointer [INFO] [stdout] --> marston/src/reports.rs:42:68 [INFO] [stdout] | [INFO] [stdout] 42 | report.eprint((Arc::clone(&bag.file), Source::from(bag.source_content.clone()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::sync::Arc::::clone(&bag.source_content)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_ref_ptr [INFO] [stdout] = note: requested on the command line with `-W clippy::clone-on-ref-ptr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> marston/src/validator/conditions.rs:43:1 [INFO] [stdout] | [INFO] [stdout] 43 | impl<'a> Into> for &'a Block { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `-W clippy::from-over-into` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::from_over_into)]` [INFO] [stdout] help: replace the `Into` implementation with `From<&'a ast::Block>` [INFO] [stdout] | [INFO] [stdout] 43 ~ impl<'a> From<&'a Block> for ValidationContext<'a> { [INFO] [stdout] 44 ~ fn from(val: &'a Block) -> Self { [INFO] [stdout] 45 ~ ValidationContext::new(val) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider adding a `;` to the last statement for consistent formatting [INFO] [stdout] --> marston/src/validator/rules/block.rs:43:13 [INFO] [stdout] | [INFO] [stdout] 43 | / ReportsBag::add(report!( [INFO] [stdout] 44 | | kind: ReportKind::Error, [INFO] [stdout] 45 | | message: format!("Duplicate attribute '{}' found in '{block_name}'", attr), [INFO] [stdout] 46 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 49 | | label_vec: spans.iter().skip(1).map(|s| (s.clone(), "Attribute redefined here")).collect_vec() => Color::Yellow, [INFO] [stdout] 50 | | )) [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned [INFO] [stdout] = note: `-W clippy::semicolon-if-nothing-returned` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::semicolon_if_nothing_returned)]` [INFO] [stdout] help: add a `;` here [INFO] [stdout] | [INFO] [stdout] 43 | ReportsBag::add(report!( [INFO] [stdout] ... [INFO] [stdout] 49 | label_vec: spans.iter().skip(1).map(|s| (s.clone(), "Attribute redefined here")).collect_vec() => Color::Yellow, [INFO] [stdout] 50 ~ )); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/validator/rules/link.rs:68:21 [INFO] [stdout] | [INFO] [stdout] 68 | / ... if let Some(attr) = block.get_attribute("rel") { [INFO] [stdout] 69 | | ... if let Some(string) = attr.value.kind.as_string() { [INFO] [stdout] 70 | | ... return ConditionResult::new(string == "stylesheet", Some("link elements with rel=\"stylesheet\" must have a file ext... [INFO] [stdout] 71 | | ... } [INFO] [stdout] 72 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 68 ~ if let Some(attr) = block.get_attribute("rel") [INFO] [stdout] 69 ~ && let Some(string) = attr.value.kind.as_string() { [INFO] [stdout] 70 | return ConditionResult::new(string == "stylesheet", Some("link elements with rel=\"stylesheet\" must have a file extension of .css")) [INFO] [stdout] 71 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/validator/rules/link.rs:107:13 [INFO] [stdout] | [INFO] [stdout] 107 | / if let Some(rel) = block.get_attribute("rel") [INFO] [stdout] 108 | | && let Some(string) = rel.value.kind.as_string() [INFO] [stdout] 109 | | { [INFO] [stdout] 110 | | if string == "preload" { [INFO] [stdout] ... | [INFO] [stdout] 116 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 108 ~ && let Some(string) = rel.value.kind.as_string() [INFO] [stdout] 109 ~ && string == "preload" { [INFO] [stdout] 110 | return ConditionResult::new( [INFO] [stdout] ... [INFO] [stdout] 113 | ); [INFO] [stdout] 114 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/validator/rules/link.rs:132:13 [INFO] [stdout] | [INFO] [stdout] 132 | / if let Some(rel) = block.get_attribute("rel") [INFO] [stdout] 133 | | && let Some(string) = rel.value.kind.as_string() [INFO] [stdout] 134 | | { [INFO] [stdout] 135 | | if string == "expect" || string == "stylesheet" { [INFO] [stdout] ... | [INFO] [stdout] 141 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 133 ~ && let Some(string) = rel.value.kind.as_string() [INFO] [stdout] 134 ~ && (string == "expect" || string == "stylesheet") { [INFO] [stdout] 135 | return ConditionResult::new( [INFO] [stdout] ... [INFO] [stdout] 138 | ); [INFO] [stdout] 139 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> marston/src/validator/rules/link.rs:158:20 [INFO] [stdout] | [INFO] [stdout] 158 | if let None = block.get_attribute("href") { [INFO] [stdout] | -------^^^^------------------------------ help: try: `if block.get_attribute("href").is_none()` [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: `-W clippy::redundant-pattern-matching` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::redundant_pattern_matching)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern matching can be expressed using `matches!` [INFO] [stdout] --> marston/src/validator/rules/link.rs:158:16 [INFO] [stdout] | [INFO] [stdout] 158 | if let None = block.get_attribute("href") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `matches!(block.get_attribute("href"), None)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#equatable_if_let [INFO] [stdout] = note: `-W clippy::equatable-if-let` implied by `-W clippy::nursery` [INFO] [stdout] = help: to override `-W clippy::nursery` add `#[allow(clippy::equatable_if_let)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant clone [INFO] [stdout] --> marston/src/validator/url.rs:58:33 [INFO] [stdout] | [INFO] [stdout] 58 | ... span.clone() => "invalid URL extension" => Color::BrightRed [INFO] [stdout] | ^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] note: this value is dropped without further use [INFO] [stdout] --> marston/src/validator/url.rs:58:29 [INFO] [stdout] | [INFO] [stdout] 58 | ... span.clone() => "invalid URL extension" => Color::BrightRed [INFO] [stdout] | ^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone [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] --> marston/src/validator/url.rs:89:29 [INFO] [stdout] | [INFO] [stdout] 89 | / ... match trimmed.parse::() { [INFO] [stdout] 90 | | ... Ok(path) => { [INFO] [stdout] 91 | | ... Self::validate_extension(path.to_str().unwrap(), &options, span.clone(), block); [INFO] [stdout] 92 | | ... return; [INFO] [stdout] 93 | | ... } [INFO] [stdout] 94 | | ... Err(_) => {} [INFO] [stdout] 95 | | ... } [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: `-W clippy::single-match` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::single_match)]` [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 89 ~ if let Ok(path) = trimmed.parse::() { [INFO] [stdout] 90 + Self::validate_extension(path.to_str().unwrap(), &options, span.clone(), block); [INFO] [stdout] 91 + return; [INFO] [stdout] 92 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are deriving `PartialEq` and can implement `Eq` [INFO] [stdout] --> marston/src/validator/mod.rs:41:30 [INFO] [stdout] | [INFO] [stdout] 41 | #[derive(Clone, Copy, Debug, PartialEq)] [INFO] [stdout] | ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq [INFO] [stdout] = note: `-W clippy::derive-partial-eq-without-eq` implied by `-W clippy::nursery` [INFO] [stdout] = help: to override `-W clippy::nursery` add `#[allow(clippy::derive_partial_eq_without_eq)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> marston/src/validator/mod.rs:53:18 [INFO] [stdout] | [INFO] [stdout] 53 | type_checks: Vec bool>>, [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] --> marston/src/validator/mod.rs:54:19 [INFO] [stdout] | [INFO] [stdout] 54 | value_checks: 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: methods called `as_*` usually take `self` by reference or `self` by mutable reference [INFO] [stdout] --> marston/src/validator/mod.rs:89:25 [INFO] [stdout] | [INFO] [stdout] 89 | pub fn as_attribute(mut self) -> 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: `-W clippy::wrong-self-convention` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::wrong_self_convention)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `as_*` usually take `self` by reference or `self` by mutable reference [INFO] [stdout] --> marston/src/validator/mod.rs:94:21 [INFO] [stdout] | [INFO] [stdout] 94 | pub fn as_block(mut self) -> 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 argument is passed by value, but not consumed in the function body [INFO] [stdout] --> marston/src/validator/mod.rs:99:46 [INFO] [stdout] | [INFO] [stdout] 99 | pub fn in_parent(mut self, parent_names: Vec<&str>) -> Self { [INFO] [stdout] | ^^^^^^^^^ help: consider changing the type to: `&[&str]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value [INFO] [stdout] = note: `-W clippy::needless-pass-by-value` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::needless_pass_by_value)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument is passed by value, but not consumed in the function body [INFO] [stdout] --> marston/src/validator/mod.rs:110:50 [INFO] [stdout] | [INFO] [stdout] 110 | pub fn require_one_of_attrs(mut self, attrs: Vec<&str>) -> Self { [INFO] [stdout] | ^^^^^^^^^ help: consider changing the type to: `&[&str]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> marston/src/validator/mod.rs:111:53 [INFO] [stdout] | [INFO] [stdout] 111 | self.require_on_of_attrs = attrs.iter().map(|s| s.to_string()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `std::string::ToString::to_string` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/validator/mod.rs:260:13 [INFO] [stdout] | [INFO] [stdout] 260 | / if let Some(array) = value.kind.as_array() { [INFO] [stdout] 261 | | if array.is_empty() { [INFO] [stdout] 262 | | ReportsBag::add(report!( [INFO] [stdout] 263 | | kind: ReportKind::Error, [INFO] [stdout] ... | [INFO] [stdout] 270 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 260 ~ if let Some(array) = value.kind.as_array() [INFO] [stdout] 261 ~ && array.is_empty() { [INFO] [stdout] 262 | ReportsBag::add(report!( [INFO] [stdout] ... [INFO] [stdout] 268 | )) [INFO] [stdout] 269 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider adding a `;` to the last statement for consistent formatting [INFO] [stdout] --> marston/src/validator/mod.rs:262:21 [INFO] [stdout] | [INFO] [stdout] 262 | / ReportsBag::add(report!( [INFO] [stdout] 263 | | kind: ReportKind::Error, [INFO] [stdout] 264 | | message: "Array cannot be empty".to_string(), [INFO] [stdout] 265 | | labels: { [INFO] [stdout] 266 | | span.clone() => "This array must not be empty" => Color::BrightRed [INFO] [stdout] 267 | | }, [INFO] [stdout] 268 | | )) [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned [INFO] [stdout] help: add a `;` here [INFO] [stdout] | [INFO] [stdout] 262 | ReportsBag::add(report!( [INFO] [stdout] ... [INFO] [stdout] 267 | }, [INFO] [stdout] 268 ~ )); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> marston/src/validator/mod.rs:422:43 [INFO] [stdout] | [INFO] [stdout] 422 | self.validate_attribute_value(&attr, block); [INFO] [stdout] | ^^^^^ help: change this to: `attr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `-W clippy::needless-borrow` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::needless_borrow)]` [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] --> marston/src/validator/mod.rs:426:13 [INFO] [stdout] | [INFO] [stdout] 426 | / match child { [INFO] [stdout] 427 | | Node::Block(child_block) => { [INFO] [stdout] 428 | | self.walk_block(child_block, name_str, info); [INFO] [stdout] ... | [INFO] [stdout] 431 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 426 ~ if let Node::Block(child_block) = child { [INFO] [stdout] 427 + self.walk_block(child_block, name_str, info); [INFO] [stdout] 428 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard matches only a single variant and will also match any future added variants [INFO] [stdout] --> marston/src/validator/mod.rs:430:17 [INFO] [stdout] | [INFO] [stdout] 430 | _ => {} [INFO] [stdout] | ^ help: try: `Node::Text(_)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants [INFO] [stdout] = note: `-W clippy::match-wildcard-for-single-variants` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::match_wildcard_for_single_variants)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> marston/src/validator/mod.rs:420:45 [INFO] [stdout] | [INFO] [stdout] 420 | pub fn walk_block(&self, block: &Block, name_str: &str, info: &mut Info) { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_name_str` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> marston/src/validator/mod.rs:428:50 [INFO] [stdout] | [INFO] [stdout] 428 | self.walk_block(child_block, name_str, info); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] = note: `-W clippy::only-used-in-recursion` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::only_used_in_recursion)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> marston/src/validator/mod.rs:420:61 [INFO] [stdout] | [INFO] [stdout] 420 | pub fn walk_block(&self, block: &Block, name_str: &str, info: &mut Info) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_info` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> marston/src/validator/mod.rs:428:60 [INFO] [stdout] | [INFO] [stdout] 428 | self.walk_block(child_block, name_str, info); [INFO] [stdout] | ^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider adding a `;` to the last statement for consistent formatting [INFO] [stdout] --> marston/src/validator/mod.rs:453:17 [INFO] [stdout] | [INFO] [stdout] 453 | / self.validate_found_items( [INFO] [stdout] 454 | | found_as_attrs, [INFO] [stdout] 455 | | found_as_blocks, [INFO] [stdout] 456 | | &name_str, [INFO] [stdout] ... | [INFO] [stdout] 459 | | Some(parent), [INFO] [stdout] 460 | | ) [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned [INFO] [stdout] help: add a `;` here [INFO] [stdout] | [INFO] [stdout] 453 | self.validate_found_items( [INFO] [stdout] ... [INFO] [stdout] 459 | Some(parent), [INFO] [stdout] 460 ~ ); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> marston/src/validator/mod.rs:509:12 [INFO] [stdout] | [INFO] [stdout] 509 | if required.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!required.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `-W clippy::len-zero` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::len_zero)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> marston/src/validator/mod.rs:513:51 [INFO] [stdout] | [INFO] [stdout] 513 | self.validate_attribute_value(&attr, block); [INFO] [stdout] | ^^^^^ help: change this to: `attr` [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: consider adding a `;` to the last statement for consistent formatting [INFO] [stdout] --> marston/src/validator/mod.rs:517:17 [INFO] [stdout] | [INFO] [stdout] 517 | / ReportsBag::add(report!( [INFO] [stdout] 518 | | kind: ReportKind::Error, [INFO] [stdout] 519 | | message: format!("'{}' should have one of the following attributes: {:?}", name_str, required), [INFO] [stdout] 520 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 523 | | notes: [format!("Add one of the following attributes to '{}': {:?}", name_str, required)] [INFO] [stdout] 524 | | )) [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned [INFO] [stdout] help: add a `;` here [INFO] [stdout] | [INFO] [stdout] 517 | ReportsBag::add(report!( [INFO] [stdout] ... [INFO] [stdout] 523 | notes: [format!("Add one of the following attributes to '{}': {:?}", name_str, required)] [INFO] [stdout] 524 ~ )); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> marston/src/validator/mod.rs:542:47 [INFO] [stdout] | [INFO] [stdout] 542 | self.validate_attribute_value(&attr, parent.unwrap()); [INFO] [stdout] | ^^^^^ help: change this to: `attr` [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: consider adding a `;` to the last statement for consistent formatting [INFO] [stdout] --> marston/src/validator/mod.rs:650:17 [INFO] [stdout] | [INFO] [stdout] 650 | / ReportsBag::add(report!( [INFO] [stdout] 651 | | kind: ReportKind::Error, [INFO] [stdout] 652 | | message: format!("Attribute '{}' is not valid in this context.", resolve(attr.key.key)), [INFO] [stdout] 653 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 656 | | notes: [result.messages.join(". ")] [INFO] [stdout] 657 | | )) [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned [INFO] [stdout] help: add a `;` here [INFO] [stdout] | [INFO] [stdout] 650 | ReportsBag::add(report!( [INFO] [stdout] ... [INFO] [stdout] 656 | notes: [result.messages.join(". ")] [INFO] [stdout] 657 ~ )); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> marston/src/validator/mod.rs:666:88 [INFO] [stdout] | [INFO] [stdout] 666 | let expected_ext = if extension.starts_with('.') { extension } else { &format!(".{}", extension) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 666 - let expected_ext = if extension.starts_with('.') { extension } else { &format!(".{}", extension) }; [INFO] [stdout] 666 + let expected_ext = if extension.starts_with('.') { extension } else { &format!(".{extension}") }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> marston/src/validator/mod.rs:754:35 [INFO] [stdout] | [INFO] [stdout] 754 | .with_message(format!( [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 755 | | "Conflicting '{}' and '{}' attributes", [INFO] [stdout] 756 | | attr1_name, attr2_name [INFO] [stdout] 757 | | )) [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it is more concise to loop over references to containers instead of using explicit iteration methods [INFO] [stdout] --> marston/src/validator/mod.rs:761:21 [INFO] [stdout] | [INFO] [stdout] 761 | for note in notes.iter() { [INFO] [stdout] | ^^^^^^^^^^^^ help: to write this more concisely, try: `notes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_iter_loop [INFO] [stdout] = note: `-W clippy::explicit-iter-loop` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::explicit_iter_loop)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> marston/src/validator/mod.rs:780:13 [INFO] [stdout] | [INFO] [stdout] 780 | format!("Either provide a '{}' attribute or add content", attr_name) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 780 - format!("Either provide a '{}' attribute or add content", attr_name) [INFO] [stdout] 780 + format!("Either provide a '{attr_name}' attribute or add content") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this parameter is a mutable reference but is not used mutably [INFO] [stdout] --> marston/src/ast/parser.rs:358:29 [INFO] [stdout] | [INFO] [stdout] 358 | fn error_expected_token(&mut self, expected: &TokenKind, message: &str) { [INFO] [stdout] | ^----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: consider removing this `mut` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut [INFO] [stdout] = note: `-W clippy::needless-pass-by-ref-mut` implied by `-W clippy::nursery` [INFO] [stdout] = help: to override `-W clippy::nursery` add `#[allow(clippy::needless_pass_by_ref_mut)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this parameter is a mutable reference but is not used mutably [INFO] [stdout] --> marston/src/ast/parser.rs:364:9 [INFO] [stdout] | [INFO] [stdout] 364 | &mut self, [INFO] [stdout] | ^----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: consider removing this `mut` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this parameter is a mutable reference but is not used mutably [INFO] [stdout] --> marston/src/ast/parser.rs:373:33 [INFO] [stdout] | [INFO] [stdout] 373 | fn error_expected_any_token(&mut self, expected: &[TokenKind], message: &str) { [INFO] [stdout] | ^----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: consider removing this `mut` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this parameter is a mutable reference but is not used mutably [INFO] [stdout] --> marston/src/ast/parser.rs:384:9 [INFO] [stdout] | [INFO] [stdout] 384 | &mut self, [INFO] [stdout] | ^----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: consider removing this `mut` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this parameter is a mutable reference but is not used mutably [INFO] [stdout] --> marston/src/ast/parser.rs:398:34 [INFO] [stdout] | [INFO] [stdout] 398 | fn error_expected_identifier(&mut self, message: &str) { [INFO] [stdout] | ^----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: consider removing this `mut` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this parameter is a mutable reference but is not used mutably [INFO] [stdout] --> marston/src/ast/parser.rs:406:42 [INFO] [stdout] | [INFO] [stdout] 406 | fn error_expected_identifier_at_span(&mut self, message: &str, span: Range) { [INFO] [stdout] | ^----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: consider removing this `mut` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of wildcard import for enum variants [INFO] [stdout] --> marston/src/lexer.rs:59:13 [INFO] [stdout] | [INFO] [stdout] 59 | use TokenKind::*; [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `TokenKind::{Bool, BraceOpen, BraceClose, BracketOpen, BracketClose, ParenOpen, ParenClose, Dot, Equals, Comma, Number, String, Identifier}` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_glob_use [INFO] [stdout] = note: `-W clippy::enum-glob-use` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::enum_glob_use)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.clone()` on a ref-counted pointer [INFO] [stdout] --> marston/src/reports.rs:42:68 [INFO] [stdout] | [INFO] [stdout] 42 | report.eprint((Arc::clone(&bag.file), Source::from(bag.source_content.clone()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::sync::Arc::::clone(&bag.source_content)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_ref_ptr [INFO] [stdout] = note: requested on the command line with `-W clippy::clone-on-ref-ptr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> marston/src/validator/conditions.rs:43:1 [INFO] [stdout] | [INFO] [stdout] 43 | impl<'a> Into> for &'a Block { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `-W clippy::from-over-into` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::from_over_into)]` [INFO] [stdout] help: replace the `Into` implementation with `From<&'a ast::Block>` [INFO] [stdout] | [INFO] [stdout] 43 ~ impl<'a> From<&'a Block> for ValidationContext<'a> { [INFO] [stdout] 44 ~ fn from(val: &'a Block) -> Self { [INFO] [stdout] 45 ~ ValidationContext::new(val) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider adding a `;` to the last statement for consistent formatting [INFO] [stdout] --> marston/src/validator/rules/block.rs:43:13 [INFO] [stdout] | [INFO] [stdout] 43 | / ReportsBag::add(report!( [INFO] [stdout] 44 | | kind: ReportKind::Error, [INFO] [stdout] 45 | | message: format!("Duplicate attribute '{}' found in '{block_name}'", attr), [INFO] [stdout] 46 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 49 | | label_vec: spans.iter().skip(1).map(|s| (s.clone(), "Attribute redefined here")).collect_vec() => Color::Yellow, [INFO] [stdout] 50 | | )) [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned [INFO] [stdout] = note: `-W clippy::semicolon-if-nothing-returned` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::semicolon_if_nothing_returned)]` [INFO] [stdout] help: add a `;` here [INFO] [stdout] | [INFO] [stdout] 43 | ReportsBag::add(report!( [INFO] [stdout] ... [INFO] [stdout] 49 | label_vec: spans.iter().skip(1).map(|s| (s.clone(), "Attribute redefined here")).collect_vec() => Color::Yellow, [INFO] [stdout] 50 ~ )); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/validator/rules/link.rs:68:21 [INFO] [stdout] | [INFO] [stdout] 68 | / ... if let Some(attr) = block.get_attribute("rel") { [INFO] [stdout] 69 | | ... if let Some(string) = attr.value.kind.as_string() { [INFO] [stdout] 70 | | ... return ConditionResult::new(string == "stylesheet", Some("link elements with rel=\"stylesheet\" must have a file ext... [INFO] [stdout] 71 | | ... } [INFO] [stdout] 72 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 68 ~ if let Some(attr) = block.get_attribute("rel") [INFO] [stdout] 69 ~ && let Some(string) = attr.value.kind.as_string() { [INFO] [stdout] 70 | return ConditionResult::new(string == "stylesheet", Some("link elements with rel=\"stylesheet\" must have a file extension of .css")) [INFO] [stdout] 71 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/validator/rules/link.rs:107:13 [INFO] [stdout] | [INFO] [stdout] 107 | / if let Some(rel) = block.get_attribute("rel") [INFO] [stdout] 108 | | && let Some(string) = rel.value.kind.as_string() [INFO] [stdout] 109 | | { [INFO] [stdout] 110 | | if string == "preload" { [INFO] [stdout] ... | [INFO] [stdout] 116 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 108 ~ && let Some(string) = rel.value.kind.as_string() [INFO] [stdout] 109 ~ && string == "preload" { [INFO] [stdout] 110 | return ConditionResult::new( [INFO] [stdout] ... [INFO] [stdout] 113 | ); [INFO] [stdout] 114 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/validator/rules/link.rs:132:13 [INFO] [stdout] | [INFO] [stdout] 132 | / if let Some(rel) = block.get_attribute("rel") [INFO] [stdout] 133 | | && let Some(string) = rel.value.kind.as_string() [INFO] [stdout] 134 | | { [INFO] [stdout] 135 | | if string == "expect" || string == "stylesheet" { [INFO] [stdout] ... | [INFO] [stdout] 141 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 133 ~ && let Some(string) = rel.value.kind.as_string() [INFO] [stdout] 134 ~ && (string == "expect" || string == "stylesheet") { [INFO] [stdout] 135 | return ConditionResult::new( [INFO] [stdout] ... [INFO] [stdout] 138 | ); [INFO] [stdout] 139 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> marston/src/validator/rules/link.rs:158:20 [INFO] [stdout] | [INFO] [stdout] 158 | if let None = block.get_attribute("href") { [INFO] [stdout] | -------^^^^------------------------------ help: try: `if block.get_attribute("href").is_none()` [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: `-W clippy::redundant-pattern-matching` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::redundant_pattern_matching)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern matching can be expressed using `matches!` [INFO] [stdout] --> marston/src/validator/rules/link.rs:158:16 [INFO] [stdout] | [INFO] [stdout] 158 | if let None = block.get_attribute("href") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `matches!(block.get_attribute("href"), None)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#equatable_if_let [INFO] [stdout] = note: `-W clippy::equatable-if-let` implied by `-W clippy::nursery` [INFO] [stdout] = help: to override `-W clippy::nursery` add `#[allow(clippy::equatable_if_let)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant clone [INFO] [stdout] --> marston/src/validator/url.rs:58:33 [INFO] [stdout] | [INFO] [stdout] 58 | ... span.clone() => "invalid URL extension" => Color::BrightRed [INFO] [stdout] | ^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] note: this value is dropped without further use [INFO] [stdout] --> marston/src/validator/url.rs:58:29 [INFO] [stdout] | [INFO] [stdout] 58 | ... span.clone() => "invalid URL extension" => Color::BrightRed [INFO] [stdout] | ^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone [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] --> marston/src/validator/url.rs:89:29 [INFO] [stdout] | [INFO] [stdout] 89 | / ... match trimmed.parse::() { [INFO] [stdout] 90 | | ... Ok(path) => { [INFO] [stdout] 91 | | ... Self::validate_extension(path.to_str().unwrap(), &options, span.clone(), block); [INFO] [stdout] 92 | | ... return; [INFO] [stdout] 93 | | ... } [INFO] [stdout] 94 | | ... Err(_) => {} [INFO] [stdout] 95 | | ... } [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: `-W clippy::single-match` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::single_match)]` [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 89 ~ if let Ok(path) = trimmed.parse::() { [INFO] [stdout] 90 + Self::validate_extension(path.to_str().unwrap(), &options, span.clone(), block); [INFO] [stdout] 91 + return; [INFO] [stdout] 92 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are deriving `PartialEq` and can implement `Eq` [INFO] [stdout] --> marston/src/validator/mod.rs:41:30 [INFO] [stdout] | [INFO] [stdout] 41 | #[derive(Clone, Copy, Debug, PartialEq)] [INFO] [stdout] | ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq [INFO] [stdout] = note: `-W clippy::derive-partial-eq-without-eq` implied by `-W clippy::nursery` [INFO] [stdout] = help: to override `-W clippy::nursery` add `#[allow(clippy::derive_partial_eq_without_eq)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> marston/src/validator/mod.rs:53:18 [INFO] [stdout] | [INFO] [stdout] 53 | type_checks: Vec bool>>, [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] --> marston/src/validator/mod.rs:54:19 [INFO] [stdout] | [INFO] [stdout] 54 | value_checks: 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: methods called `as_*` usually take `self` by reference or `self` by mutable reference [INFO] [stdout] --> marston/src/validator/mod.rs:89:25 [INFO] [stdout] | [INFO] [stdout] 89 | pub fn as_attribute(mut self) -> 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: `-W clippy::wrong-self-convention` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::wrong_self_convention)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `as_*` usually take `self` by reference or `self` by mutable reference [INFO] [stdout] --> marston/src/validator/mod.rs:94:21 [INFO] [stdout] | [INFO] [stdout] 94 | pub fn as_block(mut self) -> 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 argument is passed by value, but not consumed in the function body [INFO] [stdout] --> marston/src/validator/mod.rs:99:46 [INFO] [stdout] | [INFO] [stdout] 99 | pub fn in_parent(mut self, parent_names: Vec<&str>) -> Self { [INFO] [stdout] | ^^^^^^^^^ help: consider changing the type to: `&[&str]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value [INFO] [stdout] = note: `-W clippy::needless-pass-by-value` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::needless_pass_by_value)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this argument is passed by value, but not consumed in the function body [INFO] [stdout] --> marston/src/validator/mod.rs:110:50 [INFO] [stdout] | [INFO] [stdout] 110 | pub fn require_one_of_attrs(mut self, attrs: Vec<&str>) -> Self { [INFO] [stdout] | ^^^^^^^^^ help: consider changing the type to: `&[&str]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> marston/src/validator/mod.rs:111:53 [INFO] [stdout] | [INFO] [stdout] 111 | self.require_on_of_attrs = attrs.iter().map(|s| s.to_string()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `std::string::ToString::to_string` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> marston/src/validator/mod.rs:260:13 [INFO] [stdout] | [INFO] [stdout] 260 | / if let Some(array) = value.kind.as_array() { [INFO] [stdout] 261 | | if array.is_empty() { [INFO] [stdout] 262 | | ReportsBag::add(report!( [INFO] [stdout] 263 | | kind: ReportKind::Error, [INFO] [stdout] ... | [INFO] [stdout] 270 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 260 ~ if let Some(array) = value.kind.as_array() [INFO] [stdout] 261 ~ && array.is_empty() { [INFO] [stdout] 262 | ReportsBag::add(report!( [INFO] [stdout] ... [INFO] [stdout] 268 | )) [INFO] [stdout] 269 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider adding a `;` to the last statement for consistent formatting [INFO] [stdout] --> marston/src/validator/mod.rs:262:21 [INFO] [stdout] | [INFO] [stdout] 262 | / ReportsBag::add(report!( [INFO] [stdout] 263 | | kind: ReportKind::Error, [INFO] [stdout] 264 | | message: "Array cannot be empty".to_string(), [INFO] [stdout] 265 | | labels: { [INFO] [stdout] 266 | | span.clone() => "This array must not be empty" => Color::BrightRed [INFO] [stdout] 267 | | }, [INFO] [stdout] 268 | | )) [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned [INFO] [stdout] help: add a `;` here [INFO] [stdout] | [INFO] [stdout] 262 | ReportsBag::add(report!( [INFO] [stdout] ... [INFO] [stdout] 267 | }, [INFO] [stdout] 268 ~ )); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> marston/src/validator/mod.rs:422:43 [INFO] [stdout] | [INFO] [stdout] 422 | self.validate_attribute_value(&attr, block); [INFO] [stdout] | ^^^^^ help: change this to: `attr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `-W clippy::needless-borrow` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::needless_borrow)]` [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] --> marston/src/validator/mod.rs:426:13 [INFO] [stdout] | [INFO] [stdout] 426 | / match child { [INFO] [stdout] 427 | | Node::Block(child_block) => { [INFO] [stdout] 428 | | self.walk_block(child_block, name_str, info); [INFO] [stdout] ... | [INFO] [stdout] 431 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 426 ~ if let Node::Block(child_block) = child { [INFO] [stdout] 427 + self.walk_block(child_block, name_str, info); [INFO] [stdout] 428 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard matches only a single variant and will also match any future added variants [INFO] [stdout] --> marston/src/validator/mod.rs:430:17 [INFO] [stdout] | [INFO] [stdout] 430 | _ => {} [INFO] [stdout] | ^ help: try: `Node::Text(_)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants [INFO] [stdout] = note: `-W clippy::match-wildcard-for-single-variants` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::match_wildcard_for_single_variants)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> marston/src/validator/mod.rs:420:45 [INFO] [stdout] | [INFO] [stdout] 420 | pub fn walk_block(&self, block: &Block, name_str: &str, info: &mut Info) { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_name_str` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> marston/src/validator/mod.rs:428:50 [INFO] [stdout] | [INFO] [stdout] 428 | self.walk_block(child_block, name_str, info); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] = note: `-W clippy::only-used-in-recursion` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::only_used_in_recursion)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> marston/src/validator/mod.rs:420:61 [INFO] [stdout] | [INFO] [stdout] 420 | pub fn walk_block(&self, block: &Block, name_str: &str, info: &mut Info) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_info` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> marston/src/validator/mod.rs:428:60 [INFO] [stdout] | [INFO] [stdout] 428 | self.walk_block(child_block, name_str, info); [INFO] [stdout] | ^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider adding a `;` to the last statement for consistent formatting [INFO] [stdout] --> marston/src/validator/mod.rs:453:17 [INFO] [stdout] | [INFO] [stdout] 453 | / self.validate_found_items( [INFO] [stdout] 454 | | found_as_attrs, [INFO] [stdout] 455 | | found_as_blocks, [INFO] [stdout] 456 | | &name_str, [INFO] [stdout] ... | [INFO] [stdout] 459 | | Some(parent), [INFO] [stdout] 460 | | ) [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned [INFO] [stdout] help: add a `;` here [INFO] [stdout] | [INFO] [stdout] 453 | self.validate_found_items( [INFO] [stdout] ... [INFO] [stdout] 459 | Some(parent), [INFO] [stdout] 460 ~ ); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> marston/src/validator/mod.rs:509:12 [INFO] [stdout] | [INFO] [stdout] 509 | if required.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!required.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `-W clippy::len-zero` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::len_zero)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> marston/src/validator/mod.rs:513:51 [INFO] [stdout] | [INFO] [stdout] 513 | self.validate_attribute_value(&attr, block); [INFO] [stdout] | ^^^^^ help: change this to: `attr` [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: consider adding a `;` to the last statement for consistent formatting [INFO] [stdout] --> marston/src/validator/mod.rs:517:17 [INFO] [stdout] | [INFO] [stdout] 517 | / ReportsBag::add(report!( [INFO] [stdout] 518 | | kind: ReportKind::Error, [INFO] [stdout] 519 | | message: format!("'{}' should have one of the following attributes: {:?}", name_str, required), [INFO] [stdout] 520 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 523 | | notes: [format!("Add one of the following attributes to '{}': {:?}", name_str, required)] [INFO] [stdout] 524 | | )) [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned [INFO] [stdout] help: add a `;` here [INFO] [stdout] | [INFO] [stdout] 517 | ReportsBag::add(report!( [INFO] [stdout] ... [INFO] [stdout] 523 | notes: [format!("Add one of the following attributes to '{}': {:?}", name_str, required)] [INFO] [stdout] 524 ~ )); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> marston/src/validator/mod.rs:542:47 [INFO] [stdout] | [INFO] [stdout] 542 | self.validate_attribute_value(&attr, parent.unwrap()); [INFO] [stdout] | ^^^^^ help: change this to: `attr` [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: consider adding a `;` to the last statement for consistent formatting [INFO] [stdout] --> marston/src/validator/mod.rs:650:17 [INFO] [stdout] | [INFO] [stdout] 650 | / ReportsBag::add(report!( [INFO] [stdout] 651 | | kind: ReportKind::Error, [INFO] [stdout] 652 | | message: format!("Attribute '{}' is not valid in this context.", resolve(attr.key.key)), [INFO] [stdout] 653 | | labels: { [INFO] [stdout] ... | [INFO] [stdout] 656 | | notes: [result.messages.join(". ")] [INFO] [stdout] 657 | | )) [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned [INFO] [stdout] help: add a `;` here [INFO] [stdout] | [INFO] [stdout] 650 | ReportsBag::add(report!( [INFO] [stdout] ... [INFO] [stdout] 656 | notes: [result.messages.join(". ")] [INFO] [stdout] 657 ~ )); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> marston/src/validator/mod.rs:666:88 [INFO] [stdout] | [INFO] [stdout] 666 | let expected_ext = if extension.starts_with('.') { extension } else { &format!(".{}", extension) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 666 - let expected_ext = if extension.starts_with('.') { extension } else { &format!(".{}", extension) }; [INFO] [stdout] 666 + let expected_ext = if extension.starts_with('.') { extension } else { &format!(".{extension}") }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> marston/src/validator/mod.rs:754:35 [INFO] [stdout] | [INFO] [stdout] 754 | .with_message(format!( [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 755 | | "Conflicting '{}' and '{}' attributes", [INFO] [stdout] 756 | | attr1_name, attr2_name [INFO] [stdout] 757 | | )) [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it is more concise to loop over references to containers instead of using explicit iteration methods [INFO] [stdout] --> marston/src/validator/mod.rs:761:21 [INFO] [stdout] | [INFO] [stdout] 761 | for note in notes.iter() { [INFO] [stdout] | ^^^^^^^^^^^^ help: to write this more concisely, try: `notes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_iter_loop [INFO] [stdout] = note: `-W clippy::explicit-iter-loop` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::explicit_iter_loop)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> marston/src/validator/mod.rs:780:13 [INFO] [stdout] | [INFO] [stdout] 780 | format!("Either provide a '{}' attribute or add content", attr_name) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 780 - format!("Either provide a '{}' attribute or add content", attr_name) [INFO] [stdout] 780 + format!("Either provide a '{attr_name}' attribute or add content") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this parameter is a mutable reference but is not used mutably [INFO] [stdout] --> marston/src/ast/parser.rs:358:29 [INFO] [stdout] | [INFO] [stdout] 358 | fn error_expected_token(&mut self, expected: &TokenKind, message: &str) { [INFO] [stdout] | ^----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: consider removing this `mut` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut [INFO] [stdout] = note: `-W clippy::needless-pass-by-ref-mut` implied by `-W clippy::nursery` [INFO] [stdout] = help: to override `-W clippy::nursery` add `#[allow(clippy::needless_pass_by_ref_mut)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this parameter is a mutable reference but is not used mutably [INFO] [stdout] --> marston/src/ast/parser.rs:364:9 [INFO] [stdout] | [INFO] [stdout] 364 | &mut self, [INFO] [stdout] | ^----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: consider removing this `mut` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this parameter is a mutable reference but is not used mutably [INFO] [stdout] --> marston/src/ast/parser.rs:373:33 [INFO] [stdout] | [INFO] [stdout] 373 | fn error_expected_any_token(&mut self, expected: &[TokenKind], message: &str) { [INFO] [stdout] | ^----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: consider removing this `mut` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this parameter is a mutable reference but is not used mutably [INFO] [stdout] --> marston/src/ast/parser.rs:384:9 [INFO] [stdout] | [INFO] [stdout] 384 | &mut self, [INFO] [stdout] | ^----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: consider removing this `mut` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this parameter is a mutable reference but is not used mutably [INFO] [stdout] --> marston/src/ast/parser.rs:398:34 [INFO] [stdout] | [INFO] [stdout] 398 | fn error_expected_identifier(&mut self, message: &str) { [INFO] [stdout] | ^----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: consider removing this `mut` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this parameter is a mutable reference but is not used mutably [INFO] [stdout] --> marston/src/ast/parser.rs:406:42 [INFO] [stdout] | [INFO] [stdout] 406 | fn error_expected_identifier_at_span(&mut self, message: &str, span: Range) { [INFO] [stdout] | ^----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: consider removing this `mut` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking marston v0.1.0 (/opt/rustwide/workdir/cli) [INFO] [stdout] warning: constant `NOP` is never used [INFO] [stdout] --> cli/src/clap.rs:4:11 [INFO] [stdout] | [INFO] [stdout] 4 | pub const NOP: Style = Style::new(); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `WARN` is never used [INFO] [stdout] --> cli/src/clap.rs:10:11 [INFO] [stdout] | [INFO] [stdout] 10 | pub const WARN: Style = AnsiColor::Yellow.on_default().effects(Effects::BOLD); [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `NOTE` is never used [INFO] [stdout] --> cli/src/clap.rs:11:11 [INFO] [stdout] | [INFO] [stdout] 11 | pub const NOTE: Style = AnsiColor::Cyan.on_default().effects(Effects::BOLD); [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `GOOD` is never used [INFO] [stdout] --> cli/src/clap.rs:12:11 [INFO] [stdout] | [INFO] [stdout] 12 | pub const GOOD: Style = AnsiColor::Green.on_default().effects(Effects::BOLD); [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `positional` is never used [INFO] [stdout] --> cli/src/clap.rs:20:8 [INFO] [stdout] | [INFO] [stdout] 20 | pub fn positional(name: &'static str, help: &'static str) -> Arg { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `COMPILATION_HEADING` is never used [INFO] [stdout] --> cli/src/clap.rs:24:11 [INFO] [stdout] | [INFO] [stdout] 24 | pub const COMPILATION_HEADING: &str = "Compilation options"; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `NOP` is never used [INFO] [stdout] --> cli/src/clap.rs:4:11 [INFO] [stdout] | [INFO] [stdout] 4 | pub const NOP: Style = Style::new(); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `WARN` is never used [INFO] [stdout] --> cli/src/clap.rs:10:11 [INFO] [stdout] | [INFO] [stdout] 10 | pub const WARN: Style = AnsiColor::Yellow.on_default().effects(Effects::BOLD); [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `NOTE` is never used [INFO] [stdout] --> cli/src/clap.rs:11:11 [INFO] [stdout] | [INFO] [stdout] 11 | pub const NOTE: Style = AnsiColor::Cyan.on_default().effects(Effects::BOLD); [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `GOOD` is never used [INFO] [stdout] --> cli/src/clap.rs:12:11 [INFO] [stdout] | [INFO] [stdout] 12 | pub const GOOD: Style = AnsiColor::Green.on_default().effects(Effects::BOLD); [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `positional` is never used [INFO] [stdout] --> cli/src/clap.rs:20:8 [INFO] [stdout] | [INFO] [stdout] 20 | pub fn positional(name: &'static str, help: &'static str) -> Arg { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `COMPILATION_HEADING` is never used [INFO] [stdout] --> cli/src/clap.rs:24:11 [INFO] [stdout] | [INFO] [stdout] 24 | pub const COMPILATION_HEADING: &str = "Compilation options"; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 25.56s [INFO] running `Command { std: "docker" "inspect" "781c46624f52b08c3670efc69a486348c3fc13a333c922dc1625471d535693f1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "781c46624f52b08c3670efc69a486348c3fc13a333c922dc1625471d535693f1", kill_on_drop: false }` [INFO] [stdout] 781c46624f52b08c3670efc69a486348c3fc13a333c922dc1625471d535693f1