[INFO] cloning repository https://github.com/bitbangr/img_tile [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/bitbangr/img_tile" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbitbangr%2Fimg_tile", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbitbangr%2Fimg_tile'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 85b9732137c4f753a1f26e41dc504b7cc250b12d [INFO] linting bitbangr/img_tile against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbitbangr%2Fimg_tile" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/bitbangr/img_tile [INFO] finished tweaking git repo https://github.com/bitbangr/img_tile [INFO] tweaked toml for git repo https://github.com/bitbangr/img_tile written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/bitbangr/img_tile 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/bitbangr/img_tile 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 encoding_index_tests v0.1.4 [INFO] [stderr] Downloaded ordered-float v1.1.1 [INFO] [stderr] Downloaded const_fn v0.4.11 [INFO] [stderr] Downloaded encoding-index-singlebyte v1.20141219.5 [INFO] [stderr] Downloaded lzw v0.10.0 [INFO] [stderr] Downloaded encoding v0.2.33 [INFO] [stderr] Downloaded ego-tree v0.10.0 [INFO] [stderr] Downloaded encoding-index-tradchinese v1.20141219.5 [INFO] [stderr] Downloaded lopdf v0.26.0 [INFO] [stderr] Downloaded encoding-index-japanese v1.20141219.5 [INFO] [stderr] Downloaded encoding-index-korean v1.20141219.5 [INFO] [stderr] Downloaded encoding-index-simpchinese v1.20141219.5 [INFO] [stderr] Downloaded tiff v0.6.1 [INFO] [stderr] Downloaded printpdf v0.3.4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 0734f64e0a314204e43427eaab0aa39a39eb887f7a89415b3d626c2ee6b6657f [INFO] running `Command { std: "docker" "start" "-a" "0734f64e0a314204e43427eaab0aa39a39eb887f7a89415b3d626c2ee6b6657f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "0734f64e0a314204e43427eaab0aa39a39eb887f7a89415b3d626c2ee6b6657f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0734f64e0a314204e43427eaab0aa39a39eb887f7a89415b3d626c2ee6b6657f", kill_on_drop: false }` [INFO] [stdout] 0734f64e0a314204e43427eaab0aa39a39eb887f7a89415b3d626c2ee6b6657f [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 8481efe8010d6080fec70384bb8f50039a6968eec21ef0cfb617b229d0ef1f51 [INFO] running `Command { std: "docker" "start" "-a" "8481efe8010d6080fec70384bb8f50039a6968eec21ef0cfb617b229d0ef1f51", kill_on_drop: false }` [INFO] [stderr] Compiling standback v0.2.17 [INFO] [stderr] Checking encoding_index_tests v0.1.4 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling proc-macro-hack v0.5.20+deprecated [INFO] [stderr] Compiling miniz_oxide v0.4.4 [INFO] [stderr] Checking adler32 v1.2.0 [INFO] [stderr] Compiling const_fn v0.4.11 [INFO] [stderr] Compiling time v0.2.27 [INFO] [stderr] Compiling num-rational v0.3.2 [INFO] [stderr] Compiling syn v2.0.101 [INFO] [stderr] Checking miniz_oxide v0.8.8 [INFO] [stderr] Checking jpeg-decoder v0.1.22 [INFO] [stderr] Checking gif v0.11.4 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Checking stb_truetype v0.3.1 [INFO] [stderr] Checking num-iter v0.1.45 [INFO] [stderr] Checking encoding-index-simpchinese v1.20141219.5 [INFO] [stderr] Checking encoding-index-tradchinese v1.20141219.5 [INFO] [stderr] Checking miniz_oxide v0.3.7 [INFO] [stderr] Checking deflate v0.8.6 [INFO] [stderr] Checking encoding-index-japanese v1.20141219.5 [INFO] [stderr] Checking encoding-index-singlebyte v1.20141219.5 [INFO] [stderr] Checking encoding-index-korean v1.20141219.5 [INFO] [stderr] Checking approx v0.3.2 [INFO] [stderr] Checking ordered-float v1.1.1 [INFO] [stderr] Checking regex-syntax v0.8.5 [INFO] [stderr] Checking scoped_threadpool v0.1.9 [INFO] [stderr] Checking bytemuck v1.22.0 [INFO] [stderr] Checking lzw v0.10.0 [INFO] [stderr] Checking flate2 v1.1.1 [INFO] [stderr] Checking itoa v0.4.8 [INFO] [stderr] Checking encoding v0.2.33 [INFO] [stderr] Checking dtoa v0.4.8 [INFO] [stderr] Checking clap_builder v4.5.37 [INFO] [stderr] Checking rusttype v0.8.3 [INFO] [stderr] Checking euclid v0.22.11 [INFO] [stderr] Checking ego-tree v0.10.0 [INFO] [stderr] Checking tiff v0.6.1 [INFO] [stderr] Checking png v0.16.8 [INFO] [stderr] Checking image v0.23.14 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking clap v4.5.37 [INFO] [stderr] Compiling time-macros-impl v0.1.2 [INFO] [stderr] Checking time-macros v0.1.1 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Checking lopdf v0.26.0 [INFO] [stderr] Checking printpdf v0.3.4 [INFO] [stderr] Checking serde v1.0.219 [INFO] [stderr] Checking serde_json v1.0.140 [INFO] [stderr] Checking img_tile v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: empty lines after doc comment [INFO] [stdout] --> src/main.rs:375:1 [INFO] [stdout] | [INFO] [stdout] 375 | / /// ``` [INFO] [stdout] 376 | | [INFO] [stdout] 377 | | [INFO] [stdout] | |_^ [INFO] [stdout] 378 | fn create_out_panes(input_img_width: f64, [INFO] [stdout] | ------------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty lines are unintentional, remove them [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty lines after doc comment [INFO] [stdout] --> src/main.rs:375:1 [INFO] [stdout] | [INFO] [stdout] 375 | / /// ``` [INFO] [stdout] 376 | | [INFO] [stdout] 377 | | [INFO] [stdout] | |_^ [INFO] [stdout] 378 | fn create_out_panes(input_img_width: f64, [INFO] [stdout] | ------------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty lines are unintentional, remove them [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is an `else {..}` but the formatting might hide it [INFO] [stdout] --> src/main.rs:495:6 [INFO] [stdout] | [INFO] [stdout] 495 | } else [INFO] [stdout] | ______^ [INFO] [stdout] 496 | | { [INFO] [stdout] | |____^ [INFO] [stdout] | [INFO] [stdout] = note: to remove this lint, remove the `else` or remove the new line between `else` and `{..}` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_else_formatting [INFO] [stdout] = note: `#[warn(clippy::suspicious_else_formatting)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is an `else {..}` but the formatting might hide it [INFO] [stdout] --> src/main.rs:495:6 [INFO] [stdout] | [INFO] [stdout] 495 | } else [INFO] [stdout] | ______^ [INFO] [stdout] 496 | | { [INFO] [stdout] | |____^ [INFO] [stdout] | [INFO] [stdout] = note: to remove this lint, remove the `else` or remove the new line between `else` and `{..}` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_else_formatting [INFO] [stdout] = note: `#[warn(clippy::suspicious_else_formatting)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `dash_pattern` is assigned to, but never used [INFO] [stdout] --> src/pdf_util.rs:208:9 [INFO] [stdout] | [INFO] [stdout] 208 | let mut dash_pattern = LineDashPattern::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_dash_pattern` instead [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `dash_pattern` is never read [INFO] [stdout] --> src/pdf_util.rs:209:5 [INFO] [stdout] | [INFO] [stdout] 209 | dash_pattern.dash_1 = Some(20); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `dash_pattern` is assigned to, but never used [INFO] [stdout] --> src/pdf_util.rs:208:9 [INFO] [stdout] | [INFO] [stdout] 208 | let mut dash_pattern = LineDashPattern::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_dash_pattern` instead [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `dash_pattern` is never read [INFO] [stdout] --> src/pdf_util.rs:209:5 [INFO] [stdout] | [INFO] [stdout] 209 | dash_pattern.dash_1 = Some(20); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `page_margin_left_mm` [INFO] [stdout] --> src/pdf_util.rs:459:10 [INFO] [stdout] | [INFO] [stdout] 459 | let page_margin_left_mm: f64 = 20.0; // size of left margin [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_page_margin_left_mm` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `page_margin_right_mm` [INFO] [stdout] --> src/pdf_util.rs:460:10 [INFO] [stdout] | [INFO] [stdout] 460 | let page_margin_right_mm: f64 = 50.0; // size of right margin [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_page_margin_right_mm` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `col_0_x` [INFO] [stdout] --> src/pdf_util.rs:486:14 [INFO] [stdout] | [INFO] [stdout] 486 | let col_0_x :i32 = 20; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_col_0_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `col_1_x` [INFO] [stdout] --> src/pdf_util.rs:487:14 [INFO] [stdout] | [INFO] [stdout] 487 | let col_1_x :i32 = 110; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_col_1_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `col_2_x` [INFO] [stdout] --> src/pdf_util.rs:488:14 [INFO] [stdout] | [INFO] [stdout] 488 | let col_2_x :i32 = 195; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_col_2_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `page_margin_left_mm` [INFO] [stdout] --> src/pdf_util.rs:459:10 [INFO] [stdout] | [INFO] [stdout] 459 | let page_margin_left_mm: f64 = 20.0; // size of left margin [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_page_margin_left_mm` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `page_margin_right_mm` [INFO] [stdout] --> src/pdf_util.rs:460:10 [INFO] [stdout] | [INFO] [stdout] 460 | let page_margin_right_mm: f64 = 50.0; // size of right margin [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_page_margin_right_mm` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `col_0_x` [INFO] [stdout] --> src/pdf_util.rs:486:14 [INFO] [stdout] | [INFO] [stdout] 486 | let col_0_x :i32 = 20; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_col_0_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `col_1_x` [INFO] [stdout] --> src/pdf_util.rs:487:14 [INFO] [stdout] | [INFO] [stdout] 487 | let col_1_x :i32 = 110; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_col_1_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `col_2_x` [INFO] [stdout] --> src/pdf_util.rs:488:14 [INFO] [stdout] | [INFO] [stdout] 488 | let col_2_x :i32 = 195; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_col_2_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:193:18 [INFO] [stdout] | [INFO] [stdout] 193 | for (_j, mut tile) in pane.iter_mut().enumerate(){ [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `draw_summary_circles` is never used [INFO] [stdout] --> src/pdf_util.rs:952:4 [INFO] [stdout] | [INFO] [stdout] 952 | fn draw_summary_circles(pdf_output_window: &Vec, modtile::RGB)>>, [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 `draw_diag` is never used [INFO] [stdout] --> src/pdf_util.rs:1006:4 [INFO] [stdout] | [INFO] [stdout] 1006 | fn draw_diag(current_layer: &&PdfLayerReference) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `draw_circle_with_pts_no_fill` is never used [INFO] [stdout] --> src/pdf_util.rs:1276:4 [INFO] [stdout] | [INFO] [stdout] 1276 | fn draw_circle_with_pts_no_fill(current_layer: &&PdfLayerReference, offsetx_pt: Pt, offsety_pt: Pt, radius_pt: Pt) -> () { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_points_for_circle` is never used [INFO] [stdout] --> src/pdf_util.rs:1368:4 [INFO] [stdout] | [INFO] [stdout] 1368 | fn get_points_for_circle(xoff: f64, yoff: f64, scale: f64) -> Vec<(Point, bool)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `old_load_all_colors` is never used [INFO] [stdout] --> src/modtile.rs:188:8 [INFO] [stdout] | [INFO] [stdout] 188 | pub fn old_load_all_colors>(path: P) -> AllColors { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `save_all_colors` is never used [INFO] [stdout] --> src/modtile.rs:208:8 [INFO] [stdout] | [INFO] [stdout] 208 | pub fn save_all_colors>(path: P, all_colors: AllColors) -> Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `save_config` is never used [INFO] [stdout] --> src/modtile.rs:217:8 [INFO] [stdout] | [INFO] [stdout] 217 | pub fn save_config>(path: P, config: &Config) -> Result<()> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/json_export.rs:21:4 [INFO] [stdout] | [INFO] [stdout] 21 | fn main() -> Result<(), Box> { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/kd_tree.rs:114:16 [INFO] [stdout] | [INFO] [stdout] 114 | if !node_id_option.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `node_id_option.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: called `unwrap` on `node_id_option` after checking its variant with `is_none` [INFO] [stdout] --> src/kd_tree.rs:116:71 [INFO] [stdout] | [INFO] [stdout] 114 | if !node_id_option.is_none() { [INFO] [stdout] | ------------------------ the check is happening here [INFO] [stdout] 115 | let second_best_guess_node = [INFO] [stdout] 116 | query_nearest_neighbor(q, kd_tree, max_dimension, node_id_option.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: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/kd_tree.rs:106:31 [INFO] [stdout] | [INFO] [stdout] 106 | let plane_dist: u32 = (i32::from(parent_val[current_dim]) [INFO] [stdout] | _______________________________^ [INFO] [stdout] 107 | | - i32::from(best_guess_node.value()[current_dim])) [INFO] [stdout] 108 | | .abs() as u32; [INFO] [stdout] | |_________________________^ help: replace with: `(i32::from(parent_val[current_dim]) - i32::from(best_guess_node.value()[current_dim])).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:193:18 [INFO] [stdout] | [INFO] [stdout] 193 | for (_j, mut tile) in pane.iter_mut().enumerate(){ [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/kd_tree.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | kd_tree: &'a Tree>, [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_kd_tree` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/kd_tree.rs:116:47 [INFO] [stdout] | [INFO] [stdout] 116 | query_nearest_neighbor(q, kd_tree, max_dimension, node_id_option.unwrap()); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] = note: `#[warn(clippy::only_used_in_recursion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/pdf_util.rs:27:26 [INFO] [stdout] | [INFO] [stdout] 27 | PdfDocument::new(&all_colors.name.to_owned(), Mm(x_mm), Mm(y_mm), "Layer 1"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `all_colors.name.to_owned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `row` is used as a loop counter [INFO] [stdout] --> src/pdf_util.rs:75:5 [INFO] [stdout] | [INFO] [stdout] 75 | for st in (0..*len).step_by(step) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (row, st) in (0_i32..).zip((0..*len).step_by(step))` [INFO] [stdout] | [INFO] [stdout] = note: `row` is of type `i32`, making it ineligible for `Iterator::enumerate` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pdf_util.rs:124:66 [INFO] [stdout] | [INFO] [stdout] 124 | ... font: &IndirectFontRef, row: i32) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: immediately dereferencing a reference [INFO] [stdout] --> src/pdf_util.rs:158:46 [INFO] [stdout] | [INFO] [stdout] 158 | let fill_color = Color::Rgb(Rgb::new(*&tc.rgb.0 as f64/255.0, *&tc.rgb.1 as f64/255.0, *&tc.rgb.2 as f64/255.0, None)); [INFO] [stdout] | ^^^^^^^^^^ help: try: `tc.rgb.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deref_addrof [INFO] [stdout] = note: `#[warn(clippy::deref_addrof)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: immediately dereferencing a reference [INFO] [stdout] --> src/pdf_util.rs:158:71 [INFO] [stdout] | [INFO] [stdout] 158 | let fill_color = Color::Rgb(Rgb::new(*&tc.rgb.0 as f64/255.0, *&tc.rgb.1 as f64/255.0, *&tc.rgb.2 as f64/255.0, None)); [INFO] [stdout] | ^^^^^^^^^^ help: try: `tc.rgb.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deref_addrof [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: immediately dereferencing a reference [INFO] [stdout] --> src/pdf_util.rs:158:96 [INFO] [stdout] | [INFO] [stdout] 158 | let fill_color = Color::Rgb(Rgb::new(*&tc.rgb.0 as f64/255.0, *&tc.rgb.1 as f64/255.0, *&tc.rgb.2 as f64/255.0, None)); [INFO] [stdout] | ^^^^^^^^^^ help: try: `tc.rgb.2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deref_addrof [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pdf_util.rs:194:98 [INFO] [stdout] | [INFO] [stdout] 194 | ... output_window: &Vec, modtile::RGB)>>) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/pdf_util.rs:199:26 [INFO] [stdout] | [INFO] [stdout] 199 | PdfDocument::new(&all_colors.name.to_owned(), Mm(doc_width_mm), Mm(doc_height_mm), "Layer 1"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `all_colors.name.to_owned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/pdf_util.rs:266:1 [INFO] [stdout] | [INFO] [stdout] 266 | / fn construct_window_panes(current_layer: &PdfLayerReference, [INFO] [stdout] 267 | | doc: &PdfDocumentReference, [INFO] [stdout] 268 | | doc_width_mm: f64, [INFO] [stdout] 269 | | doc_height_mm: f64, [INFO] [stdout] ... | [INFO] [stdout] 272 | | tile_color_count_vec: Vec<(Vec, i32)>, [INFO] [stdout] 273 | | output_window: &Vec, modtile::RGB)>>) -> () { [INFO] [stdout] | |_________________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pdf_util.rs:273:84 [INFO] [stdout] | [INFO] [stdout] 273 | output_window: &Vec, modtile::RGB)>>) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `draw_summary_circles` is never used [INFO] [stdout] --> src/pdf_util.rs:952:4 [INFO] [stdout] | [INFO] [stdout] 952 | fn draw_summary_circles(pdf_output_window: &Vec, modtile::RGB)>>, [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 `draw_diag` is never used [INFO] [stdout] --> src/pdf_util.rs:1006:4 [INFO] [stdout] | [INFO] [stdout] 1006 | fn draw_diag(current_layer: &&PdfLayerReference) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `draw_circle_with_pts_no_fill` is never used [INFO] [stdout] --> src/pdf_util.rs:1276:4 [INFO] [stdout] | [INFO] [stdout] 1276 | fn draw_circle_with_pts_no_fill(current_layer: &&PdfLayerReference, offsetx_pt: Pt, offsety_pt: Pt, radius_pt: Pt) -> () { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_points_for_circle` is never used [INFO] [stdout] --> src/pdf_util.rs:1368:4 [INFO] [stdout] | [INFO] [stdout] 1368 | fn get_points_for_circle(xoff: f64, yoff: f64, scale: f64) -> Vec<(Point, bool)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `old_load_all_colors` is never used [INFO] [stdout] --> src/modtile.rs:188:8 [INFO] [stdout] | [INFO] [stdout] 188 | pub fn old_load_all_colors>(path: P) -> AllColors { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `save_all_colors` is never used [INFO] [stdout] --> src/modtile.rs:208:8 [INFO] [stdout] | [INFO] [stdout] 208 | pub fn save_all_colors>(path: P, all_colors: AllColors) -> Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `save_config` is never used [INFO] [stdout] --> src/modtile.rs:217:8 [INFO] [stdout] | [INFO] [stdout] 217 | pub fn save_config>(path: P, config: &Config) -> Result<()> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/json_export.rs:21:4 [INFO] [stdout] | [INFO] [stdout] 21 | fn main() -> Result<(), Box> { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:359:101 [INFO] [stdout] | [INFO] [stdout] 359 | let start_x : Pt = Mm(grid_origin_x_mm + column as f64 * p_cfg.pane_tile_col_count as f64 * pdftile_wid_mm as f64).into(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `pdftile_wid_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/kd_tree.rs:114:16 [INFO] [stdout] | [INFO] [stdout] 114 | if !node_id_option.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `node_id_option.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: called `unwrap` on `node_id_option` after checking its variant with `is_none` [INFO] [stdout] --> src/kd_tree.rs:116:71 [INFO] [stdout] | [INFO] [stdout] 114 | if !node_id_option.is_none() { [INFO] [stdout] | ------------------------ the check is happening here [INFO] [stdout] 115 | let second_best_guess_node = [INFO] [stdout] 116 | query_nearest_neighbor(q, kd_tree, max_dimension, node_id_option.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: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/kd_tree.rs:106:31 [INFO] [stdout] | [INFO] [stdout] 106 | let plane_dist: u32 = (i32::from(parent_val[current_dim]) [INFO] [stdout] | _______________________________^ [INFO] [stdout] 107 | | - i32::from(best_guess_node.value()[current_dim])) [INFO] [stdout] 108 | | .abs() as u32; [INFO] [stdout] | |_________________________^ help: replace with: `(i32::from(parent_val[current_dim]) - i32::from(best_guess_node.value()[current_dim])).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Pt` which implements the `Copy` trait [INFO] [stdout] --> src/pdf_util.rs:361:26 [INFO] [stdout] | [INFO] [stdout] 361 | let end_x : Pt = start_x.clone(); // drawing a vertical line so x remains the same [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `start_x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:362:113 [INFO] [stdout] | [INFO] [stdout] 362 | ...4 * p_cfg.pane_tile_row_count as f64 * pdftile_hgt_mm as f64).into(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `pdftile_hgt_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:380:101 [INFO] [stdout] | [INFO] [stdout] 380 | ...4 * p_cfg.pane_tile_row_count as f64 * pdftile_hgt_mm as f64).into(); // <--- something wrong here [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `pdftile_hgt_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:381:118 [INFO] [stdout] | [INFO] [stdout] 381 | ...4 * p_cfg.pane_tile_col_count as f64 * pdftile_wid_mm as f64).into(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `pdftile_wid_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Pt` which implements the `Copy` trait [INFO] [stdout] --> src/pdf_util.rs:382:31 [INFO] [stdout] | [INFO] [stdout] 382 | let end_y_pt : Pt = start_y_pt.clone(); // drawing a horizontal line so y remains the same [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `start_y_pt` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/kd_tree.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | kd_tree: &'a Tree>, [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_kd_tree` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/kd_tree.rs:116:47 [INFO] [stdout] | [INFO] [stdout] 116 | query_nearest_neighbor(q, kd_tree, max_dimension, node_id_option.unwrap()); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] = note: `#[warn(clippy::only_used_in_recursion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pdf_util.rs:414:60 [INFO] [stdout] | [INFO] [stdout] 414 | current_layer.use_text(number.2, 48.0, x_mm, y_mm, &pane_font); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `pane_font` [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: unneeded unit return type [INFO] [stdout] --> src/pdf_util.rs:445:52 [INFO] [stdout] | [INFO] [stdout] 445 | ... doc_height_mm: f64) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/pdf_util.rs:27:26 [INFO] [stdout] | [INFO] [stdout] 27 | PdfDocument::new(&all_colors.name.to_owned(), Mm(x_mm), Mm(y_mm), "Layer 1"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `all_colors.name.to_owned()` [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: useless use of `format!` [INFO] [stdout] --> src/pdf_util.rs:465:23 [INFO] [stdout] | [INFO] [stdout] 465 | let pn: String = format!("Tile Colors ") ; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Tile Colors ".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: the variable `row` is used as a loop counter [INFO] [stdout] --> src/pdf_util.rs:75:5 [INFO] [stdout] | [INFO] [stdout] 75 | for st in (0..*len).step_by(step) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (row, st) in (0_i32..).zip((0..*len).step_by(step))` [INFO] [stdout] | [INFO] [stdout] = note: `row` is of type `i32`, making it ineligible for `Iterator::enumerate` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:517:49 [INFO] [stdout] | [INFO] [stdout] 517 | ... let center_y_pt: Pt = Mm((doc_height_mm as f64 - page_margin_ver_mm as f64) - 15.0 * (i % display_entries_per_col) as f64).in... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `doc_height_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:517:72 [INFO] [stdout] | [INFO] [stdout] 517 | ... let center_y_pt: Pt = Mm((doc_height_mm as f64 - page_margin_ver_mm as f64) - 15.0 * (i % display_entries_per_col) as f64).in... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `page_margin_ver_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:526:103 [INFO] [stdout] | [INFO] [stdout] 526 | ...m(col_pos_x[cur_col] as f64 - 2.0), Mm((doc_height_mm as f64 - page_margin_ver_mm as f64 - 2.0) - 15.0 * (i % display_entries_pe... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `doc_height_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:526:126 [INFO] [stdout] | [INFO] [stdout] 526 | ...- 2.0), Mm((doc_height_mm as f64 - page_margin_ver_mm as f64 - 2.0) - 15.0 * (i % display_entries_per_col) as f64), pane_font); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `page_margin_ver_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pdf_util.rs:124:66 [INFO] [stdout] | [INFO] [stdout] 124 | ... font: &IndirectFontRef, row: i32) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:531:104 [INFO] [stdout] | [INFO] [stdout] 531 | ...m(col_pos_x[cur_col] as f64 + 7.0), Mm((doc_height_mm as f64 - page_margin_ver_mm as f64 - 1.0) - 15.0 * (i % display_entries_pe... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `doc_height_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:531:127 [INFO] [stdout] | [INFO] [stdout] 531 | ...+ 7.0), Mm((doc_height_mm as f64 - page_margin_ver_mm as f64 - 1.0) - 15.0 * (i % display_entries_per_col) as f64), pane_font); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `page_margin_ver_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: immediately dereferencing a reference [INFO] [stdout] --> src/pdf_util.rs:158:46 [INFO] [stdout] | [INFO] [stdout] 158 | let fill_color = Color::Rgb(Rgb::new(*&tc.rgb.0 as f64/255.0, *&tc.rgb.1 as f64/255.0, *&tc.rgb.2 as f64/255.0, None)); [INFO] [stdout] | ^^^^^^^^^^ help: try: `tc.rgb.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deref_addrof [INFO] [stdout] = note: `#[warn(clippy::deref_addrof)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: immediately dereferencing a reference [INFO] [stdout] --> src/pdf_util.rs:158:71 [INFO] [stdout] | [INFO] [stdout] 158 | let fill_color = Color::Rgb(Rgb::new(*&tc.rgb.0 as f64/255.0, *&tc.rgb.1 as f64/255.0, *&tc.rgb.2 as f64/255.0, None)); [INFO] [stdout] | ^^^^^^^^^^ help: try: `tc.rgb.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deref_addrof [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: immediately dereferencing a reference [INFO] [stdout] --> src/pdf_util.rs:158:96 [INFO] [stdout] | [INFO] [stdout] 158 | let fill_color = Color::Rgb(Rgb::new(*&tc.rgb.0 as f64/255.0, *&tc.rgb.1 as f64/255.0, *&tc.rgb.2 as f64/255.0, None)); [INFO] [stdout] | ^^^^^^^^^^ help: try: `tc.rgb.2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deref_addrof [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/pdf_util.rs:542:1 [INFO] [stdout] | [INFO] [stdout] 542 | / fn construct_pane_detail_page(pane_no: usize, [INFO] [stdout] 543 | | pane: &&Vec<(Box2D, modtile::RGB)>, [INFO] [stdout] 544 | | doc: &&PdfDocumentReference, [INFO] [stdout] 545 | | pane_font: &&IndirectFontRef, [INFO] [stdout] ... | [INFO] [stdout] 549 | | doc_height_mm: f64, [INFO] [stdout] 550 | | p_cfg: &PanePdfConfig) -> () { [INFO] [stdout] | |______________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pdf_util.rs:550:57 [INFO] [stdout] | [INFO] [stdout] 550 | ... p_cfg: &PanePdfConfig) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pdf_util.rs:194:98 [INFO] [stdout] | [INFO] [stdout] 194 | ... output_window: &Vec, modtile::RGB)>>) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/pdf_util.rs:199:26 [INFO] [stdout] | [INFO] [stdout] 199 | PdfDocument::new(&all_colors.name.to_owned(), Mm(doc_width_mm), Mm(doc_height_mm), "Layer 1"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `all_colors.name.to_owned()` [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: needlessly taken reference of left operand [INFO] [stdout] --> src/pdf_util.rs:586:26 [INFO] [stdout] | [INFO] [stdout] 586 | pdftile_hgt_mm = &pdftile_wid_mm * imgtile_hgt_px/imgtile_wid_px; [INFO] [stdout] | ---------------^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `pdftile_wid_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/pdf_util.rs:593:26 [INFO] [stdout] | [INFO] [stdout] 593 | pdftile_wid_mm = &pdftile_hgt_mm * imgtile_wid_px/imgtile_hgt_px; [INFO] [stdout] | ---------------^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `pdftile_hgt_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/pdf_util.rs:266:1 [INFO] [stdout] | [INFO] [stdout] 266 | / fn construct_window_panes(current_layer: &PdfLayerReference, [INFO] [stdout] 267 | | doc: &PdfDocumentReference, [INFO] [stdout] 268 | | doc_width_mm: f64, [INFO] [stdout] 269 | | doc_height_mm: f64, [INFO] [stdout] ... | [INFO] [stdout] 272 | | tile_color_count_vec: Vec<(Vec, i32)>, [INFO] [stdout] 273 | | output_window: &Vec, modtile::RGB)>>) -> () { [INFO] [stdout] | |_________________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pdf_util.rs:273:84 [INFO] [stdout] | [INFO] [stdout] 273 | output_window: &Vec, modtile::RGB)>>) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pdf_util.rs:618:23 [INFO] [stdout] | [INFO] [stdout] 618 | draw_pane_circles(&pane, [INFO] [stdout] | ^^^^^ help: change this to: `pane` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/pdf_util.rs:648:1 [INFO] [stdout] | [INFO] [stdout] 648 | / fn draw_pane_legend(pane: &&Vec<(Box2D, modtile::RGB)>, [INFO] [stdout] 649 | | pane_no : usize, [INFO] [stdout] 650 | | current_layer: &PdfLayerReference, [INFO] [stdout] 651 | | pane_font: &&IndirectFontRef, [INFO] [stdout] ... | [INFO] [stdout] 657 | | all_colors: &modtile::AllColors, [INFO] [stdout] 658 | | tile_color_count_vec: &Vec<(Vec, i32)>,) -> () { [INFO] [stdout] | |______________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pdf_util.rs:658:65 [INFO] [stdout] | [INFO] [stdout] 658 | tile_color_count_vec: &Vec<(Vec, i32)>,) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/pdf_util.rs:658:43 [INFO] [stdout] | [INFO] [stdout] 658 | tile_color_count_vec: &Vec<(Vec, i32)>,) -> () { [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] 658 - tile_color_count_vec: &Vec<(Vec, i32)>,) -> () { [INFO] [stdout] 658 + tile_color_count_vec: &[(Vec, i32)],) -> () { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/pdf_util.rs:662:34 [INFO] [stdout] | [INFO] [stdout] 662 | for (_i, tile) in pane.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] 662 - for (_i, tile) in pane.iter().enumerate() { [INFO] [stdout] 662 + for tile in pane.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:359:101 [INFO] [stdout] | [INFO] [stdout] 359 | let start_x : Pt = Mm(grid_origin_x_mm + column as f64 * p_cfg.pane_tile_col_count as f64 * pdftile_wid_mm as f64).into(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `pdftile_wid_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/pdf_util.rs:684:94 [INFO] [stdout] | [INFO] [stdout] 684 | let (tile_colors, _count) : (Vec<&Vec>,Vec<&i32>) = tile_color_count_vec.iter().map(|&(ref a, ref b)| (a, b)).unzip(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 684 - let (tile_colors, _count) : (Vec<&Vec>,Vec<&i32>) = tile_color_count_vec.iter().map(|&(ref a, ref b)| (a, b)).unzip(); [INFO] [stdout] 684 + let (tile_colors, _count) : (Vec<&Vec>,Vec<&i32>) = tile_color_count_vec.iter().map(|(a, b)| (a, b)).unzip(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:704:43 [INFO] [stdout] | [INFO] [stdout] 704 | let center_y_pt: Pt = Mm((doc_height_mm as f64 - page_margin_ver_mm as f64) - 15.0 * i as f64).into(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `doc_height_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:704:66 [INFO] [stdout] | [INFO] [stdout] 704 | let center_y_pt: Pt = Mm((doc_height_mm as f64 - page_margin_ver_mm as f64) - 15.0 * i as f64).into(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `page_margin_ver_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/pdf_util.rs:713:39 [INFO] [stdout] | [INFO] [stdout] 713 | let pos_str: String = format!("{}", pos.unwrap().to_string()) ; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `pos.unwrap().to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/pdf_util.rs:713:65 [INFO] [stdout] | [INFO] [stdout] 713 | let pos_str: String = format!("{}", pos.unwrap().to_string()) ; [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:716:70 [INFO] [stdout] | [INFO] [stdout] 716 | ... current_layer.use_text(pos_str, 20.0, Mm(203.0), Mm((doc_height_mm as f64 - page_margin_ver_mm as f64 - 2.0) - 15.0 * i as f6... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `doc_height_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:716:93 [INFO] [stdout] | [INFO] [stdout] 716 | ...203.0), Mm((doc_height_mm as f64 - page_margin_ver_mm as f64 - 2.0) - 15.0 * i as f64), pane_font); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `page_margin_ver_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:721:71 [INFO] [stdout] | [INFO] [stdout] 721 | ... current_layer.use_text(name_str, 20.0, Mm(212.0), Mm((doc_height_mm as f64 - page_margin_ver_mm as f64 - 1.0) - 15.0 * i as f... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `doc_height_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:721:94 [INFO] [stdout] | [INFO] [stdout] 721 | ...212.0), Mm((doc_height_mm as f64 - page_margin_ver_mm as f64 - 1.0) - 15.0 * i as f64), pane_font); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `page_margin_ver_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pdf_util.rs:727:100 [INFO] [stdout] | [INFO] [stdout] 727 | fn draw_page_marks(current_layer: &&PdfLayerReference, doc_width_as_mm: f64, doc_height_as_mm: f64) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Pt` which implements the `Copy` trait [INFO] [stdout] --> src/pdf_util.rs:361:26 [INFO] [stdout] | [INFO] [stdout] 361 | let end_x : Pt = start_x.clone(); // drawing a vertical line so x remains the same [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `start_x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:362:113 [INFO] [stdout] | [INFO] [stdout] 362 | ...4 * p_cfg.pane_tile_row_count as f64 * pdftile_hgt_mm as f64).into(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `pdftile_hgt_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:380:101 [INFO] [stdout] | [INFO] [stdout] 380 | ...4 * p_cfg.pane_tile_row_count as f64 * pdftile_hgt_mm as f64).into(); // <--- something wrong here [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `pdftile_hgt_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pdf_util.rs:797:54 [INFO] [stdout] | [INFO] [stdout] 797 | ... scale_factor_hgt: f64) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:381:118 [INFO] [stdout] | [INFO] [stdout] 381 | ...4 * p_cfg.pane_tile_col_count as f64 * pdftile_wid_mm as f64).into(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `pdftile_wid_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Pt` which implements the `Copy` trait [INFO] [stdout] --> src/pdf_util.rs:382:31 [INFO] [stdout] | [INFO] [stdout] 382 | let end_y_pt : Pt = start_y_pt.clone(); // drawing a horizontal line so y remains the same [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `start_y_pt` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/pdf_util.rs:791:34 [INFO] [stdout] | [INFO] [stdout] 791 | fn draw_tiles(pdf_output_window: &Vec, [INFO] [stdout] | __________________________________^ [INFO] [stdout] 792 | | modtile::RGB)>>, [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] 791 ~ fn draw_tiles(pdf_output_window: &[Vec<(Box2D, [INFO] [stdout] 792 ~ modtile::RGB)>], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pdf_util.rs:414:60 [INFO] [stdout] | [INFO] [stdout] 414 | current_layer.use_text(number.2, 48.0, x_mm, y_mm, &pane_font); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `pane_font` [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: unneeded unit return type [INFO] [stdout] --> src/pdf_util.rs:445:52 [INFO] [stdout] | [INFO] [stdout] 445 | ... doc_height_mm: f64) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/pdf_util.rs:805:47 [INFO] [stdout] | [INFO] [stdout] 805 | for (_i, pane) in pdf_output_window.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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 805 - for (_i, pane) in pdf_output_window.iter().enumerate() { [INFO] [stdout] 805 + for pane in pdf_output_window.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/pdf_util.rs:806:38 [INFO] [stdout] | [INFO] [stdout] 806 | for (_j, tile) in pane.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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 806 - for (_j, tile) in pane.iter().enumerate(){ [INFO] [stdout] 806 + for tile in pane.iter(){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (13/7) [INFO] [stdout] --> src/pdf_util.rs:848:1 [INFO] [stdout] | [INFO] [stdout] 848 | / fn draw_pane_circles(pdf_output_pane: &Vec<(Box2D, modtile::RGB)>, [INFO] [stdout] 849 | | current_layer: &&PdfLayerReference, [INFO] [stdout] 850 | | pane_font: &&IndirectFontRef, [INFO] [stdout] 851 | | grid_origin_x_mm: f64, [INFO] [stdout] ... | [INFO] [stdout] 859 | | all_colors: &modtile::AllColors, [INFO] [stdout] 860 | | tile_color_count_vec: &Vec<(Vec,i32)>,) -> () { [INFO] [stdout] | |_________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pdf_util.rs:860:68 [INFO] [stdout] | [INFO] [stdout] 860 | tile_color_count_vec: &Vec<(Vec,i32)>,) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/pdf_util.rs:848:39 [INFO] [stdout] | [INFO] [stdout] 848 | fn draw_pane_circles(pdf_output_pane: &Vec<(Box2D, modtile::RGB)>, [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] 848 - fn draw_pane_circles(pdf_output_pane: &Vec<(Box2D, modtile::RGB)>, [INFO] [stdout] 848 + fn draw_pane_circles(pdf_output_pane: &[(Box2D, modtile::RGB)], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/pdf_util.rs:860:47 [INFO] [stdout] | [INFO] [stdout] 860 | tile_color_count_vec: &Vec<(Vec,i32)>,) -> () { [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] 860 - tile_color_count_vec: &Vec<(Vec,i32)>,) -> () { [INFO] [stdout] 860 + tile_color_count_vec: &[(Vec,i32)],) -> () { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/pdf_util.rs:465:23 [INFO] [stdout] | [INFO] [stdout] 465 | let pn: String = format!("Tile Colors ") ; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Tile Colors ".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: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/pdf_util.rs:879:94 [INFO] [stdout] | [INFO] [stdout] 879 | let (tile_colors, _count) : (Vec<&Vec>,Vec<&i32>) = tile_color_count_vec.iter().map(|&(ref a, ref b)| (a, b)).unzip(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 879 - let (tile_colors, _count) : (Vec<&Vec>,Vec<&i32>) = tile_color_count_vec.iter().map(|&(ref a, ref b)| (a, b)).unzip(); [INFO] [stdout] 879 + let (tile_colors, _count) : (Vec<&Vec>,Vec<&i32>) = tile_color_count_vec.iter().map(|(a, b)| (a, b)).unzip(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/pdf_util.rs:883:45 [INFO] [stdout] | [INFO] [stdout] 883 | for (_i, tile) in pdf_output_pane.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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 883 - for (_i, tile) in pdf_output_pane.iter().enumerate() { [INFO] [stdout] 883 + for tile in pdf_output_pane.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/pdf_util.rs:895:13 [INFO] [stdout] | [INFO] [stdout] 895 | let radius_pt: Pt; [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 `radius_pt` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 895 ~ [INFO] [stdout] 896 ~ let radius_pt: Pt = if pdftile_wid_mm < pdftile_hgt_mm { [INFO] [stdout] 897 ~ Mm(pdftile_wid_mm / 2.0).into() [INFO] [stdout] 898 | } else { [INFO] [stdout] 899 ~ Mm(pdftile_hgt_mm / 2.0).into() [INFO] [stdout] 900 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pdf_util.rs:904:34 [INFO] [stdout] | [INFO] [stdout] 904 | ... draw_circle_with_pts(¤t_layer, center_x_pt, center_y_pt, radius_pt) ; // pane detail with color fill circles [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `current_layer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/pdf_util.rs:915:43 [INFO] [stdout] | [INFO] [stdout] 915 | let tile_no: String = format!("{}", pos.unwrap().to_string()) ; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `pos.unwrap().to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:517:49 [INFO] [stdout] | [INFO] [stdout] 517 | ... let center_y_pt: Pt = Mm((doc_height_mm as f64 - page_margin_ver_mm as f64) - 15.0 * (i % display_entries_per_col) as f64).in... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `doc_height_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:517:72 [INFO] [stdout] | [INFO] [stdout] 517 | ... let center_y_pt: Pt = Mm((doc_height_mm as f64 - page_margin_ver_mm as f64) - 15.0 * (i % display_entries_per_col) as f64).in... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `page_margin_ver_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/pdf_util.rs:915:69 [INFO] [stdout] | [INFO] [stdout] 915 | let tile_no: String = format!("{}", pos.unwrap().to_string()) ; [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/pdf_util.rs:921:21 [INFO] [stdout] | [INFO] [stdout] 921 | offset_center_x_mm = offset_center_x_mm - Mm(2.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `offset_center_x_mm -= Mm(2.0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:526:103 [INFO] [stdout] | [INFO] [stdout] 526 | ...m(col_pos_x[cur_col] as f64 - 2.0), Mm((doc_height_mm as f64 - page_margin_ver_mm as f64 - 2.0) - 15.0 * (i % display_entries_pe... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `doc_height_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/pdf_util.rs:923:21 [INFO] [stdout] | [INFO] [stdout] 923 | offset_center_y_mm = offset_center_y_mm - Mm(2.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `offset_center_y_mm -= Mm(2.0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:526:126 [INFO] [stdout] | [INFO] [stdout] 526 | ...- 2.0), Mm((doc_height_mm as f64 - page_margin_ver_mm as f64 - 2.0) - 15.0 * (i % display_entries_per_col) as f64), pane_font); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `page_margin_ver_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pdf_util.rs:957:47 [INFO] [stdout] | [INFO] [stdout] 957 | scale_factor_hgt: f64) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/pdf_util.rs:952:44 [INFO] [stdout] | [INFO] [stdout] 952 | fn draw_summary_circles(pdf_output_window: &Vec, modtile::RGB)>>, [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] 952 - fn draw_summary_circles(pdf_output_window: &Vec, modtile::RGB)>>, [INFO] [stdout] 952 + fn draw_summary_circles(pdf_output_window: &[Vec<(Box2D, modtile::RGB)>], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:531:104 [INFO] [stdout] | [INFO] [stdout] 531 | ...m(col_pos_x[cur_col] as f64 + 7.0), Mm((doc_height_mm as f64 - page_margin_ver_mm as f64 - 1.0) - 15.0 * (i % display_entries_pe... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `doc_height_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:531:127 [INFO] [stdout] | [INFO] [stdout] 531 | ...+ 7.0), Mm((doc_height_mm as f64 - page_margin_ver_mm as f64 - 1.0) - 15.0 * (i % display_entries_per_col) as f64), pane_font); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `page_margin_ver_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/pdf_util.rs:965:47 [INFO] [stdout] | [INFO] [stdout] 965 | for (_i, pane) in pdf_output_window.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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 965 - for (_i, pane) in pdf_output_window.iter().enumerate() { [INFO] [stdout] 965 + for pane in pdf_output_window.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/pdf_util.rs:966:38 [INFO] [stdout] | [INFO] [stdout] 966 | for (_j, tile) in pane.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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 966 - for (_j, tile) in pane.iter().enumerate(){ [INFO] [stdout] 966 + for tile in pane.iter(){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/pdf_util.rs:542:1 [INFO] [stdout] | [INFO] [stdout] 542 | / fn construct_pane_detail_page(pane_no: usize, [INFO] [stdout] 543 | | pane: &&Vec<(Box2D, modtile::RGB)>, [INFO] [stdout] 544 | | doc: &&PdfDocumentReference, [INFO] [stdout] 545 | | pane_font: &&IndirectFontRef, [INFO] [stdout] ... | [INFO] [stdout] 549 | | doc_height_mm: f64, [INFO] [stdout] 550 | | p_cfg: &PanePdfConfig) -> () { [INFO] [stdout] | |______________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pdf_util.rs:550:57 [INFO] [stdout] | [INFO] [stdout] 550 | ... p_cfg: &PanePdfConfig) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/pdf_util.rs:980:13 [INFO] [stdout] | [INFO] [stdout] 980 | let radius_pt: Pt; [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 `radius_pt` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 980 ~ [INFO] [stdout] 981 ~ let radius_pt: Pt = if size_x_pt < size_y_pt { [INFO] [stdout] 982 ~ Pt(size_x_pt.0 / 2.0) [INFO] [stdout] 983 | } else { [INFO] [stdout] 984 ~ Pt(size_y_pt.0 / 2.0) [INFO] [stdout] 985 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pdf_util.rs:990:34 [INFO] [stdout] | [INFO] [stdout] 990 | draw_circle_with_pts(¤t_layer, center_x_pt, center_y_pt, radius_pt) ; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `current_layer` [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: needlessly taken reference of left operand [INFO] [stdout] --> src/pdf_util.rs:586:26 [INFO] [stdout] | [INFO] [stdout] 586 | pdftile_hgt_mm = &pdftile_wid_mm * imgtile_hgt_px/imgtile_wid_px; [INFO] [stdout] | ---------------^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `pdftile_wid_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pdf_util.rs:1037:26 [INFO] [stdout] | [INFO] [stdout] 1037 | draw_circle_with_pts(¤t_layer, x1, y1, radi) ; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `current_layer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pdf_util.rs:1038:26 [INFO] [stdout] | [INFO] [stdout] 1038 | draw_circle_with_pts(¤t_layer, x2, y1, radi) ; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `current_layer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pdf_util.rs:1039:26 [INFO] [stdout] | [INFO] [stdout] 1039 | draw_circle_with_pts(¤t_layer, x3, y1, radi) ; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `current_layer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pdf_util.rs:1041:26 [INFO] [stdout] | [INFO] [stdout] 1041 | draw_circle_with_pts(¤t_layer, x1, y2, radi) ; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `current_layer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pdf_util.rs:1042:26 [INFO] [stdout] | [INFO] [stdout] 1042 | draw_circle_with_pts(¤t_layer, x2, y2, radi) ; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `current_layer` [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: needlessly taken reference of left operand [INFO] [stdout] --> src/pdf_util.rs:593:26 [INFO] [stdout] | [INFO] [stdout] 593 | pdftile_wid_mm = &pdftile_hgt_mm * imgtile_wid_px/imgtile_hgt_px; [INFO] [stdout] | ---------------^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `pdftile_hgt_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pdf_util.rs:1043:26 [INFO] [stdout] | [INFO] [stdout] 1043 | draw_circle_with_pts(¤t_layer, x3, y2, radi) ; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `current_layer` [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 `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/pdf_util.rs:1050:34 [INFO] [stdout] | [INFO] [stdout] 1050 | fn get_pdf_coords(output_window: &Vec, modtile::RGB)>>, max_y: i32) -> Vec, modtile::RGB... [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] 1050 - fn get_pdf_coords(output_window: &Vec, modtile::RGB)>>, max_y: i32) -> Vec, modtile::RGB)>> { [INFO] [stdout] 1050 + fn get_pdf_coords(output_window: &[Vec<(Box2D, modtile::RGB)>], max_y: i32) -> Vec, modtile::RGB)>> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pdf_util.rs:618:23 [INFO] [stdout] | [INFO] [stdout] 618 | draw_pane_circles(&pane, [INFO] [stdout] | ^^^^^ help: change this to: `pane` [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: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/pdf_util.rs:1059:43 [INFO] [stdout] | [INFO] [stdout] 1059 | for (_i, pane) in output_window.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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 1059 - for (_i, pane) in output_window.iter().enumerate() { [INFO] [stdout] 1059 + for pane in output_window.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/pdf_util.rs:1061:38 [INFO] [stdout] | [INFO] [stdout] 1061 | for (_j, tile) in pane.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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 1061 - for (_j, tile) in pane.iter().enumerate(){ [INFO] [stdout] 1061 + for tile in pane.iter(){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/pdf_util.rs:648:1 [INFO] [stdout] | [INFO] [stdout] 648 | / fn draw_pane_legend(pane: &&Vec<(Box2D, modtile::RGB)>, [INFO] [stdout] 649 | | pane_no : usize, [INFO] [stdout] 650 | | current_layer: &PdfLayerReference, [INFO] [stdout] 651 | | pane_font: &&IndirectFontRef, [INFO] [stdout] ... | [INFO] [stdout] 657 | | all_colors: &modtile::AllColors, [INFO] [stdout] 658 | | tile_color_count_vec: &Vec<(Vec, i32)>,) -> () { [INFO] [stdout] | |______________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pdf_util.rs:658:65 [INFO] [stdout] | [INFO] [stdout] 658 | tile_color_count_vec: &Vec<(Vec, i32)>,) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/pdf_util.rs:658:43 [INFO] [stdout] | [INFO] [stdout] 658 | tile_color_count_vec: &Vec<(Vec, i32)>,) -> () { [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] 658 - tile_color_count_vec: &Vec<(Vec, i32)>,) -> () { [INFO] [stdout] 658 + tile_color_count_vec: &[(Vec, i32)],) -> () { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary operation [INFO] [stdout] --> src/pdf_util.rs:1078:13 [INFO] [stdout] | [INFO] [stdout] 1078 | &pdf_pane.push ((pdf_tile_box,pdf_tile_rgb)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: statement can be reduced to: `pdf_pane.push ((pdf_tile_box,pdf_tile_rgb));` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_operation [INFO] [stdout] = note: `#[warn(clippy::unnecessary_operation)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/pdf_util.rs:662:34 [INFO] [stdout] | [INFO] [stdout] 662 | for (_i, tile) in pane.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] 662 - for (_i, tile) in pane.iter().enumerate() { [INFO] [stdout] 662 + for tile in pane.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/pdf_util.rs:1089:39 [INFO] [stdout] | [INFO] [stdout] 1089 | fn get_pane_pdf_coords(output_window: &Vec, modtile::RGB)>>) -> PanePdfConfig { [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] 1089 - fn get_pane_pdf_coords(output_window: &Vec, modtile::RGB)>>) -> PanePdfConfig { [INFO] [stdout] 1089 + fn get_pane_pdf_coords(output_window: &[Vec<(Box2D, modtile::RGB)>]) -> PanePdfConfig { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/pdf_util.rs:1127:43 [INFO] [stdout] | [INFO] [stdout] 1127 | for (_i, pane) in output_window.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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 1127 - for (_i, pane) in output_window.iter().enumerate() { [INFO] [stdout] 1127 + for pane in output_window.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/pdf_util.rs:684:94 [INFO] [stdout] | [INFO] [stdout] 684 | let (tile_colors, _count) : (Vec<&Vec>,Vec<&i32>) = tile_color_count_vec.iter().map(|&(ref a, ref b)| (a, b)).unzip(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 684 - let (tile_colors, _count) : (Vec<&Vec>,Vec<&i32>) = tile_color_count_vec.iter().map(|&(ref a, ref b)| (a, b)).unzip(); [INFO] [stdout] 684 + let (tile_colors, _count) : (Vec<&Vec>,Vec<&i32>) = tile_color_count_vec.iter().map(|(a, b)| (a, b)).unzip(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary operation [INFO] [stdout] --> src/pdf_util.rs:1191:9 [INFO] [stdout] | [INFO] [stdout] 1191 | &ret.push (pane_box); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: statement can be reduced to: `ret.push (pane_box);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_operation [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:704:43 [INFO] [stdout] | [INFO] [stdout] 704 | let center_y_pt: Pt = Mm((doc_height_mm as f64 - page_margin_ver_mm as f64) - 15.0 * i as f64).into(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `doc_height_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:704:66 [INFO] [stdout] | [INFO] [stdout] 704 | let center_y_pt: Pt = Mm((doc_height_mm as f64 - page_margin_ver_mm as f64) - 15.0 * i as f64).into(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `page_margin_ver_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/pdf_util.rs:713:39 [INFO] [stdout] | [INFO] [stdout] 713 | let pos_str: String = format!("{}", pos.unwrap().to_string()) ; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `pos.unwrap().to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/pdf_util.rs:713:65 [INFO] [stdout] | [INFO] [stdout] 713 | let pos_str: String = format!("{}", pos.unwrap().to_string()) ; [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pdf_util.rs:1222:119 [INFO] [stdout] | [INFO] [stdout] 1222 | fn get_xy_tile_count(pane: &&Vec<(Box2D, modtile::RGB)>, tile_row_count: &mut i32, tile_col_count: &mut i32) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/pdf_util.rs:1228:34 [INFO] [stdout] | [INFO] [stdout] 1228 | for (_i, tile) in pane.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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 1228 - for (_i, tile) in pane.iter().enumerate() { [INFO] [stdout] 1228 + for tile in pane.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:716:70 [INFO] [stdout] | [INFO] [stdout] 716 | ... current_layer.use_text(pos_str, 20.0, Mm(203.0), Mm((doc_height_mm as f64 - page_margin_ver_mm as f64 - 2.0) - 15.0 * i as f6... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `doc_height_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:716:93 [INFO] [stdout] | [INFO] [stdout] 716 | ...203.0), Mm((doc_height_mm as f64 - page_margin_ver_mm as f64 - 2.0) - 15.0 * i as f64), pane_font); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `page_margin_ver_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:721:71 [INFO] [stdout] | [INFO] [stdout] 721 | ... current_layer.use_text(name_str, 20.0, Mm(212.0), Mm((doc_height_mm as f64 - page_margin_ver_mm as f64 - 1.0) - 15.0 * i as f... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `doc_height_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/pdf_util.rs:1248:50 [INFO] [stdout] | [INFO] [stdout] 1248 | fn get_pane_text_loc_px( window_panes_coords_px: &Vec>) -> Vec<(f64, f64, String)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 1248 - fn get_pane_text_loc_px( window_panes_coords_px: &Vec>) -> Vec<(f64, f64, String)> { [INFO] [stdout] 1248 + fn get_pane_text_loc_px( window_panes_coords_px: &[Box2D]) -> Vec<(f64, f64, String)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/pdf_util.rs:721:94 [INFO] [stdout] | [INFO] [stdout] 721 | ...212.0), Mm((doc_height_mm as f64 - page_margin_ver_mm as f64 - 1.0) - 15.0 * i as f64), pane_font); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `page_margin_ver_mm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pdf_util.rs:727:100 [INFO] [stdout] | [INFO] [stdout] 727 | fn draw_page_marks(current_layer: &&PdfLayerReference, doc_width_as_mm: f64, doc_height_as_mm: f64) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pdf_util.rs:1260:107 [INFO] [stdout] | [INFO] [stdout] 1260 | fn draw_circle_with_pts(current_layer: &&PdfLayerReference, offsetx_pt: Pt, offsety_pt: Pt, radius_pt: Pt) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pdf_util.rs:1276:115 [INFO] [stdout] | [INFO] [stdout] 1276 | fn draw_circle_with_pts_no_fill(current_layer: &&PdfLayerReference, offsetx_pt: Pt, offsety_pt: Pt, radius_pt: Pt) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pdf_util.rs:1298:56 [INFO] [stdout] | [INFO] [stdout] 1298 | fn draw_quarter_arc(current_layer: &&PdfLayerReference) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pdf_util.rs:797:54 [INFO] [stdout] | [INFO] [stdout] 797 | ... scale_factor_hgt: f64) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/pdf_util.rs:791:34 [INFO] [stdout] | [INFO] [stdout] 791 | fn draw_tiles(pdf_output_window: &Vec, [INFO] [stdout] | __________________________________^ [INFO] [stdout] 792 | | modtile::RGB)>>, [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] 791 ~ fn draw_tiles(pdf_output_window: &[Vec<(Box2D, [INFO] [stdout] 792 ~ modtile::RGB)>], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/pdf_util.rs:805:47 [INFO] [stdout] | [INFO] [stdout] 805 | for (_i, pane) in pdf_output_window.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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 805 - for (_i, pane) in pdf_output_window.iter().enumerate() { [INFO] [stdout] 805 + for pane in pdf_output_window.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/pdf_util.rs:1382:48 [INFO] [stdout] | [INFO] [stdout] 1382 | let p2_2 = Point::new(Mm(c*scale+xoff), Mm(-1.0*scale+yoff)); [INFO] [stdout] | ^^^^^^^^^^ help: consider using: `-scale` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/pdf_util.rs:806:38 [INFO] [stdout] | [INFO] [stdout] 806 | for (_j, tile) in pane.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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 806 - for (_j, tile) in pane.iter().enumerate(){ [INFO] [stdout] 806 + for tile in pane.iter(){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (13/7) [INFO] [stdout] --> src/pdf_util.rs:848:1 [INFO] [stdout] | [INFO] [stdout] 848 | / fn draw_pane_circles(pdf_output_pane: &Vec<(Box2D, modtile::RGB)>, [INFO] [stdout] 849 | | current_layer: &&PdfLayerReference, [INFO] [stdout] 850 | | pane_font: &&IndirectFontRef, [INFO] [stdout] 851 | | grid_origin_x_mm: f64, [INFO] [stdout] ... | [INFO] [stdout] 859 | | all_colors: &modtile::AllColors, [INFO] [stdout] 860 | | tile_color_count_vec: &Vec<(Vec,i32)>,) -> () { [INFO] [stdout] | |_________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pdf_util.rs:860:68 [INFO] [stdout] | [INFO] [stdout] 860 | tile_color_count_vec: &Vec<(Vec,i32)>,) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/pdf_util.rs:1383:50 [INFO] [stdout] | [INFO] [stdout] 1383 | let p3_2 = Point::new(Mm(0.0*scale+xoff), Mm(-1.0*scale+yoff)); [INFO] [stdout] | ^^^^^^^^^^ help: consider using: `-scale` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/pdf_util.rs:848:39 [INFO] [stdout] | [INFO] [stdout] 848 | fn draw_pane_circles(pdf_output_pane: &Vec<(Box2D, modtile::RGB)>, [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] 848 - fn draw_pane_circles(pdf_output_pane: &Vec<(Box2D, modtile::RGB)>, [INFO] [stdout] 848 + fn draw_pane_circles(pdf_output_pane: &[(Box2D, modtile::RGB)], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/pdf_util.rs:1386:50 [INFO] [stdout] | [INFO] [stdout] 1386 | let p0_3 = Point::new(Mm(0.0*scale+xoff), Mm(-1.0*scale+yoff)); [INFO] [stdout] | ^^^^^^^^^^ help: consider using: `-scale` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/pdf_util.rs:1387:49 [INFO] [stdout] | [INFO] [stdout] 1387 | let p1_3 = Point::new(Mm(-c*scale+xoff), Mm(-1.0*scale+yoff)); [INFO] [stdout] | ^^^^^^^^^^ help: consider using: `-scale` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/pdf_util.rs:1388:30 [INFO] [stdout] | [INFO] [stdout] 1388 | let p2_3 = Point::new(Mm(-1.0*scale+xoff), Mm(-c*scale+yoff)); [INFO] [stdout] | ^^^^^^^^^^ help: consider using: `-scale` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/pdf_util.rs:1389:30 [INFO] [stdout] | [INFO] [stdout] 1389 | let p3_3 = Point::new(Mm(-1.0*scale+xoff), Mm(0.0*scale+yoff)); [INFO] [stdout] | ^^^^^^^^^^ help: consider using: `-scale` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/pdf_util.rs:1392:30 [INFO] [stdout] | [INFO] [stdout] 1392 | let p0_4 = Point::new(Mm(-1.0*scale+xoff), Mm(0.0*scale+yoff)); [INFO] [stdout] | ^^^^^^^^^^ help: consider using: `-scale` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/pdf_util.rs:860:47 [INFO] [stdout] | [INFO] [stdout] 860 | tile_color_count_vec: &Vec<(Vec,i32)>,) -> () { [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] 860 - tile_color_count_vec: &Vec<(Vec,i32)>,) -> () { [INFO] [stdout] 860 + tile_color_count_vec: &[(Vec,i32)],) -> () { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/pdf_util.rs:1393:30 [INFO] [stdout] | [INFO] [stdout] 1393 | let p1_4 = Point::new(Mm(-1.0*scale+xoff), Mm(c*scale+yoff)); [INFO] [stdout] | ^^^^^^^^^^ help: consider using: `-scale` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/pdf_util.rs:879:94 [INFO] [stdout] | [INFO] [stdout] 879 | let (tile_colors, _count) : (Vec<&Vec>,Vec<&i32>) = tile_color_count_vec.iter().map(|&(ref a, ref b)| (a, b)).unzip(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 879 - let (tile_colors, _count) : (Vec<&Vec>,Vec<&i32>) = tile_color_count_vec.iter().map(|&(ref a, ref b)| (a, b)).unzip(); [INFO] [stdout] 879 + let (tile_colors, _count) : (Vec<&Vec>,Vec<&i32>) = tile_color_count_vec.iter().map(|(a, b)| (a, b)).unzip(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/pdf_util.rs:883:45 [INFO] [stdout] | [INFO] [stdout] 883 | for (_i, tile) in pdf_output_pane.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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 883 - for (_i, tile) in pdf_output_pane.iter().enumerate() { [INFO] [stdout] 883 + for tile in pdf_output_pane.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/pdf_util.rs:895:13 [INFO] [stdout] | [INFO] [stdout] 895 | let radius_pt: Pt; [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 `radius_pt` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 895 ~ [INFO] [stdout] 896 ~ let radius_pt: Pt = if pdftile_wid_mm < pdftile_hgt_mm { [INFO] [stdout] 897 ~ Mm(pdftile_wid_mm / 2.0).into() [INFO] [stdout] 898 | } else { [INFO] [stdout] 899 ~ Mm(pdftile_hgt_mm / 2.0).into() [INFO] [stdout] 900 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pdf_util.rs:904:34 [INFO] [stdout] | [INFO] [stdout] 904 | ... draw_circle_with_pts(¤t_layer, center_x_pt, center_y_pt, radius_pt) ; // pane detail with color fill circles [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `current_layer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/pdf_util.rs:915:43 [INFO] [stdout] | [INFO] [stdout] 915 | let tile_no: String = format!("{}", pos.unwrap().to_string()) ; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `pos.unwrap().to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/pdf_util.rs:915:69 [INFO] [stdout] | [INFO] [stdout] 915 | let tile_no: String = format!("{}", pos.unwrap().to_string()) ; [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/pdf_util.rs:921:21 [INFO] [stdout] | [INFO] [stdout] 921 | offset_center_x_mm = offset_center_x_mm - Mm(2.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `offset_center_x_mm -= Mm(2.0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/pdf_util.rs:923:21 [INFO] [stdout] | [INFO] [stdout] 923 | offset_center_y_mm = offset_center_y_mm - Mm(2.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `offset_center_y_mm -= Mm(2.0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pdf_util.rs:957:47 [INFO] [stdout] | [INFO] [stdout] 957 | scale_factor_hgt: f64) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/pdf_util.rs:952:44 [INFO] [stdout] | [INFO] [stdout] 952 | fn draw_summary_circles(pdf_output_window: &Vec, modtile::RGB)>>, [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] 952 - fn draw_summary_circles(pdf_output_window: &Vec, modtile::RGB)>>, [INFO] [stdout] 952 + fn draw_summary_circles(pdf_output_window: &[Vec<(Box2D, modtile::RGB)>], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/pdf_util.rs:965:47 [INFO] [stdout] | [INFO] [stdout] 965 | for (_i, pane) in pdf_output_window.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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 965 - for (_i, pane) in pdf_output_window.iter().enumerate() { [INFO] [stdout] 965 + for pane in pdf_output_window.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/pdf_util.rs:966:38 [INFO] [stdout] | [INFO] [stdout] 966 | for (_j, tile) in pane.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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 966 - for (_j, tile) in pane.iter().enumerate(){ [INFO] [stdout] 966 + for tile in pane.iter(){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/pdf_util.rs:980:13 [INFO] [stdout] | [INFO] [stdout] 980 | let radius_pt: Pt; [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 `radius_pt` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 980 ~ [INFO] [stdout] 981 ~ let radius_pt: Pt = if size_x_pt < size_y_pt { [INFO] [stdout] 982 ~ Pt(size_x_pt.0 / 2.0) [INFO] [stdout] 983 | } else { [INFO] [stdout] 984 ~ Pt(size_y_pt.0 / 2.0) [INFO] [stdout] 985 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pdf_util.rs:990:34 [INFO] [stdout] | [INFO] [stdout] 990 | draw_circle_with_pts(¤t_layer, center_x_pt, center_y_pt, radius_pt) ; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `current_layer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pdf_util.rs:1037:26 [INFO] [stdout] | [INFO] [stdout] 1037 | draw_circle_with_pts(¤t_layer, x1, y1, radi) ; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `current_layer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pdf_util.rs:1038:26 [INFO] [stdout] | [INFO] [stdout] 1038 | draw_circle_with_pts(¤t_layer, x2, y1, radi) ; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `current_layer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pdf_util.rs:1039:26 [INFO] [stdout] | [INFO] [stdout] 1039 | draw_circle_with_pts(¤t_layer, x3, y1, radi) ; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `current_layer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pdf_util.rs:1041:26 [INFO] [stdout] | [INFO] [stdout] 1041 | draw_circle_with_pts(¤t_layer, x1, y2, radi) ; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `current_layer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pdf_util.rs:1042:26 [INFO] [stdout] | [INFO] [stdout] 1042 | draw_circle_with_pts(¤t_layer, x2, y2, radi) ; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `current_layer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pdf_util.rs:1043:26 [INFO] [stdout] | [INFO] [stdout] 1043 | draw_circle_with_pts(¤t_layer, x3, y2, radi) ; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `current_layer` [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 `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/pdf_util.rs:1050:34 [INFO] [stdout] | [INFO] [stdout] 1050 | fn get_pdf_coords(output_window: &Vec, modtile::RGB)>>, max_y: i32) -> Vec, modtile::RGB... [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] 1050 - fn get_pdf_coords(output_window: &Vec, modtile::RGB)>>, max_y: i32) -> Vec, modtile::RGB)>> { [INFO] [stdout] 1050 + fn get_pdf_coords(output_window: &[Vec<(Box2D, modtile::RGB)>], max_y: i32) -> Vec, modtile::RGB)>> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/pdf_util.rs:1059:43 [INFO] [stdout] | [INFO] [stdout] 1059 | for (_i, pane) in output_window.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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 1059 - for (_i, pane) in output_window.iter().enumerate() { [INFO] [stdout] 1059 + for pane in output_window.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/pdf_util.rs:1061:38 [INFO] [stdout] | [INFO] [stdout] 1061 | for (_j, tile) in pane.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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 1061 - for (_j, tile) in pane.iter().enumerate(){ [INFO] [stdout] 1061 + for tile in pane.iter(){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary operation [INFO] [stdout] --> src/pdf_util.rs:1078:13 [INFO] [stdout] | [INFO] [stdout] 1078 | &pdf_pane.push ((pdf_tile_box,pdf_tile_rgb)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: statement can be reduced to: `pdf_pane.push ((pdf_tile_box,pdf_tile_rgb));` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_operation [INFO] [stdout] = note: `#[warn(clippy::unnecessary_operation)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/pdf_util.rs:1089:39 [INFO] [stdout] | [INFO] [stdout] 1089 | fn get_pane_pdf_coords(output_window: &Vec, modtile::RGB)>>) -> PanePdfConfig { [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] 1089 - fn get_pane_pdf_coords(output_window: &Vec, modtile::RGB)>>) -> PanePdfConfig { [INFO] [stdout] 1089 + fn get_pane_pdf_coords(output_window: &[Vec<(Box2D, modtile::RGB)>]) -> PanePdfConfig { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/pdf_util.rs:1127:43 [INFO] [stdout] | [INFO] [stdout] 1127 | for (_i, pane) in output_window.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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 1127 - for (_i, pane) in output_window.iter().enumerate() { [INFO] [stdout] 1127 + for pane in output_window.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary operation [INFO] [stdout] --> src/pdf_util.rs:1191:9 [INFO] [stdout] | [INFO] [stdout] 1191 | &ret.push (pane_box); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: statement can be reduced to: `ret.push (pane_box);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_operation [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pdf_util.rs:1222:119 [INFO] [stdout] | [INFO] [stdout] 1222 | fn get_xy_tile_count(pane: &&Vec<(Box2D, modtile::RGB)>, tile_row_count: &mut i32, tile_col_count: &mut i32) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/pdf_util.rs:1228:34 [INFO] [stdout] | [INFO] [stdout] 1228 | for (_i, tile) in pane.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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 1228 - for (_i, tile) in pane.iter().enumerate() { [INFO] [stdout] 1228 + for tile in pane.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/modtile.rs:32:34 [INFO] [stdout] | [INFO] [stdout] 32 | Ok(config) => return config, [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] 32 - Ok(config) => return config, [INFO] [stdout] 32 + Ok(config) => config, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/pdf_util.rs:1248:50 [INFO] [stdout] | [INFO] [stdout] 1248 | fn get_pane_text_loc_px( window_panes_coords_px: &Vec>) -> Vec<(f64, f64, String)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 1248 - fn get_pane_text_loc_px( window_panes_coords_px: &Vec>) -> Vec<(f64, f64, String)> { [INFO] [stdout] 1248 + fn get_pane_text_loc_px( window_panes_coords_px: &[Box2D]) -> Vec<(f64, f64, String)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pdf_util.rs:1260:107 [INFO] [stdout] | [INFO] [stdout] 1260 | fn draw_circle_with_pts(current_layer: &&PdfLayerReference, offsetx_pt: Pt, offsety_pt: Pt, radius_pt: Pt) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pdf_util.rs:1276:115 [INFO] [stdout] | [INFO] [stdout] 1276 | fn draw_circle_with_pts_no_fill(current_layer: &&PdfLayerReference, offsetx_pt: Pt, offsety_pt: Pt, radius_pt: Pt) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pdf_util.rs:1298:56 [INFO] [stdout] | [INFO] [stdout] 1298 | fn draw_quarter_arc(current_layer: &&PdfLayerReference) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `RGB` contains a capitalized acronym [INFO] [stdout] --> src/modtile.rs:78:12 [INFO] [stdout] | [INFO] [stdout] 78 | pub struct RGB(pub u8,pub u8,pub u8); [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Rgb` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/pdf_util.rs:1382:48 [INFO] [stdout] | [INFO] [stdout] 1382 | let p2_2 = Point::new(Mm(c*scale+xoff), Mm(-1.0*scale+yoff)); [INFO] [stdout] | ^^^^^^^^^^ help: consider using: `-scale` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/pdf_util.rs:1383:50 [INFO] [stdout] | [INFO] [stdout] 1383 | let p3_2 = Point::new(Mm(0.0*scale+xoff), Mm(-1.0*scale+yoff)); [INFO] [stdout] | ^^^^^^^^^^ help: consider using: `-scale` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/pdf_util.rs:1386:50 [INFO] [stdout] | [INFO] [stdout] 1386 | let p0_3 = Point::new(Mm(0.0*scale+xoff), Mm(-1.0*scale+yoff)); [INFO] [stdout] | ^^^^^^^^^^ help: consider using: `-scale` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/pdf_util.rs:1387:49 [INFO] [stdout] | [INFO] [stdout] 1387 | let p1_3 = Point::new(Mm(-c*scale+xoff), Mm(-1.0*scale+yoff)); [INFO] [stdout] | ^^^^^^^^^^ help: consider using: `-scale` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/pdf_util.rs:1388:30 [INFO] [stdout] | [INFO] [stdout] 1388 | let p2_3 = Point::new(Mm(-1.0*scale+xoff), Mm(-c*scale+yoff)); [INFO] [stdout] | ^^^^^^^^^^ help: consider using: `-scale` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/pdf_util.rs:1389:30 [INFO] [stdout] | [INFO] [stdout] 1389 | let p3_3 = Point::new(Mm(-1.0*scale+xoff), Mm(0.0*scale+yoff)); [INFO] [stdout] | ^^^^^^^^^^ help: consider using: `-scale` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/pdf_util.rs:1392:30 [INFO] [stdout] | [INFO] [stdout] 1392 | let p0_4 = Point::new(Mm(-1.0*scale+xoff), Mm(0.0*scale+yoff)); [INFO] [stdout] | ^^^^^^^^^^ help: consider using: `-scale` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/pdf_util.rs:1393:30 [INFO] [stdout] | [INFO] [stdout] 1393 | let p1_4 = Point::new(Mm(-1.0*scale+xoff), Mm(c*scale+yoff)); [INFO] [stdout] | ^^^^^^^^^^ help: consider using: `-scale` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/modtile.rs:150:38 [INFO] [stdout] | [INFO] [stdout] 150 | Ok(all_colors) => return all_colors, [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] 150 - Ok(all_colors) => return all_colors, [INFO] [stdout] 150 + Ok(all_colors) => all_colors, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/modtile.rs:32:34 [INFO] [stdout] | [INFO] [stdout] 32 | Ok(config) => return config, [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] 32 - Ok(config) => return config, [INFO] [stdout] 32 + Ok(config) => config, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> src/json_export.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | RGB { 0: 255, 1: 0, 2: 0 }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use tuple initialization: `RGB(255, 0, 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] = note: `#[warn(clippy::init_numbered_fields)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> src/json_export.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | RGB { 0: 0, 1: 255, 2: 0 }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use tuple initialization: `RGB(0, 255, 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> src/json_export.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | RGB { 0: 0, 1: 0, 2: 255 }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use tuple initialization: `RGB(0, 0, 255)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> src/json_export.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | RGB { 0: 255, 1: 255, 2: 255 }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use tuple initialization: `RGB(255, 255, 255)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> src/json_export.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | RGB { 0: 128, 1: 128, 2: 128 }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use tuple initialization: `RGB(128, 128, 128)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> src/json_export.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | RGB { 0: 255, 1: 255, 2: 0 }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use tuple initialization: `RGB(255, 255, 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> src/json_export.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | RGB { 0: 0, 1: 255, 2: 255 }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use tuple initialization: `RGB(0, 255, 255)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `RGB` contains a capitalized acronym [INFO] [stdout] --> src/modtile.rs:78:12 [INFO] [stdout] | [INFO] [stdout] 78 | pub struct RGB(pub u8,pub u8,pub u8); [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Rgb` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> src/json_export.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | RGB { 0: 255, 1: 0, 2: 255 }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use tuple initialization: `RGB(255, 0, 255)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> src/json_export.rs:37:38 [INFO] [stdout] | [INFO] [stdout] 37 | let mut output_tiles = vec![vec![RGB { 0: 0, 1: 0, 2: 0 }; col]; row]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use tuple initialization: `RGB(0, 0, 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/json_export.rs:58:37 [INFO] [stdout] | [INFO] [stdout] 58 | pub fn dump_rgb_json(output_window: &Vec, modtile::RGB)>>, [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] 58 - pub fn dump_rgb_json(output_window: &Vec, modtile::RGB)>>, [INFO] [stdout] 58 + pub fn dump_rgb_json(output_window: &[Vec<(euclid::Box2D, modtile::RGB)>], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> src/json_export.rs:73:38 [INFO] [stdout] | [INFO] [stdout] 73 | let mut output_tiles = vec![vec![RGB { 0: 0, 1: 0, 2: 0 }; output_width_tile_count ]; output_height_tile_count]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use tuple initialization: `RGB(0, 0, 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `panic!` args [INFO] [stdout] --> src/main.rs:156:18 [INFO] [stdout] | [INFO] [stdout] 156 | v.to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/main.rs:190:46 [INFO] [stdout] | [INFO] [stdout] 190 | for (_i, pane) in input_window.iter_mut().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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 190 - for (_i, pane) in input_window.iter_mut().enumerate() { [INFO] [stdout] 190 + for pane in input_window.iter_mut() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/main.rs:193:46 [INFO] [stdout] | [INFO] [stdout] 193 | for (_j, mut tile) in pane.iter_mut().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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 193 - for (_j, mut tile) in pane.iter_mut().enumerate(){ [INFO] [stdout] 193 + for mut tile in pane.iter_mut(){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:196:48 [INFO] [stdout] | [INFO] [stdout] 196 | let avg_col: Rgb = get_avg_col(&input_image_buffer, &tile.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `input_image_buffer` [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: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/main.rs:205:30 [INFO] [stdout] | [INFO] [stdout] 205 | let cm_red: u8 = color_tup[0] as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `color_tup[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/main.rs:206:33 [INFO] [stdout] | [INFO] [stdout] 206 | let cm_yellow: u8 = color_tup[1] as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `color_tup[1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/main.rs:207:32 [INFO] [stdout] | [INFO] [stdout] 207 | let cm_green: u8 = color_tup[2] as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `color_tup[2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u8` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:209:32 [INFO] [stdout] | [INFO] [stdout] 209 | pane_colours.push((cm_red.clone(),cm_yellow.clone(),cm_green.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `cm_red` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u8` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:209:47 [INFO] [stdout] | [INFO] [stdout] 209 | pane_colours.push((cm_red.clone(),cm_yellow.clone(),cm_green.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `cm_yellow` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u8` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:209:65 [INFO] [stdout] | [INFO] [stdout] 209 | pane_colours.push((cm_red.clone(),cm_yellow.clone(),cm_green.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `cm_green` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u8` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:214:35 [INFO] [stdout] | [INFO] [stdout] 214 | tile.1 = modtile::RGB(cm_red.clone(),cm_yellow.clone(),cm_green.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `cm_red` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u8` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:214:50 [INFO] [stdout] | [INFO] [stdout] 214 | tile.1 = modtile::RGB(cm_red.clone(),cm_yellow.clone(),cm_green.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `cm_yellow` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u8` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:214:68 [INFO] [stdout] | [INFO] [stdout] 214 | tile.1 = modtile::RGB(cm_red.clone(),cm_yellow.clone(),cm_green.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `cm_green` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/main.rs:231:29 [INFO] [stdout] | [INFO] [stdout] 231 | for (_i, (ip,op)) in wit.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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 231 - for (_i, (ip,op)) in wit.enumerate() { [INFO] [stdout] 231 + for (ip,op) in wit { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/main.rs:236:34 [INFO] [stdout] | [INFO] [stdout] 236 | for (_j, (itp,otp)) in pit.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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 236 - for (_j, (itp,otp)) in pit.enumerate() { [INFO] [stdout] 236 + for (itp,otp) in pit { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/main.rs:258:5 [INFO] [stdout] | [INFO] [stdout] 258 | tile_color_count_vec.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 258 - tile_color_count_vec.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] 258 + tile_color_count_vec.sort_by_key(|b| std::cmp::Reverse(b.1)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:286:32 [INFO] [stdout] | [INFO] [stdout] 286 | pdf_util::build_output_pdf(&save_path,&all_colors,tile_color_count_vec,&input_window); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `save_path` [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 `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:291:39 [INFO] [stdout] | [INFO] [stdout] 291 | fn create_output_image(output_window: &Vec, modtile::RGB)>>, output_width: f64, output_height: f64) -> Dynamic... [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] 291 - fn create_output_image(output_window: &Vec, modtile::RGB)>>, output_width: f64, output_height: f64) -> DynamicImage { [INFO] [stdout] 291 + fn create_output_image(output_window: &[Vec<(Box2D, modtile::RGB)>], output_width: f64, output_height: f64) -> DynamicImage { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/main.rs:294:43 [INFO] [stdout] | [INFO] [stdout] 294 | for (_i, pane) in output_window.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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 294 - for (_i, pane) in output_window.iter().enumerate() { [INFO] [stdout] 294 + for pane in output_window.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/main.rs:295:38 [INFO] [stdout] | [INFO] [stdout] 295 | for (_j, tile) in pane.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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 295 - for (_j, tile) in pane.iter().enumerate(){ [INFO] [stdout] 295 + for tile in pane.iter(){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/main.rs:297:24 [INFO] [stdout] | [INFO] [stdout] 297 | let cm_r = tile.1.0 as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `tile.1.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/main.rs:298:24 [INFO] [stdout] | [INFO] [stdout] 298 | let cm_y = tile.1.1 as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `tile.1.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/main.rs:299:24 [INFO] [stdout] | [INFO] [stdout] 299 | let cm_g = tile.1.2 as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `tile.1.2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/modtile.rs:150:38 [INFO] [stdout] | [INFO] [stdout] 150 | Ok(all_colors) => return all_colors, [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] 150 - Ok(all_colors) => return all_colors, [INFO] [stdout] 150 + Ok(all_colors) => all_colors, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/main.rs:317:5 [INFO] [stdout] | [INFO] [stdout] 317 | Ok(image::open(image_path)?) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 317 - Ok(image::open(image_path)?) [INFO] [stdout] 317 + image::open(image_path) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/main.rs:355:5 [INFO] [stdout] | [INFO] [stdout] 353 | let rgb_tup = Rgb([avg_red as u8, avg_gre as u8, avg_blu as u8]); [INFO] [stdout] | ------------------------------------------------------------------ unnecessary `let` binding [INFO] [stdout] 354 | [INFO] [stdout] 355 | rgb_tup [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 353 ~ [INFO] [stdout] 354 | [INFO] [stdout] 355 ~ Rgb([avg_red as u8, avg_gre as u8, avg_blu as u8]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> src/json_export.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | RGB { 0: 255, 1: 0, 2: 0 }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use tuple initialization: `RGB(255, 0, 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] = note: `#[warn(clippy::init_numbered_fields)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> src/json_export.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | RGB { 0: 0, 1: 255, 2: 0 }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use tuple initialization: `RGB(0, 255, 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/main.rs:481:28 [INFO] [stdout] | [INFO] [stdout] 481 | let trans_height = &ip_height * (&op_height/&ip_height); [INFO] [stdout] | ----------^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `ip_height` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> src/json_export.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | RGB { 0: 0, 1: 0, 2: 255 }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use tuple initialization: `RGB(0, 0, 255)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/main.rs:481:41 [INFO] [stdout] | [INFO] [stdout] 481 | let trans_height = &ip_height * (&op_height/&ip_height); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 481 - let trans_height = &ip_height * (&op_height/&ip_height); [INFO] [stdout] 481 + let trans_height = &ip_height * (op_height/ip_height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> src/json_export.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | RGB { 0: 255, 1: 255, 2: 255 }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use tuple initialization: `RGB(255, 255, 255)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/main.rs:482:27 [INFO] [stdout] | [INFO] [stdout] 482 | let trans_width = &ip_width * (op_height/ip_height); [INFO] [stdout] | ---------^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `ip_width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> src/json_export.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | RGB { 0: 128, 1: 128, 2: 128 }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use tuple initialization: `RGB(128, 128, 128)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> src/json_export.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | RGB { 0: 255, 1: 255, 2: 0 }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use tuple initialization: `RGB(255, 255, 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/main.rs:489:28 [INFO] [stdout] | [INFO] [stdout] 489 | let trans_height = &ip_height * (op_width/ip_width); [INFO] [stdout] | ----------^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `ip_height` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> src/json_export.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | RGB { 0: 0, 1: 255, 2: 255 }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use tuple initialization: `RGB(0, 255, 255)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/main.rs:490:27 [INFO] [stdout] | [INFO] [stdout] 490 | let trans_width = &ip_width * (op_width/ip_width); [INFO] [stdout] | ---------^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `ip_width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> src/json_export.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | RGB { 0: 255, 1: 0, 2: 255 }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use tuple initialization: `RGB(255, 0, 255)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> src/json_export.rs:37:38 [INFO] [stdout] | [INFO] [stdout] 37 | let mut output_tiles = vec![vec![RGB { 0: 0, 1: 0, 2: 0 }; col]; row]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use tuple initialization: `RGB(0, 0, 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/main.rs:274:6 [INFO] [stdout] | [INFO] [stdout] 274 | / dump_rgb_json(&output_window, [INFO] [stdout] 275 | | output_width_tile_count, [INFO] [stdout] 276 | | output_height_tile_count, [INFO] [stdout] 277 | | cfg.tiles_per_pane_width, [INFO] [stdout] 278 | | cfg.tiles_per_pane_height, [INFO] [stdout] 279 | | save_path ); [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 274 | let _ = dump_rgb_json(&output_window, [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/json_export.rs:58:37 [INFO] [stdout] | [INFO] [stdout] 58 | pub fn dump_rgb_json(output_window: &Vec, modtile::RGB)>>, [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] 58 - pub fn dump_rgb_json(output_window: &Vec, modtile::RGB)>>, [INFO] [stdout] 58 + pub fn dump_rgb_json(output_window: &[Vec<(euclid::Box2D, modtile::RGB)>], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused borrow that must be used [INFO] [stdout] --> src/pdf_util.rs:1078:13 [INFO] [stdout] | [INFO] [stdout] 1078 | &pdf_pane.push ((pdf_tile_box,pdf_tile_rgb)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the borrow produces a value [INFO] [stdout] | [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 1078 | let _ = &pdf_pane.push ((pdf_tile_box,pdf_tile_rgb)); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused borrow that must be used [INFO] [stdout] --> src/pdf_util.rs:1191:9 [INFO] [stdout] | [INFO] [stdout] 1191 | &ret.push (pane_box); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ the borrow produces a value [INFO] [stdout] | [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 1191 | let _ = &ret.push (pane_box); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> src/json_export.rs:73:38 [INFO] [stdout] | [INFO] [stdout] 73 | let mut output_tiles = vec![vec![RGB { 0: 0, 1: 0, 2: 0 }; output_width_tile_count ]; output_height_tile_count]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use tuple initialization: `RGB(0, 0, 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `panic!` args [INFO] [stdout] --> src/main.rs:156:18 [INFO] [stdout] | [INFO] [stdout] 156 | v.to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/main.rs:190:46 [INFO] [stdout] | [INFO] [stdout] 190 | for (_i, pane) in input_window.iter_mut().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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 190 - for (_i, pane) in input_window.iter_mut().enumerate() { [INFO] [stdout] 190 + for pane in input_window.iter_mut() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/main.rs:193:46 [INFO] [stdout] | [INFO] [stdout] 193 | for (_j, mut tile) in pane.iter_mut().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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 193 - for (_j, mut tile) in pane.iter_mut().enumerate(){ [INFO] [stdout] 193 + for mut tile in pane.iter_mut(){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:196:48 [INFO] [stdout] | [INFO] [stdout] 196 | let avg_col: Rgb = get_avg_col(&input_image_buffer, &tile.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `input_image_buffer` [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: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/main.rs:205:30 [INFO] [stdout] | [INFO] [stdout] 205 | let cm_red: u8 = color_tup[0] as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `color_tup[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/main.rs:206:33 [INFO] [stdout] | [INFO] [stdout] 206 | let cm_yellow: u8 = color_tup[1] as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `color_tup[1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/main.rs:207:32 [INFO] [stdout] | [INFO] [stdout] 207 | let cm_green: u8 = color_tup[2] as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `color_tup[2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u8` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:209:32 [INFO] [stdout] | [INFO] [stdout] 209 | pane_colours.push((cm_red.clone(),cm_yellow.clone(),cm_green.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `cm_red` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u8` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:209:47 [INFO] [stdout] | [INFO] [stdout] 209 | pane_colours.push((cm_red.clone(),cm_yellow.clone(),cm_green.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `cm_yellow` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u8` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:209:65 [INFO] [stdout] | [INFO] [stdout] 209 | pane_colours.push((cm_red.clone(),cm_yellow.clone(),cm_green.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `cm_green` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u8` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:214:35 [INFO] [stdout] | [INFO] [stdout] 214 | tile.1 = modtile::RGB(cm_red.clone(),cm_yellow.clone(),cm_green.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `cm_red` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u8` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:214:50 [INFO] [stdout] | [INFO] [stdout] 214 | tile.1 = modtile::RGB(cm_red.clone(),cm_yellow.clone(),cm_green.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `cm_yellow` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u8` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:214:68 [INFO] [stdout] | [INFO] [stdout] 214 | tile.1 = modtile::RGB(cm_red.clone(),cm_yellow.clone(),cm_green.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `cm_green` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/main.rs:231:29 [INFO] [stdout] | [INFO] [stdout] 231 | for (_i, (ip,op)) in wit.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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 231 - for (_i, (ip,op)) in wit.enumerate() { [INFO] [stdout] 231 + for (ip,op) in wit { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/main.rs:236:34 [INFO] [stdout] | [INFO] [stdout] 236 | for (_j, (itp,otp)) in pit.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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 236 - for (_j, (itp,otp)) in pit.enumerate() { [INFO] [stdout] 236 + for (itp,otp) in pit { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/main.rs:258:5 [INFO] [stdout] | [INFO] [stdout] 258 | tile_color_count_vec.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 258 - tile_color_count_vec.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] 258 + tile_color_count_vec.sort_by_key(|b| std::cmp::Reverse(b.1)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:286:32 [INFO] [stdout] | [INFO] [stdout] 286 | pdf_util::build_output_pdf(&save_path,&all_colors,tile_color_count_vec,&input_window); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `save_path` [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 `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:291:39 [INFO] [stdout] | [INFO] [stdout] 291 | fn create_output_image(output_window: &Vec, modtile::RGB)>>, output_width: f64, output_height: f64) -> Dynamic... [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] 291 - fn create_output_image(output_window: &Vec, modtile::RGB)>>, output_width: f64, output_height: f64) -> DynamicImage { [INFO] [stdout] 291 + fn create_output_image(output_window: &[Vec<(Box2D, modtile::RGB)>], output_width: f64, output_height: f64) -> DynamicImage { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/main.rs:294:43 [INFO] [stdout] | [INFO] [stdout] 294 | for (_i, pane) in output_window.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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 294 - for (_i, pane) in output_window.iter().enumerate() { [INFO] [stdout] 294 + for pane in output_window.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/main.rs:295:38 [INFO] [stdout] | [INFO] [stdout] 295 | for (_j, tile) in pane.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] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 295 - for (_j, tile) in pane.iter().enumerate(){ [INFO] [stdout] 295 + for tile in pane.iter(){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/main.rs:297:24 [INFO] [stdout] | [INFO] [stdout] 297 | let cm_r = tile.1.0 as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `tile.1.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/main.rs:298:24 [INFO] [stdout] | [INFO] [stdout] 298 | let cm_y = tile.1.1 as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `tile.1.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/main.rs:299:24 [INFO] [stdout] | [INFO] [stdout] 299 | let cm_g = tile.1.2 as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `tile.1.2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/main.rs:317:5 [INFO] [stdout] | [INFO] [stdout] 317 | Ok(image::open(image_path)?) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 317 - Ok(image::open(image_path)?) [INFO] [stdout] 317 + image::open(image_path) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/main.rs:355:5 [INFO] [stdout] | [INFO] [stdout] 353 | let rgb_tup = Rgb([avg_red as u8, avg_gre as u8, avg_blu as u8]); [INFO] [stdout] | ------------------------------------------------------------------ unnecessary `let` binding [INFO] [stdout] 354 | [INFO] [stdout] 355 | rgb_tup [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 353 ~ [INFO] [stdout] 354 | [INFO] [stdout] 355 ~ Rgb([avg_red as u8, avg_gre as u8, avg_blu as u8]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/main.rs:481:28 [INFO] [stdout] | [INFO] [stdout] 481 | let trans_height = &ip_height * (&op_height/&ip_height); [INFO] [stdout] | ----------^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `ip_height` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/main.rs:481:41 [INFO] [stdout] | [INFO] [stdout] 481 | let trans_height = &ip_height * (&op_height/&ip_height); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 481 - let trans_height = &ip_height * (&op_height/&ip_height); [INFO] [stdout] 481 + let trans_height = &ip_height * (op_height/ip_height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/main.rs:482:27 [INFO] [stdout] | [INFO] [stdout] 482 | let trans_width = &ip_width * (op_height/ip_height); [INFO] [stdout] | ---------^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `ip_width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/main.rs:489:28 [INFO] [stdout] | [INFO] [stdout] 489 | let trans_height = &ip_height * (op_width/ip_width); [INFO] [stdout] | ----------^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `ip_height` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/main.rs:490:27 [INFO] [stdout] | [INFO] [stdout] 490 | let trans_width = &ip_width * (op_width/ip_width); [INFO] [stdout] | ---------^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `ip_width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/main.rs:274:6 [INFO] [stdout] | [INFO] [stdout] 274 | / dump_rgb_json(&output_window, [INFO] [stdout] 275 | | output_width_tile_count, [INFO] [stdout] 276 | | output_height_tile_count, [INFO] [stdout] 277 | | cfg.tiles_per_pane_width, [INFO] [stdout] 278 | | cfg.tiles_per_pane_height, [INFO] [stdout] 279 | | save_path ); [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 274 | let _ = dump_rgb_json(&output_window, [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused borrow that must be used [INFO] [stdout] --> src/pdf_util.rs:1078:13 [INFO] [stdout] | [INFO] [stdout] 1078 | &pdf_pane.push ((pdf_tile_box,pdf_tile_rgb)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the borrow produces a value [INFO] [stdout] | [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 1078 | let _ = &pdf_pane.push ((pdf_tile_box,pdf_tile_rgb)); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused borrow that must be used [INFO] [stdout] --> src/pdf_util.rs:1191:9 [INFO] [stdout] | [INFO] [stdout] 1191 | &ret.push (pane_box); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ the borrow produces a value [INFO] [stdout] | [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 1191 | let _ = &ret.push (pane_box); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 18.50s [INFO] running `Command { std: "docker" "inspect" "8481efe8010d6080fec70384bb8f50039a6968eec21ef0cfb617b229d0ef1f51", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8481efe8010d6080fec70384bb8f50039a6968eec21ef0cfb617b229d0ef1f51", kill_on_drop: false }` [INFO] [stdout] 8481efe8010d6080fec70384bb8f50039a6968eec21ef0cfb617b229d0ef1f51