[INFO] cloning repository https://github.com/XuanRikka/mc-linear-tool [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/XuanRikka/mc-linear-tool" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FXuanRikka%2Fmc-linear-tool", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FXuanRikka%2Fmc-linear-tool'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 4ff95f7f48067017befad0ce9c0598ad1623e75a [INFO] linting XuanRikka/mc-linear-tool against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FXuanRikka%2Fmc-linear-tool" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/XuanRikka/mc-linear-tool [INFO] finished tweaking git repo https://github.com/XuanRikka/mc-linear-tool [INFO] tweaked toml for git repo https://github.com/XuanRikka/mc-linear-tool written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/XuanRikka/mc-linear-tool 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/XuanRikka/mc-linear-tool 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] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded zlib-rs v0.6.2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] ed738603ad456906aa0b970146b6ea097a136d5cb3f7f8e9b3a02209a8eaf90b [INFO] running `Command { std: "docker" "start" "-a" "ed738603ad456906aa0b970146b6ea097a136d5cb3f7f8e9b3a02209a8eaf90b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "ed738603ad456906aa0b970146b6ea097a136d5cb3f7f8e9b3a02209a8eaf90b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ed738603ad456906aa0b970146b6ea097a136d5cb3f7f8e9b3a02209a8eaf90b", kill_on_drop: false }` [INFO] [stdout] ed738603ad456906aa0b970146b6ea097a136d5cb3f7f8e9b3a02209a8eaf90b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] ede6cce705dbd06f027617eacf5d6d191636a294ddc7389e7f4257d1fecfbc93 [INFO] running `Command { std: "docker" "start" "-a" "ede6cce705dbd06f027617eacf5d6d191636a294ddc7389e7f4257d1fecfbc93", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.106 [INFO] [stderr] Compiling owo-colors v4.3.0 [INFO] [stderr] Compiling zstd-safe v7.2.4 [INFO] [stderr] Compiling binrw_derive v0.15.0 [INFO] [stderr] Compiling libc v0.2.182 [INFO] [stderr] Compiling binrw v0.15.0 [INFO] [stderr] Compiling either v1.15.0 [INFO] [stderr] Checking twox-hash v2.1.2 [INFO] [stderr] Checking zlib-rs v0.6.2 [INFO] [stderr] Compiling portable-atomic v1.13.1 [INFO] [stderr] Checking bytemuck v1.25.0 [INFO] [stderr] Checking array-init v2.1.0 [INFO] [stderr] Checking unicode-width v0.2.2 [INFO] [stderr] Checking xxhash-rust v0.8.15 [INFO] [stderr] Checking number_prefix v0.4.0 [INFO] [stderr] Checking humantime v2.3.0 [INFO] [stderr] Checking lz4_flex v0.12.0 [INFO] [stderr] Checking console v0.15.11 [INFO] [stderr] Checking indicatif v0.17.11 [INFO] [stderr] Compiling quote v1.0.44 [INFO] [stderr] Compiling syn v2.0.117 [INFO] [stderr] Checking flate2 v1.1.9 [INFO] [stderr] Compiling jobserver v0.1.34 [INFO] [stderr] Compiling cc v1.2.56 [INFO] [stderr] Compiling zstd-sys v2.0.16+zstd.1.5.7 [INFO] [stderr] Compiling clap_derive v4.5.55 [INFO] [stderr] Checking clap v4.5.60 [INFO] [stderr] Checking zstd v0.13.3 [INFO] [stderr] Checking mclinear v0.1.0 (/opt/rustwide/workdir/mclinear) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> mclinear/src/models/anvil.rs:123:13 [INFO] [stdout] | [INFO] [stdout] 123 | sector_offset: sector_offset, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sector_offset` [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] --> mclinear/src/models/anvil.rs:123:13 [INFO] [stdout] | [INFO] [stdout] 123 | sector_offset: sector_offset, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sector_offset` [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] --> mclinear/src/region.rs:194:13 [INFO] [stdout] | [INFO] [stdout] 194 | grid_size: grid_size, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `grid_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] --> mclinear/src/region.rs:194:13 [INFO] [stdout] | [INFO] [stdout] 194 | grid_size: grid_size, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `grid_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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> mclinear/src/models/linear_v2.rs:31:37 [INFO] [stdout] | [INFO] [stdout] 31 | #[bw(map = |x| serialize_bitmap(&x))] [INFO] [stdout] | ^^ help: change this to: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> mclinear/src/models/linear_v2.rs:31:37 [INFO] [stdout] | [INFO] [stdout] 31 | #[bw(map = |x| serialize_bitmap(&x))] [INFO] [stdout] | ^^ help: change this to: `x` [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: redundant closure [INFO] [stdout] --> mclinear/src/models/anvil.rs:29:14 [INFO] [stdout] | [INFO] [stdout] 29 | #[bw(map(|x| u32_to_u24_be(x)))] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `u32_to_u24_be` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> mclinear/src/models/anvil.rs:29:14 [INFO] [stdout] | [INFO] [stdout] 29 | #[bw(map(|x| u32_to_u24_be(x)))] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `u32_to_u24_be` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> mclinear/src/models/anvil.rs:137:8 [INFO] [stdout] | [INFO] [stdout] 137 | if !mcc.is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `mcc.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 `mcc` after checking its variant with `is_none` [INFO] [stdout] --> mclinear/src/models/anvil.rs:139:19 [INFO] [stdout] | [INFO] [stdout] 137 | if !mcc.is_none() [INFO] [stdout] | ------------- the check is happening here [INFO] [stdout] 138 | { [INFO] [stdout] 139 | let mcc = mcc.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `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: unneeded late initialization [INFO] [stdout] --> mclinear/src/models/anvil.rs:157:9 [INFO] [stdout] | [INFO] [stdout] 157 | let data: Vec; [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 `data` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 157 ~ [INFO] [stdout] 158 | if info.sector_offset == 0 || info.sector_count == 0 [INFO] [stdout] ... [INFO] [stdout] 167 | // 压缩类型只到1-4,如果超过3了那就是有外部mcc,需要-128得到实际类型 [INFO] [stdout] 168 ~ let data: Vec = if header.compression_type >= 128 [INFO] [stdout] 169 | { [INFO] [stdout] ... [INFO] [stdout] 173 | mcc_file.read_to_end(&mut raw_data)?; [INFO] [stdout] 174 ~ chunk_decompress(raw_data, header.compression_type-128)? [INFO] [stdout] 175 | } [INFO] [stdout] ... [INFO] [stdout] 185 | f.read_exact(&mut t)?; [INFO] [stdout] 186 ~ chunk_decompress(t, header.compression_type)? [INFO] [stdout] 187 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> mclinear/src/models/anvil.rs:137:8 [INFO] [stdout] | [INFO] [stdout] 137 | if !mcc.is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `mcc.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 `mcc` after checking its variant with `is_none` [INFO] [stdout] --> mclinear/src/models/anvil.rs:139:19 [INFO] [stdout] | [INFO] [stdout] 137 | if !mcc.is_none() [INFO] [stdout] | ------------- the check is happening here [INFO] [stdout] 138 | { [INFO] [stdout] 139 | let mcc = mcc.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `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: unneeded late initialization [INFO] [stdout] --> mclinear/src/models/anvil.rs:157:9 [INFO] [stdout] | [INFO] [stdout] 157 | let data: Vec; [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 `data` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 157 ~ [INFO] [stdout] 158 | if info.sector_offset == 0 || info.sector_count == 0 [INFO] [stdout] ... [INFO] [stdout] 167 | // 压缩类型只到1-4,如果超过3了那就是有外部mcc,需要-128得到实际类型 [INFO] [stdout] 168 ~ let data: Vec = if header.compression_type >= 128 [INFO] [stdout] 169 | { [INFO] [stdout] ... [INFO] [stdout] 173 | mcc_file.read_to_end(&mut raw_data)?; [INFO] [stdout] 174 ~ chunk_decompress(raw_data, header.compression_type-128)? [INFO] [stdout] 175 | } [INFO] [stdout] ... [INFO] [stdout] 185 | f.read_exact(&mut t)?; [INFO] [stdout] 186 ~ chunk_decompress(t, header.compression_type)? [INFO] [stdout] 187 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> mclinear/src/region.rs:99:27 [INFO] [stdout] | [INFO] [stdout] 99 | encoder.write_all(&data.get_ref())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `data.get_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> mclinear/src/region.rs:255:56 [INFO] [stdout] | [INFO] [stdout] 255 | let (region_x, region_z) = parse_region_coords(&p)?; [INFO] [stdout] | ^^ help: change this to: `p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> mclinear/src/region.rs:258:35 [INFO] [stdout] | [INFO] [stdout] 258 | let mut file = File::open(&p)?; [INFO] [stdout] | ^^ help: change this to: `p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> mclinear/src/region.rs:260:43 [INFO] [stdout] | [INFO] [stdout] 260 | let mcc_files = collect_mcc_files(&p)?; [INFO] [stdout] | ^^ help: change this to: `p` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> mclinear/src/region.rs:99:27 [INFO] [stdout] | [INFO] [stdout] 99 | encoder.write_all(&data.get_ref())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `data.get_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> mclinear/src/region.rs:255:56 [INFO] [stdout] | [INFO] [stdout] 255 | let (region_x, region_z) = parse_region_coords(&p)?; [INFO] [stdout] | ^^ help: change this to: `p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> mclinear/src/region.rs:258:35 [INFO] [stdout] | [INFO] [stdout] 258 | let mut file = File::open(&p)?; [INFO] [stdout] | ^^ help: change this to: `p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> mclinear/src/region.rs:260:43 [INFO] [stdout] | [INFO] [stdout] 260 | let mcc_files = collect_mcc_files(&p)?; [INFO] [stdout] | ^^ help: change this to: `p` [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] [stderr] Checking mc-linear-tool v0.1.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: function `split_into_chunks` is never used [INFO] [stdout] --> src/utils.rs:30:8 [INFO] [stdout] | [INFO] [stdout] 30 | pub fn split_into_chunks(mut vec: Vec, n: usize) -> 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: manually reimplementing `div_ceil` [INFO] [stdout] --> src/utils.rs:43:34 [INFO] [stdout] | [INFO] [stdout] 43 | let current_chunk_size = (vec.len() + remaining_chunks - 1) / remaining_chunks; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `vec.len().div_ceil(remaining_chunks)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/main.rs:197:9 [INFO] [stdout] | [INFO] [stdout] 197 | let r: Region; [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 `r` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 197 ~ [INFO] [stdout] 198 ~ let r: Region = match file_type { [INFO] [stdout] 199 | FileType::Anvil => { [INFO] [stdout] 200 ~ Region::from_anvil(&path).expect(format!("线程{}: 读取 {} 时失败", num, path.display()).as_str()) [INFO] [stdout] 201 | } [INFO] [stdout] ... [INFO] [stdout] 204 | let file = File::open(&path)?; [INFO] [stdout] 205 ~ Region::from_linear_v1(file, region_x, region_z).expect(format!("线程{}: 读取 {} 时失败", num, path.display()).as_str()) [INFO] [stdout] 206 | } [INFO] [stdout] 207 | FileType::LinearV2 => { [INFO] [stdout] 208 | let file = File::open(&path)?; [INFO] [stdout] 209 ~ Region::from_linear_v2(file).expect(format!("线程{}: 读取 {} 时失败", num, path.display()).as_str()) [INFO] [stdout] 210 | } [INFO] [stdout] 211 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:200:47 [INFO] [stdout] | [INFO] [stdout] 200 | r = Region::from_anvil(&path).expect(format!("线程{}: 读取 {} 时失败", num, path.display()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("线程{}: 读取 {} 时失败", num, path.display()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:203:71 [INFO] [stdout] | [INFO] [stdout] 203 | ...e_region_coords(&path).expect(format!("解析 {} 的区域坐标时失败", path.display()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("解析 {} 的区域坐标时失败", path.display()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:205:70 [INFO] [stdout] | [INFO] [stdout] 205 | ...e, region_x, region_z).expect(format!("线程{}: 读取 {} 时失败", num, path.display()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("线程{}: 读取 {} 时失败", num, path.display()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:209:50 [INFO] [stdout] | [INFO] [stdout] 209 | r = Region::from_linear_v2(file).expect(format!("线程{}: 读取 {} 时失败", num, path.display()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("线程{}: 读取 {} 时失败", num, path.display()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:241:22 [INFO] [stdout] | [INFO] [stdout] 241 | .expect(format!("线程{}: 转换 {} 时失败", num, path.display()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("线程{}: 转换 {} 时失败", num, path.display()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:247:22 [INFO] [stdout] | [INFO] [stdout] 247 | .expect(format!("线程{}: 转换 {} 时失败", num, path.display()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("线程{}: 转换 {} 时失败", num, path.display()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:253:22 [INFO] [stdout] | [INFO] [stdout] 253 | .expect(format!("线程{}: 转换 {} 时失败", num, path.display()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("线程{}: 转换 {} 时失败", num, path.display()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `split_into_chunks` is never used [INFO] [stdout] --> src/utils.rs:30:8 [INFO] [stdout] | [INFO] [stdout] 30 | pub fn split_into_chunks(mut vec: Vec, n: usize) -> 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: manually reimplementing `div_ceil` [INFO] [stdout] --> src/utils.rs:43:34 [INFO] [stdout] | [INFO] [stdout] 43 | let current_chunk_size = (vec.len() + remaining_chunks - 1) / remaining_chunks; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `vec.len().div_ceil(remaining_chunks)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/main.rs:197:9 [INFO] [stdout] | [INFO] [stdout] 197 | let r: Region; [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 `r` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 197 ~ [INFO] [stdout] 198 ~ let r: Region = match file_type { [INFO] [stdout] 199 | FileType::Anvil => { [INFO] [stdout] 200 ~ Region::from_anvil(&path).expect(format!("线程{}: 读取 {} 时失败", num, path.display()).as_str()) [INFO] [stdout] 201 | } [INFO] [stdout] ... [INFO] [stdout] 204 | let file = File::open(&path)?; [INFO] [stdout] 205 ~ Region::from_linear_v1(file, region_x, region_z).expect(format!("线程{}: 读取 {} 时失败", num, path.display()).as_str()) [INFO] [stdout] 206 | } [INFO] [stdout] 207 | FileType::LinearV2 => { [INFO] [stdout] 208 | let file = File::open(&path)?; [INFO] [stdout] 209 ~ Region::from_linear_v2(file).expect(format!("线程{}: 读取 {} 时失败", num, path.display()).as_str()) [INFO] [stdout] 210 | } [INFO] [stdout] 211 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:200:47 [INFO] [stdout] | [INFO] [stdout] 200 | r = Region::from_anvil(&path).expect(format!("线程{}: 读取 {} 时失败", num, path.display()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("线程{}: 读取 {} 时失败", num, path.display()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:203:71 [INFO] [stdout] | [INFO] [stdout] 203 | ...e_region_coords(&path).expect(format!("解析 {} 的区域坐标时失败", path.display()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("解析 {} 的区域坐标时失败", path.display()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:205:70 [INFO] [stdout] | [INFO] [stdout] 205 | ...e, region_x, region_z).expect(format!("线程{}: 读取 {} 时失败", num, path.display()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("线程{}: 读取 {} 时失败", num, path.display()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:209:50 [INFO] [stdout] | [INFO] [stdout] 209 | r = Region::from_linear_v2(file).expect(format!("线程{}: 读取 {} 时失败", num, path.display()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("线程{}: 读取 {} 时失败", num, path.display()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:241:22 [INFO] [stdout] | [INFO] [stdout] 241 | .expect(format!("线程{}: 转换 {} 时失败", num, path.display()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("线程{}: 转换 {} 时失败", num, path.display()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:247:22 [INFO] [stdout] | [INFO] [stdout] 247 | .expect(format!("线程{}: 转换 {} 时失败", num, path.display()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("线程{}: 转换 {} 时失败", num, path.display()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:253:22 [INFO] [stdout] | [INFO] [stdout] 253 | .expect(format!("线程{}: 转换 {} 时失败", num, path.display()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("线程{}: 转换 {} 时失败", num, path.display()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 23.62s [INFO] running `Command { std: "docker" "inspect" "ede6cce705dbd06f027617eacf5d6d191636a294ddc7389e7f4257d1fecfbc93", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ede6cce705dbd06f027617eacf5d6d191636a294ddc7389e7f4257d1fecfbc93", kill_on_drop: false }` [INFO] [stdout] ede6cce705dbd06f027617eacf5d6d191636a294ddc7389e7f4257d1fecfbc93