[INFO] cloning repository https://github.com/guillaumeboehm/wal-telegram-rs [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/guillaumeboehm/wal-telegram-rs" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fguillaumeboehm%2Fwal-telegram-rs", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fguillaumeboehm%2Fwal-telegram-rs'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 1b3f14c05418b4bad222697606e21b040d47073b [INFO] linting guillaumeboehm/wal-telegram-rs against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fguillaumeboehm%2Fwal-telegram-rs" "/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/guillaumeboehm/wal-telegram-rs [INFO] finished tweaking git repo https://github.com/guillaumeboehm/wal-telegram-rs [INFO] tweaked toml for git repo https://github.com/guillaumeboehm/wal-telegram-rs written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/guillaumeboehm/wal-telegram-rs 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/guillaumeboehm/wal-telegram-rs 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 sha2 v0.10.7 [INFO] [stderr] Downloaded blurslice v0.1.0 [INFO] [stderr] Downloaded exr v1.7.0 [INFO] [stderr] Downloaded aho-corasick v1.1.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 4f8fd4a8361e66adbf5ab0d23266e449595da229d0043999d1228a8cf6fdad3d [INFO] running `Command { std: "docker" "start" "-a" "4f8fd4a8361e66adbf5ab0d23266e449595da229d0043999d1228a8cf6fdad3d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "4f8fd4a8361e66adbf5ab0d23266e449595da229d0043999d1228a8cf6fdad3d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4f8fd4a8361e66adbf5ab0d23266e449595da229d0043999d1228a8cf6fdad3d", kill_on_drop: false }` [INFO] [stdout] 4f8fd4a8361e66adbf5ab0d23266e449595da229d0043999d1228a8cf6fdad3d [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] ecc585239cf09d3a78043a31af8fc5724865d459dc2d4f2f98ef8380c644ceca [INFO] running `Command { std: "docker" "start" "-a" "ecc585239cf09d3a78043a31af8fc5724865d459dc2d4f2f98ef8380c644ceca", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.148 [INFO] [stderr] Compiling pkg-config v0.3.27 [INFO] [stderr] Compiling proc-macro2 v1.0.67 [INFO] [stderr] Checking subtle v2.5.0 [INFO] [stderr] Checking cpufeatures v0.2.9 [INFO] [stderr] Compiling num-traits v0.2.16 [INFO] [stderr] Compiling zstd-safe v5.0.2+zstd.1.5.2 [INFO] [stderr] Checking crossbeam-channel v0.5.8 [INFO] [stderr] Checking flate2 v1.0.27 [INFO] [stderr] Checking futures-core v0.3.28 [INFO] [stderr] Checking spin v0.9.8 [INFO] [stderr] Checking inout v0.1.3 [INFO] [stderr] Checking base64ct v1.6.0 [INFO] [stderr] Checking memchr v2.6.3 [INFO] [stderr] Checking futures-sink v0.3.28 [INFO] [stderr] Checking fdeflate v0.3.0 [INFO] [stderr] Checking deranged v0.3.8 [INFO] [stderr] Checking time-core v0.1.1 [INFO] [stderr] Checking regex-syntax v0.7.5 [INFO] [stderr] Checking cipher v0.4.4 [INFO] [stderr] Checking constant_time_eq v0.1.5 [INFO] [stderr] Checking blurslice v0.1.0 [INFO] [stderr] Checking xdg v2.5.2 [INFO] [stderr] Checking aho-corasick v1.1.0 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking sha2 v0.10.7 [INFO] [stderr] Checking hmac v0.12.1 [INFO] [stderr] Checking sha1 v0.10.5 [INFO] [stderr] Checking aes v0.8.3 [INFO] [stderr] Checking png v0.17.10 [INFO] [stderr] Compiling quote v1.0.33 [INFO] [stderr] Compiling jobserver v0.1.26 [INFO] [stderr] Checking time v0.3.28 [INFO] [stderr] Compiling cc v1.0.83 [INFO] [stderr] Compiling syn v2.0.37 [INFO] [stderr] Checking getrandom v0.2.10 [INFO] [stderr] Checking num_cpus v1.16.0 [INFO] [stderr] Checking rayon-core v1.11.0 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking nanorand v0.7.0 [INFO] [stderr] Checking num-integer v0.1.45 [INFO] [stderr] Checking password-hash v0.4.2 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking num-rational v0.4.1 [INFO] [stderr] Checking pbkdf2 v0.11.0 [INFO] [stderr] Checking rayon v1.7.0 [INFO] [stderr] Compiling zstd-sys v2.0.8+zstd.1.5.5 [INFO] [stderr] Compiling bzip2-sys v0.1.11+1.0.8 [INFO] [stderr] Checking regex-automata v0.3.8 [INFO] [stderr] Checking bzip2 v0.4.4 [INFO] [stderr] Checking jpeg-decoder v0.3.0 [INFO] [stderr] Compiling pin-project-internal v1.1.3 [INFO] [stderr] Checking tiff v0.9.0 [INFO] [stderr] Checking regex v1.9.5 [INFO] [stderr] Checking pin-project v1.1.3 [INFO] [stderr] Checking flume v0.10.14 [INFO] [stderr] Checking exr v1.7.0 [INFO] [stderr] Checking zstd v0.11.2+zstd.1.5.2 [INFO] [stderr] Checking zip v0.6.6 [INFO] [stderr] Checking image v0.24.7 [INFO] [stderr] Checking wal-telegram-rs v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused imports: `cell::RefCell`, `collections::HashMap`, and `rc::Rc` [INFO] [stdout] --> src/background/mod.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{cell::RefCell, rc::Rc, collections::HashMap}; [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: `format` [INFO] [stdout] --> src/color.rs:3:22 [INFO] [stdout] | [INFO] [stdout] 3 | use std::fmt::{self, format}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/telegram/colors.rs:189:59 [INFO] [stdout] | [INFO] [stdout] 189 | add_color("scrollBg", colors["color7"].borrow().alpha(05)); [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] = note: `#[warn(clippy::zero_prefixed_literal)]` on by default [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 189 - add_color("scrollBg", colors["color7"].borrow().alpha(05)); [INFO] [stdout] 189 + add_color("scrollBg", colors["color7"].borrow().alpha(5)); [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 189 | add_color("scrollBg", colors["color7"].borrow().alpha(0o5)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/telegram/colors.rs:243:62 [INFO] [stdout] | [INFO] [stdout] 243 | add_color("titleShadow", colors["color0"].borrow().alpha(05)); [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 243 - add_color("titleShadow", colors["color0"].borrow().alpha(05)); [INFO] [stdout] 243 + add_color("titleShadow", colors["color0"].borrow().alpha(5)); [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 243 | add_color("titleShadow", colors["color0"].borrow().alpha(0o5)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/telegram/colors.rs:777:68 [INFO] [stdout] | [INFO] [stdout] 777 | add_color("msgBotKbOverBgAdd", colors["color7"].borrow().alpha(05)); [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 777 - add_color("msgBotKbOverBgAdd", colors["color7"].borrow().alpha(05)); [INFO] [stdout] 777 + add_color("msgBotKbOverBgAdd", colors["color7"].borrow().alpha(5)); [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 777 | add_color("msgBotKbOverBgAdd", colors["color7"].borrow().alpha(0o5)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/telegram/colors.rs:781:67 [INFO] [stdout] | [INFO] [stdout] 781 | add_color("msgBotKbRippleBg", colors["color1"].borrow().alpha(05)); [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 781 - add_color("msgBotKbRippleBg", colors["color1"].borrow().alpha(05)); [INFO] [stdout] 781 + add_color("msgBotKbRippleBg", colors["color1"].borrow().alpha(5)); [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 781 | add_color("msgBotKbRippleBg", colors["color1"].borrow().alpha(0o5)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/telegram/colors.rs:1043:74 [INFO] [stdout] | [INFO] [stdout] 1043 | add_color("callMuteRipple", Color::from_hex("ffffff").unwrap().alpha(05)); [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 1043 - add_color("callMuteRipple", Color::from_hex("ffffff").unwrap().alpha(05)); [INFO] [stdout] 1043 + add_color("callMuteRipple", Color::from_hex("ffffff").unwrap().alpha(5)); [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 1043 | add_color("callMuteRipple", Color::from_hex("ffffff").unwrap().alpha(0o5)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `cell::RefCell`, `collections::HashMap`, and `rc::Rc` [INFO] [stdout] --> src/background/mod.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{cell::RefCell, rc::Rc, collections::HashMap}; [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: `format` [INFO] [stdout] --> src/color.rs:3:22 [INFO] [stdout] | [INFO] [stdout] 3 | use std::fmt::{self, format}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/telegram/colors.rs:189:59 [INFO] [stdout] | [INFO] [stdout] 189 | add_color("scrollBg", colors["color7"].borrow().alpha(05)); [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] = note: `#[warn(clippy::zero_prefixed_literal)]` on by default [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 189 - add_color("scrollBg", colors["color7"].borrow().alpha(05)); [INFO] [stdout] 189 + add_color("scrollBg", colors["color7"].borrow().alpha(5)); [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 189 | add_color("scrollBg", colors["color7"].borrow().alpha(0o5)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/telegram/colors.rs:243:62 [INFO] [stdout] | [INFO] [stdout] 243 | add_color("titleShadow", colors["color0"].borrow().alpha(05)); [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 243 - add_color("titleShadow", colors["color0"].borrow().alpha(05)); [INFO] [stdout] 243 + add_color("titleShadow", colors["color0"].borrow().alpha(5)); [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 243 | add_color("titleShadow", colors["color0"].borrow().alpha(0o5)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/telegram/colors.rs:777:68 [INFO] [stdout] | [INFO] [stdout] 777 | add_color("msgBotKbOverBgAdd", colors["color7"].borrow().alpha(05)); [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 777 - add_color("msgBotKbOverBgAdd", colors["color7"].borrow().alpha(05)); [INFO] [stdout] 777 + add_color("msgBotKbOverBgAdd", colors["color7"].borrow().alpha(5)); [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 777 | add_color("msgBotKbOverBgAdd", colors["color7"].borrow().alpha(0o5)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/telegram/colors.rs:781:67 [INFO] [stdout] | [INFO] [stdout] 781 | add_color("msgBotKbRippleBg", colors["color1"].borrow().alpha(05)); [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 781 - add_color("msgBotKbRippleBg", colors["color1"].borrow().alpha(05)); [INFO] [stdout] 781 + add_color("msgBotKbRippleBg", colors["color1"].borrow().alpha(5)); [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 781 | add_color("msgBotKbRippleBg", colors["color1"].borrow().alpha(0o5)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/telegram/colors.rs:1043:74 [INFO] [stdout] | [INFO] [stdout] 1043 | add_color("callMuteRipple", Color::from_hex("ffffff").unwrap().alpha(05)); [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 1043 - add_color("callMuteRipple", Color::from_hex("ffffff").unwrap().alpha(05)); [INFO] [stdout] 1043 + add_color("callMuteRipple", Color::from_hex("ffffff").unwrap().alpha(5)); [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 1043 | add_color("callMuteRipple", Color::from_hex("ffffff").unwrap().alpha(0o5)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `copy_background` is never used [INFO] [stdout] --> src/background/mod.rs:14:8 [INFO] [stdout] | [INFO] [stdout] 14 | pub fn copy_background(tmp_dir: &std::path::PathBuf, blur:f32, bg_str: &str) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `use_wal_background` is never used [INFO] [stdout] --> src/background/wal.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn use_wal_background(tmp_dir: &std::path::PathBuf, blur: f32, wal_colors_path: Option<&str>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `use_custom_background` is never used [INFO] [stdout] --> src/background/custom.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn use_custom_background(tmp_dir: &std::path::PathBuf, blur: f32, background_path: &str) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `blur_image` is never used [INFO] [stdout] --> src/background/blur.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn blur_image(image: &mut image::DynamicImage, percentage: f32) -> Result<(), blurslice::SliceSizeError> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `from_rgb_int`, `from_rgba_int`, `from_rgb_float`, and `from_rgba_float` are never used [INFO] [stdout] --> src/color.rs:37:12 [INFO] [stdout] | [INFO] [stdout] 31 | impl Color { [INFO] [stdout] | ---------- associated functions in this implementation [INFO] [stdout] ... [INFO] [stdout] 37 | pub fn from_rgb_int(r: u8, g: u8, b: u8) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 47 | pub fn from_rgba_int(r: u8, g: u8, b: u8, a: u8) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 57 | pub fn from_rgb_float(r: f32, g: f32, b: f32) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 61 | pub fn from_rgba_float(r: f32, g: f32, b: f32, a: f32) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Custom` is never constructed [INFO] [stdout] --> src/palette/mod.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 10 | pub enum Palette { [INFO] [stdout] | ------- variant in this enum [INFO] [stdout] 11 | Wal, [INFO] [stdout] 12 | Custom, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `wal_colors_path` after checking its variant with `is_none` [INFO] [stdout] --> src/background/wal.rs:29:19 [INFO] [stdout] | [INFO] [stdout] 8 | if wal_colors_path.is_none() || wal_colors_path.unwrap().is_empty() { [INFO] [stdout] | ------------------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 29 | path.push(wal_colors_path.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/background/wal.rs:12:46 [INFO] [stdout] | [INFO] [stdout] 12 | ... .expect(format!("Wal's 'wal' file not found in default location: {}", xdg_dirs.get_cache_home().display()).as_str()).to_str() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("Wal's 'wal' file not found in default location: {}", xdg_dirs.get_cache_home().display()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/background/wal.rs:40:10 [INFO] [stdout] | [INFO] [stdout] 40 | .expect(format!("Unexpected error, Couldn't read the file {}", filepath).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Unexpected error, Couldn't read the file {}", filepath))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/background/custom.rs:19:28 [INFO] [stdout] | [INFO] [stdout] 19 | super::copy_background(&tmp_dir, blur, path.to_str().unwrap()); [INFO] [stdout] | ^^^^^^^^ help: change this to: `tmp_dir` [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: called `unwrap` on `palette` after checking its variant with `is_some` [INFO] [stdout] --> src/background/plain.rs:14:22 [INFO] [stdout] | [INFO] [stdout] 13 | if palette.is_some() { [INFO] [stdout] | -------------------- help: try: `if let Some() = palette` [INFO] [stdout] 14 | let colors = palette.unwrap().values().map(|col| col.borrow().clone()).clone().collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/background/plain.rs:18:53 [INFO] [stdout] | [INFO] [stdout] 18 | ...or_hex.unwrap()).expect(format!("Could not parse plain image color '{}'", color_hex.unwrap()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("Could not parse plain image color '{}'", color_hex.unwrap()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/background/plain.rs:24:22 [INFO] [stdout] | [INFO] [stdout] 24 | super::create_bg(&tmp_dir, &color); [INFO] [stdout] | ^^^^^^^^ help: change this to: `tmp_dir` [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: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/background/mod.rs:14:33 [INFO] [stdout] | [INFO] [stdout] 14 | pub fn copy_background(tmp_dir: &std::path::PathBuf, blur:f32, bg_str: &str) { [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] 14 ~ pub fn copy_background(tmp_dir: &Path, blur:f32, bg_str: &str) { [INFO] [stdout] 15 ~ let mut tmp_bg = tmp_dir.to_path_buf(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/background/mod.rs:16:17 [INFO] [stdout] | [INFO] [stdout] 16 | tmp_bg.push(&BG_FILENAME); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `BG_FILENAME` [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: function call inside of `expect` [INFO] [stdout] --> src/background/mod.rs:20:30 [INFO] [stdout] | [INFO] [stdout] 20 | ... .expect(format!("Could not recognize background file '{}' as an image", bg_str).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Could not recognize background file '{}' as an image", bg_str))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/background/mod.rs:19:34 [INFO] [stdout] | [INFO] [stdout] 19 | let mut bg_img = image::open(&bg_str) [INFO] [stdout] | ^^^^^^^ help: change this to: `bg_str` [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: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/background/mod.rs:30:27 [INFO] [stdout] | [INFO] [stdout] 30 | pub fn create_bg(tmp_dir: &std::path::PathBuf, color: &Color) { [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] 30 ~ pub fn create_bg(tmp_dir: &Path, color: &Color) { [INFO] [stdout] 31 ~ let mut tmp_bg = tmp_dir.to_path_buf(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/background/mod.rs:32:17 [INFO] [stdout] | [INFO] [stdout] 32 | tmp_bg.push(&BG_FILENAME); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `BG_FILENAME` [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: function call inside of `expect` [INFO] [stdout] --> src/background/mod.rs:44:23 [INFO] [stdout] | [INFO] [stdout] 44 | img.save(&tmp_bg).expect(format!("Error writing plain background file to '{}'", tmp_bg.display()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Error writing plain background file to '{}'", tmp_bg.display()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | return value/12.92; [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] 9 - return value/12.92; [INFO] [stdout] 9 + value/12.92 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | return ((value+0.055)/1.055).powf(2.4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 12 - return ((value+0.055)/1.055).powf(2.4); [INFO] [stdout] 12 + ((value+0.055)/1.055).powf(2.4) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | return Color {red: 0.0, green: 0.0, blue: 0.0, alpha: 1.0, contrasts: Vec::new()}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 34 - return Color {red: 0.0, green: 0.0, blue: 0.0, alpha: 1.0, contrasts: Vec::new()}; [INFO] [stdout] 34 + Color {red: 0.0, green: 0.0, blue: 0.0, alpha: 1.0, contrasts: Vec::new()} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | return Some(col); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 44 - return Some(col); [INFO] [stdout] 44 + Some(col) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | return col; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 54 - return col; [INFO] [stdout] 54 + col [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | return Some(Color{red: r, green: g, blue: b, alpha: 1.0, contrasts: Vec::new()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 58 - return Some(Color{red: r, green: g, blue: b, alpha: 1.0, contrasts: Vec::new()}); [INFO] [stdout] 58 + Some(Color{red: r, green: g, blue: b, alpha: 1.0, contrasts: Vec::new()}) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | return col; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 68 - return col; [INFO] [stdout] 68 + col [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 103 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 103 - return None; [INFO] [stdout] 103 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | return (self.red * 255.0).round() as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 108 - return (self.red * 255.0).round() as u8; [INFO] [stdout] 108 + (self.red * 255.0).round() as u8 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:111:9 [INFO] [stdout] | [INFO] [stdout] 111 | return (self.green * 255.0).round() as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 111 - return (self.green * 255.0).round() as u8; [INFO] [stdout] 111 + (self.green * 255.0).round() as u8 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:114:9 [INFO] [stdout] | [INFO] [stdout] 114 | return (self.blue * 255.0).round() as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 114 - return (self.blue * 255.0).round() as u8; [INFO] [stdout] 114 + (self.blue * 255.0).round() as u8 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:117:9 [INFO] [stdout] | [INFO] [stdout] 117 | return (self.alpha * 255.0).round() as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 117 - return (self.alpha * 255.0).round() as u8; [INFO] [stdout] 117 + (self.alpha * 255.0).round() as u8 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:121:9 [INFO] [stdout] | [INFO] [stdout] 121 | return format!( "{:02x}{:02x}{:02x}{:02x}", self.u8_red(), self.u8_green(), self.u8_blue(), self.u8_alpha()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 121 - return format!( "{:02x}{:02x}{:02x}{:02x}", self.u8_red(), self.u8_green(), self.u8_blue(), self.u8_alpha()); [INFO] [stdout] 121 + format!( "{:02x}{:02x}{:02x}{:02x}", self.u8_red(), self.u8_green(), self.u8_blue(), self.u8_alpha()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | / return (0.2126*fixed_for_rel_luma(self.red) + [INFO] [stdout] 132 | | 0.7152*fixed_for_rel_luma(self.green) + [INFO] [stdout] 133 | | 0.0722*fixed_for_rel_luma(self.blue)) * self.alpha; [INFO] [stdout] | |__________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 131 ~ (0.2126*fixed_for_rel_luma(self.red) + [INFO] [stdout] 132 + 0.7152*fixed_for_rel_luma(self.green) + [INFO] [stdout] 133 ~ 0.0722*fixed_for_rel_luma(self.blue)) * self.alpha [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:142:13 [INFO] [stdout] | [INFO] [stdout] 142 | return (our_luma + 0.05) / (other_luma + 0.05); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 142 - return (our_luma + 0.05) / (other_luma + 0.05); [INFO] [stdout] 142 + (our_luma + 0.05) / (other_luma + 0.05) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:145:13 [INFO] [stdout] | [INFO] [stdout] 145 | return (other_luma + 0.05) / (our_luma + 0.05); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 145 - return (other_luma + 0.05) / (our_luma + 0.05); [INFO] [stdout] 145 + (other_luma + 0.05) / (our_luma + 0.05) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:162:9 [INFO] [stdout] | [INFO] [stdout] 162 | return Rc::new(RefCell::new(col)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 162 - return Rc::new(RefCell::new(col)); [INFO] [stdout] 162 + Rc::new(RefCell::new(col)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:154:13 [INFO] [stdout] | [INFO] [stdout] 154 | return (c - c * perc).clamp(0.0, 1.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 154 - return (c - c * perc).clamp(0.0, 1.0); [INFO] [stdout] 154 + (c - c * perc).clamp(0.0, 1.0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:177:9 [INFO] [stdout] | [INFO] [stdout] 177 | return Rc::new(RefCell::new(col)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 177 - return Rc::new(RefCell::new(col)); [INFO] [stdout] 177 + Rc::new(RefCell::new(col)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:169:13 [INFO] [stdout] | [INFO] [stdout] 169 | return (c + (1.0 - c) * perc).clamp(0.0, 1.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 169 - return (c + (1.0 - c) * perc).clamp(0.0, 1.0); [INFO] [stdout] 169 + (c + (1.0 - c) * perc).clamp(0.0, 1.0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:186:9 [INFO] [stdout] | [INFO] [stdout] 186 | return Rc::new(RefCell::new(col)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 186 - return Rc::new(RefCell::new(col)); [INFO] [stdout] 186 + Rc::new(RefCell::new(col)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `c` after checking its variant with `is_some` [INFO] [stdout] --> src/color.rs:195:20 [INFO] [stdout] | [INFO] [stdout] 194 | if c.is_some() { [INFO] [stdout] | -------------- help: try: `if let Some() = c` [INFO] [stdout] 195 | return c.unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:195:13 [INFO] [stdout] | [INFO] [stdout] 195 | return c.unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 195 - return c.unwrap().clone(); [INFO] [stdout] 195 + c.unwrap().clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:199:13 [INFO] [stdout] | [INFO] [stdout] 199 | return Rc::new(RefCell::new(self.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 199 - return Rc::new(RefCell::new(self.clone())); [INFO] [stdout] 199 + Rc::new(RefCell::new(self.clone())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/color.rs:212:88 [INFO] [stdout] | [INFO] [stdout] 212 | let c = colors[format!("color{index}").as_str()].borrow().get_contrast(&(*col_sec.borrow())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `&col_sec.borrow()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:240:5 [INFO] [stdout] | [INFO] [stdout] 240 | return ret_col; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 240 - return ret_col; [INFO] [stdout] 240 + ret_col [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `wal_colors_path` after checking its variant with `is_none` [INFO] [stdout] --> src/palette/wal.rs:32:12 [INFO] [stdout] | [INFO] [stdout] 12 | if wal_colors_path.is_none() { [INFO] [stdout] | ---------------------------- help: try: `if let Some() = wal_colors_path` [INFO] [stdout] ... [INFO] [stdout] 32 | if wal_colors_path.unwrap().is_empty() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `wal_colors_path` after checking its variant with `is_none` [INFO] [stdout] --> src/palette/wal.rs:37:19 [INFO] [stdout] | [INFO] [stdout] 12 | if wal_colors_path.is_none() { [INFO] [stdout] | ---------------------------- help: try: `if let Some() = wal_colors_path` [INFO] [stdout] ... [INFO] [stdout] 37 | path.push(wal_colors_path.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/palette/wal.rs:86:5 [INFO] [stdout] | [INFO] [stdout] 86 | return palette; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 86 - return palette; [INFO] [stdout] 86 + palette [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/palette/wal.rs:16:46 [INFO] [stdout] | [INFO] [stdout] 16 | ... .expect(format!("Wal 'colors' file not found in default location: {}", xdg_dirs.get_cache_home().display()).as_str()).to_str() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("Wal 'colors' file not found in default location: {}", xdg_dirs.get_cache_home().display()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/palette/wal.rs:48:10 [INFO] [stdout] | [INFO] [stdout] 48 | .expect(format!("Unexpected error, Couldn't read the file {}", filepath).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Unexpected error, Couldn't read the file {}", filepath))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Lines<'_>` [INFO] [stdout] --> src/palette/wal.rs:56:25 [INFO] [stdout] | [INFO] [stdout] 56 | for (index, col) in palette_file.lines().into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `palette_file.lines()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/palette/custom.rs:45:5 [INFO] [stdout] | [INFO] [stdout] 45 | return palette; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 45 - return palette; [INFO] [stdout] 45 + palette [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/palette/custom.rs:23:10 [INFO] [stdout] | [INFO] [stdout] 23 | .expect(format!("Couldn't read the palette file: {}", filepath).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Couldn't read the palette file: {}", filepath))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/palette/custom.rs:30:54 [INFO] [stdout] | [INFO] [stdout] 30 | for (_, line) in palette_file.lines().into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 30 - for (_, line) in palette_file.lines().into_iter().enumerate() { [INFO] [stdout] 30 + for line in palette_file.lines().into_iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Lines<'_>` [INFO] [stdout] --> src/palette/custom.rs:30:22 [INFO] [stdout] | [INFO] [stdout] 30 | for (_, line) in palette_file.lines().into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `palette_file.lines()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/palette/mod.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | return palette; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 32 - return palette; [INFO] [stdout] 32 + palette [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/palette/mod.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | let palette; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `palette` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 16 ~ [INFO] [stdout] 17 ~ let palette = match palette_type { [INFO] [stdout] 18 | Palette::Wal => { [INFO] [stdout] 19 ~ wal::import_wal_palette(filepath) [INFO] [stdout] 20 | } [INFO] [stdout] ... [INFO] [stdout] 24 | } [INFO] [stdout] 25 ~ custom::import_custom_palette(filepath.unwrap()) [INFO] [stdout] 26 | } [INFO] [stdout] 27 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/telegram/colors.rs:6:19 [INFO] [stdout] | [INFO] [stdout] 6 | let elements: Rc>>>>> = Rc::new(RefCell::new(HashMap::new())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/telegram/colors.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 12 | if !col.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `col.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/telegram/colors.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | return col; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 41 - return col; [INFO] [stdout] 41 + col [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/telegram/colors.rs:37:26 [INFO] [stdout] | [INFO] [stdout] 37 | .expect(format!("Could not find '{el}' in the previously defined elements").as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("Could not find '{el}' in the previously defined elements"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/telegram/colors.rs:53:19 [INFO] [stdout] | [INFO] [stdout] 53 | add_color(format!("{col_name}").as_str(), colors[col_name].clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `col_name.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `copy_background` is never used [INFO] [stdout] --> src/background/mod.rs:14:8 [INFO] [stdout] | [INFO] [stdout] 14 | pub fn copy_background(tmp_dir: &std::path::PathBuf, blur:f32, bg_str: &str) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `use_wal_background` is never used [INFO] [stdout] --> src/background/wal.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn use_wal_background(tmp_dir: &std::path::PathBuf, blur: f32, wal_colors_path: Option<&str>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `use_custom_background` is never used [INFO] [stdout] --> src/background/custom.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn use_custom_background(tmp_dir: &std::path::PathBuf, blur: f32, background_path: &str) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `blur_image` is never used [INFO] [stdout] --> src/background/blur.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn blur_image(image: &mut image::DynamicImage, percentage: f32) -> Result<(), blurslice::SliceSizeError> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `from_rgb_int`, `from_rgba_int`, `from_rgb_float`, and `from_rgba_float` are never used [INFO] [stdout] --> src/color.rs:37:12 [INFO] [stdout] | [INFO] [stdout] 31 | impl Color { [INFO] [stdout] | ---------- associated functions in this implementation [INFO] [stdout] ... [INFO] [stdout] 37 | pub fn from_rgb_int(r: u8, g: u8, b: u8) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 47 | pub fn from_rgba_int(r: u8, g: u8, b: u8, a: u8) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 57 | pub fn from_rgb_float(r: f32, g: f32, b: f32) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 61 | pub fn from_rgba_float(r: f32, g: f32, b: f32, a: f32) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Custom` is never constructed [INFO] [stdout] --> src/palette/mod.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 10 | pub enum Palette { [INFO] [stdout] | ------- variant in this enum [INFO] [stdout] 11 | Wal, [INFO] [stdout] 12 | Custom, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `wal_colors_path` after checking its variant with `is_none` [INFO] [stdout] --> src/background/wal.rs:29:19 [INFO] [stdout] | [INFO] [stdout] 8 | if wal_colors_path.is_none() || wal_colors_path.unwrap().is_empty() { [INFO] [stdout] | ------------------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 29 | path.push(wal_colors_path.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/background/wal.rs:12:46 [INFO] [stdout] | [INFO] [stdout] 12 | ... .expect(format!("Wal's 'wal' file not found in default location: {}", xdg_dirs.get_cache_home().display()).as_str()).to_str() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("Wal's 'wal' file not found in default location: {}", xdg_dirs.get_cache_home().display()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/background/wal.rs:40:10 [INFO] [stdout] | [INFO] [stdout] 40 | .expect(format!("Unexpected error, Couldn't read the file {}", filepath).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Unexpected error, Couldn't read the file {}", filepath))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/background/custom.rs:19:28 [INFO] [stdout] | [INFO] [stdout] 19 | super::copy_background(&tmp_dir, blur, path.to_str().unwrap()); [INFO] [stdout] | ^^^^^^^^ help: change this to: `tmp_dir` [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: called `unwrap` on `palette` after checking its variant with `is_some` [INFO] [stdout] --> src/background/plain.rs:14:22 [INFO] [stdout] | [INFO] [stdout] 13 | if palette.is_some() { [INFO] [stdout] | -------------------- help: try: `if let Some() = palette` [INFO] [stdout] 14 | let colors = palette.unwrap().values().map(|col| col.borrow().clone()).clone().collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/background/plain.rs:18:53 [INFO] [stdout] | [INFO] [stdout] 18 | ...or_hex.unwrap()).expect(format!("Could not parse plain image color '{}'", color_hex.unwrap()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("Could not parse plain image color '{}'", color_hex.unwrap()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/background/plain.rs:24:22 [INFO] [stdout] | [INFO] [stdout] 24 | super::create_bg(&tmp_dir, &color); [INFO] [stdout] | ^^^^^^^^ help: change this to: `tmp_dir` [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: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/background/mod.rs:14:33 [INFO] [stdout] | [INFO] [stdout] 14 | pub fn copy_background(tmp_dir: &std::path::PathBuf, blur:f32, bg_str: &str) { [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] 14 ~ pub fn copy_background(tmp_dir: &Path, blur:f32, bg_str: &str) { [INFO] [stdout] 15 ~ let mut tmp_bg = tmp_dir.to_path_buf(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/background/mod.rs:16:17 [INFO] [stdout] | [INFO] [stdout] 16 | tmp_bg.push(&BG_FILENAME); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `BG_FILENAME` [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: function call inside of `expect` [INFO] [stdout] --> src/background/mod.rs:20:30 [INFO] [stdout] | [INFO] [stdout] 20 | ... .expect(format!("Could not recognize background file '{}' as an image", bg_str).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Could not recognize background file '{}' as an image", bg_str))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/background/mod.rs:19:34 [INFO] [stdout] | [INFO] [stdout] 19 | let mut bg_img = image::open(&bg_str) [INFO] [stdout] | ^^^^^^^ help: change this to: `bg_str` [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: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/background/mod.rs:30:27 [INFO] [stdout] | [INFO] [stdout] 30 | pub fn create_bg(tmp_dir: &std::path::PathBuf, color: &Color) { [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] 30 ~ pub fn create_bg(tmp_dir: &Path, color: &Color) { [INFO] [stdout] 31 ~ let mut tmp_bg = tmp_dir.to_path_buf(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/background/mod.rs:32:17 [INFO] [stdout] | [INFO] [stdout] 32 | tmp_bg.push(&BG_FILENAME); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `BG_FILENAME` [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: function call inside of `expect` [INFO] [stdout] --> src/background/mod.rs:44:23 [INFO] [stdout] | [INFO] [stdout] 44 | img.save(&tmp_bg).expect(format!("Error writing plain background file to '{}'", tmp_bg.display()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Error writing plain background file to '{}'", tmp_bg.display()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | return value/12.92; [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] 9 - return value/12.92; [INFO] [stdout] 9 + value/12.92 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | return ((value+0.055)/1.055).powf(2.4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 12 - return ((value+0.055)/1.055).powf(2.4); [INFO] [stdout] 12 + ((value+0.055)/1.055).powf(2.4) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/telegram/theme.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | return output_path; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 56 - return output_path; [INFO] [stdout] 56 + output_path [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/telegram/theme.rs:41:30 [INFO] [stdout] | [INFO] [stdout] 41 | ...().expect(format!("The output path {} cannot be probed, permissions are probably the issue.", output_path.display()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("The output path {} cannot be probed, permissions are probably the issue.", output_path.display()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | return Color {red: 0.0, green: 0.0, blue: 0.0, alpha: 1.0, contrasts: Vec::new()}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 34 - return Color {red: 0.0, green: 0.0, blue: 0.0, alpha: 1.0, contrasts: Vec::new()}; [INFO] [stdout] 34 + Color {red: 0.0, green: 0.0, blue: 0.0, alpha: 1.0, contrasts: Vec::new()} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | return Some(col); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 44 - return Some(col); [INFO] [stdout] 44 + Some(col) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | return col; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 54 - return col; [INFO] [stdout] 54 + col [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | return Some(Color{red: r, green: g, blue: b, alpha: 1.0, contrasts: Vec::new()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 58 - return Some(Color{red: r, green: g, blue: b, alpha: 1.0, contrasts: Vec::new()}); [INFO] [stdout] 58 + Some(Color{red: r, green: g, blue: b, alpha: 1.0, contrasts: Vec::new()}) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/telegram/theme.rs:77:31 [INFO] [stdout] | [INFO] [stdout] 77 | pub fn package_theme(tmp_dir: &std::path::PathBuf, output: Option<&str>, input_palette: &HashMap>>) { [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] 77 ~ pub fn package_theme(tmp_dir: &Path, output: Option<&str>, input_palette: &HashMap>>) { [INFO] [stdout] 78 | [INFO] [stdout] ... [INFO] [stdout] 81 | // Tmp files [INFO] [stdout] 82 ~ let mut tmp_bg = tmp_dir.to_path_buf(); [INFO] [stdout] 83 | tmp_bg.push(super::super::background::BG_FILENAME); [INFO] [stdout] 84 | [INFO] [stdout] 85 ~ let mut tmp_palette = tmp_dir.to_path_buf(); [INFO] [stdout] 86 | tmp_palette.push(super::super::palette::PALETTE_FILENAME); [INFO] [stdout] 87 | [INFO] [stdout] 88 ~ let mut tmp_theme = tmp_dir.to_path_buf(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | return col; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 68 - return col; [INFO] [stdout] 68 + col [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/telegram/theme.rs:92:5 [INFO] [stdout] | [INFO] [stdout] 92 | let bg_contents; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `bg_contents` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 92 ~ [INFO] [stdout] 93 ~ let bg_contents = match std::fs::read(&tmp_bg) { [INFO] [stdout] 94 | Ok(contents) => { [INFO] [stdout] 95 ~ contents [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 103 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 103 - return None; [INFO] [stdout] 103 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/telegram/theme.rs:104:62 [INFO] [stdout] | [INFO] [stdout] 104 | let telegram_colors = super::colors::get_telegram_colors(&input_palette); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `input_palette` [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: unneeded `return` statement [INFO] [stdout] --> src/color.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | return (self.red * 255.0).round() as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 108 - return (self.red * 255.0).round() as u8; [INFO] [stdout] 108 + (self.red * 255.0).round() as u8 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:111:9 [INFO] [stdout] | [INFO] [stdout] 111 | return (self.green * 255.0).round() as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 111 - return (self.green * 255.0).round() as u8; [INFO] [stdout] 111 + (self.green * 255.0).round() as u8 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/telegram/theme.rs:170:35 [INFO] [stdout] | [INFO] [stdout] 170 | match std::fs::create_dir_all(&output_path.parent().unwrap()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `output_path.parent().unwrap()` [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: unneeded `return` statement [INFO] [stdout] --> src/color.rs:114:9 [INFO] [stdout] | [INFO] [stdout] 114 | return (self.blue * 255.0).round() as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 114 - return (self.blue * 255.0).round() as u8; [INFO] [stdout] 114 + (self.blue * 255.0).round() as u8 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:117:9 [INFO] [stdout] | [INFO] [stdout] 117 | return (self.alpha * 255.0).round() as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 117 - return (self.alpha * 255.0).round() as u8; [INFO] [stdout] 117 + (self.alpha * 255.0).round() as u8 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:121:9 [INFO] [stdout] | [INFO] [stdout] 121 | return format!( "{:02x}{:02x}{:02x}{:02x}", self.u8_red(), self.u8_green(), self.u8_blue(), self.u8_alpha()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 121 - return format!( "{:02x}{:02x}{:02x}{:02x}", self.u8_red(), self.u8_green(), self.u8_blue(), self.u8_alpha()); [INFO] [stdout] 121 + format!( "{:02x}{:02x}{:02x}{:02x}", self.u8_red(), self.u8_green(), self.u8_blue(), self.u8_alpha()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | / return (0.2126*fixed_for_rel_luma(self.red) + [INFO] [stdout] 132 | | 0.7152*fixed_for_rel_luma(self.green) + [INFO] [stdout] 133 | | 0.0722*fixed_for_rel_luma(self.blue)) * self.alpha; [INFO] [stdout] | |__________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 131 ~ (0.2126*fixed_for_rel_luma(self.red) + [INFO] [stdout] 132 + 0.7152*fixed_for_rel_luma(self.green) + [INFO] [stdout] 133 ~ 0.0722*fixed_for_rel_luma(self.blue)) * self.alpha [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tmp_dir.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | return tmp_dir; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 23 - return tmp_dir; [INFO] [stdout] 23 + tmp_dir [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:142:13 [INFO] [stdout] | [INFO] [stdout] 142 | return (our_luma + 0.05) / (other_luma + 0.05); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 142 - return (our_luma + 0.05) / (other_luma + 0.05); [INFO] [stdout] 142 + (our_luma + 0.05) / (other_luma + 0.05) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:145:13 [INFO] [stdout] | [INFO] [stdout] 145 | return (other_luma + 0.05) / (our_luma + 0.05); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 145 - return (other_luma + 0.05) / (our_luma + 0.05); [INFO] [stdout] 145 + (other_luma + 0.05) / (our_luma + 0.05) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/tmp_dir.rs:10:31 [INFO] [stdout] | [INFO] [stdout] 10 | rand_folder.push_str((String::from(epoch_time.as_secs().to_string()) + "_").as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `epoch_time.as_secs().to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:162:9 [INFO] [stdout] | [INFO] [stdout] 162 | return Rc::new(RefCell::new(col)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 162 - return Rc::new(RefCell::new(col)); [INFO] [stdout] 162 + Rc::new(RefCell::new(col)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:154:13 [INFO] [stdout] | [INFO] [stdout] 154 | return (c - c * perc).clamp(0.0, 1.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 154 - return (c - c * perc).clamp(0.0, 1.0); [INFO] [stdout] 154 + (c - c * perc).clamp(0.0, 1.0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:177:9 [INFO] [stdout] | [INFO] [stdout] 177 | return Rc::new(RefCell::new(col)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 177 - return Rc::new(RefCell::new(col)); [INFO] [stdout] 177 + Rc::new(RefCell::new(col)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:169:13 [INFO] [stdout] | [INFO] [stdout] 169 | return (c + (1.0 - c) * perc).clamp(0.0, 1.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 169 - return (c + (1.0 - c) * perc).clamp(0.0, 1.0); [INFO] [stdout] 169 + (c + (1.0 - c) * perc).clamp(0.0, 1.0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:186:9 [INFO] [stdout] | [INFO] [stdout] 186 | return Rc::new(RefCell::new(col)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 186 - return Rc::new(RefCell::new(col)); [INFO] [stdout] 186 + Rc::new(RefCell::new(col)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `c` after checking its variant with `is_some` [INFO] [stdout] --> src/color.rs:195:20 [INFO] [stdout] | [INFO] [stdout] 194 | if c.is_some() { [INFO] [stdout] | -------------- help: try: `if let Some() = c` [INFO] [stdout] 195 | return c.unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:195:13 [INFO] [stdout] | [INFO] [stdout] 195 | return c.unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 195 - return c.unwrap().clone(); [INFO] [stdout] 195 + c.unwrap().clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:199:13 [INFO] [stdout] | [INFO] [stdout] 199 | return Rc::new(RefCell::new(self.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 199 - return Rc::new(RefCell::new(self.clone())); [INFO] [stdout] 199 + Rc::new(RefCell::new(self.clone())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/palette/custom.rs:22:51 [INFO] [stdout] | [INFO] [stdout] 22 | let palette_file = fs::read_to_string(filepath.clone()) [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/color.rs:212:88 [INFO] [stdout] | [INFO] [stdout] 212 | let c = colors[format!("color{index}").as_str()].borrow().get_contrast(&(*col_sec.borrow())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `&col_sec.borrow()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/color.rs:240:5 [INFO] [stdout] | [INFO] [stdout] 240 | return ret_col; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 240 - return ret_col; [INFO] [stdout] 240 + ret_col [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `wal_colors_path` after checking its variant with `is_none` [INFO] [stdout] --> src/palette/wal.rs:32:12 [INFO] [stdout] | [INFO] [stdout] 12 | if wal_colors_path.is_none() { [INFO] [stdout] | ---------------------------- help: try: `if let Some() = wal_colors_path` [INFO] [stdout] ... [INFO] [stdout] 32 | if wal_colors_path.unwrap().is_empty() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `wal_colors_path` after checking its variant with `is_none` [INFO] [stdout] --> src/palette/wal.rs:37:19 [INFO] [stdout] | [INFO] [stdout] 12 | if wal_colors_path.is_none() { [INFO] [stdout] | ---------------------------- help: try: `if let Some() = wal_colors_path` [INFO] [stdout] ... [INFO] [stdout] 37 | path.push(wal_colors_path.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/palette/wal.rs:86:5 [INFO] [stdout] | [INFO] [stdout] 86 | return palette; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 86 - return palette; [INFO] [stdout] 86 + palette [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/palette/wal.rs:16:46 [INFO] [stdout] | [INFO] [stdout] 16 | ... .expect(format!("Wal 'colors' file not found in default location: {}", xdg_dirs.get_cache_home().display()).as_str()).to_str() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("Wal 'colors' file not found in default location: {}", xdg_dirs.get_cache_home().display()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/palette/wal.rs:48:10 [INFO] [stdout] | [INFO] [stdout] 48 | .expect(format!("Unexpected error, Couldn't read the file {}", filepath).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Unexpected error, Couldn't read the file {}", filepath))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Lines<'_>` [INFO] [stdout] --> src/palette/wal.rs:56:25 [INFO] [stdout] | [INFO] [stdout] 56 | for (index, col) in palette_file.lines().into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `palette_file.lines()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/palette/custom.rs:45:5 [INFO] [stdout] | [INFO] [stdout] 45 | return palette; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 45 - return palette; [INFO] [stdout] 45 + palette [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/palette/custom.rs:23:10 [INFO] [stdout] | [INFO] [stdout] 23 | .expect(format!("Couldn't read the palette file: {}", filepath).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Couldn't read the palette file: {}", filepath))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/palette/custom.rs:30:54 [INFO] [stdout] | [INFO] [stdout] 30 | for (_, line) in palette_file.lines().into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 30 - for (_, line) in palette_file.lines().into_iter().enumerate() { [INFO] [stdout] 30 + for line in palette_file.lines().into_iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Lines<'_>` [INFO] [stdout] --> src/palette/custom.rs:30:22 [INFO] [stdout] | [INFO] [stdout] 30 | for (_, line) in palette_file.lines().into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `palette_file.lines()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/palette/mod.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | return palette; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 32 - return palette; [INFO] [stdout] 32 + palette [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/palette/mod.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | let palette; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `palette` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 16 ~ [INFO] [stdout] 17 ~ let palette = match palette_type { [INFO] [stdout] 18 | Palette::Wal => { [INFO] [stdout] 19 ~ wal::import_wal_palette(filepath) [INFO] [stdout] 20 | } [INFO] [stdout] ... [INFO] [stdout] 24 | } [INFO] [stdout] 25 ~ custom::import_custom_palette(filepath.unwrap()) [INFO] [stdout] 26 | } [INFO] [stdout] 27 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/telegram/colors.rs:6:19 [INFO] [stdout] | [INFO] [stdout] 6 | let elements: Rc>>>>> = Rc::new(RefCell::new(HashMap::new())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/telegram/colors.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 12 | if !col.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `col.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/telegram/colors.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | return col; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 41 - return col; [INFO] [stdout] 41 + col [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/telegram/colors.rs:37:26 [INFO] [stdout] | [INFO] [stdout] 37 | .expect(format!("Could not find '{el}' in the previously defined elements").as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("Could not find '{el}' in the previously defined elements"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/telegram/colors.rs:53:19 [INFO] [stdout] | [INFO] [stdout] 53 | add_color(format!("{col_name}").as_str(), colors[col_name].clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `col_name.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/telegram/theme.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | return output_path; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 56 - return output_path; [INFO] [stdout] 56 + output_path [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/telegram/theme.rs:41:30 [INFO] [stdout] | [INFO] [stdout] 41 | ...().expect(format!("The output path {} cannot be probed, permissions are probably the issue.", output_path.display()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("The output path {} cannot be probed, permissions are probably the issue.", output_path.display()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/telegram/theme.rs:77:31 [INFO] [stdout] | [INFO] [stdout] 77 | pub fn package_theme(tmp_dir: &std::path::PathBuf, output: Option<&str>, input_palette: &HashMap>>) { [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] 77 ~ pub fn package_theme(tmp_dir: &Path, output: Option<&str>, input_palette: &HashMap>>) { [INFO] [stdout] 78 | [INFO] [stdout] ... [INFO] [stdout] 81 | // Tmp files [INFO] [stdout] 82 ~ let mut tmp_bg = tmp_dir.to_path_buf(); [INFO] [stdout] 83 | tmp_bg.push(super::super::background::BG_FILENAME); [INFO] [stdout] 84 | [INFO] [stdout] 85 ~ let mut tmp_palette = tmp_dir.to_path_buf(); [INFO] [stdout] 86 | tmp_palette.push(super::super::palette::PALETTE_FILENAME); [INFO] [stdout] 87 | [INFO] [stdout] 88 ~ let mut tmp_theme = tmp_dir.to_path_buf(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/telegram/theme.rs:92:5 [INFO] [stdout] | [INFO] [stdout] 92 | let bg_contents; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `bg_contents` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 92 ~ [INFO] [stdout] 93 ~ let bg_contents = match std::fs::read(&tmp_bg) { [INFO] [stdout] 94 | Ok(contents) => { [INFO] [stdout] 95 ~ contents [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/telegram/theme.rs:104:62 [INFO] [stdout] | [INFO] [stdout] 104 | let telegram_colors = super::colors::get_telegram_colors(&input_palette); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `input_palette` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/telegram/theme.rs:170:35 [INFO] [stdout] | [INFO] [stdout] 170 | match std::fs::create_dir_all(&output_path.parent().unwrap()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `output_path.parent().unwrap()` [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: unneeded `return` statement [INFO] [stdout] --> src/tmp_dir.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | return tmp_dir; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 23 - return tmp_dir; [INFO] [stdout] 23 + tmp_dir [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/tmp_dir.rs:10:31 [INFO] [stdout] | [INFO] [stdout] 10 | rand_folder.push_str((String::from(epoch_time.as_secs().to_string()) + "_").as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `epoch_time.as_secs().to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/palette/custom.rs:22:51 [INFO] [stdout] | [INFO] [stdout] 22 | let palette_file = fs::read_to_string(filepath.clone()) [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 29.15s [INFO] running `Command { std: "docker" "inspect" "ecc585239cf09d3a78043a31af8fc5724865d459dc2d4f2f98ef8380c644ceca", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ecc585239cf09d3a78043a31af8fc5724865d459dc2d4f2f98ef8380c644ceca", kill_on_drop: false }` [INFO] [stdout] ecc585239cf09d3a78043a31af8fc5724865d459dc2d4f2f98ef8380c644ceca