[INFO] cloning repository https://github.com/Tiqur/Crypt [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Tiqur/Crypt" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FTiqur%2FCrypt", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FTiqur%2FCrypt'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] ce7831ee25f77bd13520dac30035dda94e16197d [INFO] building Tiqur/Crypt against master#11663cd3bfefef7d34e8f0892c250bf698049392+rustflags=-Dtail-expr-drop-order for pr-134523 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FTiqur%2FCrypt" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/Tiqur/Crypt on toolchain 11663cd3bfefef7d34e8f0892c250bf698049392 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/Tiqur/Crypt [INFO] finished tweaking git repo https://github.com/Tiqur/Crypt [INFO] tweaked toml for git repo https://github.com/Tiqur/Crypt written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/Tiqur/Crypt 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" "+11663cd3bfefef7d34e8f0892c250bf698049392" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded libdeflater v0.7.1 [INFO] [stderr] Downloaded libdeflate-sys v0.7.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 37cf0a43f2c2fe789555211e7756204d0074c4d69449dbcbbe50386e6c4f0444 [INFO] running `Command { std: "docker" "start" "-a" "37cf0a43f2c2fe789555211e7756204d0074c4d69449dbcbbe50386e6c4f0444", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "37cf0a43f2c2fe789555211e7756204d0074c4d69449dbcbbe50386e6c4f0444", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "37cf0a43f2c2fe789555211e7756204d0074c4d69449dbcbbe50386e6c4f0444", kill_on_drop: false }` [INFO] [stdout] 37cf0a43f2c2fe789555211e7756204d0074c4d69449dbcbbe50386e6c4f0444 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid -Dtail-expr-drop-order" "-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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 9f7548352b4f0c8ff2fe5bb5a19d916e043499bce7e7b7e9b5d301cb3ac08537 [INFO] running `Command { std: "docker" "start" "-a" "9f7548352b4f0c8ff2fe5bb5a19d916e043499bce7e7b7e9b5d301cb3ac08537", kill_on_drop: false }` [INFO] [stderr] Compiling cc v1.0.66 [INFO] [stderr] Compiling libc v0.2.82 [INFO] [stderr] Compiling unicode-width v0.1.8 [INFO] [stderr] Compiling vec_map v0.8.2 [INFO] [stderr] Compiling strsim v0.8.0 [INFO] [stderr] Compiling ansi_term v0.11.0 [INFO] [stderr] Compiling bitflags v1.2.1 [INFO] [stderr] Compiling textwrap v0.11.0 [INFO] [stderr] Compiling libdeflate-sys v0.7.1 [INFO] [stderr] Compiling atty v0.2.14 [INFO] [stderr] Compiling clap v2.33.3 [INFO] [stderr] Compiling libdeflater v0.7.1 [INFO] [stderr] Compiling Crypt v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::env` [INFO] [stdout] --> src/main.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::env; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Cursor` and `Write` [INFO] [stdout] --> src/main.rs:4:15 [INFO] [stdout] | [INFO] [stdout] 4 | use std::io::{Cursor, Write}; [INFO] [stdout] | ^^^^^^ ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Compressor` and `Decompressor` [INFO] [stdout] --> src/main.rs:9:19 [INFO] [stdout] | [INFO] [stdout] 9 | use libdeflater::{Compressor, CompressionLvl, Decompressor}; [INFO] [stdout] | ^^^^^^^^^^ ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `thread` [INFO] [stdout] --> src/Functions/enterDir.rs:3:15 [INFO] [stdout] | [INFO] [stdout] 3 | use std::{fs, thread}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::Functions::decodeFile::decodeFile` [INFO] [stdout] --> src/Functions/enterDir.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::Functions::decodeFile::decodeFile; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::time::Duration` [INFO] [stdout] --> src/Functions/enterDir.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::time::Duration; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `fileType` should have an upper camel case name [INFO] [stdout] --> src/Functions/enterDir.rs:10:6 [INFO] [stdout] | [INFO] [stdout] 10 | enum fileType { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to upper camel case (notice the capitalization): `FileType` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::Functions::compressBuffer::compressBuffer` [INFO] [stdout] --> src/Functions/decodeFile.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::Functions::compressBuffer::compressBuffer; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::Read` [INFO] [stdout] --> src/Functions/decodeFile.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::io::Read; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/Functions/enterDir.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | let mut paths = fs::read_dir(pathDir.clone()).unwrap(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/Functions/enterDir.rs:18:13 [INFO] [stdout] | [INFO] [stdout] 18 | let mut fileName = path.as_ref().unwrap().clone().file_name().into_string().unwrap(); [INFO] [stdout] | ----^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dirDelimiter` [INFO] [stdout] --> src/Functions/encodeFile.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | let dirDelimiter = if path == "" {""} else {"/"}; [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_dirDelimiter` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `fileName` [INFO] [stdout] --> src/Functions/encodeFile.rs:19:55 [INFO] [stdout] | [INFO] [stdout] 19 | pub fn encodeFile(path: String, mergeFile: &mut File, fileName: String, compress: CompressionLvl) { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_fileName` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/Functions/encodeFile.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | let mut encodedCompressedBuffer = base64::encode(compressedBuffer); [INFO] [stdout] | ----^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `compress` [INFO] [stdout] --> src/main.rs:53:8 [INFO] [stdout] | [INFO] [stdout] 53 | let compress = matches.is_present("compress"); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_compress` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `fileType` is never used [INFO] [stdout] --> src/Functions/enterDir.rs:10:6 [INFO] [stdout] | [INFO] [stdout] 10 | enum fileType { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `StringUtils` is never used [INFO] [stdout] --> src/Functions/encodeFile.rs:9:7 [INFO] [stdout] | [INFO] [stdout] 9 | trait StringUtils { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `Functions` should have a snake case name [INFO] [stdout] --> src/main.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | mod Functions; [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `functions` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `compressionLevel` should have a snake case name [INFO] [stdout] --> src/main.rs:81:11 [INFO] [stdout] | [INFO] [stdout] 81 | let compressionLevel = CompressionLvl::best(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `compression_level` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `tempPath` should have a snake case name [INFO] [stdout] --> src/main.rs:86:11 [INFO] [stdout] | [INFO] [stdout] 86 | let tempPath = "protected.crypt"; [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `temp_path` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `enterDir` should have a snake case name [INFO] [stdout] --> src/Functions/mod.rs:1:9 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod enterDir; [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `enter_dir` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `compressBuffer` should have a snake case name [INFO] [stdout] --> src/Functions/mod.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 2 | pub mod compressBuffer; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: convert the identifier to snake case: `compress_buffer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `decompressBuffer` should have a snake case name [INFO] [stdout] --> src/Functions/mod.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | pub mod decompressBuffer; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `decompress_buffer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `encodeFile` should have a snake case name [INFO] [stdout] --> src/Functions/mod.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | pub mod encodeFile; [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `encode_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `decodeFile` should have a snake case name [INFO] [stdout] --> src/Functions/mod.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | pub mod decodeFile; [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `decode_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `enterDir` should have a snake case name [INFO] [stdout] --> src/Functions/enterDir.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 15 | pub fn enterDir(pathDir: String, mergeFile: &mut File, compress: CompressionLvl, depth: i32, mode: Mode) { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `enter_dir` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `pathDir` should have a snake case name [INFO] [stdout] --> src/Functions/enterDir.rs:15:17 [INFO] [stdout] | [INFO] [stdout] 15 | pub fn enterDir(pathDir: String, mergeFile: &mut File, compress: CompressionLvl, depth: i32, mode: Mode) { [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case: `path_dir` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `mergeFile` should have a snake case name [INFO] [stdout] --> src/Functions/enterDir.rs:15:34 [INFO] [stdout] | [INFO] [stdout] 15 | pub fn enterDir(pathDir: String, mergeFile: &mut File, compress: CompressionLvl, depth: i32, mode: Mode) { [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `merge_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/Functions/enterDir.rs:18:50 [INFO] [stdout] | [INFO] [stdout] 18 | let mut fileName = path.as_ref().unwrap().clone().file_name().into_string().unwrap(); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type `DirEntry` does not implement `Clone`, so calling `clone` on `&DirEntry` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] 18 - let mut fileName = path.as_ref().unwrap().clone().file_name().into_string().unwrap(); [INFO] [stdout] 18 + let mut fileName = path.as_ref().unwrap().file_name().into_string().unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `fileName` should have a snake case name [INFO] [stdout] --> src/Functions/enterDir.rs:18:17 [INFO] [stdout] | [INFO] [stdout] 18 | let mut fileName = path.as_ref().unwrap().clone().file_name().into_string().unwrap(); [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `file_name` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/Functions/enterDir.rs:19:44 [INFO] [stdout] | [INFO] [stdout] 19 | let isFile = path.as_ref().unwrap().clone().file_type().unwrap().is_file(); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type `DirEntry` does not implement `Clone`, so calling `clone` on `&DirEntry` copies the reference, which does not do anything and can be removed [INFO] [stdout] help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] 19 - let isFile = path.as_ref().unwrap().clone().file_type().unwrap().is_file(); [INFO] [stdout] 19 + let isFile = path.as_ref().unwrap().file_type().unwrap().is_file(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `isFile` should have a snake case name [INFO] [stdout] --> src/Functions/enterDir.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | let isFile = path.as_ref().unwrap().clone().file_type().unwrap().is_file(); [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case: `is_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/Functions/enterDir.rs:20:43 [INFO] [stdout] | [INFO] [stdout] 20 | let isDir = path.as_ref().unwrap().clone().file_type().unwrap().is_dir(); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type `DirEntry` does not implement `Clone`, so calling `clone` on `&DirEntry` copies the reference, which does not do anything and can be removed [INFO] [stdout] help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] 20 - let isDir = path.as_ref().unwrap().clone().file_type().unwrap().is_dir(); [INFO] [stdout] 20 + let isDir = path.as_ref().unwrap().file_type().unwrap().is_dir(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `isDir` should have a snake case name [INFO] [stdout] --> src/Functions/enterDir.rs:20:13 [INFO] [stdout] | [INFO] [stdout] 20 | let isDir = path.as_ref().unwrap().clone().file_type().unwrap().is_dir(); [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case: `is_dir` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/Functions/enterDir.rs:33:13 [INFO] [stdout] | [INFO] [stdout] 33 | fs::remove_dir(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)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 33 | let _ = fs::remove_dir(path); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `compressBuffer` should have a snake case name [INFO] [stdout] --> src/Functions/compressBuffer.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn compressBuffer(bytes: Vec, compLevel: CompressionLvl) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: convert the identifier to snake case: `compress_buffer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `compLevel` should have a snake case name [INFO] [stdout] --> src/Functions/compressBuffer.rs:3:39 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn compressBuffer(bytes: Vec, compLevel: CompressionLvl) -> Vec { [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `comp_level` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `decompressBuffer` should have a snake case name [INFO] [stdout] --> src/Functions/decompressBuffer.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn decompressBuffer(bytes: Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `decompress_buffer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `encodeFile` should have a snake case name [INFO] [stdout] --> src/Functions/encodeFile.rs:19:8 [INFO] [stdout] | [INFO] [stdout] 19 | pub fn encodeFile(path: String, mergeFile: &mut File, fileName: String, compress: CompressionLvl) { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `encode_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `mergeFile` should have a snake case name [INFO] [stdout] --> src/Functions/encodeFile.rs:19:33 [INFO] [stdout] | [INFO] [stdout] 19 | pub fn encodeFile(path: String, mergeFile: &mut File, fileName: String, compress: CompressionLvl) { [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `merge_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `fileName` should have a snake case name [INFO] [stdout] --> src/Functions/encodeFile.rs:19:55 [INFO] [stdout] | [INFO] [stdout] 19 | pub fn encodeFile(path: String, mergeFile: &mut File, fileName: String, compress: CompressionLvl) { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `file_name` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `dataBuffer` should have a snake case name [INFO] [stdout] --> src/Functions/encodeFile.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | let mut dataBuffer = fs::read(&path).unwrap(); [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `data_buffer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `dirDelimiter` should have a snake case name [INFO] [stdout] --> src/Functions/encodeFile.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | let dirDelimiter = if path == "" {""} else {"/"}; [INFO] [stdout] | ^^^^^^^^^^^^ help: convert the identifier to snake case: `dir_delimiter` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `compressedBuffer` should have a snake case name [INFO] [stdout] --> src/Functions/encodeFile.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | let compressedBuffer = compressBuffer(dataBuffer.clone(), compress); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `compressed_buffer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `encodedCompressedBuffer` should have a snake case name [INFO] [stdout] --> src/Functions/encodeFile.rs:33:13 [INFO] [stdout] | [INFO] [stdout] 33 | let mut encodedCompressedBuffer = base64::encode(compressedBuffer); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `encoded_compressed_buffer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/Functions/encodeFile.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | mergeFile.write_all(format!("{},", encodedCompressedBuffer).as_ref()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 36 | let _ = mergeFile.write_all(format!("{},", encodedCompressedBuffer).as_ref()); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `decodeFile` should have a snake case name [INFO] [stdout] --> src/Functions/decodeFile.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn decodeFile(path: String) { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `decode_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `fileString` should have a snake case name [INFO] [stdout] --> src/Functions/decodeFile.rs:9:13 [INFO] [stdout] | [INFO] [stdout] 9 | let mut fileString = fs::read_to_string(&path).unwrap(); [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `file_string` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `encodedFiles` should have a snake case name [INFO] [stdout] --> src/Functions/decodeFile.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | let encodedFiles = fileString.split(","); [INFO] [stdout] | ^^^^^^^^^^^^ help: convert the identifier to snake case: `encoded_files` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `encodedFile` should have a snake case name [INFO] [stdout] --> src/Functions/decodeFile.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | for encodedFile in encodedFiles { [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to snake case: `encoded_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `encodedFileBytes` should have a snake case name [INFO] [stdout] --> src/Functions/decodeFile.rs:20:13 [INFO] [stdout] | [INFO] [stdout] 20 | let encodedFileBytes = encodedFile.as_bytes(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `encoded_file_bytes` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `compressedBuffer` should have a snake case name [INFO] [stdout] --> src/Functions/decodeFile.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | let compressedBuffer = base64::decode(&encodedFileBytes).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `compressed_buffer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `dataBuffer` should have a snake case name [INFO] [stdout] --> src/Functions/decodeFile.rs:26:17 [INFO] [stdout] | [INFO] [stdout] 26 | let mut dataBuffer = decompressBuffer(compressedBuffer); [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `data_buffer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `indexOfComma` should have a snake case name [INFO] [stdout] --> src/Functions/decodeFile.rs:29:13 [INFO] [stdout] | [INFO] [stdout] 29 | let indexOfComma = dataBuffer.iter().rposition(|r| r == &b',').unwrap()+1; [INFO] [stdout] | ^^^^^^^^^^^^ help: convert the identifier to snake case: `index_of_comma` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `filePath` should have a snake case name [INFO] [stdout] --> src/Functions/decodeFile.rs:30:13 [INFO] [stdout] | [INFO] [stdout] 30 | let filePath = &dataBuffer.clone()[indexOfComma..dataBuffer.len()]; [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `file_path` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `fileNameDelimiterIndex` should have a snake case name [INFO] [stdout] --> src/Functions/decodeFile.rs:31:13 [INFO] [stdout] | [INFO] [stdout] 31 | let fileNameDelimiterIndex = filePath.iter().rposition(|r| r == &b'/').unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `file_name_delimiter_index` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/Functions/decodeFile.rs:32:72 [INFO] [stdout] | [INFO] [stdout] 32 | let filePathWithoutName = String::from_utf8(Vec::from(&filePath.clone()[0..fileNameDelimiterIndex])).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `[u8]` does not implement `Clone`, so calling `clone` on `&[u8]` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `filePathWithoutName` should have a snake case name [INFO] [stdout] --> src/Functions/decodeFile.rs:32:13 [INFO] [stdout] | [INFO] [stdout] 32 | let filePathWithoutName = String::from_utf8(Vec::from(&filePath.clone()[0..fileNameDelimiterIndex])).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `file_path_without_name` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `strPath` should have a snake case name [INFO] [stdout] --> src/Functions/decodeFile.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | let strPath = std::str::from_utf8(filePath).unwrap(); [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case: `str_path` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/Functions/decodeFile.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | fs::create_dir_all(filePathWithoutName); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 43 | let _ = fs::create_dir_all(filePathWithoutName); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/Functions/decodeFile.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | fs::write(strPath, dataBuffer); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 46 | let _ = fs::write(strPath, dataBuffer); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.71s [INFO] running `Command { std: "docker" "inspect" "9f7548352b4f0c8ff2fe5bb5a19d916e043499bce7e7b7e9b5d301cb3ac08537", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9f7548352b4f0c8ff2fe5bb5a19d916e043499bce7e7b7e9b5d301cb3ac08537", kill_on_drop: false }` [INFO] [stdout] 9f7548352b4f0c8ff2fe5bb5a19d916e043499bce7e7b7e9b5d301cb3ac08537 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid -Dtail-expr-drop-order" "-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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] a699244f88f9827b906fa85ec39ac7e0072a3e95ad44fe7e2fef540326f00396 [INFO] running `Command { std: "docker" "start" "-a" "a699244f88f9827b906fa85ec39ac7e0072a3e95ad44fe7e2fef540326f00396", kill_on_drop: false }` [INFO] [stderr] Compiling Crypt v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::env` [INFO] [stdout] --> src/main.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::env; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Cursor` and `Write` [INFO] [stdout] --> src/main.rs:4:15 [INFO] [stdout] | [INFO] [stdout] 4 | use std::io::{Cursor, Write}; [INFO] [stdout] | ^^^^^^ ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Compressor` and `Decompressor` [INFO] [stdout] --> src/main.rs:9:19 [INFO] [stdout] | [INFO] [stdout] 9 | use libdeflater::{Compressor, CompressionLvl, Decompressor}; [INFO] [stdout] | ^^^^^^^^^^ ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `thread` [INFO] [stdout] --> src/Functions/enterDir.rs:3:15 [INFO] [stdout] | [INFO] [stdout] 3 | use std::{fs, thread}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::Functions::decodeFile::decodeFile` [INFO] [stdout] --> src/Functions/enterDir.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::Functions::decodeFile::decodeFile; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::time::Duration` [INFO] [stdout] --> src/Functions/enterDir.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::time::Duration; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `fileType` should have an upper camel case name [INFO] [stdout] --> src/Functions/enterDir.rs:10:6 [INFO] [stdout] | [INFO] [stdout] 10 | enum fileType { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to upper camel case (notice the capitalization): `FileType` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::Functions::compressBuffer::compressBuffer` [INFO] [stdout] --> src/Functions/decodeFile.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::Functions::compressBuffer::compressBuffer; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::Read` [INFO] [stdout] --> src/Functions/decodeFile.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::io::Read; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/Functions/enterDir.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | let mut paths = fs::read_dir(pathDir.clone()).unwrap(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/Functions/enterDir.rs:18:13 [INFO] [stdout] | [INFO] [stdout] 18 | let mut fileName = path.as_ref().unwrap().clone().file_name().into_string().unwrap(); [INFO] [stdout] | ----^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dirDelimiter` [INFO] [stdout] --> src/Functions/encodeFile.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | let dirDelimiter = if path == "" {""} else {"/"}; [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_dirDelimiter` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `fileName` [INFO] [stdout] --> src/Functions/encodeFile.rs:19:55 [INFO] [stdout] | [INFO] [stdout] 19 | pub fn encodeFile(path: String, mergeFile: &mut File, fileName: String, compress: CompressionLvl) { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_fileName` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/Functions/encodeFile.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | let mut encodedCompressedBuffer = base64::encode(compressedBuffer); [INFO] [stdout] | ----^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `compress` [INFO] [stdout] --> src/main.rs:53:8 [INFO] [stdout] | [INFO] [stdout] 53 | let compress = matches.is_present("compress"); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_compress` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `fileType` is never used [INFO] [stdout] --> src/Functions/enterDir.rs:10:6 [INFO] [stdout] | [INFO] [stdout] 10 | enum fileType { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `StringUtils` is never used [INFO] [stdout] --> src/Functions/encodeFile.rs:9:7 [INFO] [stdout] | [INFO] [stdout] 9 | trait StringUtils { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `Functions` should have a snake case name [INFO] [stdout] --> src/main.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | mod Functions; [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `functions` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `compressionLevel` should have a snake case name [INFO] [stdout] --> src/main.rs:81:11 [INFO] [stdout] | [INFO] [stdout] 81 | let compressionLevel = CompressionLvl::best(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `compression_level` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `tempPath` should have a snake case name [INFO] [stdout] --> src/main.rs:86:11 [INFO] [stdout] | [INFO] [stdout] 86 | let tempPath = "protected.crypt"; [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `temp_path` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `enterDir` should have a snake case name [INFO] [stdout] --> src/Functions/mod.rs:1:9 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod enterDir; [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `enter_dir` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `compressBuffer` should have a snake case name [INFO] [stdout] --> src/Functions/mod.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 2 | pub mod compressBuffer; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: convert the identifier to snake case: `compress_buffer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `decompressBuffer` should have a snake case name [INFO] [stdout] --> src/Functions/mod.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | pub mod decompressBuffer; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `decompress_buffer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `encodeFile` should have a snake case name [INFO] [stdout] --> src/Functions/mod.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | pub mod encodeFile; [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `encode_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `decodeFile` should have a snake case name [INFO] [stdout] --> src/Functions/mod.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | pub mod decodeFile; [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `decode_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `enterDir` should have a snake case name [INFO] [stdout] --> src/Functions/enterDir.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 15 | pub fn enterDir(pathDir: String, mergeFile: &mut File, compress: CompressionLvl, depth: i32, mode: Mode) { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `enter_dir` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `pathDir` should have a snake case name [INFO] [stdout] --> src/Functions/enterDir.rs:15:17 [INFO] [stdout] | [INFO] [stdout] 15 | pub fn enterDir(pathDir: String, mergeFile: &mut File, compress: CompressionLvl, depth: i32, mode: Mode) { [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case: `path_dir` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `mergeFile` should have a snake case name [INFO] [stdout] --> src/Functions/enterDir.rs:15:34 [INFO] [stdout] | [INFO] [stdout] 15 | pub fn enterDir(pathDir: String, mergeFile: &mut File, compress: CompressionLvl, depth: i32, mode: Mode) { [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `merge_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/Functions/enterDir.rs:18:50 [INFO] [stdout] | [INFO] [stdout] 18 | let mut fileName = path.as_ref().unwrap().clone().file_name().into_string().unwrap(); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type `DirEntry` does not implement `Clone`, so calling `clone` on `&DirEntry` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] 18 - let mut fileName = path.as_ref().unwrap().clone().file_name().into_string().unwrap(); [INFO] [stdout] 18 + let mut fileName = path.as_ref().unwrap().file_name().into_string().unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `fileName` should have a snake case name [INFO] [stdout] --> src/Functions/enterDir.rs:18:17 [INFO] [stdout] | [INFO] [stdout] 18 | let mut fileName = path.as_ref().unwrap().clone().file_name().into_string().unwrap(); [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `file_name` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/Functions/enterDir.rs:19:44 [INFO] [stdout] | [INFO] [stdout] 19 | let isFile = path.as_ref().unwrap().clone().file_type().unwrap().is_file(); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type `DirEntry` does not implement `Clone`, so calling `clone` on `&DirEntry` copies the reference, which does not do anything and can be removed [INFO] [stdout] help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] 19 - let isFile = path.as_ref().unwrap().clone().file_type().unwrap().is_file(); [INFO] [stdout] 19 + let isFile = path.as_ref().unwrap().file_type().unwrap().is_file(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `isFile` should have a snake case name [INFO] [stdout] --> src/Functions/enterDir.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | let isFile = path.as_ref().unwrap().clone().file_type().unwrap().is_file(); [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case: `is_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/Functions/enterDir.rs:20:43 [INFO] [stdout] | [INFO] [stdout] 20 | let isDir = path.as_ref().unwrap().clone().file_type().unwrap().is_dir(); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type `DirEntry` does not implement `Clone`, so calling `clone` on `&DirEntry` copies the reference, which does not do anything and can be removed [INFO] [stdout] help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] 20 - let isDir = path.as_ref().unwrap().clone().file_type().unwrap().is_dir(); [INFO] [stdout] 20 + let isDir = path.as_ref().unwrap().file_type().unwrap().is_dir(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `isDir` should have a snake case name [INFO] [stdout] --> src/Functions/enterDir.rs:20:13 [INFO] [stdout] | [INFO] [stdout] 20 | let isDir = path.as_ref().unwrap().clone().file_type().unwrap().is_dir(); [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case: `is_dir` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/Functions/enterDir.rs:33:13 [INFO] [stdout] | [INFO] [stdout] 33 | fs::remove_dir(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)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 33 | let _ = fs::remove_dir(path); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `compressBuffer` should have a snake case name [INFO] [stdout] --> src/Functions/compressBuffer.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn compressBuffer(bytes: Vec, compLevel: CompressionLvl) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: convert the identifier to snake case: `compress_buffer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `compLevel` should have a snake case name [INFO] [stdout] --> src/Functions/compressBuffer.rs:3:39 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn compressBuffer(bytes: Vec, compLevel: CompressionLvl) -> Vec { [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `comp_level` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `decompressBuffer` should have a snake case name [INFO] [stdout] --> src/Functions/decompressBuffer.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn decompressBuffer(bytes: Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `decompress_buffer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `encodeFile` should have a snake case name [INFO] [stdout] --> src/Functions/encodeFile.rs:19:8 [INFO] [stdout] | [INFO] [stdout] 19 | pub fn encodeFile(path: String, mergeFile: &mut File, fileName: String, compress: CompressionLvl) { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `encode_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `mergeFile` should have a snake case name [INFO] [stdout] --> src/Functions/encodeFile.rs:19:33 [INFO] [stdout] | [INFO] [stdout] 19 | pub fn encodeFile(path: String, mergeFile: &mut File, fileName: String, compress: CompressionLvl) { [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `merge_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `fileName` should have a snake case name [INFO] [stdout] --> src/Functions/encodeFile.rs:19:55 [INFO] [stdout] | [INFO] [stdout] 19 | pub fn encodeFile(path: String, mergeFile: &mut File, fileName: String, compress: CompressionLvl) { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `file_name` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `dataBuffer` should have a snake case name [INFO] [stdout] --> src/Functions/encodeFile.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | let mut dataBuffer = fs::read(&path).unwrap(); [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `data_buffer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `dirDelimiter` should have a snake case name [INFO] [stdout] --> src/Functions/encodeFile.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | let dirDelimiter = if path == "" {""} else {"/"}; [INFO] [stdout] | ^^^^^^^^^^^^ help: convert the identifier to snake case: `dir_delimiter` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `compressedBuffer` should have a snake case name [INFO] [stdout] --> src/Functions/encodeFile.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | let compressedBuffer = compressBuffer(dataBuffer.clone(), compress); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `compressed_buffer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `encodedCompressedBuffer` should have a snake case name [INFO] [stdout] --> src/Functions/encodeFile.rs:33:13 [INFO] [stdout] | [INFO] [stdout] 33 | let mut encodedCompressedBuffer = base64::encode(compressedBuffer); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `encoded_compressed_buffer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/Functions/encodeFile.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | mergeFile.write_all(format!("{},", encodedCompressedBuffer).as_ref()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 36 | let _ = mergeFile.write_all(format!("{},", encodedCompressedBuffer).as_ref()); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `decodeFile` should have a snake case name [INFO] [stdout] --> src/Functions/decodeFile.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn decodeFile(path: String) { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `decode_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `fileString` should have a snake case name [INFO] [stdout] --> src/Functions/decodeFile.rs:9:13 [INFO] [stdout] | [INFO] [stdout] 9 | let mut fileString = fs::read_to_string(&path).unwrap(); [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `file_string` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `encodedFiles` should have a snake case name [INFO] [stdout] --> src/Functions/decodeFile.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | let encodedFiles = fileString.split(","); [INFO] [stdout] | ^^^^^^^^^^^^ help: convert the identifier to snake case: `encoded_files` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `encodedFile` should have a snake case name [INFO] [stdout] --> src/Functions/decodeFile.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | for encodedFile in encodedFiles { [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to snake case: `encoded_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `encodedFileBytes` should have a snake case name [INFO] [stdout] --> src/Functions/decodeFile.rs:20:13 [INFO] [stdout] | [INFO] [stdout] 20 | let encodedFileBytes = encodedFile.as_bytes(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `encoded_file_bytes` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `compressedBuffer` should have a snake case name [INFO] [stdout] --> src/Functions/decodeFile.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | let compressedBuffer = base64::decode(&encodedFileBytes).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `compressed_buffer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `dataBuffer` should have a snake case name [INFO] [stdout] --> src/Functions/decodeFile.rs:26:17 [INFO] [stdout] | [INFO] [stdout] 26 | let mut dataBuffer = decompressBuffer(compressedBuffer); [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `data_buffer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `indexOfComma` should have a snake case name [INFO] [stdout] --> src/Functions/decodeFile.rs:29:13 [INFO] [stdout] | [INFO] [stdout] 29 | let indexOfComma = dataBuffer.iter().rposition(|r| r == &b',').unwrap()+1; [INFO] [stdout] | ^^^^^^^^^^^^ help: convert the identifier to snake case: `index_of_comma` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `filePath` should have a snake case name [INFO] [stdout] --> src/Functions/decodeFile.rs:30:13 [INFO] [stdout] | [INFO] [stdout] 30 | let filePath = &dataBuffer.clone()[indexOfComma..dataBuffer.len()]; [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `file_path` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `fileNameDelimiterIndex` should have a snake case name [INFO] [stdout] --> src/Functions/decodeFile.rs:31:13 [INFO] [stdout] | [INFO] [stdout] 31 | let fileNameDelimiterIndex = filePath.iter().rposition(|r| r == &b'/').unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `file_name_delimiter_index` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/Functions/decodeFile.rs:32:72 [INFO] [stdout] | [INFO] [stdout] 32 | let filePathWithoutName = String::from_utf8(Vec::from(&filePath.clone()[0..fileNameDelimiterIndex])).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `[u8]` does not implement `Clone`, so calling `clone` on `&[u8]` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `filePathWithoutName` should have a snake case name [INFO] [stdout] --> src/Functions/decodeFile.rs:32:13 [INFO] [stdout] | [INFO] [stdout] 32 | let filePathWithoutName = String::from_utf8(Vec::from(&filePath.clone()[0..fileNameDelimiterIndex])).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `file_path_without_name` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `strPath` should have a snake case name [INFO] [stdout] --> src/Functions/decodeFile.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | let strPath = std::str::from_utf8(filePath).unwrap(); [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case: `str_path` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/Functions/decodeFile.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | fs::create_dir_all(filePathWithoutName); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 43 | let _ = fs::create_dir_all(filePathWithoutName); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/Functions/decodeFile.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | fs::write(strPath, dataBuffer); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 46 | let _ = fs::write(strPath, dataBuffer); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.16s [INFO] running `Command { std: "docker" "inspect" "a699244f88f9827b906fa85ec39ac7e0072a3e95ad44fe7e2fef540326f00396", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a699244f88f9827b906fa85ec39ac7e0072a3e95ad44fe7e2fef540326f00396", kill_on_drop: false }` [INFO] [stdout] a699244f88f9827b906fa85ec39ac7e0072a3e95ad44fe7e2fef540326f00396