[INFO] cloning repository https://github.com/metinUr/scroll [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/metinUr/scroll" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FmetinUr%2Fscroll", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FmetinUr%2Fscroll'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 16aff5a80b570fdfa87726b1adf1ca589c2d02a5 [INFO] linting metinUr/scroll against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FmetinUr%2Fscroll" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/metinUr/scroll [INFO] finished tweaking git repo https://github.com/metinUr/scroll [INFO] tweaked toml for git repo https://github.com/metinUr/scroll written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/metinUr/scroll 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] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Locking 75 packages to latest compatible versions [INFO] [stderr] Adding clap v2.34.0 (available: v4.6.0) [INFO] [stderr] Adding notify v4.0.18 (available: v8.2.0) [INFO] [stderr] Adding toml v0.5.11 (available: v1.0.7+spec-1.1.0) [INFO] [stderr] Adding wasi v0.10.0+wasi-snapshot-preview1 (available: v0.10.2+wasi-snapshot-preview1) [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] Downloading crates ... [INFO] [stderr] Downloaded net2 v0.2.39 [INFO] [stderr] Downloaded log v0.3.9 [INFO] [stderr] Downloaded notify v4.0.18 [INFO] [stderr] Downloaded fsevent v0.4.0 [INFO] [stderr] Downloaded inotify v0.7.1 [INFO] [stderr] Downloaded time v0.1.45 [INFO] [stderr] Downloaded simple-server v0.4.0 [INFO] [stderr] Downloaded fsevent-sys v2.0.1 [INFO] [stderr] Downloaded http v0.1.21 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] ec85b75f545f1caacb239c7c7673589cab8b26aee99bf1541c19528763eb422a [INFO] running `Command { std: "docker" "start" "-a" "ec85b75f545f1caacb239c7c7673589cab8b26aee99bf1541c19528763eb422a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "ec85b75f545f1caacb239c7c7673589cab8b26aee99bf1541c19528763eb422a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ec85b75f545f1caacb239c7c7673589cab8b26aee99bf1541c19528763eb422a", kill_on_drop: false }` [INFO] [stdout] ec85b75f545f1caacb239c7c7673589cab8b26aee99bf1541c19528763eb422a [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 779a681ba1909257f48842ba3af1e7a1946fff430f8fe51fdf8abf34bcb047b5 [INFO] running `Command { std: "docker" "start" "-a" "779a681ba1909257f48842ba3af1e7a1946fff430f8fe51fdf8abf34bcb047b5", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.183 [INFO] [stderr] Compiling proc-macro2 v1.0.106 [INFO] [stderr] Compiling quote v1.0.45 [INFO] [stderr] Checking slab v0.4.12 [INFO] [stderr] Checking aho-corasick v1.1.4 [INFO] [stderr] Checking unicode-width v0.1.14 [INFO] [stderr] Checking itoa v0.4.8 [INFO] [stderr] Checking regex-syntax v0.8.10 [INFO] [stderr] Checking lazycell v1.3.0 [INFO] [stderr] Checking log v0.3.9 [INFO] [stderr] Checking textwrap v0.11.0 [INFO] [stderr] Checking scoped_threadpool v0.1.9 [INFO] [stderr] Checking ansi_term v0.12.1 [INFO] [stderr] Compiling syn v2.0.117 [INFO] [stderr] Checking iovec v0.1.4 [INFO] [stderr] Checking net2 v0.2.39 [INFO] [stderr] Checking inotify-sys v0.1.5 [INFO] [stderr] Checking time v0.1.45 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking num_cpus v1.17.0 [INFO] [stderr] Checking bytes v0.4.12 [INFO] [stderr] Checking inotify v0.7.1 [INFO] [stderr] Checking filetime v0.2.27 [INFO] [stderr] Checking clap v2.34.0 [INFO] [stderr] Checking mio v0.6.23 [INFO] [stderr] Checking http v0.1.21 [INFO] [stderr] Checking regex-automata v0.4.14 [INFO] [stderr] Checking mio-extras v2.0.6 [INFO] [stderr] Checking notify v4.0.18 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Checking simple-server v0.4.0 [INFO] [stderr] Checking regex v1.12.3 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking tinytemplate v1.2.1 [INFO] [stderr] Checking toml v0.5.11 [INFO] [stderr] Checking scroll v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands.rs:69:8 [INFO] [stdout] | [INFO] [stdout] 69 | if !fs::metadata("./scroll.toml").is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `fs::metadata("./scroll.toml").is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/commands.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 73 | / match fs::remove_dir_all("./public") { [INFO] [stdout] 74 | | Err(_) => (), //println!("Error while tring to delete old site. Error: {}", e), [INFO] [stdout] 75 | | Ok(_) => (), //println!("Older site deleted!"), [INFO] [stdout] 76 | | } [INFO] [stdout] | |_____^ help: try: `if let Err(_) = fs::remove_dir_all("./public") { () }` [INFO] [stdout] | [INFO] [stdout] = note: you might want to preserve the comments from inside the `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/commands.rs:81:5 [INFO] [stdout] | [INFO] [stdout] 81 | / for entry in WalkDir::new(".").into_iter().filter_entry(|e| !is_bl(e)) { [INFO] [stdout] 82 | | if let Ok(e) = entry { [INFO] [stdout] 83 | | if e.file_name().to_str().unwrap().ends_with(".org") { [INFO] [stdout] 84 | | create_html(e.path(), &mut site_styles); [INFO] [stdout] ... | [INFO] [stdout] 89 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/commands.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | / if let Ok(e) = entry { [INFO] [stdout] 83 | | if e.file_name().to_str().unwrap().ends_with(".org") { [INFO] [stdout] 84 | | create_html(e.path(), &mut site_styles); [INFO] [stdout] 85 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 88 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 81 ~ for e in WalkDir::new(".").into_iter().filter_entry(|e| !is_bl(e)).flatten() { [INFO] [stdout] 82 + if e.file_name().to_str().unwrap().ends_with(".org") { [INFO] [stdout] 83 + create_html(e.path(), &mut site_styles); [INFO] [stdout] 84 + } else { [INFO] [stdout] 85 + copy_file_to_site(e.path()); [INFO] [stdout] 86 + } [INFO] [stdout] 87 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/commands.rs:102:21 [INFO] [stdout] | [INFO] [stdout] 102 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 102 - return false; [INFO] [stdout] 102 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/commands.rs:131:38 [INFO] [stdout] | [INFO] [stdout] 131 | if let Ok(md) = fs::metadata(&path) { [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/commands.rs:144:42 [INFO] [stdout] | [INFO] [stdout] 144 | if let Ok(md) = fs::metadata(&path) { [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/commands.rs:149:38 [INFO] [stdout] | [INFO] [stdout] 149 | if let Err(e) = fs::copy(&path, &p) { [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/commands.rs:213:13 [INFO] [stdout] | [INFO] [stdout] 213 | / match create_file_w_content(name, "scroll.toml", &defaults::CONF) { [INFO] [stdout] 214 | | Err(err) => println!("Error while createing config file. Error: {}", err), [INFO] [stdout] 215 | | Ok(_) => (), [INFO] [stdout] 216 | | } [INFO] [stdout] | |_____________^ help: try: `if let Err(err) = create_file_w_content(name, "scroll.toml", &defaults::CONF) { println!("Error while createing config file. Error: {}", err) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/commands.rs:218:13 [INFO] [stdout] | [INFO] [stdout] 218 | / match create_file_w_content(name, "index.org", &defaults::INDEX) { [INFO] [stdout] 219 | | Err(err) => println!("Error while createing index.org file. Error: {}", err), [INFO] [stdout] 220 | | Ok(_) => (), [INFO] [stdout] 221 | | } [INFO] [stdout] | |_____________^ help: try: `if let Err(err) = create_file_w_content(name, "index.org", &defaults::INDEX) { println!("Error while createing index.org file. Error: {}", err) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/commands.rs:223:13 [INFO] [stdout] | [INFO] [stdout] 223 | / match create_file_w_content(name, "style_config.toml", &defaults::CSS_DEFAULT) { [INFO] [stdout] 224 | | Err(e) => println!( [INFO] [stdout] 225 | | "Error while creating default style_config.toml file. Error: {}", [INFO] [stdout] 226 | | e [INFO] [stdout] 227 | | ), [INFO] [stdout] 228 | | Ok(_) => (), [INFO] [stdout] 229 | | } [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] 223 ~ if let Err(e) = create_file_w_content(name, "style_config.toml", &defaults::CSS_DEFAULT) { println!( [INFO] [stdout] 224 + "Error while creating default style_config.toml file. Error: {}", [INFO] [stdout] 225 + e [INFO] [stdout] 226 + ) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/commands.rs:234:21 [INFO] [stdout] | [INFO] [stdout] 234 | / match create_file_w_content(&path, "default_template.html", &defaults::TEMPLATE) [INFO] [stdout] 235 | | { [INFO] [stdout] 236 | | Err(e) => println!("Error while creating default template. Error: {}", e), [INFO] [stdout] 237 | | Ok(_) => (), [INFO] [stdout] 238 | | } [INFO] [stdout] | |_____________________^ help: try: `if let Err(e) = create_file_w_content(&path, "default_template.html", &defaults::TEMPLATE) { println!("Error while creating default template. Error: {}", e) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/commands.rs:239:21 [INFO] [stdout] | [INFO] [stdout] 239 | / match create_file_w_content( [INFO] [stdout] 240 | | &path, [INFO] [stdout] 241 | | "empty_template.html", [INFO] [stdout] 242 | | &defaults::EMPTY_TEMPLATE, [INFO] [stdout] ... | [INFO] [stdout] 245 | | Ok(_) => (), [INFO] [stdout] 246 | | } [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] 239 ~ if let Err(e) = create_file_w_content( [INFO] [stdout] 240 + &path, [INFO] [stdout] 241 + "empty_template.html", [INFO] [stdout] 242 + &defaults::EMPTY_TEMPLATE, [INFO] [stdout] 243 + ) { println!("Error while creating empty template. Error: {}", e) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/commands.rs:250:13 [INFO] [stdout] | [INFO] [stdout] 250 | / match create_file_w_content(name, "theme.css", &defaults::THEME) { [INFO] [stdout] 251 | | Err(err) => println!("Error while createing theme file. Error: {}", err), [INFO] [stdout] 252 | | Ok(_) => (), [INFO] [stdout] 253 | | } [INFO] [stdout] | |_____________^ help: try: `if let Err(err) = create_file_w_content(name, "theme.css", &defaults::THEME) { println!("Error while createing theme file. Error: {}", err) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/css_gen/css_generator.rs:56:17 [INFO] [stdout] | [INFO] [stdout] 56 | let style = match parse_style(class_name) { [INFO] [stdout] | _________________^ [INFO] [stdout] 57 | | Some(s) => s, [INFO] [stdout] 58 | | None => return None, [INFO] [stdout] 59 | | }; [INFO] [stdout] | |_____^ help: try instead: `parse_style(class_name)?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/css_gen/css_generator.rs:125:39 [INFO] [stdout] | [INFO] [stdout] 125 | .find(|&x| x.property_name == p_name.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `p_name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/css_gen/css_generator.rs:199:15 [INFO] [stdout] | [INFO] [stdout] 199 | keywords: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 199 - keywords: &Vec, [INFO] [stdout] 199 + keywords: &[String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/css_gen/css_generator.rs:200:22 [INFO] [stdout] | [INFO] [stdout] 200 | keyword_aliases: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 200 - keyword_aliases: &Vec, [INFO] [stdout] 200 + keyword_aliases: &[String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `format!` args [INFO] [stdout] --> src/css_gen/css_generator.rs:250:34 [INFO] [stdout] | [INFO] [stdout] 250 | color = Some(format!( [INFO] [stdout] | __________________________________^ [INFO] [stdout] 251 | | "{}{}", [INFO] [stdout] 252 | | color.unwrap(), [INFO] [stdout] 253 | | format!("{:x}", lerp(0x00, 0xff, w_norm)) [INFO] [stdout] 254 | | )); [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `format!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] = note: `#[warn(clippy::format_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/css_gen/css_generator.rs:315:16 [INFO] [stdout] | [INFO] [stdout] 315 | if let Ok(_) = arg.parse::() { [INFO] [stdout] | -------^^^^^--------------------- help: try: `if arg.parse::().is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/css_gen/css_generator.rs:322:24 [INFO] [stdout] | [INFO] [stdout] 322 | if let Ok(_) = t.parse::() { [INFO] [stdout] | -------^^^^^------------------- help: try: `if t.parse::().is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/css_gen/css_generator.rs:333:12 [INFO] [stdout] | [INFO] [stdout] 333 | if let Ok(_) = arg.parse::() { [INFO] [stdout] | -------^^^^^--------------------- help: try: `if arg.parse::().is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/css_gen/css_generator.rs:367:8 [INFO] [stdout] | [INFO] [stdout] 367 | if fp.len() > 0 && fp[0] != "" { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!fp.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/css_gen/css_generator.rs:367:24 [INFO] [stdout] | [INFO] [stdout] 367 | if fp.len() > 0 && fp[0] != "" { [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!fp[0].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/css_gen/css_generator.rs:378:8 [INFO] [stdout] | [INFO] [stdout] 378 | if pseudo_vec.len() > 0 && pseudo_vec[0] != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!pseudo_vec.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] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/css_gen/css_generator.rs:378:32 [INFO] [stdout] | [INFO] [stdout] 378 | if pseudo_vec.len() > 0 && pseudo_vec[0] != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!pseudo_vec[0].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/css_gen/css_generator.rs:384:29 [INFO] [stdout] | [INFO] [stdout] 384 | let property_alias = if sp[0] != "" { [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!sp[0].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/css_gen/css_generator.rs:390:8 [INFO] [stdout] | [INFO] [stdout] 390 | if sp.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!sp.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] [INFO] [stdout] [INFO] [stdout] warning: name `SRC` contains a capitalized acronym [INFO] [stdout] --> src/sop/ast_gen.rs:65:5 [INFO] [stdout] | [INFO] [stdout] 65 | SRC, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Src` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `HTML` contains a capitalized acronym [INFO] [stdout] --> src/sop/ast_gen.rs:66:5 [INFO] [stdout] | [INFO] [stdout] 66 | HTML, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Html` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `QUOTE` contains a capitalized acronym [INFO] [stdout] --> src/sop/ast_gen.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 67 | QUOTE, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Quote` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `UNDEFINED` contains a capitalized acronym [INFO] [stdout] --> src/sop/ast_gen.rs:68:5 [INFO] [stdout] | [INFO] [stdout] 68 | UNDEFINED, [INFO] [stdout] | ^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Undefined` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `IMG` contains a capitalized acronym [INFO] [stdout] --> src/sop/ast_gen.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 73 | IMG, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Img` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `ORDERED` contains a capitalized acronym [INFO] [stdout] --> src/sop/ast_gen.rs:77:5 [INFO] [stdout] | [INFO] [stdout] 77 | ORDERED, [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Ordered` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `UNORDERED` contains a capitalized acronym [INFO] [stdout] --> src/sop/ast_gen.rs:78:5 [INFO] [stdout] | [INFO] [stdout] 78 | UNORDERED, [INFO] [stdout] | ^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Unordered` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/sop/ast_gen.rs:207:12 [INFO] [stdout] | [INFO] [stdout] 207 | if let None = link.find("https://") { [INFO] [stdout] | -------^^^^------------------------ help: try: `if link.find("https://").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] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/sop/ast_gen.rs:208:16 [INFO] [stdout] | [INFO] [stdout] 208 | if let None = link.find("http://") { [INFO] [stdout] | -------^^^^----------------------- help: try: `if link.find("http://").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] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/sop/ast_gen.rs:446:20 [INFO] [stdout] | [INFO] [stdout] 446 | if line == "" { [INFO] [stdout] | ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/sop/ast_gen.rs:458:28 [INFO] [stdout] | [INFO] [stdout] 458 | if style != None { [INFO] [stdout] | ^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `style.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/sop/ast_gen.rs:464:20 [INFO] [stdout] | [INFO] [stdout] 464 | if line != "" { [INFO] [stdout] | ^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/sop/ast_gen.rs:534:25 [INFO] [stdout] | [INFO] [stdout] 534 | / if let OrgElement::List { items, .. } = el { [INFO] [stdout] 535 | | add_to_list(items, self.list_indentation, child); [INFO] [stdout] 536 | | } else { [INFO] [stdout] 537 | | v.push(create_list(r)) [INFO] [stdout] 538 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/sop/ast_gen.rs:533:33 [INFO] [stdout] | [INFO] [stdout] 533 | if let Some(el) = v.last_mut() { [INFO] [stdout] | ^^ replace this binding [INFO] [stdout] 534 | if let OrgElement::List { items, .. } = el { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sop/html_gen.rs:159:53 [INFO] [stdout] | [INFO] [stdout] 159 | format!("
  • {}
  • \n", generate_html_for_text(&els)) [INFO] [stdout] | ^^^^ help: change this to: `els` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sop/html_gen.rs:189:19 [INFO] [stdout] | [INFO] [stdout] 189 | remove_spaces(&id.trim()) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `id.trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands.rs:69:8 [INFO] [stdout] | [INFO] [stdout] 69 | if !fs::metadata("./scroll.toml").is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `fs::metadata("./scroll.toml").is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/commands.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 73 | / match fs::remove_dir_all("./public") { [INFO] [stdout] 74 | | Err(_) => (), //println!("Error while tring to delete old site. Error: {}", e), [INFO] [stdout] 75 | | Ok(_) => (), //println!("Older site deleted!"), [INFO] [stdout] 76 | | } [INFO] [stdout] | |_____^ help: try: `if let Err(_) = fs::remove_dir_all("./public") { () }` [INFO] [stdout] | [INFO] [stdout] = note: you might want to preserve the comments from inside the `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/commands.rs:81:5 [INFO] [stdout] | [INFO] [stdout] 81 | / for entry in WalkDir::new(".").into_iter().filter_entry(|e| !is_bl(e)) { [INFO] [stdout] 82 | | if let Ok(e) = entry { [INFO] [stdout] 83 | | if e.file_name().to_str().unwrap().ends_with(".org") { [INFO] [stdout] 84 | | create_html(e.path(), &mut site_styles); [INFO] [stdout] ... | [INFO] [stdout] 89 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/commands.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | / if let Ok(e) = entry { [INFO] [stdout] 83 | | if e.file_name().to_str().unwrap().ends_with(".org") { [INFO] [stdout] 84 | | create_html(e.path(), &mut site_styles); [INFO] [stdout] 85 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 88 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 81 ~ for e in WalkDir::new(".").into_iter().filter_entry(|e| !is_bl(e)).flatten() { [INFO] [stdout] 82 + if e.file_name().to_str().unwrap().ends_with(".org") { [INFO] [stdout] 83 + create_html(e.path(), &mut site_styles); [INFO] [stdout] 84 + } else { [INFO] [stdout] 85 + copy_file_to_site(e.path()); [INFO] [stdout] 86 + } [INFO] [stdout] 87 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/commands.rs:102:21 [INFO] [stdout] | [INFO] [stdout] 102 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 102 - return false; [INFO] [stdout] 102 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/commands.rs:131:38 [INFO] [stdout] | [INFO] [stdout] 131 | if let Ok(md) = fs::metadata(&path) { [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/commands.rs:144:42 [INFO] [stdout] | [INFO] [stdout] 144 | if let Ok(md) = fs::metadata(&path) { [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/commands.rs:149:38 [INFO] [stdout] | [INFO] [stdout] 149 | if let Err(e) = fs::copy(&path, &p) { [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/commands.rs:213:13 [INFO] [stdout] | [INFO] [stdout] 213 | / match create_file_w_content(name, "scroll.toml", &defaults::CONF) { [INFO] [stdout] 214 | | Err(err) => println!("Error while createing config file. Error: {}", err), [INFO] [stdout] 215 | | Ok(_) => (), [INFO] [stdout] 216 | | } [INFO] [stdout] | |_____________^ help: try: `if let Err(err) = create_file_w_content(name, "scroll.toml", &defaults::CONF) { println!("Error while createing config file. Error: {}", err) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/commands.rs:218:13 [INFO] [stdout] | [INFO] [stdout] 218 | / match create_file_w_content(name, "index.org", &defaults::INDEX) { [INFO] [stdout] 219 | | Err(err) => println!("Error while createing index.org file. Error: {}", err), [INFO] [stdout] 220 | | Ok(_) => (), [INFO] [stdout] 221 | | } [INFO] [stdout] | |_____________^ help: try: `if let Err(err) = create_file_w_content(name, "index.org", &defaults::INDEX) { println!("Error while createing index.org file. Error: {}", err) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/commands.rs:223:13 [INFO] [stdout] | [INFO] [stdout] 223 | / match create_file_w_content(name, "style_config.toml", &defaults::CSS_DEFAULT) { [INFO] [stdout] 224 | | Err(e) => println!( [INFO] [stdout] 225 | | "Error while creating default style_config.toml file. Error: {}", [INFO] [stdout] 226 | | e [INFO] [stdout] 227 | | ), [INFO] [stdout] 228 | | Ok(_) => (), [INFO] [stdout] 229 | | } [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] 223 ~ if let Err(e) = create_file_w_content(name, "style_config.toml", &defaults::CSS_DEFAULT) { println!( [INFO] [stdout] 224 + "Error while creating default style_config.toml file. Error: {}", [INFO] [stdout] 225 + e [INFO] [stdout] 226 + ) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/commands.rs:234:21 [INFO] [stdout] | [INFO] [stdout] 234 | / match create_file_w_content(&path, "default_template.html", &defaults::TEMPLATE) [INFO] [stdout] 235 | | { [INFO] [stdout] 236 | | Err(e) => println!("Error while creating default template. Error: {}", e), [INFO] [stdout] 237 | | Ok(_) => (), [INFO] [stdout] 238 | | } [INFO] [stdout] | |_____________________^ help: try: `if let Err(e) = create_file_w_content(&path, "default_template.html", &defaults::TEMPLATE) { println!("Error while creating default template. Error: {}", e) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/commands.rs:239:21 [INFO] [stdout] | [INFO] [stdout] 239 | / match create_file_w_content( [INFO] [stdout] 240 | | &path, [INFO] [stdout] 241 | | "empty_template.html", [INFO] [stdout] 242 | | &defaults::EMPTY_TEMPLATE, [INFO] [stdout] ... | [INFO] [stdout] 245 | | Ok(_) => (), [INFO] [stdout] 246 | | } [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] 239 ~ if let Err(e) = create_file_w_content( [INFO] [stdout] 240 + &path, [INFO] [stdout] 241 + "empty_template.html", [INFO] [stdout] 242 + &defaults::EMPTY_TEMPLATE, [INFO] [stdout] 243 + ) { println!("Error while creating empty template. Error: {}", e) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/commands.rs:250:13 [INFO] [stdout] | [INFO] [stdout] 250 | / match create_file_w_content(name, "theme.css", &defaults::THEME) { [INFO] [stdout] 251 | | Err(err) => println!("Error while createing theme file. Error: {}", err), [INFO] [stdout] 252 | | Ok(_) => (), [INFO] [stdout] 253 | | } [INFO] [stdout] | |_____________^ help: try: `if let Err(err) = create_file_w_content(name, "theme.css", &defaults::THEME) { println!("Error while createing theme file. Error: {}", err) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/css_gen/css_generator.rs:56:17 [INFO] [stdout] | [INFO] [stdout] 56 | let style = match parse_style(class_name) { [INFO] [stdout] | _________________^ [INFO] [stdout] 57 | | Some(s) => s, [INFO] [stdout] 58 | | None => return None, [INFO] [stdout] 59 | | }; [INFO] [stdout] | |_____^ help: try instead: `parse_style(class_name)?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/css_gen/css_generator.rs:125:39 [INFO] [stdout] | [INFO] [stdout] 125 | .find(|&x| x.property_name == p_name.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `p_name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/css_gen/css_generator.rs:199:15 [INFO] [stdout] | [INFO] [stdout] 199 | keywords: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 199 - keywords: &Vec, [INFO] [stdout] 199 + keywords: &[String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/css_gen/css_generator.rs:200:22 [INFO] [stdout] | [INFO] [stdout] 200 | keyword_aliases: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 200 - keyword_aliases: &Vec, [INFO] [stdout] 200 + keyword_aliases: &[String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `format!` args [INFO] [stdout] --> src/css_gen/css_generator.rs:250:34 [INFO] [stdout] | [INFO] [stdout] 250 | color = Some(format!( [INFO] [stdout] | __________________________________^ [INFO] [stdout] 251 | | "{}{}", [INFO] [stdout] 252 | | color.unwrap(), [INFO] [stdout] 253 | | format!("{:x}", lerp(0x00, 0xff, w_norm)) [INFO] [stdout] 254 | | )); [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `format!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] = note: `#[warn(clippy::format_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/css_gen/css_generator.rs:315:16 [INFO] [stdout] | [INFO] [stdout] 315 | if let Ok(_) = arg.parse::() { [INFO] [stdout] | -------^^^^^--------------------- help: try: `if arg.parse::().is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/css_gen/css_generator.rs:322:24 [INFO] [stdout] | [INFO] [stdout] 322 | if let Ok(_) = t.parse::() { [INFO] [stdout] | -------^^^^^------------------- help: try: `if t.parse::().is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/css_gen/css_generator.rs:333:12 [INFO] [stdout] | [INFO] [stdout] 333 | if let Ok(_) = arg.parse::() { [INFO] [stdout] | -------^^^^^--------------------- help: try: `if arg.parse::().is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/css_gen/css_generator.rs:367:8 [INFO] [stdout] | [INFO] [stdout] 367 | if fp.len() > 0 && fp[0] != "" { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!fp.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/css_gen/css_generator.rs:367:24 [INFO] [stdout] | [INFO] [stdout] 367 | if fp.len() > 0 && fp[0] != "" { [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!fp[0].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/css_gen/css_generator.rs:378:8 [INFO] [stdout] | [INFO] [stdout] 378 | if pseudo_vec.len() > 0 && pseudo_vec[0] != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!pseudo_vec.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] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/css_gen/css_generator.rs:378:32 [INFO] [stdout] | [INFO] [stdout] 378 | if pseudo_vec.len() > 0 && pseudo_vec[0] != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!pseudo_vec[0].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/css_gen/css_generator.rs:384:29 [INFO] [stdout] | [INFO] [stdout] 384 | let property_alias = if sp[0] != "" { [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!sp[0].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/css_gen/css_generator.rs:390:8 [INFO] [stdout] | [INFO] [stdout] 390 | if sp.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!sp.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] [INFO] [stdout] [INFO] [stdout] warning: name `SRC` contains a capitalized acronym [INFO] [stdout] --> src/sop/ast_gen.rs:65:5 [INFO] [stdout] | [INFO] [stdout] 65 | SRC, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Src` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `HTML` contains a capitalized acronym [INFO] [stdout] --> src/sop/ast_gen.rs:66:5 [INFO] [stdout] | [INFO] [stdout] 66 | HTML, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Html` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `QUOTE` contains a capitalized acronym [INFO] [stdout] --> src/sop/ast_gen.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 67 | QUOTE, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Quote` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `UNDEFINED` contains a capitalized acronym [INFO] [stdout] --> src/sop/ast_gen.rs:68:5 [INFO] [stdout] | [INFO] [stdout] 68 | UNDEFINED, [INFO] [stdout] | ^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Undefined` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `IMG` contains a capitalized acronym [INFO] [stdout] --> src/sop/ast_gen.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 73 | IMG, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Img` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `ORDERED` contains a capitalized acronym [INFO] [stdout] --> src/sop/ast_gen.rs:77:5 [INFO] [stdout] | [INFO] [stdout] 77 | ORDERED, [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Ordered` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `UNORDERED` contains a capitalized acronym [INFO] [stdout] --> src/sop/ast_gen.rs:78:5 [INFO] [stdout] | [INFO] [stdout] 78 | UNORDERED, [INFO] [stdout] | ^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Unordered` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/sop/ast_gen.rs:207:12 [INFO] [stdout] | [INFO] [stdout] 207 | if let None = link.find("https://") { [INFO] [stdout] | -------^^^^------------------------ help: try: `if link.find("https://").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] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/sop/ast_gen.rs:208:16 [INFO] [stdout] | [INFO] [stdout] 208 | if let None = link.find("http://") { [INFO] [stdout] | -------^^^^----------------------- help: try: `if link.find("http://").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] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/sop/ast_gen.rs:446:20 [INFO] [stdout] | [INFO] [stdout] 446 | if line == "" { [INFO] [stdout] | ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/sop/ast_gen.rs:458:28 [INFO] [stdout] | [INFO] [stdout] 458 | if style != None { [INFO] [stdout] | ^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `style.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/sop/ast_gen.rs:464:20 [INFO] [stdout] | [INFO] [stdout] 464 | if line != "" { [INFO] [stdout] | ^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/sop/ast_gen.rs:534:25 [INFO] [stdout] | [INFO] [stdout] 534 | / if let OrgElement::List { items, .. } = el { [INFO] [stdout] 535 | | add_to_list(items, self.list_indentation, child); [INFO] [stdout] 536 | | } else { [INFO] [stdout] 537 | | v.push(create_list(r)) [INFO] [stdout] 538 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/sop/ast_gen.rs:533:33 [INFO] [stdout] | [INFO] [stdout] 533 | if let Some(el) = v.last_mut() { [INFO] [stdout] | ^^ replace this binding [INFO] [stdout] 534 | if let OrgElement::List { items, .. } = el { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sop/html_gen.rs:159:53 [INFO] [stdout] | [INFO] [stdout] 159 | format!("
  • {}
  • \n", generate_html_for_text(&els)) [INFO] [stdout] | ^^^^ help: change this to: `els` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sop/html_gen.rs:189:19 [INFO] [stdout] | [INFO] [stdout] 189 | remove_spaces(&id.trim()) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `id.trim()` [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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 22.74s [INFO] running `Command { std: "docker" "inspect" "779a681ba1909257f48842ba3af1e7a1946fff430f8fe51fdf8abf34bcb047b5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "779a681ba1909257f48842ba3af1e7a1946fff430f8fe51fdf8abf34bcb047b5", kill_on_drop: false }` [INFO] [stdout] 779a681ba1909257f48842ba3af1e7a1946fff430f8fe51fdf8abf34bcb047b5