[INFO] cloning repository https://github.com/stallmanifold/fontgen [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/stallmanifold/fontgen" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fstallmanifold%2Ffontgen", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fstallmanifold%2Ffontgen'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 6a7a9e5dd8c544a3bed021e047669f15c6f74c71 [INFO] linting stallmanifold/fontgen against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fstallmanifold%2Ffontgen" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/stallmanifold/fontgen [INFO] finished tweaking git repo https://github.com/stallmanifold/fontgen [INFO] tweaked toml for git repo https://github.com/stallmanifold/fontgen written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/stallmanifold/fontgen 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/stallmanifold/fontgen 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 git repository `https://github.com/lambdaxymox/bmfa` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded structopt-derive v0.2.18 [INFO] [stderr] Downloaded proc-macro2 v0.4.25 [INFO] [stderr] Downloaded predicates v1.0.0 [INFO] [stderr] Downloaded float-cmp v0.4.0 [INFO] [stderr] Downloaded memchr v2.1.2 [INFO] [stderr] Downloaded structopt v0.2.18 [INFO] [stderr] Downloaded freetype-sys v0.7.1 [INFO] [stderr] Downloaded normalize-line-endings v0.2.2 [INFO] [stderr] Downloaded png v0.14.0 [INFO] [stderr] Downloaded log v0.4.7 [INFO] [stderr] Downloaded ryu v1.0.0 [INFO] [stderr] Downloaded proc-macro2 v1.0.1 [INFO] [stderr] Downloaded serde_derive v1.0.99 [INFO] [stderr] Downloaded serde v1.0.99 [INFO] [stderr] Downloaded flate2 v1.0.11 [INFO] [stderr] Downloaded serde_json v1.0.40 [INFO] [stderr] Downloaded freetype-rs v0.20.0 [INFO] [stderr] Downloaded image v0.21.2 [INFO] [stderr] Downloaded regex v1.1.0 [INFO] [stderr] Downloaded syn v1.0.3 [INFO] [stderr] Downloaded miniz_oxide v0.3.2 [INFO] [stderr] Downloaded cc v1.0.28 [INFO] [stderr] Downloaded num-rational v0.2.1 [INFO] [stderr] Downloaded regex-syntax v0.6.4 [INFO] [stderr] Downloaded zip v0.5.3 [INFO] [stderr] Downloaded inflate v0.4.4 [INFO] [stderr] Downloaded redox_syscall v0.1.50 [INFO] [stderr] Downloaded libc v0.2.47 [INFO] [stderr] Downloaded tiff v0.2.1 [INFO] [stderr] Downloaded libz-sys v1.0.25 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] 4e9947da77c37821206fa57934a72b4af1f469fb00bb2a61b9f7bdf66a039c7f [INFO] running `Command { std: "docker" "start" "-a" "4e9947da77c37821206fa57934a72b4af1f469fb00bb2a61b9f7bdf66a039c7f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "4e9947da77c37821206fa57934a72b4af1f469fb00bb2a61b9f7bdf66a039c7f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4e9947da77c37821206fa57934a72b4af1f469fb00bb2a61b9f7bdf66a039c7f", kill_on_drop: false }` [INFO] [stdout] 4e9947da77c37821206fa57934a72b4af1f469fb00bb2a61b9f7bdf66a039c7f [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] 8262d3e9e2338fb8b2b41e7d0b267e6574fc2b81aeb900eaff4f94d0614bce12 [INFO] running `Command { std: "docker" "start" "-a" "8262d3e9e2338fb8b2b41e7d0b267e6574fc2b81aeb900eaff4f94d0614bce12", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.47 [INFO] [stderr] Checking cfg-if v0.1.6 [INFO] [stderr] Compiling num-traits v0.2.6 [INFO] [stderr] Compiling cc v1.0.28 [INFO] [stderr] Checking lazy_static v1.2.0 [INFO] [stderr] Compiling proc-macro2 v0.4.25 [INFO] [stderr] Compiling proc-macro2 v1.0.1 [INFO] [stderr] Compiling arrayvec v0.4.10 [INFO] [stderr] Compiling unicode-xid v0.1.0 [INFO] [stderr] Compiling syn v1.0.3 [INFO] [stderr] Checking adler32 v1.0.3 [INFO] [stderr] Checking nodrop v0.1.13 [INFO] [stderr] Compiling rayon-core v1.4.1 [INFO] [stderr] Compiling num-integer v0.1.39 [INFO] [stderr] Checking memoffset v0.2.1 [INFO] [stderr] Checking scopeguard v0.3.3 [INFO] [stderr] Compiling pkg-config v0.3.14 [INFO] [stderr] Checking crossbeam-utils v0.2.2 [INFO] [stderr] Compiling serde v1.0.99 [INFO] [stderr] Checking byteorder v1.2.7 [INFO] [stderr] Compiling version_check v0.1.5 [INFO] [stderr] Checking bitflags v1.0.4 [INFO] [stderr] Compiling ryu v1.0.0 [INFO] [stderr] Compiling num-derive v0.2.3 [INFO] [stderr] Compiling crc32fast v1.1.2 [INFO] [stderr] Compiling rayon v1.0.3 [INFO] [stderr] Compiling num-iter v0.1.37 [INFO] [stderr] Checking lzw v0.10.0 [INFO] [stderr] Checking either v1.5.0 [INFO] [stderr] Checking itoa v0.4.3 [INFO] [stderr] Checking num_cpus v1.9.0 [INFO] [stderr] Compiling memchr v2.1.2 [INFO] [stderr] Compiling num-rational v0.2.1 [INFO] [stderr] Compiling freetype-sys v0.7.1 [INFO] [stderr] Checking deflate v0.7.19 [INFO] [stderr] Checking miniz_oxide v0.3.2 [INFO] [stderr] Checking inflate v0.4.4 [INFO] [stderr] Compiling log v0.4.7 [INFO] [stderr] Compiling unicode-segmentation v1.2.1 [INFO] [stderr] Checking ucd-util v0.1.3 [INFO] [stderr] Compiling regex v1.1.0 [INFO] [stderr] Checking color_quant v1.0.1 [INFO] [stderr] Checking unicode-width v0.1.5 [INFO] [stderr] Compiling heck v0.3.1 [INFO] [stderr] Checking regex-syntax v0.6.4 [INFO] [stderr] Compiling quote v0.6.10 [INFO] [stderr] Compiling libz-sys v1.0.25 [INFO] [stderr] Compiling bzip2-sys v0.1.7 [INFO] [stderr] Checking gif v0.10.1 [INFO] [stderr] Checking time v0.1.42 [INFO] [stderr] Checking textwrap v0.10.0 [INFO] [stderr] Checking atty v0.2.11 [INFO] [stderr] Checking crossbeam-epoch v0.3.1 [INFO] [stderr] Checking thread_local v0.3.6 [INFO] [stderr] Compiling syn v0.15.26 [INFO] [stderr] Checking strsim v0.7.0 [INFO] [stderr] Checking utf8-ranges v1.0.2 [INFO] [stderr] Compiling quote v1.0.2 [INFO] [stderr] Checking aho-corasick v0.6.9 [INFO] [stderr] Checking podio v0.1.6 [INFO] [stderr] Checking vec_map v0.8.1 [INFO] [stderr] Checking ansi_term v0.11.0 [INFO] [stderr] Checking scoped_threadpool v0.1.9 [INFO] [stderr] Checking flate2 v1.0.11 [INFO] [stderr] Checking float-cmp v0.4.0 [INFO] [stderr] Checking normalize-line-endings v0.2.2 [INFO] [stderr] Checking crossbeam-deque v0.2.0 [INFO] [stderr] Checking png v0.14.0 [INFO] [stderr] Checking freetype-rs v0.20.0 [INFO] [stderr] Checking clap v2.32.0 [INFO] [stderr] Checking bzip2 v0.3.3 [INFO] [stderr] Checking zip v0.5.3 [INFO] [stderr] Checking jpeg-decoder v0.1.15 [INFO] [stderr] Checking predicates v1.0.0 [INFO] [stderr] Compiling serde_derive v1.0.99 [INFO] [stderr] Compiling structopt-derive v0.2.18 [INFO] [stderr] Checking structopt v0.2.18 [INFO] [stderr] Checking tiff v0.2.1 [INFO] [stderr] Checking image v0.21.2 [INFO] [stderr] Checking serde_json v1.0.40 [INFO] [stderr] Checking bmfa v0.3.6 (https://github.com/lambdaxymox/bmfa#c58c7f77) [INFO] [stderr] Checking escargot v0.4.0 [INFO] [stderr] Checking fontgen v0.5.5 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:47:13 [INFO] [stdout] | [INFO] [stdout] 47 | origin: origin, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `origin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:48:13 [INFO] [stdout] | [INFO] [stdout] 48 | width: width, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:49:13 [INFO] [stdout] | [INFO] [stdout] 49 | height: height, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `height` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | rows: rows, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `rows` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:51:13 [INFO] [stdout] | [INFO] [stdout] 51 | columns: columns, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `columns` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:52:13 [INFO] [stdout] | [INFO] [stdout] 52 | padding: padding, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `padding` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:53:13 [INFO] [stdout] | [INFO] [stdout] 53 | slot_glyph_size: slot_glyph_size, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `slot_glyph_size` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:54:13 [INFO] [stdout] | [INFO] [stdout] 54 | glyph_size: glyph_size, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `glyph_size` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:68:13 [INFO] [stdout] | [INFO] [stdout] 68 | data: data, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:352:9 [INFO] [stdout] | [INFO] [stdout] 352 | glyph_metadata: glyph_metadata, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `glyph_metadata` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `colour` is never read [INFO] [stdout] --> src/main.rs:286:21 [INFO] [stdout] | [INFO] [stdout] 286 | colour[3] = colour[0]; [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: field `pitch` is never read [INFO] [stdout] --> src/main.rs:81:5 [INFO] [stdout] | [INFO] [stdout] 75 | struct GlyphTable { [INFO] [stdout] | ---------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 81 | pitch: Vec, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/main.rs:363:31 [INFO] [stdout] | [INFO] [stdout] 363 | SlotGlyphSizeCannotBeZero(usize), [INFO] [stdout] | ------------------------- ^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `OptError` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 363 - SlotGlyphSizeCannotBeZero(usize), [INFO] [stdout] 363 + SlotGlyphSizeCannotBeZero(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/main.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | / fn new( [INFO] [stdout] 42 | | origin: bmfa::Origin, [INFO] [stdout] 43 | | width: usize, height: usize, rows: usize, columns: usize, [INFO] [stdout] 44 | | padding: usize, slot_glyph_size: usize, glyph_size: usize) -> AtlasSpec { [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: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/main.rs:97:31 [INFO] [stdout] | [INFO] [stdout] 97 | let mut glyph_data = vec![0 as u8; rows * pitch]; [INFO] [stdout] | ^^^^^^^ help: try: `0_u8` [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: you don't need to add `&` to all patterns [INFO] [stdout] --> src/main.rs:145:9 [INFO] [stdout] | [INFO] [stdout] 145 | / match self { [INFO] [stdout] 146 | | &SampleTypefaceError::SetPixelSize(ref e,_,_) => Some(e), [INFO] [stdout] 147 | | &SampleTypefaceError::LoadCharacter(ref e,_) => Some(e), [INFO] [stdout] 148 | | &SampleTypefaceError::RenderCharacter(ref e, _) => Some(e), [INFO] [stdout] 149 | | &SampleTypefaceError::GetGlyphImage(ref e,_) => Some(e), [INFO] [stdout] 150 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 145 ~ match *self { [INFO] [stdout] 146 ~ SampleTypefaceError::SetPixelSize(ref e,_,_) => Some(e), [INFO] [stdout] 147 ~ SampleTypefaceError::LoadCharacter(ref e,_) => Some(e), [INFO] [stdout] 148 ~ SampleTypefaceError::RenderCharacter(ref e, _) => Some(e), [INFO] [stdout] 149 ~ SampleTypefaceError::GetGlyphImage(ref e,_) => Some(e), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/main.rs:146:13 [INFO] [stdout] | [INFO] [stdout] 146 | &SampleTypefaceError::SetPixelSize(ref e,_,_) => Some(e), [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] 146 - &SampleTypefaceError::SetPixelSize(ref e,_,_) => Some(e), [INFO] [stdout] 146 + SampleTypefaceError::SetPixelSize(e,_,_) => Some(e), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/main.rs:147:13 [INFO] [stdout] | [INFO] [stdout] 147 | &SampleTypefaceError::LoadCharacter(ref e,_) => Some(e), [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] 147 - &SampleTypefaceError::LoadCharacter(ref e,_) => Some(e), [INFO] [stdout] 147 + SampleTypefaceError::LoadCharacter(e,_) => Some(e), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/main.rs:148:13 [INFO] [stdout] | [INFO] [stdout] 148 | &SampleTypefaceError::RenderCharacter(ref e, _) => Some(e), [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] 148 - &SampleTypefaceError::RenderCharacter(ref e, _) => Some(e), [INFO] [stdout] 148 + SampleTypefaceError::RenderCharacter(e, _) => Some(e), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/main.rs:149:13 [INFO] [stdout] | [INFO] [stdout] 149 | &SampleTypefaceError::GetGlyphImage(ref e,_) => Some(e), [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] 149 - &SampleTypefaceError::GetGlyphImage(ref e,_) => Some(e), [INFO] [stdout] 149 + SampleTypefaceError::GetGlyphImage(e,_) => Some(e), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `i32` is unnecessary [INFO] [stdout] --> src/main.rs:161:31 [INFO] [stdout] | [INFO] [stdout] 161 | let mut glyph_rows = vec![0 as i32; 256]; [INFO] [stdout] | ^^^^^^^^ help: try: `0_i32` [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 integer literal to `i32` is unnecessary [INFO] [stdout] --> src/main.rs:163:32 [INFO] [stdout] | [INFO] [stdout] 163 | let mut glyph_width = vec![0 as i32; 256]; [INFO] [stdout] | ^^^^^^^^ help: try: `0_i32` [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 integer literal to `i32` is unnecessary [INFO] [stdout] --> src/main.rs:165:32 [INFO] [stdout] | [INFO] [stdout] 165 | let mut glyph_pitch = vec![0 as i32; 256]; [INFO] [stdout] | ^^^^^^^^ help: try: `0_i32` [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 integer literal to `i64` is unnecessary [INFO] [stdout] --> src/main.rs:167:31 [INFO] [stdout] | [INFO] [stdout] 167 | let mut glyph_ymin = vec![0 as i64; 256]; [INFO] [stdout] | ^^^^^^^^ help: try: `0_i64` [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] [stderr] Checking assert_cmd v0.11.1 [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/main.rs:249:9 [INFO] [stdout] | [INFO] [stdout] 249 | 0 as u8; spec.width * spec.height * 4 * mem::size_of::() [INFO] [stdout] | ^^^^^^^ help: try: `0_u8` [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 integer literal to `u8` is unnecessary [INFO] [stdout] --> src/main.rs:282:39 [INFO] [stdout] | [INFO] [stdout] 282 | let mut colour = [0 as u8; 4]; [INFO] [stdout] | ^^^^^^^ help: try: `0_u8` [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: this looks like you are swapping elements of `atlas_buffer` manually [INFO] [stdout] --> src/main.rs:320:17 [INFO] [stdout] | [INFO] [stdout] 320 | / let temp = atlas_buffer[row * width_in_bytes + col]; [INFO] [stdout] 321 | | atlas_buffer[row * width_in_bytes + col] = atlas_buffer[((height - row - 1) * width_in_bytes) + col]; [INFO] [stdout] 322 | | atlas_buffer[((height - row - 1) * width_in_bytes) + col] = temp; [INFO] [stdout] | |_________________________________________________________________________________^ help: try: `atlas_buffer.swap(row * width_in_bytes + col, ((height - row - 1) * width_in_bytes) + col);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] = note: `#[warn(clippy::manual_swap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/main.rs:336:21 [INFO] [stdout] | [INFO] [stdout] 336 | let glyph_tab = match sample_typeface(face, spec) { [INFO] [stdout] | _____________________^ [INFO] [stdout] 337 | | Ok(val) => val, [INFO] [stdout] 338 | | Err(e) => return Err(e), [INFO] [stdout] 339 | | }; [INFO] [stdout] | |_____^ help: try instead: `sample_typeface(face, spec)?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:404:42 [INFO] [stdout] | [INFO] [stdout] 404 | _ => Err(OptError::InvalidOrigin(format!("{}", st))), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `st.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: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:449:8 [INFO] [stdout] | [INFO] [stdout] 449 | if !(opt.slot_glyph_size > 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(opt.slot_glyph_size <= 0)` [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: all variants have the same prefix: `CouldNot` [INFO] [stdout] --> src/main.rs:460:1 [INFO] [stdout] | [INFO] [stdout] 460 | / enum AppError { [INFO] [stdout] 461 | | CouldNotOpenFontFile(PathBuf), [INFO] [stdout] 462 | | CouldNotCreateBitmapFont(Box), [INFO] [stdout] 463 | | CouldNotCreateAtlasFile(PathBuf), [INFO] [stdout] 464 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the prefixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> tests/fontgen.rs:10:62 [INFO] [stdout] | [INFO] [stdout] 10 | fn generate_a_font_sheet_from_a_ttf_file() -> Result<(), Box> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default [INFO] [stdout] help: if this is a dyn-compatible trait, use `dyn` [INFO] [stdout] | [INFO] [stdout] 10 | fn generate_a_font_sheet_from_a_ttf_file() -> Result<(), Box> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> tests/fontgen.rs:33:66 [INFO] [stdout] | [INFO] [stdout] 33 | fn generate_a_font_sheet_that_does_not_exist() -> Result<(), Box> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: if this is a dyn-compatible trait, use `dyn` [INFO] [stdout] | [INFO] [stdout] 33 | fn generate_a_font_sheet_that_does_not_exist() -> Result<(), Box> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> tests/fontgen.rs:50:82 [INFO] [stdout] | [INFO] [stdout] 50 | fn fontgen_should_reject_padding_larger_than_slot_glyph_size() -> Result<(), Box> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: if this is a dyn-compatible trait, use `dyn` [INFO] [stdout] | [INFO] [stdout] 50 | fn fontgen_should_reject_padding_larger_than_slot_glyph_size() -> Result<(), Box> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:47:13 [INFO] [stdout] | [INFO] [stdout] 47 | origin: origin, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `origin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:48:13 [INFO] [stdout] | [INFO] [stdout] 48 | width: width, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:49:13 [INFO] [stdout] | [INFO] [stdout] 49 | height: height, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `height` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | rows: rows, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `rows` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:51:13 [INFO] [stdout] | [INFO] [stdout] 51 | columns: columns, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `columns` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:52:13 [INFO] [stdout] | [INFO] [stdout] 52 | padding: padding, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `padding` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:53:13 [INFO] [stdout] | [INFO] [stdout] 53 | slot_glyph_size: slot_glyph_size, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `slot_glyph_size` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:54:13 [INFO] [stdout] | [INFO] [stdout] 54 | glyph_size: glyph_size, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `glyph_size` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:68:13 [INFO] [stdout] | [INFO] [stdout] 68 | data: data, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:352:9 [INFO] [stdout] | [INFO] [stdout] 352 | glyph_metadata: glyph_metadata, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `glyph_metadata` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `colour` is never read [INFO] [stdout] --> src/main.rs:286:21 [INFO] [stdout] | [INFO] [stdout] 286 | colour[3] = colour[0]; [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: field `pitch` is never read [INFO] [stdout] --> src/main.rs:81:5 [INFO] [stdout] | [INFO] [stdout] 75 | struct GlyphTable { [INFO] [stdout] | ---------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 81 | pitch: Vec, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/main.rs:363:31 [INFO] [stdout] | [INFO] [stdout] 363 | SlotGlyphSizeCannotBeZero(usize), [INFO] [stdout] | ------------------------- ^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `OptError` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 363 - SlotGlyphSizeCannotBeZero(usize), [INFO] [stdout] 363 + SlotGlyphSizeCannotBeZero(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/main.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | / fn new( [INFO] [stdout] 42 | | origin: bmfa::Origin, [INFO] [stdout] 43 | | width: usize, height: usize, rows: usize, columns: usize, [INFO] [stdout] 44 | | padding: usize, slot_glyph_size: usize, glyph_size: usize) -> AtlasSpec { [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: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/main.rs:97:31 [INFO] [stdout] | [INFO] [stdout] 97 | let mut glyph_data = vec![0 as u8; rows * pitch]; [INFO] [stdout] | ^^^^^^^ help: try: `0_u8` [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: you don't need to add `&` to all patterns [INFO] [stdout] --> src/main.rs:145:9 [INFO] [stdout] | [INFO] [stdout] 145 | / match self { [INFO] [stdout] 146 | | &SampleTypefaceError::SetPixelSize(ref e,_,_) => Some(e), [INFO] [stdout] 147 | | &SampleTypefaceError::LoadCharacter(ref e,_) => Some(e), [INFO] [stdout] 148 | | &SampleTypefaceError::RenderCharacter(ref e, _) => Some(e), [INFO] [stdout] 149 | | &SampleTypefaceError::GetGlyphImage(ref e,_) => Some(e), [INFO] [stdout] 150 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 145 ~ match *self { [INFO] [stdout] 146 ~ SampleTypefaceError::SetPixelSize(ref e,_,_) => Some(e), [INFO] [stdout] 147 ~ SampleTypefaceError::LoadCharacter(ref e,_) => Some(e), [INFO] [stdout] 148 ~ SampleTypefaceError::RenderCharacter(ref e, _) => Some(e), [INFO] [stdout] 149 ~ SampleTypefaceError::GetGlyphImage(ref e,_) => Some(e), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/main.rs:146:13 [INFO] [stdout] | [INFO] [stdout] 146 | &SampleTypefaceError::SetPixelSize(ref e,_,_) => Some(e), [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] 146 - &SampleTypefaceError::SetPixelSize(ref e,_,_) => Some(e), [INFO] [stdout] 146 + SampleTypefaceError::SetPixelSize(e,_,_) => Some(e), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/main.rs:147:13 [INFO] [stdout] | [INFO] [stdout] 147 | &SampleTypefaceError::LoadCharacter(ref e,_) => Some(e), [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] 147 - &SampleTypefaceError::LoadCharacter(ref e,_) => Some(e), [INFO] [stdout] 147 + SampleTypefaceError::LoadCharacter(e,_) => Some(e), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/main.rs:148:13 [INFO] [stdout] | [INFO] [stdout] 148 | &SampleTypefaceError::RenderCharacter(ref e, _) => Some(e), [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] 148 - &SampleTypefaceError::RenderCharacter(ref e, _) => Some(e), [INFO] [stdout] 148 + SampleTypefaceError::RenderCharacter(e, _) => Some(e), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/main.rs:149:13 [INFO] [stdout] | [INFO] [stdout] 149 | &SampleTypefaceError::GetGlyphImage(ref e,_) => Some(e), [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] 149 - &SampleTypefaceError::GetGlyphImage(ref e,_) => Some(e), [INFO] [stdout] 149 + SampleTypefaceError::GetGlyphImage(e,_) => Some(e), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `i32` is unnecessary [INFO] [stdout] --> src/main.rs:161:31 [INFO] [stdout] | [INFO] [stdout] 161 | let mut glyph_rows = vec![0 as i32; 256]; [INFO] [stdout] | ^^^^^^^^ help: try: `0_i32` [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 integer literal to `i32` is unnecessary [INFO] [stdout] --> src/main.rs:163:32 [INFO] [stdout] | [INFO] [stdout] 163 | let mut glyph_width = vec![0 as i32; 256]; [INFO] [stdout] | ^^^^^^^^ help: try: `0_i32` [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 integer literal to `i32` is unnecessary [INFO] [stdout] --> src/main.rs:165:32 [INFO] [stdout] | [INFO] [stdout] 165 | let mut glyph_pitch = vec![0 as i32; 256]; [INFO] [stdout] | ^^^^^^^^ help: try: `0_i32` [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 integer literal to `i64` is unnecessary [INFO] [stdout] --> src/main.rs:167:31 [INFO] [stdout] | [INFO] [stdout] 167 | let mut glyph_ymin = vec![0 as i64; 256]; [INFO] [stdout] | ^^^^^^^^ help: try: `0_i64` [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 integer literal to `u8` is unnecessary [INFO] [stdout] --> src/main.rs:249:9 [INFO] [stdout] | [INFO] [stdout] 249 | 0 as u8; spec.width * spec.height * 4 * mem::size_of::() [INFO] [stdout] | ^^^^^^^ help: try: `0_u8` [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 integer literal to `u8` is unnecessary [INFO] [stdout] --> src/main.rs:282:39 [INFO] [stdout] | [INFO] [stdout] 282 | let mut colour = [0 as u8; 4]; [INFO] [stdout] | ^^^^^^^ help: try: `0_u8` [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: this looks like you are swapping elements of `atlas_buffer` manually [INFO] [stdout] --> src/main.rs:320:17 [INFO] [stdout] | [INFO] [stdout] 320 | / let temp = atlas_buffer[row * width_in_bytes + col]; [INFO] [stdout] 321 | | atlas_buffer[row * width_in_bytes + col] = atlas_buffer[((height - row - 1) * width_in_bytes) + col]; [INFO] [stdout] 322 | | atlas_buffer[((height - row - 1) * width_in_bytes) + col] = temp; [INFO] [stdout] | |_________________________________________________________________________________^ help: try: `atlas_buffer.swap(row * width_in_bytes + col, ((height - row - 1) * width_in_bytes) + col);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] = note: `#[warn(clippy::manual_swap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/main.rs:336:21 [INFO] [stdout] | [INFO] [stdout] 336 | let glyph_tab = match sample_typeface(face, spec) { [INFO] [stdout] | _____________________^ [INFO] [stdout] 337 | | Ok(val) => val, [INFO] [stdout] 338 | | Err(e) => return Err(e), [INFO] [stdout] 339 | | }; [INFO] [stdout] | |_____^ help: try instead: `sample_typeface(face, spec)?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:404:42 [INFO] [stdout] | [INFO] [stdout] 404 | _ => Err(OptError::InvalidOrigin(format!("{}", st))), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `st.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: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:449:8 [INFO] [stdout] | [INFO] [stdout] 449 | if !(opt.slot_glyph_size > 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(opt.slot_glyph_size <= 0)` [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: all variants have the same prefix: `CouldNot` [INFO] [stdout] --> src/main.rs:460:1 [INFO] [stdout] | [INFO] [stdout] 460 | / enum AppError { [INFO] [stdout] 461 | | CouldNotOpenFontFile(PathBuf), [INFO] [stdout] 462 | | CouldNotCreateBitmapFont(Box), [INFO] [stdout] 463 | | CouldNotCreateAtlasFile(PathBuf), [INFO] [stdout] 464 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the prefixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 19.47s [INFO] running `Command { std: "docker" "inspect" "8262d3e9e2338fb8b2b41e7d0b267e6574fc2b81aeb900eaff4f94d0614bce12", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8262d3e9e2338fb8b2b41e7d0b267e6574fc2b81aeb900eaff4f94d0614bce12", kill_on_drop: false }` [INFO] [stdout] 8262d3e9e2338fb8b2b41e7d0b267e6574fc2b81aeb900eaff4f94d0614bce12