[INFO] cloning repository https://github.com/jd-opensource/oss_pipe [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/jd-opensource/oss_pipe" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjd-opensource%2Foss_pipe", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjd-opensource%2Foss_pipe'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 199fa496a6fa65403047492a217ffd53e9cb8d20 [INFO] linting jd-opensource/oss_pipe against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjd-opensource%2Foss_pipe" "/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/jd-opensource/oss_pipe [INFO] removed 2 missing examples [INFO] finished tweaking git repo https://github.com/jd-opensource/oss_pipe [INFO] tweaked toml for git repo https://github.com/jd-opensource/oss_pipe written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/jd-opensource/oss_pipe 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/jd-opensource/oss_pipe already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded shellwords v1.1.0 [INFO] [stderr] Downloaded log4rs v1.3.0 [INFO] [stderr] Downloaded rs-snowflake v0.6.0 [INFO] [stderr] Downloaded rustyline-derive v0.11.1 [INFO] [stderr] Downloaded notify v8.1.0 [INFO] [stderr] Downloaded rfc6979 v0.3.1 [INFO] [stderr] Downloaded crc32c v0.6.8 [INFO] [stderr] Downloaded unsafe-any-ors v1.0.0 [INFO] [stderr] Downloaded aws-smithy-checksums v0.60.13 [INFO] [stderr] Downloaded typemap-ors v1.0.0 [INFO] [stderr] Downloaded thread-id v4.2.2 [INFO] [stderr] Downloaded destructure_traitobject v0.2.0 [INFO] [stderr] Downloaded ecdsa v0.14.8 [INFO] [stderr] Downloaded log-mdc v0.1.0 [INFO] [stderr] Downloaded io-uring v0.7.8 [INFO] [stderr] Downloaded aws-smithy-eventstream v0.60.9 [INFO] [stderr] Downloaded aws-runtime v1.5.9 [INFO] [stderr] Downloaded aws-sdk-sso v1.75.0 [INFO] [stderr] Downloaded p256 v0.11.1 [INFO] [stderr] Downloaded aws-sdk-ssooidc v1.76.0 [INFO] [stderr] Downloaded aws-config v1.8.2 [INFO] [stderr] Downloaded governor v0.10.0 [INFO] [stderr] Downloaded aws-sdk-sts v1.77.0 [INFO] [stderr] Downloaded aws-lc-rs v1.13.2 [INFO] [stderr] Downloaded h2 v0.4.11 [INFO] [stderr] Downloaded hyper-util v0.1.15 [INFO] [stderr] Downloaded aws-smithy-runtime v1.8.4 [INFO] [stderr] Downloaded rustyline v16.0.0 [INFO] [stderr] Downloaded rustls-webpki v0.103.4 [INFO] [stderr] Downloaded aws-smithy-runtime-api v1.8.3 [INFO] [stderr] Downloaded aws-smithy-http v0.60.12 [INFO] [stderr] Downloaded rustc-serialize v0.3.25 [INFO] [stderr] Downloaded rustls v0.23.29 [INFO] [stderr] Downloaded tokio v1.46.1 [INFO] [stderr] Downloaded aws-sdk-s3 v1.68.0 [INFO] [stderr] Downloaded aws-lc-sys v0.30.0 [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] 3e7cf0608dbac1053786fe79da3de4214f6123962a6470960b3c0d360b5c5906 [INFO] running `Command { std: "docker" "start" "-a" "3e7cf0608dbac1053786fe79da3de4214f6123962a6470960b3c0d360b5c5906", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "3e7cf0608dbac1053786fe79da3de4214f6123962a6470960b3c0d360b5c5906", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "3e7cf0608dbac1053786fe79da3de4214f6123962a6470960b3c0d360b5c5906", kill_on_drop: false }` [INFO] [stdout] 3e7cf0608dbac1053786fe79da3de4214f6123962a6470960b3c0d360b5c5906 [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] 9ab0bd9299d0bfd6de86d3fd0308ce1fdb36a8056bf94603972cabcd15a87046 [INFO] running `Command { std: "docker" "start" "-a" "9ab0bd9299d0bfd6de86d3fd0308ce1fdb36a8056bf94603972cabcd15a87046", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.174 [INFO] [stderr] Compiling serde v1.0.219 [INFO] [stderr] Checking zeroize v1.8.1 [INFO] [stderr] Checking tracing-core v0.1.34 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Checking either v1.15.0 [INFO] [stderr] Checking time v0.3.41 [INFO] [stderr] Checking vsimd v0.8.0 [INFO] [stderr] Compiling jobserver v0.1.33 [INFO] [stderr] Checking tracing v0.1.41 [INFO] [stderr] Compiling cc v1.2.29 [INFO] [stderr] Checking outref v0.5.2 [INFO] [stderr] Checking bytes-utils v0.1.4 [INFO] [stderr] Checking base64-simd v0.8.0 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking crypto-common v0.1.6 [INFO] [stderr] Compiling semver v1.0.26 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Compiling aws-lc-rs v1.13.2 [INFO] [stderr] Checking der v0.6.1 [INFO] [stderr] Checking rustls-pki-types v1.12.0 [INFO] [stderr] Compiling rustc_version v0.4.1 [INFO] [stderr] Checking base64ct v1.8.0 [INFO] [stderr] Compiling getrandom v0.3.3 [INFO] [stderr] Compiling rustls v0.23.29 [INFO] [stderr] Compiling rustls v0.21.12 [INFO] [stderr] Checking base16ct v0.1.1 [INFO] [stderr] Checking crc32fast v1.5.0 [INFO] [stderr] Checking hmac v0.12.1 [INFO] [stderr] Checking rustls-native-certs v0.6.3 [INFO] [stderr] Checking sha2 v0.10.9 [INFO] [stderr] Compiling cmake v0.1.54 [INFO] [stderr] Checking rustls-native-certs v0.8.1 [INFO] [stderr] Checking tower v0.5.2 [INFO] [stderr] Compiling aws-types v1.3.7 [INFO] [stderr] Checking unicode-width v0.2.1 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Checking spki v0.6.0 [INFO] [stderr] Checking parking_lot_core v0.9.11 [INFO] [stderr] Checking socket2 v0.5.10 [INFO] [stderr] Checking signal-hook-registry v1.4.5 [INFO] [stderr] Checking getrandom v0.2.16 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking pkcs8 v0.9.0 [INFO] [stderr] Checking parking_lot v0.12.4 [INFO] [stderr] Checking sec1 v0.3.0 [INFO] [stderr] Compiling aws-lc-sys v0.30.0 [INFO] [stderr] Compiling ring v0.17.14 [INFO] [stderr] Checking crypto-bigint v0.4.9 [INFO] [stderr] Checking ff v0.12.1 [INFO] [stderr] Checking group v0.12.1 [INFO] [stderr] Checking signature v1.6.4 [INFO] [stderr] Checking crypto-bigint v0.5.5 [INFO] [stderr] Checking uuid v1.17.0 [INFO] [stderr] Checking utf8parse v0.2.2 [INFO] [stderr] Checking elliptic-curve v0.12.3 [INFO] [stderr] Checking rfc6979 v0.3.1 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Compiling crc32c v0.6.8 [INFO] [stderr] Checking log v0.4.27 [INFO] [stderr] Checking mio v1.0.4 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling portable-atomic v1.11.1 [INFO] [stderr] Checking ecdsa v0.14.8 [INFO] [stderr] Checking tokio v1.46.1 [INFO] [stderr] Checking xmlparser v0.13.6 [INFO] [stderr] Compiling nix v0.30.1 [INFO] [stderr] Checking p256 v0.11.1 [INFO] [stderr] Checking serde_json v1.0.140 [INFO] [stderr] Checking anstyle-parse v0.2.7 [INFO] [stderr] Checking aws-smithy-xml v0.60.10 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking crossbeam-epoch v0.9.18 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling proc-macro-error-attr2 v2.0.0 [INFO] [stderr] Checking destructure_traitobject v0.2.0 [INFO] [stderr] Compiling rayon-core v1.12.1 [INFO] [stderr] Checking anstyle-query v1.1.3 [INFO] [stderr] Checking anstyle v1.0.11 [INFO] [stderr] Checking urlencoding v2.1.3 [INFO] [stderr] Checking is_terminal_polyfill v1.70.1 [INFO] [stderr] Checking colorchoice v1.0.4 [INFO] [stderr] Compiling gcc v0.3.55 [INFO] [stderr] Compiling proc-macro-error2 v2.0.1 [INFO] [stderr] Checking anstream v0.6.19 [INFO] [stderr] Checking unsafe-any-ors v1.0.0 [INFO] [stderr] Checking rustix v1.0.8 [INFO] [stderr] Checking crossbeam-deque v0.8.6 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Compiling rust-crypto v0.2.36 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking tracing-log v0.2.0 [INFO] [stderr] Checking tracing-serde v0.2.0 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.4.6 [INFO] [stderr] Checking inotify-sys v0.1.5 [INFO] [stderr] Checking raw-cpuid v11.5.0 [INFO] [stderr] Checking sha1 v0.10.6 [INFO] [stderr] Checking md-5 v0.10.6 [INFO] [stderr] Checking ordered-float v2.10.1 [INFO] [stderr] Checking nibble_vec v0.1.0 [INFO] [stderr] Checking thread_local v1.1.9 [INFO] [stderr] Checking bytecount v0.6.9 [INFO] [stderr] Compiling rust_decimal v1.37.2 [INFO] [stderr] Checking clap_lex v0.7.5 [INFO] [stderr] Checking endian-type v0.1.2 [INFO] [stderr] Checking strsim v0.11.1 [INFO] [stderr] Checking fd-lock v4.0.4 [INFO] [stderr] Checking radix_trie v0.2.1 [INFO] [stderr] Checking clap_builder v4.5.41 [INFO] [stderr] Checking papergrid v0.17.0 [INFO] [stderr] Checking serde-value v0.7.0 [INFO] [stderr] Checking serde_yaml v0.9.34+deprecated [INFO] [stderr] Checking quanta v0.12.6 [INFO] [stderr] Checking sct v0.7.1 [INFO] [stderr] Checking rustls-webpki v0.101.7 [INFO] [stderr] Checking dashmap v6.1.0 [INFO] [stderr] Checking chrono v0.4.41 [INFO] [stderr] Compiling tabled_derive v0.11.0 [INFO] [stderr] Checking tracing-subscriber v0.3.19 [INFO] [stderr] Checking tokio-util v0.7.18 [INFO] [stderr] Checking aws-smithy-async v1.2.5 [INFO] [stderr] Checking aws-smithy-types v1.3.2 [INFO] [stderr] Checking h2 v0.4.11 [INFO] [stderr] Checking h2 v0.3.27 [INFO] [stderr] Compiling derivative v2.2.0 [INFO] [stderr] Checking tokio-rustls v0.24.1 [INFO] [stderr] Checking rand v0.3.23 [INFO] [stderr] Checking aws-smithy-runtime-api v1.8.3 [INFO] [stderr] Checking aws-smithy-eventstream v0.60.9 [INFO] [stderr] Checking aws-smithy-json v0.61.4 [INFO] [stderr] Checking aws-smithy-query v0.60.7 [INFO] [stderr] Checking inotify v0.11.0 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking rand v0.9.1 [INFO] [stderr] Checking aws-credential-types v1.2.3 [INFO] [stderr] Checking aws-smithy-http v0.62.1 [INFO] [stderr] Checking aws-smithy-observability v0.1.3 [INFO] [stderr] Checking aws-smithy-http v0.60.12 [INFO] [stderr] Checking aws-sigv4 v1.3.3 [INFO] [stderr] Checking typemap-ors v1.0.0 [INFO] [stderr] Checking futures-executor v0.3.31 [INFO] [stderr] Checking console v0.15.11 [INFO] [stderr] Checking aws-smithy-checksums v0.60.13 [INFO] [stderr] Checking hyper v0.14.32 [INFO] [stderr] Checking testing_table v0.3.0 [INFO] [stderr] Checking time v0.1.45 [INFO] [stderr] Checking thread-id v4.2.2 [INFO] [stderr] Checking lru v0.12.5 [INFO] [stderr] Checking hyper v1.6.0 [INFO] [stderr] Checking spinning_top v0.3.0 [INFO] [stderr] Checking rustc-serialize v0.3.25 [INFO] [stderr] Checking humantime v2.2.0 [INFO] [stderr] Checking unicode-segmentation v1.12.0 [INFO] [stderr] Checking home v0.5.11 [INFO] [stderr] Checking notify-types v2.0.0 [INFO] [stderr] Checking log-mdc v0.1.0 [INFO] [stderr] Checking number_prefix v0.4.0 [INFO] [stderr] Checking arc-swap v1.7.1 [INFO] [stderr] Checking arrayvec v0.7.6 [INFO] [stderr] Checking nonzero_ext v0.3.0 [INFO] [stderr] Checking governor v0.10.0 [INFO] [stderr] Checking log4rs v1.3.0 [INFO] [stderr] Checking rustyline v16.0.0 [INFO] [stderr] Checking indicatif v0.17.11 [INFO] [stderr] Checking notify v8.1.0 [INFO] [stderr] Checking hyper-util v0.1.15 [INFO] [stderr] Checking tracing-appender v0.2.3 [INFO] [stderr] Checking tabled v0.20.0 [INFO] [stderr] Checking futures v0.3.31 [INFO] [stderr] Checking rayon v1.10.0 [INFO] [stderr] Checking clap v4.5.41 [INFO] [stderr] Checking shellwords v1.1.0 [INFO] [stderr] Checking sysinfo v0.35.2 [INFO] [stderr] Checking num_cpus v1.17.0 [INFO] [stderr] Compiling async-trait v0.1.88 [INFO] [stderr] Compiling rustyline-derive v0.11.1 [INFO] [stderr] Checking rs-snowflake v0.6.0 [INFO] [stderr] Checking termtree v0.5.1 [INFO] [stderr] Checking hyper-rustls v0.24.2 [INFO] [stderr] Checking rustls-webpki v0.103.4 [INFO] [stderr] Checking tokio-rustls v0.26.2 [INFO] [stderr] Checking hyper-rustls v0.27.7 [INFO] [stderr] Checking aws-smithy-http-client v1.0.6 [INFO] [stderr] Checking aws-smithy-runtime v1.8.4 [INFO] [stderr] Checking aws-runtime v1.5.9 [INFO] [stderr] Checking aws-sdk-sts v1.77.0 [INFO] [stderr] Checking aws-sdk-ssooidc v1.76.0 [INFO] [stderr] Checking aws-sdk-sso v1.75.0 [INFO] [stderr] Checking aws-sdk-s3 v1.68.0 [INFO] [stderr] Checking aws-config v1.8.2 [INFO] [stderr] Checking oss-pipe v0.2.2 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `self` [INFO] [stdout] --> src/commons/notify_utile.rs:482:14 [INFO] [stdout] | [INFO] [stdout] 482 | fs::{self, OpenOptions}, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::tasks::gen_file_path` [INFO] [stdout] --> src/commons/notify_utile.rs:489:9 [INFO] [stdout] | [INFO] [stdout] 489 | use crate::tasks::gen_file_path; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `self` [INFO] [stdout] --> src/commons/notify_utile.rs:494:16 [INFO] [stdout] | [INFO] [stdout] 494 | task::{self, JoinSet}, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/configure/config_error.rs:34:13 [INFO] [stdout] | [INFO] [stdout] 34 | error_type: error_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `error_type` [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/configure/config_error.rs:43:13 [INFO] [stdout] | [INFO] [stdout] 43 | error_type: error_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `error_type` [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: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/cmd_consts.rs:1:22 [INFO] [stdout] | [INFO] [stdout] 1 | pub const APP_NAME: &'static str = "oss_pipe"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:2:35 [INFO] [stdout] | [INFO] [stdout] 2 | pub const OBJECTS_SEQUENCE_FILE: &'static str = "list_files/list_files_sequence"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:5:37 [INFO] [stdout] | [INFO] [stdout] 5 | pub const OBJECT_LIST_FILE_PREFIX: &'static str = "list_files/objects_list_"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:8:52 [INFO] [stdout] | [INFO] [stdout] 8 | pub const COMPARE_SOURCE_OBJECT_LIST_FILE_PREFIX: &'static str = "compare_source_list_"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:11:39 [INFO] [stdout] | [INFO] [stdout] 11 | pub const TRANSFER_CHECK_POINT_FILE: &'static str = "checkpoint_transfer.yml"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:14:38 [INFO] [stdout] | [INFO] [stdout] 14 | pub const COMPARE_CHECK_POINT_FILE: &'static str = "checkpoint_compare.yml"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:17:42 [INFO] [stdout] | [INFO] [stdout] 17 | pub const MANUAL_LIST_CHECK_POINT_FILE: &'static str = "checkpoint_manual_list_transfer.yml"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:20:42 [INFO] [stdout] | [INFO] [stdout] 20 | pub const TRANSFER_ERROR_RECORD_PREFIX: &'static str = "error_records/transfer_error_record_"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:23:35 [INFO] [stdout] | [INFO] [stdout] 23 | pub const COMPARE_RESULT_PREFIX: &'static str = "compare_results/compare_result_"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:26:27 [INFO] [stdout] | [INFO] [stdout] 26 | pub const OFFSET_PREFIX: &'static str = "offset_"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:29:32 [INFO] [stdout] | [INFO] [stdout] 29 | pub const NOTIFY_FILE_PREFIX: &'static str = "notify_"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:31:34 [INFO] [stdout] | [INFO] [stdout] 31 | pub const NOTIFY_SEQUENCE_FILE: &'static str = "notify/sequence"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:32:33 [INFO] [stdout] | [INFO] [stdout] 32 | pub const NOTIFY_FILES_PREFIX: &'static str = "notify/notify_"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:35:28 [INFO] [stdout] | [INFO] [stdout] 35 | pub const REMOVED_PREFIX: &'static str = "increment/removed_"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:38:29 [INFO] [stdout] | [INFO] [stdout] 38 | pub const MODIFIED_PREFIX: &'static str = "increment/modified_"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:41:39 [INFO] [stdout] | [INFO] [stdout] 41 | pub const DOWNLOAD_TMP_FILE_SUBFFIX: &'static str = ".filling_tmp"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/configure/config_error.rs:34:13 [INFO] [stdout] | [INFO] [stdout] 34 | error_type: error_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `error_type` [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/configure/config_error.rs:43:13 [INFO] [stdout] | [INFO] [stdout] 43 | error_type: error_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `error_type` [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: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/cmd_consts.rs:1:22 [INFO] [stdout] | [INFO] [stdout] 1 | pub const APP_NAME: &'static str = "oss_pipe"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:2:35 [INFO] [stdout] | [INFO] [stdout] 2 | pub const OBJECTS_SEQUENCE_FILE: &'static str = "list_files/list_files_sequence"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:5:37 [INFO] [stdout] | [INFO] [stdout] 5 | pub const OBJECT_LIST_FILE_PREFIX: &'static str = "list_files/objects_list_"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:8:52 [INFO] [stdout] | [INFO] [stdout] 8 | pub const COMPARE_SOURCE_OBJECT_LIST_FILE_PREFIX: &'static str = "compare_source_list_"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:11:39 [INFO] [stdout] | [INFO] [stdout] 11 | pub const TRANSFER_CHECK_POINT_FILE: &'static str = "checkpoint_transfer.yml"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:14:38 [INFO] [stdout] | [INFO] [stdout] 14 | pub const COMPARE_CHECK_POINT_FILE: &'static str = "checkpoint_compare.yml"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:17:42 [INFO] [stdout] | [INFO] [stdout] 17 | pub const MANUAL_LIST_CHECK_POINT_FILE: &'static str = "checkpoint_manual_list_transfer.yml"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:20:42 [INFO] [stdout] | [INFO] [stdout] 20 | pub const TRANSFER_ERROR_RECORD_PREFIX: &'static str = "error_records/transfer_error_record_"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:23:35 [INFO] [stdout] | [INFO] [stdout] 23 | pub const COMPARE_RESULT_PREFIX: &'static str = "compare_results/compare_result_"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:26:27 [INFO] [stdout] | [INFO] [stdout] 26 | pub const OFFSET_PREFIX: &'static str = "offset_"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:29:32 [INFO] [stdout] | [INFO] [stdout] 29 | pub const NOTIFY_FILE_PREFIX: &'static str = "notify_"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:31:34 [INFO] [stdout] | [INFO] [stdout] 31 | pub const NOTIFY_SEQUENCE_FILE: &'static str = "notify/sequence"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:32:33 [INFO] [stdout] | [INFO] [stdout] 32 | pub const NOTIFY_FILES_PREFIX: &'static str = "notify/notify_"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:35:28 [INFO] [stdout] | [INFO] [stdout] 35 | pub const REMOVED_PREFIX: &'static str = "increment/removed_"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:38:29 [INFO] [stdout] | [INFO] [stdout] 38 | pub const MODIFIED_PREFIX: &'static str = "increment/modified_"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/consts/task_consts.rs:41:39 [INFO] [stdout] | [INFO] [stdout] 41 | pub const DOWNLOAD_TMP_FILE_SUBFFIX: &'static str = ".filling_tmp"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `TimeoutConfigBuilder` [INFO] [stdout] --> src/s3/oss.rs:8:30 [INFO] [stdout] | [INFO] [stdout] 8 | timeout::{TimeoutConfig, TimeoutConfigBuilder}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `TimeoutConfigBuilder` [INFO] [stdout] --> src/s3/oss.rs:8:30 [INFO] [stdout] | [INFO] [stdout] 8 | timeout::{TimeoutConfig, TimeoutConfigBuilder}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/tasks/log_info.rs:3:34 [INFO] [stdout] | [INFO] [stdout] 3 | pub const MSG_TASK_EXECUTED_OK: &'static str = "task executed ok"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/tasks/log_info.rs:4:37 [INFO] [stdout] | [INFO] [stdout] 4 | pub const MSG_TRANSFER_TASK_START: &'static str = "Transfer task start"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/tasks/task_pre_check.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | / /// 校验项包括,源、目标是否存在,及是否有相应权限 [INFO] [stdout] 8 | | [INFO] [stdout] | |_^ [INFO] [stdout] 9 | impl ObjectStorage { [INFO] [stdout] | - the comment documents this implementation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:89:9 [INFO] [stdout] | [INFO] [stdout] 89 | / /// ToDo 重构任务执行结构 [INFO] [stdout] 90 | | /// 三个阶段init、stock、increment [INFO] [stdout] 91 | | /// 1. init 阶段:初始化任务,检查任务状态,恢复任务进度,创建任务检查点文件 [INFO] [stdout] 92 | | /// 2. stock 阶段:存量数据迁移,迁移存量数据,迁移完成后,更新任务检查点文件 [INFO] [stdout] 93 | | /// 3. increment 阶段:增量数据迁移,迁移增量数据,迁移完成后,更新任务检查点文件 [INFO] [stdout] | |_________________________________________________________________________________________^ [INFO] [stdout] 94 | // sys_set 用于执行checkpoint、notify等辅助任务 [INFO] [stdout] 95 | let mut sys_set = JoinSet::new(); [INFO] [stdout] | --------------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `//` for a plain comment [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/tasks/log_info.rs:3:34 [INFO] [stdout] | [INFO] [stdout] 3 | pub const MSG_TASK_EXECUTED_OK: &'static str = "task executed ok"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/tasks/log_info.rs:4:37 [INFO] [stdout] | [INFO] [stdout] 4 | pub const MSG_TRANSFER_TASK_START: &'static str = "Transfer task start"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/tasks/task_pre_check.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | / /// 校验项包括,源、目标是否存在,及是否有相应权限 [INFO] [stdout] 8 | | [INFO] [stdout] | |_^ [INFO] [stdout] 9 | impl ObjectStorage { [INFO] [stdout] | - the comment documents this implementation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:89:9 [INFO] [stdout] | [INFO] [stdout] 89 | / /// ToDo 重构任务执行结构 [INFO] [stdout] 90 | | /// 三个阶段init、stock、increment [INFO] [stdout] 91 | | /// 1. init 阶段:初始化任务,检查任务状态,恢复任务进度,创建任务检查点文件 [INFO] [stdout] 92 | | /// 2. stock 阶段:存量数据迁移,迁移存量数据,迁移完成后,更新任务检查点文件 [INFO] [stdout] 93 | | /// 3. increment 阶段:增量数据迁移,迁移增量数据,迁移完成后,更新任务检查点文件 [INFO] [stdout] | |_________________________________________________________________________________________^ [INFO] [stdout] 94 | // sys_set 用于执行checkpoint、notify等辅助任务 [INFO] [stdout] 95 | let mut sys_set = JoinSet::new(); [INFO] [stdout] | --------------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `//` for a plain comment [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/commons/notify_utile.rs:362:33 [INFO] [stdout] | [INFO] [stdout] 362 | pub async fn watch_to_files(mut self, meta_dir: &str, file_max_lines: usize) -> Result<()> { [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/commons/notify_utile.rs:362:33 [INFO] [stdout] | [INFO] [stdout] 362 | pub async fn watch_to_files(mut self, meta_dir: &str, file_max_lines: usize) -> Result<()> { [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `semaphore` [INFO] [stdout] --> src/tasks/compare/compare_local2local.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | semaphore: Arc, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_semaphore` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `semaphore` [INFO] [stdout] --> src/tasks/compare/compare_local2oss.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | semaphore: Arc, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_semaphore` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `semaphore` [INFO] [stdout] --> src/tasks/compare/compare_oss2local.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | semaphore: Arc, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_semaphore` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `semaphore` [INFO] [stdout] --> src/tasks/compare/compare_oss2oss.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | semaphore: Arc, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_semaphore` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `semaphore` [INFO] [stdout] --> src/tasks/compare/compare_local2local.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | semaphore: Arc, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_semaphore` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `list_file_position` is assigned to, but never used [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:709:17 [INFO] [stdout] | [INFO] [stdout] 709 | let mut list_file_position = FilePosition::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_list_file_position` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `list_file_position` is never read [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:742:21 [INFO] [stdout] | [INFO] [stdout] 742 | list_file_position.offset += len; [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: value assigned to `list_file_position` is never read [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:743:21 [INFO] [stdout] | [INFO] [stdout] 743 | list_file_position.line_num += 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `semaphore` [INFO] [stdout] --> src/tasks/compare/compare_local2oss.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | semaphore: Arc, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_semaphore` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `semaphore` [INFO] [stdout] --> src/tasks/compare/compare_oss2local.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | semaphore: Arc, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_semaphore` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `list_file_position` is assigned to, but never used [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:538:17 [INFO] [stdout] | [INFO] [stdout] 538 | let mut list_file_position = FilePosition::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_list_file_position` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `list_file_position` is never read [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:553:21 [INFO] [stdout] | [INFO] [stdout] 553 | list_file_position.offset += len; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `list_file_position` is never read [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:554:21 [INFO] [stdout] | [INFO] [stdout] 554 | list_file_position.line_num += 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `semaphore` [INFO] [stdout] --> src/tasks/compare/compare_oss2oss.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | semaphore: Arc, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_semaphore` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `list_file_position` is assigned to, but never used [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:709:17 [INFO] [stdout] | [INFO] [stdout] 709 | let mut list_file_position = FilePosition::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_list_file_position` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `list_file_position` is never read [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:742:21 [INFO] [stdout] | [INFO] [stdout] 742 | list_file_position.offset += len; [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: value assigned to `list_file_position` is never read [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:743:21 [INFO] [stdout] | [INFO] [stdout] 743 | list_file_position.line_num += 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `list_file_position` is assigned to, but never used [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:277:17 [INFO] [stdout] | [INFO] [stdout] 277 | let mut list_file_position = FilePosition::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_list_file_position` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `list_file_position` is never read [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:309:21 [INFO] [stdout] | [INFO] [stdout] 309 | list_file_position.offset += len; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `list_file_position` is never read [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:310:21 [INFO] [stdout] | [INFO] [stdout] 310 | list_file_position.line_num += 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `list_file_position` is assigned to, but never used [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:538:17 [INFO] [stdout] | [INFO] [stdout] 538 | let mut list_file_position = FilePosition::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_list_file_position` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `list_file_position` is never read [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:553:21 [INFO] [stdout] | [INFO] [stdout] 553 | list_file_position.offset += len; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `list_file_position` is never read [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:554:21 [INFO] [stdout] | [INFO] [stdout] 554 | list_file_position.line_num += 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `list_file_position` is assigned to, but never used [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:292:17 [INFO] [stdout] | [INFO] [stdout] 292 | let mut list_file_position = FilePosition::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_list_file_position` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `list_file_position` is never read [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:318:21 [INFO] [stdout] | [INFO] [stdout] 318 | list_file_position.offset += len; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `list_file_position` is never read [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:319:21 [INFO] [stdout] | [INFO] [stdout] 319 | list_file_position.line_num += 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `list_file_position` is assigned to, but never used [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:277:17 [INFO] [stdout] | [INFO] [stdout] 277 | let mut list_file_position = FilePosition::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_list_file_position` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `list_file_position` is never read [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:309:21 [INFO] [stdout] | [INFO] [stdout] 309 | list_file_position.offset += len; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `list_file_position` is never read [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:310:21 [INFO] [stdout] | [INFO] [stdout] 310 | list_file_position.line_num += 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `watcher` is never read [INFO] [stdout] --> src/commons/notify_utile.rs:60:5 [INFO] [stdout] | [INFO] [stdout] 59 | pub struct NotifyWatcher { [INFO] [stdout] | ------------- field in this struct [INFO] [stdout] 60 | watcher: RecommendedWatcher, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `NotifyWatcher` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [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/commons/notify_utile.rs:331:5 [INFO] [stdout] | [INFO] [stdout] 330 | pub struct NotifyFolder( [INFO] [stdout] | ------------ field in this struct [INFO] [stdout] 331 | RecommendedWatcher, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `NotifyFolder` has a derived impl for the trait `Debug`, but this is 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] 331 - RecommendedWatcher, [INFO] [stdout] 331 + (), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `UnknowErr` is never constructed [INFO] [stdout] --> src/configure/config_error.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 5 | pub enum ConfigErrorType { [INFO] [stdout] | --------------- variant in this enum [INFO] [stdout] 6 | /// 未知错误 [INFO] [stdout] 7 | UnknowErr, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ConfigErrorType` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `message` and `cause` are never read [INFO] [stdout] --> src/configure/config_error.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 12 | pub struct ConfigError { [INFO] [stdout] | ----------- fields in this struct [INFO] [stdout] 13 | /// 错误信息 [INFO] [stdout] 14 | pub message: Option, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 15 | /// 错误原因(上一级的错误) [INFO] [stdout] 16 | pub cause: Option, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ConfigError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_err` is never used [INFO] [stdout] --> src/configure/config_error.rs:30:19 [INFO] [stdout] | [INFO] [stdout] 21 | impl ConfigError { [INFO] [stdout] | ---------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 30 | pub(crate) fn from_err(err: impl ToString, error_type: ConfigErrorType) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `TaskError` is never used [INFO] [stdout] --> src/exception/transfor_errors.rs:4:10 [INFO] [stdout] | [INFO] [stdout] 4 | pub enum TaskError { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MSG_TRANSFER_TASK_START` is never used [INFO] [stdout] --> src/tasks/log_info.rs:4:11 [INFO] [stdout] | [INFO] [stdout] 4 | pub const MSG_TRANSFER_TASK_START: &'static str = "Transfer task start"; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `task_id`, `msg`, and `additional` are never read [INFO] [stdout] --> src/tasks/log_info.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct LogInfo { [INFO] [stdout] | ------- fields in this struct [INFO] [stdout] 8 | pub task_id: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 9 | pub msg: String, [INFO] [stdout] | ^^^ [INFO] [stdout] 10 | pub additional: Option, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `LogInfo` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `AnalyzedResult` is never constructed [INFO] [stdout] --> src/tasks/task.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | pub struct AnalyzedResult { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `exec_record_descriptions_file` is never used [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:900:14 [INFO] [stdout] | [INFO] [stdout] 521 | impl TransferTask { [INFO] [stdout] | ----------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 900 | async fn exec_record_descriptions_file( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/checkpoint/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | mod checkpoint; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/checkpoint/record.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | json.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `json.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/checkpoint/record.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 77 | json.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `json.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/cmd/rootcmd.rs:133:5 [INFO] [stdout] | [INFO] [stdout] 133 | / if matches.get_flag("interact") { [INFO] [stdout] 134 | | if !INTERACT_STATUS.load(std::sync::atomic::Ordering::SeqCst) { [INFO] [stdout] 135 | | interact::run(); [INFO] [stdout] 136 | | return; [INFO] [stdout] 137 | | } [INFO] [stdout] 138 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 133 ~ if matches.get_flag("interact") [INFO] [stdout] 134 ~ && !INTERACT_STATUS.load(std::sync::atomic::Ordering::SeqCst) { [INFO] [stdout] 135 | interact::run(); [INFO] [stdout] 136 | return; [INFO] [stdout] 137 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/cmd/rootcmd.rs:193:25 [INFO] [stdout] | [INFO] [stdout] 193 | / let _ = rt.block_on(async { [INFO] [stdout] 194 | | if let Err(e) = t.analyze().await { [INFO] [stdout] 195 | | log::error!("{:?}", e); [INFO] [stdout] 196 | | return; [INFO] [stdout] 197 | | } [INFO] [stdout] 198 | | }); [INFO] [stdout] | |___________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 193 - let _ = rt.block_on(async { [INFO] [stdout] 193 + rt.block_on(async { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/cmd/rootcmd.rs:196:33 [INFO] [stdout] | [INFO] [stdout] 196 | ... return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 195 - log::error!("{:?}", e); [INFO] [stdout] 196 - return; [INFO] [stdout] 195 + log::error!("{:?}", e); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/cmd/rootcmd.rs:213:25 [INFO] [stdout] | [INFO] [stdout] 213 | let _ = rt.block_on(async { t.execute().await }); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 213 - let _ = rt.block_on(async { t.execute().await }); [INFO] [stdout] 213 + rt.block_on(async { t.execute().await }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/cmd/rootcmd.rs:250:25 [INFO] [stdout] | [INFO] [stdout] 250 | return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 249 - log::error!("{:?}", e); [INFO] [stdout] 250 - return; [INFO] [stdout] 249 + log::error!("{:?}", e); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/cmd/rootcmd.rs:274:17 [INFO] [stdout] | [INFO] [stdout] 274 | transfer_oss2oss.name = "transfer_oss2oss".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `models::model_task_transfer::TransferTask { name: "transfer_oss2oss".to_string(), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/cmd/rootcmd.rs:273:17 [INFO] [stdout] | [INFO] [stdout] 273 | let mut transfer_oss2oss = TransferTask::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/cmd/rootcmd.rs:285:17 [INFO] [stdout] | [INFO] [stdout] 285 | oss_desc.provider = OssProvider::ALI; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `models::model_s3::OSSDescription { provider: OssProvider::ALI, endpoint: "http://oss-cn-beijing.aliyuncs.com".to_string(), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/cmd/rootcmd.rs:284:17 [INFO] [stdout] | [INFO] [stdout] 284 | let mut oss_desc = OSSDescription::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/cmd/rootcmd.rs:319:17 [INFO] [stdout] | [INFO] [stdout] 319 | transfer_oss2local.name = "transfer_oss2local".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `models::model_task_transfer::TransferTask { name: "transfer_oss2local".to_string(), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/cmd/rootcmd.rs:318:17 [INFO] [stdout] | [INFO] [stdout] 318 | let mut transfer_oss2local = TransferTask::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/cmd/rootcmd.rs:356:17 [INFO] [stdout] | [INFO] [stdout] 356 | transfer_local2oss.name = "transfer_local2oss".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `models::model_task_transfer::TransferTask { name: "transfer_local2oss".to_string(), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/cmd/rootcmd.rs:355:17 [INFO] [stdout] | [INFO] [stdout] 355 | let mut transfer_local2oss = TransferTask::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/cmd/rootcmd.rs:396:17 [INFO] [stdout] | [INFO] [stdout] 396 | transfer_local2local.name = "transfer_local2local".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `models::model_task_transfer::TransferTask { name: "transfer_local2local".to_string(), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/cmd/rootcmd.rs:395:17 [INFO] [stdout] | [INFO] [stdout] 395 | let mut transfer_local2local = TransferTask::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/cmd/rootcmd.rs:499:17 [INFO] [stdout] | [INFO] [stdout] 499 | task_compare.source = ObjectStorage::Local("/tmp".to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `models::model_task_compare::CompareTask { source: ObjectStorage::Local("/tmp".to_string()), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/cmd/rootcmd.rs:498:17 [INFO] [stdout] | [INFO] [stdout] 498 | let mut task_compare = CompareTask::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/cmd/rootcmd.rs:525:17 [INFO] [stdout] | [INFO] [stdout] 525 | task_compare.target = ObjectStorage::Local("/tmp".to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `models::model_task_compare::CompareTask { target: ObjectStorage::Local("/tmp".to_string()), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/cmd/rootcmd.rs:524:17 [INFO] [stdout] | [INFO] [stdout] 524 | let mut task_compare = CompareTask::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/cmd/rootcmd.rs:551:17 [INFO] [stdout] | [INFO] [stdout] 551 | task_compare.source = ObjectStorage::Local("/root".to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `models::model_task_compare::CompareTask { source: ObjectStorage::Local("/root".to_string()), target: ObjectStorage::Local("/tmp".to_string()), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/cmd/rootcmd.rs:550:17 [INFO] [stdout] | [INFO] [stdout] 550 | let mut task_compare = CompareTask::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/cmd/rootcmd.rs:578:16 [INFO] [stdout] | [INFO] [stdout] 578 | if let Some(_) = parameters.subcommand_matches("provider") { [INFO] [stdout] | -------^^^^^^^-------------------------------------------- help: try: `if parameters.subcommand_matches("provider").is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/cmd/rootcmd.rs:588:16 [INFO] [stdout] | [INFO] [stdout] 588 | if let Some(_) = parameters.subcommand_matches("task_type") { [INFO] [stdout] | -------^^^^^^^--------------------------------------------- help: try: `if parameters.subcommand_matches("task_type").is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/cmd/rootcmd.rs:702:12 [INFO] [stdout] | [INFO] [stdout] 702 | if let Some(_) = matches.subcommand_matches("tree") { [INFO] [stdout] | -------^^^^^^^------------------------------------- help: try: `if matches.subcommand_matches("tree").is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/commons/calculate_etag.rs:14:36 [INFO] [stdout] | [INFO] [stdout] 14 | let mut current_md5: Vec = repeat(0).take((md5.output_bits() + 7) / 8).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0, (md5.output_bits() + 7) / 8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] = note: `#[warn(clippy::manual_repeat_n)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/commons/calculate_etag.rs:14:51 [INFO] [stdout] | [INFO] [stdout] 14 | let mut current_md5: Vec = repeat(0).take((md5.output_bits() + 7) / 8).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `md5.output_bits().div_ceil(8)` [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 `return` statement [INFO] [stdout] --> src/commons/convert.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | / return match byte_str.chars().last() { [INFO] [stdout] 13 | | Some(latest) => match latest { [INFO] [stdout] 14 | | 'k' | 'K' => { [INFO] [stdout] 15 | | byte_str.remove(byte_str.len() - 1); [INFO] [stdout] ... | [INFO] [stdout] 37 | | None => return Err(anyhow!("unit description error")), [INFO] [stdout] 38 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 12 ~ match byte_str.chars().last() { [INFO] [stdout] 13 + Some(latest) => match latest { [INFO] [stdout] 14 + 'k' | 'K' => { [INFO] [stdout] 15 + byte_str.remove(byte_str.len() - 1); [INFO] [stdout] 16 + let size: usize = byte_str.parse()?; [INFO] [stdout] 17 + let size = size * k; [INFO] [stdout] 18 + Ok(size) [INFO] [stdout] 19 + } [INFO] [stdout] 20 + 'm' | 'M' => { [INFO] [stdout] 21 + byte_str.remove(byte_str.len() - 1); [INFO] [stdout] 22 + let size: usize = byte_str.parse()?; [INFO] [stdout] 23 + let size = size * m; [INFO] [stdout] 24 + Ok(size) [INFO] [stdout] 25 + } [INFO] [stdout] 26 + 'g' | 'G' => { [INFO] [stdout] 27 + byte_str.remove(byte_str.len() - 1); [INFO] [stdout] 28 + let size: usize = byte_str.parse()?; [INFO] [stdout] 29 + let size = size * g; [INFO] [stdout] 30 + Ok(size) [INFO] [stdout] 31 + } [INFO] [stdout] 32 + _ => { [INFO] [stdout] 33 + let size: usize = byte_str.parse()?; [INFO] [stdout] 34 + Ok(size) [INFO] [stdout] 35 + } [INFO] [stdout] 36 + }, [INFO] [stdout] 37 + None => return Err(anyhow!("unit description error")), [INFO] [stdout] 38 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/commons/convert.rs:42:5 [INFO] [stdout] | [INFO] [stdout] 42 | / return match byte_size { [INFO] [stdout] 43 | | b if b < 1024 => b.to_string(), [INFO] [stdout] 44 | | b if b >= 1024 && b < 1024 * 1024 => { [INFO] [stdout] 45 | | let size = b / 1024; [INFO] [stdout] ... | [INFO] [stdout] 64 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 42 ~ match byte_size { [INFO] [stdout] 43 + b if b < 1024 => b.to_string(), [INFO] [stdout] 44 + b if b >= 1024 && b < 1024 * 1024 => { [INFO] [stdout] 45 + let size = b / 1024; [INFO] [stdout] 46 + let mut size_str = size.to_string(); [INFO] [stdout] 47 + size_str.push('k'); [INFO] [stdout] 48 + size_str [INFO] [stdout] 49 + } [INFO] [stdout] 50 + [INFO] [stdout] 51 + b if b >= 1024 * 1024 && b < 1024 * 1024 * 1024 => { [INFO] [stdout] 52 + let size = b / 1024 / 1024; [INFO] [stdout] 53 + let mut size_str = size.to_string(); [INFO] [stdout] 54 + size_str.push('m'); [INFO] [stdout] 55 + size_str [INFO] [stdout] 56 + } [INFO] [stdout] 57 + [INFO] [stdout] 58 + _ => { [INFO] [stdout] 59 + let size = byte_size / 1024 / 1024 / 1024; [INFO] [stdout] 60 + let mut size_str = size.to_string(); [INFO] [stdout] 61 + size_str.push('g'); [INFO] [stdout] 62 + size_str [INFO] [stdout] 63 + } [INFO] [stdout] 64 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/convert.rs:44:14 [INFO] [stdout] | [INFO] [stdout] 44 | b if b >= 1024 && b < 1024 * 1024 => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024..1024 * 1024).contains(&b)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/convert.rs:51:14 [INFO] [stdout] | [INFO] [stdout] 51 | b if b >= 1024 * 1024 && b < 1024 * 1024 * 1024 => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024..1024 * 1024 * 1024).contains(&b)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commons/fileutiles.rs:159:28 [INFO] [stdout] | [INFO] [stdout] 159 | f_target.write_all(&buf)?; [INFO] [stdout] | ^^^^ help: change this to: `buf` [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: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/commons/fileutiles.rs:268:21 [INFO] [stdout] | [INFO] [stdout] 268 | let l = last_modify_filter.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `last_modify_filter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commons/fileutiles.rs:282:8 [INFO] [stdout] | [INFO] [stdout] 282 | if entries.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!entries.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/commons/fileutiles.rs:285:17 [INFO] [stdout] | [INFO] [stdout] 285 | let l = last_modify_filter.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `last_modify_filter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/commons/fileutiles.rs:297:15 [INFO] [stdout] | [INFO] [stdout] 297 | while let Some(_) = joinset.join_next().await {} [INFO] [stdout] | ----------^^^^^^^---------------------------- help: try: `while joinset.join_next().await.is_some()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `.write(true)` because there is `.append(true)` [INFO] [stdout] --> src/commons/fileutiles.rs:576:9 [INFO] [stdout] | [INFO] [stdout] 576 | .write(true) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove `.write(true)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ineffective_open_options [INFO] [stdout] = note: `#[warn(clippy::ineffective_open_options)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commons/fileutiles.rs:583:28 [INFO] [stdout] | [INFO] [stdout] 583 | merge_to.write_all(&buf)?; [INFO] [stdout] | ^^^^ help: change this to: `buf` [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: unnecessary use of `.write(true)` because there is `.append(true)` [INFO] [stdout] --> src/commons/fileutiles.rs:613:9 [INFO] [stdout] | [INFO] [stdout] 613 | .write(true) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove `.write(true)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ineffective_open_options [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/commons/fileutiles.rs:621:9 [INFO] [stdout] | [INFO] [stdout] 621 | line.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `line.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/commons/fileutiles.rs:684:25 [INFO] [stdout] | [INFO] [stdout] 684 | file_path.push_str("/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `file_path.push('/')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/commons/filters.rs:15:1 [INFO] [stdout] | [INFO] [stdout] 15 | / impl Default for RegexFilter { [INFO] [stdout] 16 | | fn default() -> Self { [INFO] [stdout] 17 | | Self { [INFO] [stdout] 18 | | exclude_regex: None, [INFO] [stdout] ... | [INFO] [stdout] 22 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 10 + #[derive(Default)] [INFO] [stdout] 11 | pub struct RegexFilter { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/commons/filters.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 76 | / let is_exclude = match self.exclude_regex.clone() { [INFO] [stdout] 77 | | Some(e) => { [INFO] [stdout] 78 | | return e.is_match(content); [INFO] [stdout] ... | [INFO] [stdout] 81 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 82 | is_exclude [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 76 ~ [INFO] [stdout] 77 ~ match self.exclude_regex.clone() { [INFO] [stdout] 78 + Some(e) => { [INFO] [stdout] 79 + return e.is_match(content); [INFO] [stdout] 80 + } [INFO] [stdout] 81 + None => false, [INFO] [stdout] 82 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/commons/filters.rs:92:9 [INFO] [stdout] | [INFO] [stdout] 86 | / let is_included = match self.include_regex.clone() { [INFO] [stdout] 87 | | Some(e) => { [INFO] [stdout] 88 | | return e.is_match(content); [INFO] [stdout] ... | [INFO] [stdout] 91 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 92 | is_included [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 86 ~ [INFO] [stdout] 87 ~ match self.include_regex.clone() { [INFO] [stdout] 88 + Some(e) => { [INFO] [stdout] 89 + return e.is_match(content); [INFO] [stdout] 90 + } [INFO] [stdout] 91 + None => true, [INFO] [stdout] 92 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/commons/json_utile.rs:11:46 [INFO] [stdout] | [INFO] [stdout] 11 | let res = from_str::(content).map_err(|e| anyhow::Error::new(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `anyhow::Error::new` [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: you should consider adding a `Default` implementation for `Modified` [INFO] [stdout] --> src/commons/notify_utile.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 49 | / pub fn new() -> Self { [INFO] [stdout] 50 | | Self { [INFO] [stdout] 51 | | path: "".to_string(), [INFO] [stdout] 52 | | path_type: PathType::File, [INFO] [stdout] ... | [INFO] [stdout] 55 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 48 + impl Default for Modified { [INFO] [stdout] 49 + fn default() -> Self { [INFO] [stdout] 50 + Self::new() [INFO] [stdout] 51 + } [INFO] [stdout] 52 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/commons/notify_utile.rs:83:17 [INFO] [stdout] | [INFO] [stdout] 83 | return Err(anyhow::anyhow!("watched dir not exists")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 83 - return Err(anyhow::anyhow!("watched dir not exists")); [INFO] [stdout] 83 + Err(anyhow::anyhow!("watched dir not exists")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/commons/notify_utile.rs:177:13 [INFO] [stdout] | [INFO] [stdout] 177 | / match file.metadata() { [INFO] [stdout] 178 | | Ok(meta) => { [INFO] [stdout] 179 | | file_size.store(meta.len(), Ordering::SeqCst); [INFO] [stdout] ... | [INFO] [stdout] 182 | | }; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 177 ~ if let Ok(meta) = file.metadata() { [INFO] [stdout] 178 + file_size.store(meta.len(), Ordering::SeqCst); [INFO] [stdout] 179 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commons/notify_utile.rs:215:24 [INFO] [stdout] | [INFO] [stdout] 215 | .write_all(¬ify_path.as_path().display().to_string().as_bytes())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `notify_path.as_path().display().to_string().as_bytes()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commons/notify_utile.rs:290:37 [INFO] [stdout] | [INFO] [stdout] 290 | ... ¬ify_path.as_path().display().to_string().as_bytes(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `notify_path.as_path().display().to_string().as_bytes()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/commons/notify_utile.rs:357:17 [INFO] [stdout] | [INFO] [stdout] 357 | return Err(anyhow::anyhow!("watched dir not exists")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 357 - return Err(anyhow::anyhow!("watched dir not exists")); [INFO] [stdout] 357 + Err(anyhow::anyhow!("watched dir not exists")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commons/notify_utile.rs:385:24 [INFO] [stdout] | [INFO] [stdout] 385 | .write_all(¬ify_path.as_path().display().to_string().as_bytes())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `notify_path.as_path().display().to_string().as_bytes()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commons/notify_utile.rs:456:37 [INFO] [stdout] | [INFO] [stdout] 456 | ... ¬ify_path.as_path().display().to_string().as_bytes(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `notify_path.as_path().display().to_string().as_bytes()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/commons/size_distributed.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | / return match size { [INFO] [stdout] 7 | | s if s < 1024 => "0-1K".to_string(), [INFO] [stdout] 8 | | s if s >= 1024 && s < 1024 * 8 => "1K-8K".to_string(), [INFO] [stdout] 9 | | s if s >= 1024 * 8 && s < 1024 * 16 => "8K-16K".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 38 | | _ => "1T+".to_string(), [INFO] [stdout] 39 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 6 ~ match size { [INFO] [stdout] 7 + s if s < 1024 => "0-1K".to_string(), [INFO] [stdout] 8 + s if s >= 1024 && s < 1024 * 8 => "1K-8K".to_string(), [INFO] [stdout] 9 + s if s >= 1024 * 8 && s < 1024 * 16 => "8K-16K".to_string(), [INFO] [stdout] 10 + s if s >= 1024 * 16 && s < 1024 * 32 => "16K-32K".to_string(), [INFO] [stdout] 11 + s if s >= 1024 * 32 && s < 1024 * 64 => "32K-64K".to_string(), [INFO] [stdout] 12 + s if s >= 1024 * 64 && s < 1024 * 128 => "64K-128K".to_string(), [INFO] [stdout] 13 + s if s >= 1024 * 128 && s < 1024 * 256 => "128K-256K".to_string(), [INFO] [stdout] 14 + s if s >= 1024 * 256 && s < 1024 * 512 => "256K-512K".to_string(), [INFO] [stdout] 15 + s if s >= 1024 * 512 && s < 1024 * 1024 => "512K-1M".to_string(), [INFO] [stdout] 16 + s if s >= 1024 * 1024 && s < 1024 * 1024 * 8 => "1M-8M".to_string(), [INFO] [stdout] 17 + s if s >= 1024 * 1024 * 8 && s < 1024 * 1024 * 16 => "8M-16M".to_string(), [INFO] [stdout] 18 + s if s >= 1024 * 1024 * 16 && s < 1024 * 1024 * 32 => "16M-32M".to_string(), [INFO] [stdout] 19 + s if s >= 1024 * 1024 * 32 && s < 1024 * 1024 * 64 => "32M-64M".to_string(), [INFO] [stdout] 20 + s if s >= 1024 * 1024 * 64 && s < 1024 * 1024 * 128 => "64M-128M".to_string(), [INFO] [stdout] 21 + s if s >= 1024 * 1024 * 128 && s < 1024 * 1024 * 256 => "128M-256M".to_string(), [INFO] [stdout] 22 + s if s >= 1024 * 1024 * 256 && s < 1024 * 1024 * 512 => "256M-512M".to_string(), [INFO] [stdout] 23 + s if s >= 1024 * 1024 * 512 && s < 1024 * 1024 * 1024 => "512M-1G".to_string(), [INFO] [stdout] 24 + s if s >= 1024 * 1024 * 1024 && s < 1024 * 1024 * 1024 * 8 => "1G-8G".to_string(), [INFO] [stdout] 25 + s if s >= 1024 * 1024 * 1024 * 8 && s < 1024 * 1024 * 1024 * 16 => "8G-16G".to_string(), [INFO] [stdout] 26 + s if s >= 1024 * 1024 * 1024 * 16 && s < 1024 * 1024 * 1024 * 32 => "16G-32G".to_string(), [INFO] [stdout] 27 + s if s >= 1024 * 1024 * 1024 * 32 && s < 1024 * 1024 * 1024 * 64 => "32G-64G".to_string(), [INFO] [stdout] 28 + s if s >= 1024 * 1024 * 1024 * 64 && s < 1024 * 1024 * 1024 * 128 => "64G-128G".to_string(), [INFO] [stdout] 29 + s if s >= 1024 * 1024 * 1024 * 128 && s < 1024 * 1024 * 1024 * 256 => { [INFO] [stdout] 30 + "128G-256G".to_string() [INFO] [stdout] 31 + } [INFO] [stdout] 32 + s if s >= 1024 * 1024 * 1024 * 256 && s < 1024 * 1024 * 1024 * 512 => { [INFO] [stdout] 33 + "256G-512G".to_string() [INFO] [stdout] 34 + } [INFO] [stdout] 35 + s if s >= 1024 * 1024 * 1024 * 512 && s < 1024 * 1024 * 1024 * 1024 => { [INFO] [stdout] 36 + "512G-1T".to_string() [INFO] [stdout] 37 + } [INFO] [stdout] 38 + _ => "1T+".to_string(), [INFO] [stdout] 39 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:8:14 [INFO] [stdout] | [INFO] [stdout] 8 | s if s >= 1024 && s < 1024 * 8 => "1K-8K".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024..1024 * 8).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:9:14 [INFO] [stdout] | [INFO] [stdout] 9 | s if s >= 1024 * 8 && s < 1024 * 16 => "8K-16K".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 8..1024 * 16).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:10:14 [INFO] [stdout] | [INFO] [stdout] 10 | s if s >= 1024 * 16 && s < 1024 * 32 => "16K-32K".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 16..1024 * 32).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:11:14 [INFO] [stdout] | [INFO] [stdout] 11 | s if s >= 1024 * 32 && s < 1024 * 64 => "32K-64K".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 32..1024 * 64).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:12:14 [INFO] [stdout] | [INFO] [stdout] 12 | s if s >= 1024 * 64 && s < 1024 * 128 => "64K-128K".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 64..1024 * 128).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:13:14 [INFO] [stdout] | [INFO] [stdout] 13 | s if s >= 1024 * 128 && s < 1024 * 256 => "128K-256K".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 128..1024 * 256).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:14:14 [INFO] [stdout] | [INFO] [stdout] 14 | s if s >= 1024 * 256 && s < 1024 * 512 => "256K-512K".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 256..1024 * 512).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:15:14 [INFO] [stdout] | [INFO] [stdout] 15 | s if s >= 1024 * 512 && s < 1024 * 1024 => "512K-1M".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 512..1024 * 1024).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:16:14 [INFO] [stdout] | [INFO] [stdout] 16 | s if s >= 1024 * 1024 && s < 1024 * 1024 * 8 => "1M-8M".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024..1024 * 1024 * 8).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:17:14 [INFO] [stdout] | [INFO] [stdout] 17 | s if s >= 1024 * 1024 * 8 && s < 1024 * 1024 * 16 => "8M-16M".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 8..1024 * 1024 * 16).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:18:14 [INFO] [stdout] | [INFO] [stdout] 18 | s if s >= 1024 * 1024 * 16 && s < 1024 * 1024 * 32 => "16M-32M".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 16..1024 * 1024 * 32).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:19:14 [INFO] [stdout] | [INFO] [stdout] 19 | s if s >= 1024 * 1024 * 32 && s < 1024 * 1024 * 64 => "32M-64M".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 32..1024 * 1024 * 64).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:20:14 [INFO] [stdout] | [INFO] [stdout] 20 | s if s >= 1024 * 1024 * 64 && s < 1024 * 1024 * 128 => "64M-128M".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 64..1024 * 1024 * 128).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:21:14 [INFO] [stdout] | [INFO] [stdout] 21 | s if s >= 1024 * 1024 * 128 && s < 1024 * 1024 * 256 => "128M-256M".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 128..1024 * 1024 * 256).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:22:14 [INFO] [stdout] | [INFO] [stdout] 22 | s if s >= 1024 * 1024 * 256 && s < 1024 * 1024 * 512 => "256M-512M".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 256..1024 * 1024 * 512).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:23:14 [INFO] [stdout] | [INFO] [stdout] 23 | s if s >= 1024 * 1024 * 512 && s < 1024 * 1024 * 1024 => "512M-1G".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 512..1024 * 1024 * 1024).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:24:14 [INFO] [stdout] | [INFO] [stdout] 24 | s if s >= 1024 * 1024 * 1024 && s < 1024 * 1024 * 1024 * 8 => "1G-8G".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 1024..1024 * 1024 * 1024 * 8).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:25:14 [INFO] [stdout] | [INFO] [stdout] 25 | s if s >= 1024 * 1024 * 1024 * 8 && s < 1024 * 1024 * 1024 * 16 => "8G-16G".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 1024 * 8..1024 * 1024 * 1024 * 16).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:26:14 [INFO] [stdout] | [INFO] [stdout] 26 | s if s >= 1024 * 1024 * 1024 * 16 && s < 1024 * 1024 * 1024 * 32 => "16G-32G".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 1024 * 16..1024 * 1024 * 1024 * 32).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:27:14 [INFO] [stdout] | [INFO] [stdout] 27 | s if s >= 1024 * 1024 * 1024 * 32 && s < 1024 * 1024 * 1024 * 64 => "32G-64G".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 1024 * 32..1024 * 1024 * 1024 * 64).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:28:14 [INFO] [stdout] | [INFO] [stdout] 28 | s if s >= 1024 * 1024 * 1024 * 64 && s < 1024 * 1024 * 1024 * 128 => "64G-128G".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 1024 * 64..1024 * 1024 * 1024 * 128).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:29:14 [INFO] [stdout] | [INFO] [stdout] 29 | s if s >= 1024 * 1024 * 1024 * 128 && s < 1024 * 1024 * 1024 * 256 => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 1024 * 128..1024 * 1024 * 1024 * 256).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:32:14 [INFO] [stdout] | [INFO] [stdout] 32 | s if s >= 1024 * 1024 * 1024 * 256 && s < 1024 * 1024 * 1024 * 512 => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 1024 * 256..1024 * 1024 * 1024 * 512).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:35:14 [INFO] [stdout] | [INFO] [stdout] 35 | s if s >= 1024 * 1024 * 1024 * 512 && s < 1024 * 1024 * 1024 * 1024 => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 1024 * 512..1024 * 1024 * 1024 * 1024).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/commons/subcmdcompleter.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | return subcmds; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 33 - return subcmds; [INFO] [stdout] 33 + subcmds [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/commons/subcmdcompleter.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | return subcmds; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 44 - return subcmds; [INFO] [stdout] 44 + subcmds [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/commons/subcmdcompleter.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | return subcmds; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 56 - return subcmds; [INFO] [stdout] 56 + subcmds [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/commons/subcmdcompleter.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 77 | return subcmds; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 77 - return subcmds; [INFO] [stdout] 77 + subcmds [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/commons/subcmdcompleter.rs:88:21 [INFO] [stdout] | [INFO] [stdout] 88 | replace.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `replace.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/commons/subcmdcompleter.rs:98:62 [INFO] [stdout] | [INFO] [stdout] 98 | for str in self.level_prefix_possible_cmd(1, *last) { [INFO] [stdout] | ^^^^^ help: try: `last` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/commons/subcmdcompleter.rs:100:21 [INFO] [stdout] | [INFO] [stdout] 100 | replace.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `replace.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/commons/subcmdcompleter.rs:115:17 [INFO] [stdout] | [INFO] [stdout] 115 | replace.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `replace.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/commons/subcmdcompleter.rs:128:17 [INFO] [stdout] | [INFO] [stdout] 128 | *last, [INFO] [stdout] | ^^^^^ help: try: `last` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/commons/subcmdcompleter.rs:131:17 [INFO] [stdout] | [INFO] [stdout] 131 | replace.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `replace.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/commons/sysutiles.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 12 - return false; [INFO] [stdout] 12 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's keys [INFO] [stdout] --> src/commons/sysutiles.rs:7:24 [INFO] [stdout] | [INFO] [stdout] 7 | for (syspid, _) in sys.processes() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 7 - for (syspid, _) in sys.processes() { [INFO] [stdout] 7 + for syspid in sys.processes().keys() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `OFF` contains a capitalized acronym [INFO] [stdout] --> src/configure/config_global.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | OFF, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Off` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `ERROR` contains a capitalized acronym [INFO] [stdout] --> src/configure/config_global.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | ERROR, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Error` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `WARN` contains a capitalized acronym [INFO] [stdout] --> src/configure/config_global.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | WARN, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Warn` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `INFO` contains a capitalized acronym [INFO] [stdout] --> src/configure/config_global.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | INFO, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Info` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `DEBUG` contains a capitalized acronym [INFO] [stdout] --> src/configure/config_global.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | DEBUG, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Debug` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `TRACE` contains a capitalized acronym [INFO] [stdout] --> src/configure/config_global.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | TRACE, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Trace` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/configure/config_global.rs:20:1 [INFO] [stdout] | [INFO] [stdout] 20 | / impl Default for LogLevel { [INFO] [stdout] 21 | | fn default() -> Self { [INFO] [stdout] 22 | | LogLevel::INFO [INFO] [stdout] 23 | | } [INFO] [stdout] 24 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 11 + #[derive(Default)] [INFO] [stdout] 12 | pub enum LogLevel { [INFO] [stdout] 13 | OFF, [INFO] [stdout] 14 | ERROR, [INFO] [stdout] 15 | WARN, [INFO] [stdout] 16 ~ #[default] [INFO] [stdout] 17 ~ INFO, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/configure/config_global.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 56 | let global_config = Config::default(); [INFO] [stdout] | -------------------------------------- unnecessary `let` binding [INFO] [stdout] 57 | global_config [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 56 ~ [INFO] [stdout] 57 ~ Config::default() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/configure/config_global.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 63 | let path = "".to_string(); [INFO] [stdout] | -------------------------- unnecessary `let` binding [INFO] [stdout] 64 | path [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 63 ~ [INFO] [stdout] 64 ~ "".to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/logger/mod.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | mod logger; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/models/model_checkpoint.rs:55:1 [INFO] [stdout] | [INFO] [stdout] 55 | / impl Default for FilePosition { [INFO] [stdout] 56 | | fn default() -> Self { [INFO] [stdout] 57 | | Self { [INFO] [stdout] 58 | | offset: 0, [INFO] [stdout] ... | [INFO] [stdout] 63 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 48 + #[derive(Default)] [INFO] [stdout] 49 | pub struct FilePosition { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/models/model_filters.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | / impl Default for RegexFilter { [INFO] [stdout] 15 | | fn default() -> Self { [INFO] [stdout] 16 | | Self { [INFO] [stdout] 17 | | exclude_regex: None, [INFO] [stdout] ... | [INFO] [stdout] 21 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 9 + #[derive(Default)] [INFO] [stdout] 10 | pub struct RegexFilter { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/models/model_s3.rs:40:1 [INFO] [stdout] | [INFO] [stdout] 40 | / impl Default for S3RequestStyle { [INFO] [stdout] 41 | | fn default() -> Self { [INFO] [stdout] 42 | | S3RequestStyle::VirtualHostedStyle [INFO] [stdout] 43 | | } [INFO] [stdout] 44 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 35 + #[derive(Default)] [INFO] [stdout] 36 | pub enum S3RequestStyle { [INFO] [stdout] 37 | PathStyle, [INFO] [stdout] 38 ~ #[default] [INFO] [stdout] 39 ~ VirtualHostedStyle, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/models/model_task_transfer.rs:31:1 [INFO] [stdout] | [INFO] [stdout] 31 | / impl Default for IncrementMode { [INFO] [stdout] 32 | | fn default() -> Self { [INFO] [stdout] 33 | | IncrementMode::Notify [INFO] [stdout] 34 | | } [INFO] [stdout] 35 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 23 + #[derive(Default)] [INFO] [stdout] 24 | pub enum IncrementMode { [INFO] [stdout] 25 ~ #[default] [INFO] [stdout] 26 ~ Notify, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/models/model_task_transfer.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | / match self { [INFO] [stdout] 48 | | TransferType::Full => true, [INFO] [stdout] 49 | | _ => false, [INFO] [stdout] 50 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 47 - match self { [INFO] [stdout] 48 - TransferType::Full => true, [INFO] [stdout] 49 - _ => false, [INFO] [stdout] 50 - } [INFO] [stdout] 47 + matches!(self, TransferType::Full) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/models/model_task_transfer.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | / match self { [INFO] [stdout] 56 | | TransferType::Stock => true, [INFO] [stdout] 57 | | _ => false, [INFO] [stdout] 58 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 55 - match self { [INFO] [stdout] 56 - TransferType::Stock => true, [INFO] [stdout] 57 - _ => false, [INFO] [stdout] 58 - } [INFO] [stdout] 55 + matches!(self, TransferType::Stock) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/models/model_task_transfer.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | / match self { [INFO] [stdout] 63 | | TransferType::Increment => true, [INFO] [stdout] 64 | | _ => false, [INFO] [stdout] 65 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 62 - match self { [INFO] [stdout] 63 - TransferType::Increment => true, [INFO] [stdout] 64 - _ => false, [INFO] [stdout] 65 - } [INFO] [stdout] 62 + matches!(self, TransferType::Increment) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `list_file_position` is assigned to, but never used [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:292:17 [INFO] [stdout] | [INFO] [stdout] 292 | let mut list_file_position = FilePosition::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_list_file_position` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `list_file_position` is never read [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:318:21 [INFO] [stdout] | [INFO] [stdout] 318 | list_file_position.offset += len; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `list_file_position` is never read [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:319:21 [INFO] [stdout] | [INFO] [stdout] 319 | list_file_position.line_num += 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/s3/jd_s3.rs:57:12 [INFO] [stdout] | [INFO] [stdout] 57 | if vec.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vec.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/s3/jd_s3.rs:163:15 [INFO] [stdout] | [INFO] [stdout] 163 | while !token.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `token.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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/s3/jd_s3.rs:197:9 [INFO] [stdout] | [INFO] [stdout] 197 | store.push_str("/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `store.push('/')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/s3/jd_s3.rs:214:28 [INFO] [stdout] | [INFO] [stdout] 214 | let _ = file.write(&*bytes).await; [INFO] [stdout] | ^^^^^^^ help: try: `&bytes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/s3/jd_s3.rs:238:13 [INFO] [stdout] | [INFO] [stdout] 238 | store.push_str("/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `store.push('/')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/s3/jd_s3.rs:255:32 [INFO] [stdout] | [INFO] [stdout] 255 | let _ = file.write(&*bytes).await; [INFO] [stdout] | ^^^^^^^ help: try: `&bytes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/s3/oss_client.rs:70:5 [INFO] [stdout] | [INFO] [stdout] 70 | / pub async fn append_object_list_to_multi_files( [INFO] [stdout] 71 | | &self, [INFO] [stdout] 72 | | bucket: String, [INFO] [stdout] 73 | | prefix: Option, [INFO] [stdout] ... | [INFO] [stdout] 78 | | file_max_lines: usize, [INFO] [stdout] 79 | | ) -> Result> { [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: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/s3/oss_client.rs:101:21 [INFO] [stdout] | [INFO] [stdout] 101 | last_modify_filter.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `last_modify_filter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/s3/oss_client.rs:131:21 [INFO] [stdout] | [INFO] [stdout] 131 | last_modify_filter.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `last_modify_filter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/s3/oss_client.rs:173:9 [INFO] [stdout] | [INFO] [stdout] 173 | / return match content_len_usize.le(&splite_size) { [INFO] [stdout] 174 | | true => { [INFO] [stdout] 175 | | self.upload_object_bytes(bucket, key, expr, object.body) [INFO] [stdout] 176 | | .await [INFO] [stdout] ... | [INFO] [stdout] 189 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 173 ~ match content_len_usize.le(&splite_size) { [INFO] [stdout] 174 + true => { [INFO] [stdout] 175 + self.upload_object_bytes(bucket, key, expr, object.body) [INFO] [stdout] 176 + .await [INFO] [stdout] 177 + } [INFO] [stdout] 178 + false => { [INFO] [stdout] 179 + self.multipart_upload_byte_stream( [INFO] [stdout] 180 + bucket, [INFO] [stdout] 181 + key, [INFO] [stdout] 182 + expr, [INFO] [stdout] 183 + content_len_usize, [INFO] [stdout] 184 + chunk_size, [INFO] [stdout] 185 + object.body, [INFO] [stdout] 186 + ) [INFO] [stdout] 187 + .await [INFO] [stdout] 188 + } [INFO] [stdout] 189 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/s3/oss_client.rs:224:5 [INFO] [stdout] | [INFO] [stdout] 224 | / pub async fn upload_local_file_paralle( [INFO] [stdout] 225 | | &self, [INFO] [stdout] 226 | | local_file: &str, [INFO] [stdout] 227 | | bucket: &str, [INFO] [stdout] ... | [INFO] [stdout] 233 | | multi_part_parallelism: usize, [INFO] [stdout] 234 | | ) -> Result<()> { [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/s3/oss_client.rs:271:5 [INFO] [stdout] | [INFO] [stdout] 271 | / pub async fn download_object_by_range( [INFO] [stdout] 272 | | &self, [INFO] [stdout] 273 | | s_bucket: &str, [INFO] [stdout] 274 | | s_key: &str, [INFO] [stdout] ... | [INFO] [stdout] 279 | | multi_part_parallelism: usize, [INFO] [stdout] 280 | | ) -> Result<()> { [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/s3/oss_client.rs:342:15 [INFO] [stdout] | [INFO] [stdout] 342 | while joinset.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!joinset.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/s3/oss_client.rs:440:9 [INFO] [stdout] | [INFO] [stdout] 440 | / return match head.e_tag() { [INFO] [stdout] 441 | | Some(t) => Ok(Some(t.to_string())), [INFO] [stdout] 442 | | None => Ok(None), [INFO] [stdout] 443 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 440 ~ match head.e_tag() { [INFO] [stdout] 441 + Some(t) => Ok(Some(t.to_string())), [INFO] [stdout] 442 + None => Ok(None), [INFO] [stdout] 443 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/s3/oss_client.rs:479:12 [INFO] [stdout] | [INFO] [stdout] 479 | if vec.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vec.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/s3/oss_client.rs:631:5 [INFO] [stdout] | [INFO] [stdout] 631 | / pub async fn multipart_upload_local_file_paralle_batch( [INFO] [stdout] 632 | | &self, [INFO] [stdout] 633 | | file_path: &str, [INFO] [stdout] 634 | | bucket: &str, [INFO] [stdout] ... | [INFO] [stdout] 639 | | multi_part_parallelism: usize, [INFO] [stdout] 640 | | ) -> Result<()> { [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/s3/oss_client.rs:760:5 [INFO] [stdout] | [INFO] [stdout] 760 | / pub async fn upload_file_parts( [INFO] [stdout] 761 | | &self, [INFO] [stdout] 762 | | file_name: &str, [INFO] [stdout] 763 | | bucket: &str, [INFO] [stdout] ... | [INFO] [stdout] 769 | | multi_part_parallelism: usize, [INFO] [stdout] 770 | | ) -> Result> { [INFO] [stdout] | |___________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/s3/oss_client.rs:830:15 [INFO] [stdout] | [INFO] [stdout] 830 | while joinset.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!joinset.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/s3/oss_client.rs:958:21 [INFO] [stdout] | [INFO] [stdout] 958 | let l = last_modify_filter.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `last_modify_filter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/s3/oss_client.rs:980:25 [INFO] [stdout] | [INFO] [stdout] 980 | let l = last_modify_filter.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `last_modify_filter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/s3/oss_client.rs:992:19 [INFO] [stdout] | [INFO] [stdout] 992 | while let Some(_) = joinset.join_next().await {} [INFO] [stdout] | ----------^^^^^^^---------------------------- help: try: `while joinset.join_next().await.is_some()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/s3/oss_client.rs:1056:1 [INFO] [stdout] | [INFO] [stdout] 1056 | / pub async fn multipart_transfer_obj_paralle_by_range( [INFO] [stdout] 1057 | | s_client: Arc, [INFO] [stdout] 1058 | | s_bucket: &str, [INFO] [stdout] 1059 | | s_key: &str, [INFO] [stdout] ... | [INFO] [stdout] 1067 | | multi_part_parallelism: usize, [INFO] [stdout] 1068 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/s3/oss_client.rs:1105:1 [INFO] [stdout] | [INFO] [stdout] 1105 | / pub async fn transfer_object_parts_by_range( [INFO] [stdout] 1106 | | s_client: Arc, [INFO] [stdout] 1107 | | s_bucket: &str, [INFO] [stdout] 1108 | | s_key: &str, [INFO] [stdout] ... | [INFO] [stdout] 1116 | | multi_part_parallelism: usize, [INFO] [stdout] 1117 | | ) -> Result> { [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/s3/oss_client.rs:1172:11 [INFO] [stdout] | [INFO] [stdout] 1172 | while joinset.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!joinset.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/s3/oss_client.rs:1194:1 [INFO] [stdout] | [INFO] [stdout] 1194 | / pub async fn transfer_parts_batch_by_range( [INFO] [stdout] 1195 | | s_client: Arc, [INFO] [stdout] 1196 | | t_client: Arc, [INFO] [stdout] 1197 | | s_bucket: &str, [INFO] [stdout] ... | [INFO] [stdout] 1203 | | completed_parts_btree: Arc>>, [INFO] [stdout] 1204 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/s3/oss_client.rs:1240:1 [INFO] [stdout] | [INFO] [stdout] 1240 | / pub async fn upload_file_parts_batch( [INFO] [stdout] 1241 | | target_client: Arc, [INFO] [stdout] 1242 | | file_name: &str, [INFO] [stdout] 1243 | | bucket: &str, [INFO] [stdout] ... | [INFO] [stdout] 1248 | | completed_parts_btree: Arc>>, [INFO] [stdout] 1249 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/s3/oss_client.rs:1356:62 [INFO] [stdout] | [INFO] [stdout] 1356 | let mut t_file = OpenOptions::new().write(true).open(&file_path)?; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_path` [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: returning the result of a `let` binding from a block [INFO] [stdout] --> src/s3/oss_client.rs:1439:13 [INFO] [stdout] | [INFO] [stdout] 1438 | let input_file_builder = gen_current_input_writer(file_num)?; [INFO] [stdout] | ------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 1439 | input_file_builder [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 1438 ~ [INFO] [stdout] 1439 ~ gen_current_input_writer(file_num)? [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/s3/oss_client.rs:1470:13 [INFO] [stdout] | [INFO] [stdout] 1470 | / match current_file_lines.eq(&0) && file_num.eq(&0) { [INFO] [stdout] 1471 | | true => { [INFO] [stdout] 1472 | | write_sequence_file(file_num)?; [INFO] [stdout] ... | [INFO] [stdout] 1475 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1470 ~ if current_file_lines.eq(&0) && file_num.eq(&0) == true { [INFO] [stdout] 1471 + write_sequence_file(file_num)?; [INFO] [stdout] 1472 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/s3/oss_client.rs:1477:13 [INFO] [stdout] | [INFO] [stdout] 1477 | / match current_file_lines >= file_max_lines.try_into()? { [INFO] [stdout] 1478 | | true => { [INFO] [stdout] 1479 | | current_input_writer.flush()?; [INFO] [stdout] 1480 | | file_num += 1; [INFO] [stdout] ... | [INFO] [stdout] 1486 | | false => {} [INFO] [stdout] 1487 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1477 ~ if current_file_lines >= file_max_lines.try_into()? == true { [INFO] [stdout] 1478 + current_input_writer.flush()?; [INFO] [stdout] 1479 + file_num += 1; [INFO] [stdout] 1480 + current_file_lines = 0; [INFO] [stdout] 1481 + [INFO] [stdout] 1482 + current_input_writer = gen_current_input_writer(file_num)?; [INFO] [stdout] 1483 + write_sequence_file(file_num)?; [INFO] [stdout] 1484 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/compare/compare_local2oss.rs:208:66 [INFO] [stdout] | [INFO] [stdout] 208 | .compare_content_len(record, source_key, &obj_t, &target_key) [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `target_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/compare/compare_local2oss.rs:217:61 [INFO] [stdout] | [INFO] [stdout] 217 | .compare_content(record, source_key, obj_t, &target_key) [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `target_key` [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: field `watcher` is never read [INFO] [stdout] --> src/commons/notify_utile.rs:60:5 [INFO] [stdout] | [INFO] [stdout] 59 | pub struct NotifyWatcher { [INFO] [stdout] | ------------- field in this struct [INFO] [stdout] 60 | watcher: RecommendedWatcher, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `NotifyWatcher` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [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/commons/notify_utile.rs:331:5 [INFO] [stdout] | [INFO] [stdout] 330 | pub struct NotifyFolder( [INFO] [stdout] | ------------ field in this struct [INFO] [stdout] 331 | RecommendedWatcher, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `NotifyFolder` has a derived impl for the trait `Debug`, but this is 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] 331 - RecommendedWatcher, [INFO] [stdout] 331 + (), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `UnknowErr` is never constructed [INFO] [stdout] --> src/configure/config_error.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 5 | pub enum ConfigErrorType { [INFO] [stdout] | --------------- variant in this enum [INFO] [stdout] 6 | /// 未知错误 [INFO] [stdout] 7 | UnknowErr, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ConfigErrorType` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `message` and `cause` are never read [INFO] [stdout] --> src/configure/config_error.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 12 | pub struct ConfigError { [INFO] [stdout] | ----------- fields in this struct [INFO] [stdout] 13 | /// 错误信息 [INFO] [stdout] 14 | pub message: Option, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 15 | /// 错误原因(上一级的错误) [INFO] [stdout] 16 | pub cause: Option, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ConfigError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_err` is never used [INFO] [stdout] --> src/configure/config_error.rs:30:19 [INFO] [stdout] | [INFO] [stdout] 21 | impl ConfigError { [INFO] [stdout] | ---------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 30 | pub(crate) fn from_err(err: impl ToString, error_type: ConfigErrorType) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `TaskError` is never used [INFO] [stdout] --> src/exception/transfor_errors.rs:4:10 [INFO] [stdout] | [INFO] [stdout] 4 | pub enum TaskError { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MSG_TRANSFER_TASK_START` is never used [INFO] [stdout] --> src/tasks/log_info.rs:4:11 [INFO] [stdout] | [INFO] [stdout] 4 | pub const MSG_TRANSFER_TASK_START: &'static str = "Transfer task start"; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `task_id`, `msg`, and `additional` are never read [INFO] [stdout] --> src/tasks/log_info.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct LogInfo { [INFO] [stdout] | ------- fields in this struct [INFO] [stdout] 8 | pub task_id: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 9 | pub msg: String, [INFO] [stdout] | ^^^ [INFO] [stdout] 10 | pub additional: Option, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `LogInfo` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `AnalyzedResult` is never constructed [INFO] [stdout] --> src/tasks/task.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | pub struct AnalyzedResult { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `exec_record_descriptions_file` is never used [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:900:14 [INFO] [stdout] | [INFO] [stdout] 521 | impl TransferTask { [INFO] [stdout] | ----------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 900 | async fn exec_record_descriptions_file( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/checkpoint/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | mod checkpoint; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/compare/compare_oss2local.rs:165:25 [INFO] [stdout] | [INFO] [stdout] 165 | .get_object(&self.source.bucket.as_str(), record.key.as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.source.bucket.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/compare/compare_oss2local.rs:201:74 [INFO] [stdout] | [INFO] [stdout] 201 | if let Some(diff) = self.compare_content_len(record, &obj_s, &target_key)? { [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `target_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/compare/compare_oss2local.rs:207:69 [INFO] [stdout] | [INFO] [stdout] 207 | if let Some(diff) = self.compare_content(record, obj_s, &target_key).await? { [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `target_key` [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: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/compare/compare_oss2local.rs:254:24 [INFO] [stdout] | [INFO] [stdout] 254 | let mut left = s_len.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `s_len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/checkpoint/record.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | json.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `json.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/compare/compare_oss2oss.rs:188:25 [INFO] [stdout] | [INFO] [stdout] 188 | .get_object(&self.source.bucket.as_str(), record.key.as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.source.bucket.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/compare/compare_oss2oss.rs:205:25 [INFO] [stdout] | [INFO] [stdout] 205 | .get_object(&self.target.bucket.as_str(), &target_key) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.target.bucket.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/compare/compare_oss2oss.rs:205:55 [INFO] [stdout] | [INFO] [stdout] 205 | .get_object(&self.target.bucket.as_str(), &target_key) [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `target_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/compare/compare_oss2oss.rs:240:82 [INFO] [stdout] | [INFO] [stdout] 240 | if let Some(diff) = self.compare_content_len(record, &obj_s, &obj_t, &target_key) { [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `target_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/compare/compare_oss2oss.rs:245:78 [INFO] [stdout] | [INFO] [stdout] 245 | if let Some(diff) = self.compare_expires(record, &obj_s, &obj_t, &target_key)? { [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `target_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/compare/compare_oss2oss.rs:251:80 [INFO] [stdout] | [INFO] [stdout] 251 | if let Some(diff) = self.compare_meta_data(record, &obj_s, &obj_t, &target_key) { [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `target_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/compare/compare_oss2oss.rs:258:56 [INFO] [stdout] | [INFO] [stdout] 258 | .compare_content(record, obj_s, obj_t, &target_key) [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `target_key` [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: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/compare/compare_oss2oss.rs:364:24 [INFO] [stdout] | [INFO] [stdout] 364 | let mut left = obj_len.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `obj_len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/tasks/compare/compare_oss2oss.rs:411:22 [INFO] [stdout] | [INFO] [stdout] 411 | let s_meta = match s_obj.metadata() { [INFO] [stdout] | ______________________^ [INFO] [stdout] 412 | | Some(m) => Some(m.clone()), [INFO] [stdout] 413 | | None => None, [INFO] [stdout] 414 | | }; [INFO] [stdout] | |_________^ help: try: `s_obj.metadata().map(|m| m.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/tasks/compare/compare_oss2oss.rs:416:22 [INFO] [stdout] | [INFO] [stdout] 416 | let t_meta = match t_obj.metadata() { [INFO] [stdout] | ______________________^ [INFO] [stdout] 417 | | Some(m) => Some(m.clone()), [INFO] [stdout] 418 | | None => None, [INFO] [stdout] 419 | | }; [INFO] [stdout] | |_________^ help: try: `t_obj.metadata().map(|m| m.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/checkpoint/record.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 77 | json.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `json.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/tasks/compare/task_compare.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 48 | ExistsDiff(DiffExists), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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: variant name ends with the enum's name [INFO] [stdout] --> src/tasks/compare/task_compare.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 49 | LengthDiff(DiffLength), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/tasks/compare/task_compare.rs:50:5 [INFO] [stdout] | [INFO] [stdout] 50 | ExpiresDiff(DiffExpires), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/tasks/compare/task_compare.rs:51:5 [INFO] [stdout] | [INFO] [stdout] 51 | ContentDiff(DiffContent), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/tasks/compare/task_compare.rs:52:5 [INFO] [stdout] | [INFO] [stdout] 52 | MetaDiff(DiffMeta), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same postfix: `Diff` [INFO] [stdout] --> src/tasks/compare/task_compare.rs:47:1 [INFO] [stdout] | [INFO] [stdout] 47 | / pub enum Diff { [INFO] [stdout] 48 | | ExistsDiff(DiffExists), [INFO] [stdout] 49 | | LengthDiff(DiffLength), [INFO] [stdout] 50 | | ExpiresDiff(DiffExpires), [INFO] [stdout] 51 | | ContentDiff(DiffContent), [INFO] [stdout] 52 | | MetaDiff(DiffMeta), [INFO] [stdout] 53 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes 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] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/cmd/rootcmd.rs:133:5 [INFO] [stdout] | [INFO] [stdout] 133 | / if matches.get_flag("interact") { [INFO] [stdout] 134 | | if !INTERACT_STATUS.load(std::sync::atomic::Ordering::SeqCst) { [INFO] [stdout] 135 | | interact::run(); [INFO] [stdout] 136 | | return; [INFO] [stdout] 137 | | } [INFO] [stdout] 138 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 133 ~ if matches.get_flag("interact") [INFO] [stdout] 134 ~ && !INTERACT_STATUS.load(std::sync::atomic::Ordering::SeqCst) { [INFO] [stdout] 135 | interact::run(); [INFO] [stdout] 136 | return; [INFO] [stdout] 137 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/cmd/rootcmd.rs:193:25 [INFO] [stdout] | [INFO] [stdout] 193 | / let _ = rt.block_on(async { [INFO] [stdout] 194 | | if let Err(e) = t.analyze().await { [INFO] [stdout] 195 | | log::error!("{:?}", e); [INFO] [stdout] 196 | | return; [INFO] [stdout] 197 | | } [INFO] [stdout] 198 | | }); [INFO] [stdout] | |___________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 193 - let _ = rt.block_on(async { [INFO] [stdout] 193 + rt.block_on(async { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/cmd/rootcmd.rs:196:33 [INFO] [stdout] | [INFO] [stdout] 196 | ... return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 195 - log::error!("{:?}", e); [INFO] [stdout] 196 - return; [INFO] [stdout] 195 + log::error!("{:?}", e); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/cmd/rootcmd.rs:213:25 [INFO] [stdout] | [INFO] [stdout] 213 | let _ = rt.block_on(async { t.execute().await }); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 213 - let _ = rt.block_on(async { t.execute().await }); [INFO] [stdout] 213 + rt.block_on(async { t.execute().await }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/cmd/rootcmd.rs:250:25 [INFO] [stdout] | [INFO] [stdout] 250 | return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 249 - log::error!("{:?}", e); [INFO] [stdout] 250 - return; [INFO] [stdout] 249 + log::error!("{:?}", e); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/cmd/rootcmd.rs:274:17 [INFO] [stdout] | [INFO] [stdout] 274 | transfer_oss2oss.name = "transfer_oss2oss".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `models::model_task_transfer::TransferTask { name: "transfer_oss2oss".to_string(), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/cmd/rootcmd.rs:273:17 [INFO] [stdout] | [INFO] [stdout] 273 | let mut transfer_oss2oss = TransferTask::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/cmd/rootcmd.rs:285:17 [INFO] [stdout] | [INFO] [stdout] 285 | oss_desc.provider = OssProvider::ALI; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `models::model_s3::OSSDescription { provider: OssProvider::ALI, endpoint: "http://oss-cn-beijing.aliyuncs.com".to_string(), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/cmd/rootcmd.rs:284:17 [INFO] [stdout] | [INFO] [stdout] 284 | let mut oss_desc = OSSDescription::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/cmd/rootcmd.rs:319:17 [INFO] [stdout] | [INFO] [stdout] 319 | transfer_oss2local.name = "transfer_oss2local".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `models::model_task_transfer::TransferTask { name: "transfer_oss2local".to_string(), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/cmd/rootcmd.rs:318:17 [INFO] [stdout] | [INFO] [stdout] 318 | let mut transfer_oss2local = TransferTask::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/cmd/rootcmd.rs:356:17 [INFO] [stdout] | [INFO] [stdout] 356 | transfer_local2oss.name = "transfer_local2oss".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `models::model_task_transfer::TransferTask { name: "transfer_local2oss".to_string(), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/cmd/rootcmd.rs:355:17 [INFO] [stdout] | [INFO] [stdout] 355 | let mut transfer_local2oss = TransferTask::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/cmd/rootcmd.rs:396:17 [INFO] [stdout] | [INFO] [stdout] 396 | transfer_local2local.name = "transfer_local2local".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `models::model_task_transfer::TransferTask { name: "transfer_local2local".to_string(), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/cmd/rootcmd.rs:395:17 [INFO] [stdout] | [INFO] [stdout] 395 | let mut transfer_local2local = TransferTask::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/cmd/rootcmd.rs:499:17 [INFO] [stdout] | [INFO] [stdout] 499 | task_compare.source = ObjectStorage::Local("/tmp".to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `models::model_task_compare::CompareTask { source: ObjectStorage::Local("/tmp".to_string()), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/cmd/rootcmd.rs:498:17 [INFO] [stdout] | [INFO] [stdout] 498 | let mut task_compare = CompareTask::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/cmd/rootcmd.rs:525:17 [INFO] [stdout] | [INFO] [stdout] 525 | task_compare.target = ObjectStorage::Local("/tmp".to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `models::model_task_compare::CompareTask { target: ObjectStorage::Local("/tmp".to_string()), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/cmd/rootcmd.rs:524:17 [INFO] [stdout] | [INFO] [stdout] 524 | let mut task_compare = CompareTask::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/tasks/compare/task_compare.rs:133:9 [INFO] [stdout] | [INFO] [stdout] 133 | json.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `json.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/cmd/rootcmd.rs:551:17 [INFO] [stdout] | [INFO] [stdout] 551 | task_compare.source = ObjectStorage::Local("/root".to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `models::model_task_compare::CompareTask { source: ObjectStorage::Local("/root".to_string()), target: ObjectStorage::Local("/tmp".to_string()), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/cmd/rootcmd.rs:550:17 [INFO] [stdout] | [INFO] [stdout] 550 | let mut task_compare = CompareTask::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/cmd/rootcmd.rs:578:16 [INFO] [stdout] | [INFO] [stdout] 578 | if let Some(_) = parameters.subcommand_matches("provider") { [INFO] [stdout] | -------^^^^^^^-------------------------------------------- help: try: `if parameters.subcommand_matches("provider").is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/cmd/rootcmd.rs:588:16 [INFO] [stdout] | [INFO] [stdout] 588 | if let Some(_) = parameters.subcommand_matches("task_type") { [INFO] [stdout] | -------^^^^^^^--------------------------------------------- help: try: `if parameters.subcommand_matches("task_type").is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/compare/task_compare.rs:245:15 [INFO] [stdout] | [INFO] [stdout] 245 | while exec_set.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!exec_set.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/compare/task_compare.rs:251:15 [INFO] [stdout] | [INFO] [stdout] 251 | while sys_set.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!sys_set.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/tasks/compare/task_compare.rs:275:36 [INFO] [stdout] | [INFO] [stdout] 275 | if key.starts_with(&COMPARE_RESULT_PREFIX) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `COMPARE_RESULT_PREFIX` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/tasks/compare/task_compare.rs:284:5 [INFO] [stdout] | [INFO] [stdout] 284 | / async fn compare_records_multi_files( [INFO] [stdout] 285 | | &self, [INFO] [stdout] 286 | | stop_mark: Arc, [INFO] [stdout] 287 | | err_occur: Arc, [INFO] [stdout] ... | [INFO] [stdout] 292 | | obj_list_files: Vec, [INFO] [stdout] 293 | | ) { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `FilePosition` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/compare/task_compare.rs:308:33 [INFO] [stdout] | [INFO] [stdout] 308 | let mut file_position = file_position.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*file_position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/cmd/rootcmd.rs:702:12 [INFO] [stdout] | [INFO] [stdout] 702 | if let Some(_) = matches.subcommand_matches("tree") { [INFO] [stdout] | -------^^^^^^^------------------------------------- help: try: `if matches.subcommand_matches("tree").is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `file_num` is used as a loop counter [INFO] [stdout] --> src/tasks/compare/task_compare.rs:311:9 [INFO] [stdout] | [INFO] [stdout] 311 | for exec_file_desc in obj_list_files.iter().skip(file_num_usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (file_num, exec_file_desc) in (file_position.file_num..).zip(obj_list_files.iter().skip(file_num_usize))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `bytes` [INFO] [stdout] --> src/tasks/compare/task_compare.rs:336:35 [INFO] [stdout] | [INFO] [stdout] 336 | let len = key.bytes().len() + "\n".bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `key.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] = note: `#[warn(clippy::needless_as_bytes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `bytes` [INFO] [stdout] --> src/tasks/compare/task_compare.rs:336:55 [INFO] [stdout] | [INFO] [stdout] 336 | let len = key.bytes().len() + "\n".bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `"\n".len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/commons/calculate_etag.rs:14:36 [INFO] [stdout] | [INFO] [stdout] 14 | let mut current_md5: Vec = repeat(0).take((md5.output_bits() + 7) / 8).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0, (md5.output_bits() + 7) / 8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] = note: `#[warn(clippy::manual_repeat_n)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/commons/calculate_etag.rs:14:51 [INFO] [stdout] | [INFO] [stdout] 14 | let mut current_md5: Vec = repeat(0).take((md5.output_bits() + 7) / 8).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `md5.output_bits().div_ceil(8)` [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: length comparison to zero [INFO] [stdout] --> src/tasks/compare/task_compare.rs:375:28 [INFO] [stdout] | [INFO] [stdout] 375 | && vec_keys.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vec_keys.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/commons/convert.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | / return match byte_str.chars().last() { [INFO] [stdout] 13 | | Some(latest) => match latest { [INFO] [stdout] 14 | | 'k' | 'K' => { [INFO] [stdout] 15 | | byte_str.remove(byte_str.len() - 1); [INFO] [stdout] ... | [INFO] [stdout] 37 | | None => return Err(anyhow!("unit description error")), [INFO] [stdout] 38 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 12 ~ match byte_str.chars().last() { [INFO] [stdout] 13 + Some(latest) => match latest { [INFO] [stdout] 14 + 'k' | 'K' => { [INFO] [stdout] 15 + byte_str.remove(byte_str.len() - 1); [INFO] [stdout] 16 + let size: usize = byte_str.parse()?; [INFO] [stdout] 17 + let size = size * k; [INFO] [stdout] 18 + Ok(size) [INFO] [stdout] 19 + } [INFO] [stdout] 20 + 'm' | 'M' => { [INFO] [stdout] 21 + byte_str.remove(byte_str.len() - 1); [INFO] [stdout] 22 + let size: usize = byte_str.parse()?; [INFO] [stdout] 23 + let size = size * m; [INFO] [stdout] 24 + Ok(size) [INFO] [stdout] 25 + } [INFO] [stdout] 26 + 'g' | 'G' => { [INFO] [stdout] 27 + byte_str.remove(byte_str.len() - 1); [INFO] [stdout] 28 + let size: usize = byte_str.parse()?; [INFO] [stdout] 29 + let size = size * g; [INFO] [stdout] 30 + Ok(size) [INFO] [stdout] 31 + } [INFO] [stdout] 32 + _ => { [INFO] [stdout] 33 + let size: usize = byte_str.parse()?; [INFO] [stdout] 34 + Ok(size) [INFO] [stdout] 35 + } [INFO] [stdout] 36 + }, [INFO] [stdout] 37 + None => return Err(anyhow!("unit description error")), [INFO] [stdout] 38 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/commons/convert.rs:42:5 [INFO] [stdout] | [INFO] [stdout] 42 | / return match byte_size { [INFO] [stdout] 43 | | b if b < 1024 => b.to_string(), [INFO] [stdout] 44 | | b if b >= 1024 && b < 1024 * 1024 => { [INFO] [stdout] 45 | | let size = b / 1024; [INFO] [stdout] ... | [INFO] [stdout] 64 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 42 ~ match byte_size { [INFO] [stdout] 43 + b if b < 1024 => b.to_string(), [INFO] [stdout] 44 + b if b >= 1024 && b < 1024 * 1024 => { [INFO] [stdout] 45 + let size = b / 1024; [INFO] [stdout] 46 + let mut size_str = size.to_string(); [INFO] [stdout] 47 + size_str.push('k'); [INFO] [stdout] 48 + size_str [INFO] [stdout] 49 + } [INFO] [stdout] 50 + [INFO] [stdout] 51 + b if b >= 1024 * 1024 && b < 1024 * 1024 * 1024 => { [INFO] [stdout] 52 + let size = b / 1024 / 1024; [INFO] [stdout] 53 + let mut size_str = size.to_string(); [INFO] [stdout] 54 + size_str.push('m'); [INFO] [stdout] 55 + size_str [INFO] [stdout] 56 + } [INFO] [stdout] 57 + [INFO] [stdout] 58 + _ => { [INFO] [stdout] 59 + let size = byte_size / 1024 / 1024 / 1024; [INFO] [stdout] 60 + let mut size_str = size.to_string(); [INFO] [stdout] 61 + size_str.push('g'); [INFO] [stdout] 62 + size_str [INFO] [stdout] 63 + } [INFO] [stdout] 64 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tasks/compare/task_compare.rs:442:9 [INFO] [stdout] | [INFO] [stdout] 442 | / return match self.attributes.start_from_checkpoint { [INFO] [stdout] 443 | | true => { [INFO] [stdout] 444 | | let checkpoint = get_task_checkpoint(check_point_file.as_str()) [INFO] [stdout] 445 | | .context(format!("{}:{}", file!(), line!()))?; [INFO] [stdout] ... | [INFO] [stdout] 468 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 442 ~ match self.attributes.start_from_checkpoint { [INFO] [stdout] 443 + true => { [INFO] [stdout] 444 + let checkpoint = get_task_checkpoint(check_point_file.as_str()) [INFO] [stdout] 445 + .context(format!("{}:{}", file!(), line!()))?; [INFO] [stdout] 446 + let list_files_desc = self.gen_source_object_list_file_desc().context(format!( [INFO] [stdout] 447 + "{}:{}", [INFO] [stdout] 448 + file!(), [INFO] [stdout] 449 + line!() [INFO] [stdout] 450 + ))?; [INFO] [stdout] 451 + let list_file_position = checkpoint.executing_file_position.clone(); [INFO] [stdout] 452 + Ok((list_files_desc, list_file_position)) [INFO] [stdout] 453 + } [INFO] [stdout] 454 + false => { [INFO] [stdout] 455 + self.init_task() [INFO] [stdout] 456 + .await [INFO] [stdout] 457 + .context(format!("{}:{}", file!(), line!()))?; [INFO] [stdout] 458 + let list_files_desc = self.gen_source_object_list_file_desc().context(format!( [INFO] [stdout] 459 + "{}:{}", [INFO] [stdout] 460 + file!(), [INFO] [stdout] 461 + line!() [INFO] [stdout] 462 + ))?; [INFO] [stdout] 463 + let checkpoint = get_task_checkpoint(check_point_file.as_str()) [INFO] [stdout] 464 + .context(format!("{}:{}", file!(), line!()))?; [INFO] [stdout] 465 + let list_file_position = checkpoint.executing_file_position.clone(); [INFO] [stdout] 466 + Ok((list_files_desc, list_file_position)) [INFO] [stdout] 467 + } [INFO] [stdout] 468 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/convert.rs:44:14 [INFO] [stdout] | [INFO] [stdout] 44 | b if b >= 1024 && b < 1024 * 1024 => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024..1024 * 1024).contains(&b)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `FilePosition` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/compare/task_compare.rs:451:42 [INFO] [stdout] | [INFO] [stdout] 451 | let list_file_position = checkpoint.executing_file_position.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `checkpoint.executing_file_position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/convert.rs:51:14 [INFO] [stdout] | [INFO] [stdout] 51 | b if b >= 1024 * 1024 && b < 1024 * 1024 * 1024 => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024..1024 * 1024 * 1024).contains(&b)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `FilePosition` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/compare/task_compare.rs:465:42 [INFO] [stdout] | [INFO] [stdout] 465 | let list_file_position = checkpoint.executing_file_position.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `checkpoint.executing_file_position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/tasks/compare/task_compare.rs:517:9 [INFO] [stdout] | [INFO] [stdout] 517 | checkpoint.executing_file = list_files[0].clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `models::model_checkpoint::CheckPoint { executing_file: list_files[0].clone(), task_begin_timestamp: i128::from(now.as_secs()), modify_checkpoint_timestamp: i128::from(now.as_secs()), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/tasks/compare/task_compare.rs:516:9 [INFO] [stdout] | [INFO] [stdout] 516 | let mut checkpoint = CheckPoint::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/tasks/compare/task_compare.rs:581:5 [INFO] [stdout] | [INFO] [stdout] 581 | / for line in lines { [INFO] [stdout] 582 | | if let Ok(str) = line { [INFO] [stdout] 583 | | let result = json_to_struct::(&str)?; [INFO] [stdout] 584 | | let source = result.source; [INFO] [stdout] ... | [INFO] [stdout] 591 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/tasks/compare/task_compare.rs:582:9 [INFO] [stdout] | [INFO] [stdout] 582 | / if let Ok(str) = line { [INFO] [stdout] 583 | | let result = json_to_struct::(&str)?; [INFO] [stdout] 584 | | let source = result.source; [INFO] [stdout] 585 | | let target = result.target; [INFO] [stdout] ... | [INFO] [stdout] 589 | | builder.push_record(raw); [INFO] [stdout] 590 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 581 ~ for str in lines.flatten() { [INFO] [stdout] 582 + let result = json_to_struct::(&str)?; [INFO] [stdout] 583 + let source = result.source; [INFO] [stdout] 584 + let target = result.target; [INFO] [stdout] 585 + let diff = result.diff; [INFO] [stdout] 586 + [INFO] [stdout] 587 + let raw = vec![source, target, diff.name(), diff.to_string()]; [INFO] [stdout] 588 + builder.push_record(raw); [INFO] [stdout] 589 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commons/fileutiles.rs:159:28 [INFO] [stdout] | [INFO] [stdout] 159 | f_target.write_all(&buf)?; [INFO] [stdout] | ^^^^ help: change this to: `buf` [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: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/commons/fileutiles.rs:268:21 [INFO] [stdout] | [INFO] [stdout] 268 | let l = last_modify_filter.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `last_modify_filter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/tasks/task.rs:137:5 [INFO] [stdout] | [INFO] [stdout] 136 | let id = id_generator_generator.real_time_generate(); [INFO] [stdout] | ----------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 137 | id [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 136 ~ [INFO] [stdout] 137 ~ id_generator_generator.real_time_generate() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/tasks/task.rs:147:9 [INFO] [stdout] | [INFO] [stdout] 147 | file_name.push_str("/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `file_name.push('/')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commons/fileutiles.rs:282:8 [INFO] [stdout] | [INFO] [stdout] 282 | if entries.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!entries.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/commons/fileutiles.rs:285:17 [INFO] [stdout] | [INFO] [stdout] 285 | let l = last_modify_filter.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `last_modify_filter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `FilePosition` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/task_delete.rs:57:29 [INFO] [stdout] | [INFO] [stdout] 57 | let file_position = current_list_file_position.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `current_list_file_position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/commons/fileutiles.rs:297:15 [INFO] [stdout] | [INFO] [stdout] 297 | while let Some(_) = joinset.join_next().await {} [INFO] [stdout] | ----------^^^^^^^---------------------------- help: try: `while joinset.join_next().await.is_some()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `bytes` [INFO] [stdout] --> src/tasks/task_delete.rs:106:35 [INFO] [stdout] | [INFO] [stdout] 106 | let len = key.bytes().len() + "\n".bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `key.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `bytes` [INFO] [stdout] --> src/tasks/task_delete.rs:106:55 [INFO] [stdout] | [INFO] [stdout] 106 | let len = key.bytes().len() + "\n".bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `"\n".len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/task_delete.rs:129:28 [INFO] [stdout] | [INFO] [stdout] 129 | && vec_record.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vec_record.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/task_delete.rs:162:15 [INFO] [stdout] | [INFO] [stdout] 162 | while execut_set.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!execut_set.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/task_delete.rs:171:15 [INFO] [stdout] | [INFO] [stdout] 171 | while sys_set.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!sys_set.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `FilePosition` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/task_delete.rs:195:42 [INFO] [stdout] | [INFO] [stdout] 195 | let list_file_position = checkpoint.executing_file_position.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `checkpoint.executing_file_position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tasks/task_pre_check.rs:15:17 [INFO] [stdout] | [INFO] [stdout] 15 | return Ok(path.exists()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 15 - return Ok(path.exists()); [INFO] [stdout] 15 + Ok(path.exists()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `.write(true)` because there is `.append(true)` [INFO] [stdout] --> src/commons/fileutiles.rs:576:9 [INFO] [stdout] | [INFO] [stdout] 576 | .write(true) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove `.write(true)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ineffective_open_options [INFO] [stdout] = note: `#[warn(clippy::ineffective_open_options)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tasks/task_pre_check.rs:26:17 [INFO] [stdout] | [INFO] [stdout] 26 | return Ok(true); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 26 - return Ok(true); [INFO] [stdout] 26 + Ok(true) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commons/fileutiles.rs:583:28 [INFO] [stdout] | [INFO] [stdout] 583 | merge_to.write_all(&buf)?; [INFO] [stdout] | ^^^^ help: change this to: `buf` [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: unnecessary use of `.write(true)` because there is `.append(true)` [INFO] [stdout] --> src/commons/fileutiles.rs:613:9 [INFO] [stdout] | [INFO] [stdout] 613 | .write(true) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove `.write(true)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ineffective_open_options [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/commons/fileutiles.rs:621:9 [INFO] [stdout] | [INFO] [stdout] 621 | line.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `line.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/commons/fileutiles.rs:684:25 [INFO] [stdout] | [INFO] [stdout] 684 | file_path.push_str("/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `file_path.push('/')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `FilePosition` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/task_status.rs:67:41 [INFO] [stdout] | [INFO] [stdout] 67 | file_position = item.value().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*item.value()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `FilePosition` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/task_status.rs:71:45 [INFO] [stdout] | [INFO] [stdout] 71 | ... file_position = item.value().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*item.value()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tasks/task_status.rs:75:25 [INFO] [stdout] | [INFO] [stdout] 75 | / if file_position.file_num.eq(&item.value().file_num) { [INFO] [stdout] 76 | | if file_position.offset > item.value().offset { [INFO] [stdout] 77 | | file_position = item.value().clone(); [INFO] [stdout] 78 | | } [INFO] [stdout] 79 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 75 ~ if file_position.file_num.eq(&item.value().file_num) [INFO] [stdout] 76 ~ && file_position.offset > item.value().offset { [INFO] [stdout] 77 | file_position = item.value().clone(); [INFO] [stdout] 78 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `FilePosition` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/task_status.rs:77:49 [INFO] [stdout] | [INFO] [stdout] 77 | ... file_position = item.value().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*item.value()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `FilePosition` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/task_status.rs:85:50 [INFO] [stdout] | [INFO] [stdout] 85 | checkpoint.executing_file_position = file_position.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `file_position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/tasks/task_traits.rs:14:15 [INFO] [stdout] | [INFO] [stdout] 14 | #[async_trait] [INFO] [stdout] | _______________^ [INFO] [stdout] 15 | | pub trait TransferTaskActions { [INFO] [stdout] 16 | | async fn analyze_source(&self) -> Result>; [INFO] [stdout] ... | [INFO] [stdout] 59 | | async fn execute_increment( [INFO] [stdout] | |____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/commons/filters.rs:15:1 [INFO] [stdout] | [INFO] [stdout] 15 | / impl Default for RegexFilter { [INFO] [stdout] 16 | | fn default() -> Self { [INFO] [stdout] 17 | | Self { [INFO] [stdout] 18 | | exclude_regex: None, [INFO] [stdout] ... | [INFO] [stdout] 22 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 10 + #[derive(Default)] [INFO] [stdout] 11 | pub struct RegexFilter { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:133:16 [INFO] [stdout] | [INFO] [stdout] 133 | if obj_list_files.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!obj_list_files.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/commons/filters.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 76 | / let is_exclude = match self.exclude_regex.clone() { [INFO] [stdout] 77 | | Some(e) => { [INFO] [stdout] 78 | | return e.is_match(content); [INFO] [stdout] ... | [INFO] [stdout] 81 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 82 | is_exclude [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 76 ~ [INFO] [stdout] 77 ~ match self.exclude_regex.clone() { [INFO] [stdout] 78 + Some(e) => { [INFO] [stdout] 79 + return e.is_match(content); [INFO] [stdout] 80 + } [INFO] [stdout] 81 + None => false, [INFO] [stdout] 82 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:198:15 [INFO] [stdout] | [INFO] [stdout] 198 | while exec_set.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!exec_set.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/commons/filters.rs:92:9 [INFO] [stdout] | [INFO] [stdout] 86 | / let is_included = match self.include_regex.clone() { [INFO] [stdout] 87 | | Some(e) => { [INFO] [stdout] 88 | | return e.is_match(content); [INFO] [stdout] ... | [INFO] [stdout] 91 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 92 | is_included [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 86 ~ [INFO] [stdout] 87 ~ match self.include_regex.clone() { [INFO] [stdout] 88 + Some(e) => { [INFO] [stdout] 89 + return e.is_match(content); [INFO] [stdout] 90 + } [INFO] [stdout] 91 + None => true, [INFO] [stdout] 92 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/commons/json_utile.rs:11:46 [INFO] [stdout] | [INFO] [stdout] 11 | let res = from_str::(content).map_err(|e| anyhow::Error::new(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `anyhow::Error::new` [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: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:267:15 [INFO] [stdout] | [INFO] [stdout] 267 | while sys_set.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!sys_set.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:329:9 [INFO] [stdout] | [INFO] [stdout] 329 | checkpoint.executing_file = list_files[0].clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `models::model_checkpoint::CheckPoint { executing_file: list_files[0].clone(), task_begin_timestamp: i128::from(now.as_secs()), modify_checkpoint_timestamp: i128::from(now.as_secs()), last_scan_timestamp: i128::from(now.as_secs()), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:328:9 [INFO] [stdout] | [INFO] [stdout] 328 | let mut checkpoint = CheckPoint::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:409:17 [INFO] [stdout] | [INFO] [stdout] 409 | return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 408 - log::error!("{:?}", e); [INFO] [stdout] 409 - return; [INFO] [stdout] 408 + log::error!("{:?}", e); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:498:50 [INFO] [stdout] | [INFO] [stdout] 498 | let mut checkpoint = get_task_checkpoint(&checkpoint_file)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `checkpoint_file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:500:28 [INFO] [stdout] | [INFO] [stdout] 500 | checkpoint.save_to(&checkpoint_file)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `checkpoint_file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:511:17 [INFO] [stdout] | [INFO] [stdout] 511 | &checkpoint_file, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `checkpoint_file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Modified` [INFO] [stdout] --> src/commons/notify_utile.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 49 | / pub fn new() -> Self { [INFO] [stdout] 50 | | Self { [INFO] [stdout] 51 | | path: "".to_string(), [INFO] [stdout] 52 | | path_type: PathType::File, [INFO] [stdout] ... | [INFO] [stdout] 55 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 48 + impl Default for Modified { [INFO] [stdout] 49 + fn default() -> Self { [INFO] [stdout] 50 + Self::new() [INFO] [stdout] 51 + } [INFO] [stdout] 52 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/commons/notify_utile.rs:83:17 [INFO] [stdout] | [INFO] [stdout] 83 | return Err(anyhow::anyhow!("watched dir not exists")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 83 - return Err(anyhow::anyhow!("watched dir not exists")); [INFO] [stdout] 83 + Err(anyhow::anyhow!("watched dir not exists")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/commons/notify_utile.rs:177:13 [INFO] [stdout] | [INFO] [stdout] 177 | / match file.metadata() { [INFO] [stdout] 178 | | Ok(meta) => { [INFO] [stdout] 179 | | file_size.store(meta.len(), Ordering::SeqCst); [INFO] [stdout] ... | [INFO] [stdout] 182 | | }; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 177 ~ if let Ok(meta) = file.metadata() { [INFO] [stdout] 178 + file_size.store(meta.len(), Ordering::SeqCst); [INFO] [stdout] 179 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commons/notify_utile.rs:215:24 [INFO] [stdout] | [INFO] [stdout] 215 | .write_all(¬ify_path.as_path().display().to_string().as_bytes())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `notify_path.as_path().display().to_string().as_bytes()` [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: using `clone` on type `FilePosition` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:746:33 [INFO] [stdout] | [INFO] [stdout] 746 | let mut file_position = file_position.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `file_position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commons/notify_utile.rs:290:37 [INFO] [stdout] | [INFO] [stdout] 290 | ... ¬ify_path.as_path().display().to_string().as_bytes(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `notify_path.as_path().display().to_string().as_bytes()` [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 variable `file_num` is used as a loop counter [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:748:9 [INFO] [stdout] | [INFO] [stdout] 748 | for exec_file_desc in obj_list_files.iter().skip(file_num_usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (file_num, exec_file_desc) in (file_position.file_num..).zip(obj_list_files.iter().skip(file_num_usize))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `map_err` over `inspect_err` [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:751:18 [INFO] [stdout] | [INFO] [stdout] 751 | .map_err(|e| { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect [INFO] [stdout] = note: `#[warn(clippy::manual_inspect)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 751 ~ .inspect_err(|e| { [INFO] [stdout] 752 | shared_marks [INFO] [stdout] ... [INFO] [stdout] 756 | .execute_stop_mark [INFO] [stdout] 757 ~ .store(true, std::sync::atomic::Ordering::SeqCst); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `map_err` over `inspect_err` [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:763:18 [INFO] [stdout] | [INFO] [stdout] 763 | .map_err(|e| { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 763 ~ .inspect_err(|e| { [INFO] [stdout] 764 | shared_marks [INFO] [stdout] ... [INFO] [stdout] 768 | .execute_stop_mark [INFO] [stdout] 769 ~ .store(true, std::sync::atomic::Ordering::SeqCst); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/commons/notify_utile.rs:357:17 [INFO] [stdout] | [INFO] [stdout] 357 | return Err(anyhow::anyhow!("watched dir not exists")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 357 - return Err(anyhow::anyhow!("watched dir not exists")); [INFO] [stdout] 357 + Err(anyhow::anyhow!("watched dir not exists")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `map_err` over `inspect_err` [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:775:18 [INFO] [stdout] | [INFO] [stdout] 775 | .map_err(|e| { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 775 ~ .inspect_err(|e| { [INFO] [stdout] 776 | shared_marks [INFO] [stdout] ... [INFO] [stdout] 780 | .execute_stop_mark [INFO] [stdout] 781 ~ .store(true, std::sync::atomic::Ordering::SeqCst); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `bytes` [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:801:35 [INFO] [stdout] | [INFO] [stdout] 801 | let len = key.bytes().len() + "\n".bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `key.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `bytes` [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:801:55 [INFO] [stdout] | [INFO] [stdout] 801 | let len = key.bytes().len() + "\n".bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `"\n".len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commons/notify_utile.rs:385:24 [INFO] [stdout] | [INFO] [stdout] 385 | .write_all(¬ify_path.as_path().display().to_string().as_bytes())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `notify_path.as_path().display().to_string().as_bytes()` [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: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:842:28 [INFO] [stdout] | [INFO] [stdout] 842 | && vec_keys.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vec_keys.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:900:5 [INFO] [stdout] | [INFO] [stdout] 900 | / async fn exec_record_descriptions_file( [INFO] [stdout] 901 | | &self, [INFO] [stdout] 902 | | stop_mark: Arc, [INFO] [stdout] 903 | | err_occur: Arc, [INFO] [stdout] ... | [INFO] [stdout] 908 | | executing_file: FileDescription, [INFO] [stdout] 909 | | ) { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commons/notify_utile.rs:456:37 [INFO] [stdout] | [INFO] [stdout] 456 | ... ¬ify_path.as_path().display().to_string().as_bytes(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `notify_path.as_path().display().to_string().as_bytes()` [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: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:939:74 [INFO] [stdout] | [INFO] [stdout] 939 | || idx.to_string().eq(&(total_lines - 1).to_string()) && vec_keys.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vec_keys.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/commons/notify_utile.rs:525:9 [INFO] [stdout] | [INFO] [stdout] 525 | / let _rt_rs = rt.block_on(async move { [INFO] [stdout] 526 | | let _rs_watch = set.spawn(async move { [INFO] [stdout] 527 | | println!("begin watch"); [INFO] [stdout] 528 | | let file = OpenOptions::new() [INFO] [stdout] ... | [INFO] [stdout] 550 | | }); [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 525 - let _rt_rs = rt.block_on(async move { [INFO] [stdout] 525 + rt.block_on(async move { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commons/notify_utile.rs:547:19 [INFO] [stdout] | [INFO] [stdout] 547 | while set.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!set.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/commons/size_distributed.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | / return match size { [INFO] [stdout] 7 | | s if s < 1024 => "0-1K".to_string(), [INFO] [stdout] 8 | | s if s >= 1024 && s < 1024 * 8 => "1K-8K".to_string(), [INFO] [stdout] 9 | | s if s >= 1024 * 8 && s < 1024 * 16 => "8K-16K".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 38 | | _ => "1T+".to_string(), [INFO] [stdout] 39 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 6 ~ match size { [INFO] [stdout] 7 + s if s < 1024 => "0-1K".to_string(), [INFO] [stdout] 8 + s if s >= 1024 && s < 1024 * 8 => "1K-8K".to_string(), [INFO] [stdout] 9 + s if s >= 1024 * 8 && s < 1024 * 16 => "8K-16K".to_string(), [INFO] [stdout] 10 + s if s >= 1024 * 16 && s < 1024 * 32 => "16K-32K".to_string(), [INFO] [stdout] 11 + s if s >= 1024 * 32 && s < 1024 * 64 => "32K-64K".to_string(), [INFO] [stdout] 12 + s if s >= 1024 * 64 && s < 1024 * 128 => "64K-128K".to_string(), [INFO] [stdout] 13 + s if s >= 1024 * 128 && s < 1024 * 256 => "128K-256K".to_string(), [INFO] [stdout] 14 + s if s >= 1024 * 256 && s < 1024 * 512 => "256K-512K".to_string(), [INFO] [stdout] 15 + s if s >= 1024 * 512 && s < 1024 * 1024 => "512K-1M".to_string(), [INFO] [stdout] 16 + s if s >= 1024 * 1024 && s < 1024 * 1024 * 8 => "1M-8M".to_string(), [INFO] [stdout] 17 + s if s >= 1024 * 1024 * 8 && s < 1024 * 1024 * 16 => "8M-16M".to_string(), [INFO] [stdout] 18 + s if s >= 1024 * 1024 * 16 && s < 1024 * 1024 * 32 => "16M-32M".to_string(), [INFO] [stdout] 19 + s if s >= 1024 * 1024 * 32 && s < 1024 * 1024 * 64 => "32M-64M".to_string(), [INFO] [stdout] 20 + s if s >= 1024 * 1024 * 64 && s < 1024 * 1024 * 128 => "64M-128M".to_string(), [INFO] [stdout] 21 + s if s >= 1024 * 1024 * 128 && s < 1024 * 1024 * 256 => "128M-256M".to_string(), [INFO] [stdout] 22 + s if s >= 1024 * 1024 * 256 && s < 1024 * 1024 * 512 => "256M-512M".to_string(), [INFO] [stdout] 23 + s if s >= 1024 * 1024 * 512 && s < 1024 * 1024 * 1024 => "512M-1G".to_string(), [INFO] [stdout] 24 + s if s >= 1024 * 1024 * 1024 && s < 1024 * 1024 * 1024 * 8 => "1G-8G".to_string(), [INFO] [stdout] 25 + s if s >= 1024 * 1024 * 1024 * 8 && s < 1024 * 1024 * 1024 * 16 => "8G-16G".to_string(), [INFO] [stdout] 26 + s if s >= 1024 * 1024 * 1024 * 16 && s < 1024 * 1024 * 1024 * 32 => "16G-32G".to_string(), [INFO] [stdout] 27 + s if s >= 1024 * 1024 * 1024 * 32 && s < 1024 * 1024 * 1024 * 64 => "32G-64G".to_string(), [INFO] [stdout] 28 + s if s >= 1024 * 1024 * 1024 * 64 && s < 1024 * 1024 * 1024 * 128 => "64G-128G".to_string(), [INFO] [stdout] 29 + s if s >= 1024 * 1024 * 1024 * 128 && s < 1024 * 1024 * 1024 * 256 => { [INFO] [stdout] 30 + "128G-256G".to_string() [INFO] [stdout] 31 + } [INFO] [stdout] 32 + s if s >= 1024 * 1024 * 1024 * 256 && s < 1024 * 1024 * 1024 * 512 => { [INFO] [stdout] 33 + "256G-512G".to_string() [INFO] [stdout] 34 + } [INFO] [stdout] 35 + s if s >= 1024 * 1024 * 1024 * 512 && s < 1024 * 1024 * 1024 * 1024 => { [INFO] [stdout] 36 + "512G-1T".to_string() [INFO] [stdout] 37 + } [INFO] [stdout] 38 + _ => "1T+".to_string(), [INFO] [stdout] 39 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:8:14 [INFO] [stdout] | [INFO] [stdout] 8 | s if s >= 1024 && s < 1024 * 8 => "1K-8K".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024..1024 * 8).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:9:14 [INFO] [stdout] | [INFO] [stdout] 9 | s if s >= 1024 * 8 && s < 1024 * 16 => "8K-16K".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 8..1024 * 16).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:10:14 [INFO] [stdout] | [INFO] [stdout] 10 | s if s >= 1024 * 16 && s < 1024 * 32 => "16K-32K".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 16..1024 * 32).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:11:14 [INFO] [stdout] | [INFO] [stdout] 11 | s if s >= 1024 * 32 && s < 1024 * 64 => "32K-64K".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 32..1024 * 64).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:12:14 [INFO] [stdout] | [INFO] [stdout] 12 | s if s >= 1024 * 64 && s < 1024 * 128 => "64K-128K".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 64..1024 * 128).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:13:14 [INFO] [stdout] | [INFO] [stdout] 13 | s if s >= 1024 * 128 && s < 1024 * 256 => "128K-256K".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 128..1024 * 256).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:14:14 [INFO] [stdout] | [INFO] [stdout] 14 | s if s >= 1024 * 256 && s < 1024 * 512 => "256K-512K".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 256..1024 * 512).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:15:14 [INFO] [stdout] | [INFO] [stdout] 15 | s if s >= 1024 * 512 && s < 1024 * 1024 => "512K-1M".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 512..1024 * 1024).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:16:14 [INFO] [stdout] | [INFO] [stdout] 16 | s if s >= 1024 * 1024 && s < 1024 * 1024 * 8 => "1M-8M".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024..1024 * 1024 * 8).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:17:14 [INFO] [stdout] | [INFO] [stdout] 17 | s if s >= 1024 * 1024 * 8 && s < 1024 * 1024 * 16 => "8M-16M".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 8..1024 * 1024 * 16).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:18:14 [INFO] [stdout] | [INFO] [stdout] 18 | s if s >= 1024 * 1024 * 16 && s < 1024 * 1024 * 32 => "16M-32M".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 16..1024 * 1024 * 32).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:19:14 [INFO] [stdout] | [INFO] [stdout] 19 | s if s >= 1024 * 1024 * 32 && s < 1024 * 1024 * 64 => "32M-64M".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 32..1024 * 1024 * 64).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:20:14 [INFO] [stdout] | [INFO] [stdout] 20 | s if s >= 1024 * 1024 * 64 && s < 1024 * 1024 * 128 => "64M-128M".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 64..1024 * 1024 * 128).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:21:14 [INFO] [stdout] | [INFO] [stdout] 21 | s if s >= 1024 * 1024 * 128 && s < 1024 * 1024 * 256 => "128M-256M".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 128..1024 * 1024 * 256).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:22:14 [INFO] [stdout] | [INFO] [stdout] 22 | s if s >= 1024 * 1024 * 256 && s < 1024 * 1024 * 512 => "256M-512M".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 256..1024 * 1024 * 512).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:23:14 [INFO] [stdout] | [INFO] [stdout] 23 | s if s >= 1024 * 1024 * 512 && s < 1024 * 1024 * 1024 => "512M-1G".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 512..1024 * 1024 * 1024).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:110:24 [INFO] [stdout] | [INFO] [stdout] 110 | if record_vec.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!record_vec.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:24:14 [INFO] [stdout] | [INFO] [stdout] 24 | s if s >= 1024 * 1024 * 1024 && s < 1024 * 1024 * 1024 * 8 => "1G-8G".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 1024..1024 * 1024 * 1024 * 8).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:25:14 [INFO] [stdout] | [INFO] [stdout] 25 | s if s >= 1024 * 1024 * 1024 * 8 && s < 1024 * 1024 * 1024 * 16 => "8G-16G".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 1024 * 8..1024 * 1024 * 1024 * 16).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:26:14 [INFO] [stdout] | [INFO] [stdout] 26 | s if s >= 1024 * 1024 * 1024 * 16 && s < 1024 * 1024 * 1024 * 32 => "16G-32G".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 1024 * 16..1024 * 1024 * 1024 * 32).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:27:14 [INFO] [stdout] | [INFO] [stdout] 27 | s if s >= 1024 * 1024 * 1024 * 32 && s < 1024 * 1024 * 1024 * 64 => "32G-64G".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 1024 * 32..1024 * 1024 * 1024 * 64).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:28:14 [INFO] [stdout] | [INFO] [stdout] 28 | s if s >= 1024 * 1024 * 1024 * 64 && s < 1024 * 1024 * 1024 * 128 => "64G-128G".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 1024 * 64..1024 * 1024 * 1024 * 128).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:29:14 [INFO] [stdout] | [INFO] [stdout] 29 | s if s >= 1024 * 1024 * 1024 * 128 && s < 1024 * 1024 * 1024 * 256 => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 1024 * 128..1024 * 1024 * 1024 * 256).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:32:14 [INFO] [stdout] | [INFO] [stdout] 32 | s if s >= 1024 * 1024 * 1024 * 256 && s < 1024 * 1024 * 1024 * 512 => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 1024 * 256..1024 * 1024 * 1024 * 512).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-binding `let` on a future [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:120:25 [INFO] [stdout] | [INFO] [stdout] 120 | let _ = local2local.transfer_record_options(record_vec); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider awaiting the future or dropping explicitly with `std::mem::drop` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_future [INFO] [stdout] = note: `#[warn(clippy::let_underscore_future)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/commons/size_distributed.rs:35:14 [INFO] [stdout] | [INFO] [stdout] 35 | s if s >= 1024 * 1024 * 1024 * 512 && s < 1024 * 1024 * 1024 * 1024 => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1024 * 1024 * 1024 * 512..1024 * 1024 * 1024 * 1024).contains(&s)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/commons/subcmdcompleter.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | return subcmds; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 33 - return subcmds; [INFO] [stdout] 33 + subcmds [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/commons/subcmdcompleter.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | return subcmds; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 44 - return subcmds; [INFO] [stdout] 44 + subcmds [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:468:5 [INFO] [stdout] | [INFO] [stdout] 468 | / async fn increment_notify( [INFO] [stdout] 469 | | &self, [INFO] [stdout] 470 | | _joinset: &mut JoinSet<()>, [INFO] [stdout] 471 | | stop_mark: Arc, [INFO] [stdout] ... | [INFO] [stdout] 478 | | ) -> Result<()> { [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/commons/subcmdcompleter.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | return subcmds; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 56 - return subcmds; [INFO] [stdout] 56 + subcmds [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/commons/subcmdcompleter.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 77 | return subcmds; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 77 - return subcmds; [INFO] [stdout] 77 + subcmds [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/commons/subcmdcompleter.rs:88:21 [INFO] [stdout] | [INFO] [stdout] 88 | replace.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `replace.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/commons/subcmdcompleter.rs:98:62 [INFO] [stdout] | [INFO] [stdout] 98 | for str in self.level_prefix_possible_cmd(1, *last) { [INFO] [stdout] | ^^^^^ help: try: `last` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/commons/subcmdcompleter.rs:100:21 [INFO] [stdout] | [INFO] [stdout] 100 | replace.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `replace.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/commons/subcmdcompleter.rs:115:17 [INFO] [stdout] | [INFO] [stdout] 115 | replace.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `replace.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/commons/subcmdcompleter.rs:128:17 [INFO] [stdout] | [INFO] [stdout] 128 | *last, [INFO] [stdout] | ^^^^^ help: try: `last` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/commons/subcmdcompleter.rs:131:17 [INFO] [stdout] | [INFO] [stdout] 131 | replace.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `replace.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/commons/subcmdcompleter.rs:158:9 [INFO] [stdout] | [INFO] [stdout] 158 | / let mut subcmds: Vec = vec![]; [INFO] [stdout] 159 | | subcmds.push(SubCmd { [INFO] [stdout] 160 | | level: 0, [INFO] [stdout] 161 | | command_name: "level0_cmd0".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 180 | | ], [INFO] [stdout] 181 | | }); [INFO] [stdout] | |___________^ help: consider using the `vec![]` macro: `let subcmds: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `cmd_completer.level_possible_cmd(0).get(0)` [INFO] [stdout] --> src/commons/subcmdcompleter.rs:187:13 [INFO] [stdout] | [INFO] [stdout] 187 | cmd_completer.level_possible_cmd(0).get(0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cmd_completer.level_possible_cmd(0).first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `cmd_completer [INFO] [stdout] .level_cmd_possible_sub_cmd(1, String::from("level1_cmd1")).get(0)` [INFO] [stdout] --> src/commons/subcmdcompleter.rs:191:13 [INFO] [stdout] | [INFO] [stdout] 191 | / cmd_completer [INFO] [stdout] 192 | | .level_cmd_possible_sub_cmd(1, String::from("level1_cmd1")) [INFO] [stdout] 193 | | .get(0) [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 191 ~ cmd_completer [INFO] [stdout] 192 + .level_cmd_possible_sub_cmd(1, String::from("level1_cmd1")).first() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `cmd_completer [INFO] [stdout] .level_cmd_possible_prefix_sub_cmd(1, String::from("level1_cmd2"), "let").get(0)` [INFO] [stdout] --> src/commons/subcmdcompleter.rs:197:13 [INFO] [stdout] | [INFO] [stdout] 197 | / cmd_completer [INFO] [stdout] 198 | | .level_cmd_possible_prefix_sub_cmd(1, String::from("level1_cmd2"), "let") [INFO] [stdout] 199 | | .get(0) [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 197 ~ cmd_completer [INFO] [stdout] 198 + .level_cmd_possible_prefix_sub_cmd(1, String::from("level1_cmd2"), "let").first() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/commons/sysutiles.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 12 - return false; [INFO] [stdout] 12 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's keys [INFO] [stdout] --> src/commons/sysutiles.rs:7:24 [INFO] [stdout] | [INFO] [stdout] 7 | for (syspid, _) in sys.processes() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 7 - for (syspid, _) in sys.processes() { [INFO] [stdout] 7 + for syspid in sys.processes().keys() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:617:16 [INFO] [stdout] | [INFO] [stdout] 617 | if records.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!records.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:634:13 [INFO] [stdout] | [INFO] [stdout] 634 | / match error_file.metadata() { [INFO] [stdout] 635 | | Ok(meta) => { [INFO] [stdout] 636 | | if meta.len() == 0 { [INFO] [stdout] 637 | | let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] ... | [INFO] [stdout] 640 | | Err(_) => {} [INFO] [stdout] 641 | | }; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 634 ~ if let Ok(meta) = error_file.metadata() { [INFO] [stdout] 635 + if meta.len() == 0 { [INFO] [stdout] 636 + let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] 637 + } [INFO] [stdout] 638 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:660:5 [INFO] [stdout] | [INFO] [stdout] 660 | / async fn increment_scan( [INFO] [stdout] 661 | | &self, [INFO] [stdout] 662 | | execute_set: &mut JoinSet<()>, [INFO] [stdout] 663 | | stop_mark: Arc, [INFO] [stdout] ... | [INFO] [stdout] 669 | | interval: u64, [INFO] [stdout] 670 | | ) -> Result<()> { [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `bytes` [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:726:31 [INFO] [stdout] | [INFO] [stdout] 726 | let len = line_str.bytes().len() + "\n".bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `line_str.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `bytes` [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:726:56 [INFO] [stdout] | [INFO] [stdout] 726 | let len = line_str.bytes().len() + "\n".bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `"\n".len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `OFF` contains a capitalized acronym [INFO] [stdout] --> src/configure/config_global.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | OFF, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Off` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `ERROR` contains a capitalized acronym [INFO] [stdout] --> src/configure/config_global.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | ERROR, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Error` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `WARN` contains a capitalized acronym [INFO] [stdout] --> src/configure/config_global.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | WARN, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Warn` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `INFO` contains a capitalized acronym [INFO] [stdout] --> src/configure/config_global.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | INFO, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Info` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `DEBUG` contains a capitalized acronym [INFO] [stdout] --> src/configure/config_global.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | DEBUG, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Debug` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `TRACE` contains a capitalized acronym [INFO] [stdout] --> src/configure/config_global.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | TRACE, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Trace` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:778:19 [INFO] [stdout] | [INFO] [stdout] 778 | while execute_set.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!execute_set.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/configure/config_global.rs:20:1 [INFO] [stdout] | [INFO] [stdout] 20 | / impl Default for LogLevel { [INFO] [stdout] 21 | | fn default() -> Self { [INFO] [stdout] 22 | | LogLevel::INFO [INFO] [stdout] 23 | | } [INFO] [stdout] 24 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 11 + #[derive(Default)] [INFO] [stdout] 12 | pub enum LogLevel { [INFO] [stdout] 13 | OFF, [INFO] [stdout] 14 | ERROR, [INFO] [stdout] 15 | WARN, [INFO] [stdout] 16 ~ #[default] [INFO] [stdout] 17 ~ INFO, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:807:40 [INFO] [stdout] | [INFO] [stdout] 807 | let _ = checkpoint.save_to(&checkpoint_path); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `checkpoint_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:819:19 [INFO] [stdout] | [INFO] [stdout] 819 | .open(&to_file)?; [INFO] [stdout] | ^^^^^^^^ help: change this to: `to_file` [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] --> src/tasks/transfer/transfer_local2local.rs:865:19 [INFO] [stdout] | [INFO] [stdout] 865 | .open(&to_file)?; [INFO] [stdout] | ^^^^^^^^ help: change this to: `to_file` [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: returning the result of a `let` binding from a block [INFO] [stdout] --> src/configure/config_global.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 56 | let global_config = Config::default(); [INFO] [stdout] | -------------------------------------- unnecessary `let` binding [INFO] [stdout] 57 | global_config [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 56 ~ [INFO] [stdout] 57 ~ Config::default() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/configure/config_global.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 63 | let path = "".to_string(); [INFO] [stdout] | -------------------------- unnecessary `let` binding [INFO] [stdout] 64 | path [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 63 ~ [INFO] [stdout] 64 ~ "".to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:959:21 [INFO] [stdout] | [INFO] [stdout] 959 | return Ok(record); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 959 - return Ok(record); [INFO] [stdout] 959 + Ok(record) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:974:21 [INFO] [stdout] | [INFO] [stdout] 974 | return Ok(record); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 974 - return Ok(record); [INFO] [stdout] 974 + Ok(record) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:979:13 [INFO] [stdout] | [INFO] [stdout] 979 | return Err(anyhow!("Unkown modify type")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 979 - return Err(anyhow!("Unkown modify type")); [INFO] [stdout] 979 + Err(anyhow!("Unkown modify type")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:1085:9 [INFO] [stdout] | [INFO] [stdout] 1085 | / match error_file.metadata() { [INFO] [stdout] 1086 | | Ok(meta) => { [INFO] [stdout] 1087 | | if meta.len() == 0 { [INFO] [stdout] 1088 | | let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] ... | [INFO] [stdout] 1091 | | Err(_) => {} [INFO] [stdout] 1092 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1085 ~ if let Ok(meta) = error_file.metadata() { [INFO] [stdout] 1086 + if meta.len() == 0 { [INFO] [stdout] 1087 + let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] 1088 + } [INFO] [stdout] 1089 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:1103:9 [INFO] [stdout] | [INFO] [stdout] 1103 | subffix.push_str("_"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `subffix.push('_')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/logger/mod.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | mod logger; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:1145:9 [INFO] [stdout] | [INFO] [stdout] 1145 | / match error_file.metadata() { [INFO] [stdout] 1146 | | Ok(meta) => { [INFO] [stdout] 1147 | | if meta.len() == 0 { [INFO] [stdout] 1148 | | let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] ... | [INFO] [stdout] 1151 | | Err(_) => {} [INFO] [stdout] 1152 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1145 ~ if let Ok(meta) = error_file.metadata() { [INFO] [stdout] 1146 + if meta.len() == 0 { [INFO] [stdout] 1147 + let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] 1148 + } [INFO] [stdout] 1149 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:1172:9 [INFO] [stdout] | [INFO] [stdout] 1172 | / if self.attributes.target_exists_skip { [INFO] [stdout] 1173 | | if t_path.exists() { [INFO] [stdout] 1174 | | return Ok(()); [INFO] [stdout] 1175 | | } [INFO] [stdout] 1176 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1172 ~ if self.attributes.target_exists_skip [INFO] [stdout] 1173 ~ && t_path.exists() { [INFO] [stdout] 1174 | return Ok(()); [INFO] [stdout] 1175 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:86:13 [INFO] [stdout] | [INFO] [stdout] 86 | self.attributes.last_modify_filter.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.attributes.last_modify_filter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:128:24 [INFO] [stdout] | [INFO] [stdout] 128 | if record_vec.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!record_vec.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/models/model_checkpoint.rs:55:1 [INFO] [stdout] | [INFO] [stdout] 55 | / impl Default for FilePosition { [INFO] [stdout] 56 | | fn default() -> Self { [INFO] [stdout] 57 | | Self { [INFO] [stdout] 58 | | offset: 0, [INFO] [stdout] ... | [INFO] [stdout] 63 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 48 + #[derive(Default)] [INFO] [stdout] 49 | pub struct FilePosition { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:303:5 [INFO] [stdout] | [INFO] [stdout] 303 | / async fn increment_notify( [INFO] [stdout] 304 | | &self, [INFO] [stdout] 305 | | _joinset: &mut JoinSet<()>, [INFO] [stdout] 306 | | stop_mark: Arc, [INFO] [stdout] ... | [INFO] [stdout] 313 | | ) -> Result<()> { [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/models/model_filters.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | / impl Default for RegexFilter { [INFO] [stdout] 15 | | fn default() -> Self { [INFO] [stdout] 16 | | Self { [INFO] [stdout] 17 | | exclude_regex: None, [INFO] [stdout] ... | [INFO] [stdout] 21 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 9 + #[derive(Default)] [INFO] [stdout] 10 | pub struct RegexFilter { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:452:16 [INFO] [stdout] | [INFO] [stdout] 452 | if records.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!records.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:469:13 [INFO] [stdout] | [INFO] [stdout] 469 | / match error_file.metadata() { [INFO] [stdout] 470 | | Ok(meta) => { [INFO] [stdout] 471 | | if meta.len() == 0 { [INFO] [stdout] 472 | | let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] ... | [INFO] [stdout] 475 | | Err(_) => {} [INFO] [stdout] 476 | | }; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 469 ~ if let Ok(meta) = error_file.metadata() { [INFO] [stdout] 470 + if meta.len() == 0 { [INFO] [stdout] 471 + let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] 472 + } [INFO] [stdout] 473 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:497:5 [INFO] [stdout] | [INFO] [stdout] 497 | / async fn increment_scan( [INFO] [stdout] 498 | | &self, [INFO] [stdout] 499 | | execute_set: &mut JoinSet<()>, [INFO] [stdout] 500 | | stop_mark: Arc, [INFO] [stdout] ... | [INFO] [stdout] 505 | | interval: u64, [INFO] [stdout] 506 | | ) -> Result<()> { [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `bytes` [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:546:31 [INFO] [stdout] | [INFO] [stdout] 546 | let len = line_str.bytes().len() + "\n".bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `line_str.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `bytes` [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:546:56 [INFO] [stdout] | [INFO] [stdout] 546 | let len = line_str.bytes().len() + "\n".bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `"\n".len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:590:19 [INFO] [stdout] | [INFO] [stdout] 590 | while execute_set.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!execute_set.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:622:40 [INFO] [stdout] | [INFO] [stdout] 622 | let _ = checkpoint.save_to(&checkpoint_path); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `checkpoint_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/models/model_s3.rs:40:1 [INFO] [stdout] | [INFO] [stdout] 40 | / impl Default for S3RequestStyle { [INFO] [stdout] 41 | | fn default() -> Self { [INFO] [stdout] 42 | | S3RequestStyle::VirtualHostedStyle [INFO] [stdout] 43 | | } [INFO] [stdout] 44 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 35 + #[derive(Default)] [INFO] [stdout] 36 | pub enum S3RequestStyle { [INFO] [stdout] 37 | PathStyle, [INFO] [stdout] 38 ~ #[default] [INFO] [stdout] 39 ~ VirtualHostedStyle, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:817:21 [INFO] [stdout] | [INFO] [stdout] 817 | return Ok(record); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 817 - return Ok(record); [INFO] [stdout] 817 + Ok(record) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:832:21 [INFO] [stdout] | [INFO] [stdout] 832 | return Ok(record); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 832 - return Ok(record); [INFO] [stdout] 832 + Ok(record) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:837:13 [INFO] [stdout] | [INFO] [stdout] 837 | return Err(anyhow!("Unkown modify type")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 837 - return Err(anyhow!("Unkown modify type")); [INFO] [stdout] 837 + Err(anyhow!("Unkown modify type")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:910:72 [INFO] [stdout] | [INFO] [stdout] 910 | let source_file_path = gen_file_path(self.source.as_str(), &record.key.as_str(), ""); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `record.key.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:968:9 [INFO] [stdout] | [INFO] [stdout] 968 | / match error_file.metadata() { [INFO] [stdout] 969 | | Ok(meta) => { [INFO] [stdout] 970 | | if 0.eq(&meta.len()) { [INFO] [stdout] 971 | | let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] ... | [INFO] [stdout] 974 | | Err(_) => {} [INFO] [stdout] 975 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 968 ~ if let Ok(meta) = error_file.metadata() { [INFO] [stdout] 969 + if 0.eq(&meta.len()) { [INFO] [stdout] 970 + let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] 971 + } [INFO] [stdout] 972 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:986:9 [INFO] [stdout] | [INFO] [stdout] 986 | subffix.push_str("_"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `subffix.push('_')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `FilePosition` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:1011:45 [INFO] [stdout] | [INFO] [stdout] 1011 | .insert(offset_key.clone(), record.list_file_position.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `record.list_file_position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:1085:9 [INFO] [stdout] | [INFO] [stdout] 1085 | / match error_file.metadata() { [INFO] [stdout] 1086 | | Ok(meta) => { [INFO] [stdout] 1087 | | if meta.len() == 0 { [INFO] [stdout] 1088 | | let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] ... | [INFO] [stdout] 1091 | | Err(_) => {} [INFO] [stdout] 1092 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1085 ~ if let Ok(meta) = error_file.metadata() { [INFO] [stdout] 1086 + if meta.len() == 0 { [INFO] [stdout] 1087 + let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] 1088 + } [INFO] [stdout] 1089 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:81:17 [INFO] [stdout] | [INFO] [stdout] 81 | self.attributes.last_modify_filter.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.attributes.last_modify_filter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:148:24 [INFO] [stdout] | [INFO] [stdout] 148 | if record_vec.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!record_vec.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `bytes` [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:292:31 [INFO] [stdout] | [INFO] [stdout] 292 | let len = line_str.bytes().len() + "\n".bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `line_str.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `bytes` [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:292:56 [INFO] [stdout] | [INFO] [stdout] 292 | let len = line_str.bytes().len() + "\n".bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `"\n".len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:336:16 [INFO] [stdout] | [INFO] [stdout] 336 | if vec_keys.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vec_keys.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:352:19 [INFO] [stdout] | [INFO] [stdout] 352 | while execute_set.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!execute_set.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:375:40 [INFO] [stdout] | [INFO] [stdout] 375 | let _ = checkpoint.save_to(&checkpoint_path); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `checkpoint_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:391:19 [INFO] [stdout] | [INFO] [stdout] 391 | .open(&to_file)?; [INFO] [stdout] | ^^^^^^^^ help: change this to: `to_file` [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] --> src/tasks/transfer/transfer_oss2local.rs:553:67 [INFO] [stdout] | [INFO] [stdout] 553 | let t_file_name = gen_file_path(self.target.as_str(), &record.key.as_str(), ""); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `record.key.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:595:9 [INFO] [stdout] | [INFO] [stdout] 595 | / match error_file.metadata() { [INFO] [stdout] 596 | | Ok(meta) => { [INFO] [stdout] 597 | | if meta.len() == 0 { [INFO] [stdout] 598 | | let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] ... | [INFO] [stdout] 601 | | Err(_) => {} [INFO] [stdout] 602 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 595 ~ if let Ok(meta) = error_file.metadata() { [INFO] [stdout] 596 + if meta.len() == 0 { [INFO] [stdout] 597 + let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] 598 + } [INFO] [stdout] 599 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:613:9 [INFO] [stdout] | [INFO] [stdout] 613 | subffix.push_str("_"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `subffix.push('_')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:637:13 [INFO] [stdout] | [INFO] [stdout] 637 | / if self.attributes.target_exists_skip { [INFO] [stdout] 638 | | if t_path.exists() { [INFO] [stdout] 639 | | continue; [INFO] [stdout] 640 | | } [INFO] [stdout] 641 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 637 ~ if self.attributes.target_exists_skip [INFO] [stdout] 638 ~ && t_path.exists() { [INFO] [stdout] 639 | continue; [INFO] [stdout] 640 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `FilePosition` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:650:53 [INFO] [stdout] | [INFO] [stdout] 650 | .insert(offset_key.clone(), record.list_file_position.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `record.list_file_position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:664:9 [INFO] [stdout] | [INFO] [stdout] 664 | / match error_file.metadata() { [INFO] [stdout] 665 | | Ok(meta) => { [INFO] [stdout] 666 | | if meta.len() == 0 { [INFO] [stdout] 667 | | let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] ... | [INFO] [stdout] 670 | | Err(_) => {} [INFO] [stdout] 671 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 664 ~ if let Ok(meta) = error_file.metadata() { [INFO] [stdout] 665 + if meta.len() == 0 { [INFO] [stdout] 666 + let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] 667 + } [INFO] [stdout] 668 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:690:9 [INFO] [stdout] | [INFO] [stdout] 690 | / if self.attributes.target_exists_skip { [INFO] [stdout] 691 | | if t_path.exists() { [INFO] [stdout] 692 | | return Ok(()); [INFO] [stdout] 693 | | } [INFO] [stdout] 694 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 690 ~ if self.attributes.target_exists_skip [INFO] [stdout] 691 ~ && t_path.exists() { [INFO] [stdout] 692 | return Ok(()); [INFO] [stdout] 693 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:697:25 [INFO] [stdout] | [INFO] [stdout] 697 | .get_object(&self.source.bucket.as_str(), record.key.as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.source.bucket.as_str()` [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: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:88:17 [INFO] [stdout] | [INFO] [stdout] 88 | self.attributes.last_modify_filter.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.attributes.last_modify_filter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:129:24 [INFO] [stdout] | [INFO] [stdout] 129 | if record_vec.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!record_vec.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-binding `let` on a future [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:137:25 [INFO] [stdout] | [INFO] [stdout] 137 | let _ = executor.transfer_record_options(record_vec); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider awaiting the future or dropping explicitly with `std::mem::drop` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_future [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `bytes` [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:307:31 [INFO] [stdout] | [INFO] [stdout] 307 | let len = line_str.bytes().len() + "\n".bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `line_str.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `bytes` [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:307:56 [INFO] [stdout] | [INFO] [stdout] 307 | let len = line_str.bytes().len() + "\n".bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `"\n".len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:332:28 [INFO] [stdout] | [INFO] [stdout] 332 | && vec_keys.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vec_keys.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/models/model_task_transfer.rs:31:1 [INFO] [stdout] | [INFO] [stdout] 31 | / impl Default for IncrementMode { [INFO] [stdout] 32 | | fn default() -> Self { [INFO] [stdout] 33 | | IncrementMode::Notify [INFO] [stdout] 34 | | } [INFO] [stdout] 35 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 23 + #[derive(Default)] [INFO] [stdout] 24 | pub enum IncrementMode { [INFO] [stdout] 25 ~ #[default] [INFO] [stdout] 26 ~ Notify, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:355:19 [INFO] [stdout] | [INFO] [stdout] 355 | while execute_set.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!execute_set.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:383:48 [INFO] [stdout] | [INFO] [stdout] 383 | if let Err(e) = checkpoint.save_to(&checkpoint_path) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `checkpoint_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/models/model_task_transfer.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | / match self { [INFO] [stdout] 48 | | TransferType::Full => true, [INFO] [stdout] 49 | | _ => false, [INFO] [stdout] 50 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 47 - match self { [INFO] [stdout] 48 - TransferType::Full => true, [INFO] [stdout] 49 - _ => false, [INFO] [stdout] 50 - } [INFO] [stdout] 47 + matches!(self, TransferType::Full) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/models/model_task_transfer.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | / match self { [INFO] [stdout] 56 | | TransferType::Stock => true, [INFO] [stdout] 57 | | _ => false, [INFO] [stdout] 58 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 55 - match self { [INFO] [stdout] 56 - TransferType::Stock => true, [INFO] [stdout] 57 - _ => false, [INFO] [stdout] 58 - } [INFO] [stdout] 55 + matches!(self, TransferType::Stock) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/models/model_task_transfer.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | / match self { [INFO] [stdout] 63 | | TransferType::Increment => true, [INFO] [stdout] 64 | | _ => false, [INFO] [stdout] 65 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 62 - match self { [INFO] [stdout] 63 - TransferType::Increment => true, [INFO] [stdout] 64 - _ => false, [INFO] [stdout] 65 - } [INFO] [stdout] 62 + matches!(self, TransferType::Increment) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:408:19 [INFO] [stdout] | [INFO] [stdout] 408 | .open(&to_file)?; [INFO] [stdout] | ^^^^^^^^ help: change this to: `to_file` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:685:9 [INFO] [stdout] | [INFO] [stdout] 685 | / match error_file.metadata() { [INFO] [stdout] 686 | | Ok(meta) => { [INFO] [stdout] 687 | | if meta.len() == 0 { [INFO] [stdout] 688 | | let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] ... | [INFO] [stdout] 691 | | Err(_) => {} [INFO] [stdout] 692 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 685 ~ if let Ok(meta) = error_file.metadata() { [INFO] [stdout] 686 + if meta.len() == 0 { [INFO] [stdout] 687 + let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] 688 + } [INFO] [stdout] 689 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:703:9 [INFO] [stdout] | [INFO] [stdout] 703 | subffix.push_str("_"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `subffix.push('_')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `FilePosition` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:745:49 [INFO] [stdout] | [INFO] [stdout] 745 | .insert(offset_key.clone(), record.list_file_position.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `record.list_file_position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:759:9 [INFO] [stdout] | [INFO] [stdout] 759 | / match error_file.metadata() { [INFO] [stdout] 760 | | Ok(meta) => { [INFO] [stdout] 761 | | if meta.len() == 0 { [INFO] [stdout] 762 | | let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] ... | [INFO] [stdout] 765 | | Err(_) => {} [INFO] [stdout] 766 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 759 ~ if let Ok(meta) = error_file.metadata() { [INFO] [stdout] 760 + if meta.len() == 0 { [INFO] [stdout] 761 + let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] 762 + } [INFO] [stdout] 763 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:830:9 [INFO] [stdout] | [INFO] [stdout] 830 | / return match content_len_usize.le(&self.attributes.large_file_size) { [INFO] [stdout] 831 | | true => { [INFO] [stdout] 832 | | target_oss [INFO] [stdout] 833 | | .upload_object_bytes( [INFO] [stdout] ... | [INFO] [stdout] 857 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 830 ~ match content_len_usize.le(&self.attributes.large_file_size) { [INFO] [stdout] 831 + true => { [INFO] [stdout] 832 + target_oss [INFO] [stdout] 833 + .upload_object_bytes( [INFO] [stdout] 834 + self.target.bucket.as_str(), [INFO] [stdout] 835 + target_key, [INFO] [stdout] 836 + expr, [INFO] [stdout] 837 + s_obj_output.body, [INFO] [stdout] 838 + ) [INFO] [stdout] 839 + .await [INFO] [stdout] 840 + } [INFO] [stdout] 841 + false => { [INFO] [stdout] 842 + multipart_transfer_obj_paralle_by_range( [INFO] [stdout] 843 + source_oss.clone(), [INFO] [stdout] 844 + &self.source.bucket, [INFO] [stdout] 845 + record.key.as_str(), [INFO] [stdout] 846 + target_oss.clone(), [INFO] [stdout] 847 + &self.target.bucket, [INFO] [stdout] 848 + target_key, [INFO] [stdout] 849 + expr, [INFO] [stdout] 850 + self.semaphore.clone(), [INFO] [stdout] 851 + self.attributes.multi_part_chunk_size, [INFO] [stdout] 852 + self.attributes.multi_part_chunks_per_batch, [INFO] [stdout] 853 + self.attributes.multi_part_parallelism, [INFO] [stdout] 854 + ) [INFO] [stdout] 855 + .await [INFO] [stdout] 856 + } [INFO] [stdout] 857 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:783:25 [INFO] [stdout] | [INFO] [stdout] 783 | .get_object(&self.source.bucket.as_str(), record.key.as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.source.bucket.as_str()` [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: length comparison to zero [INFO] [stdout] --> src/s3/jd_s3.rs:57:12 [INFO] [stdout] | [INFO] [stdout] 57 | if vec.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vec.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/s3/jd_s3.rs:163:15 [INFO] [stdout] | [INFO] [stdout] 163 | while !token.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `token.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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/s3/jd_s3.rs:197:9 [INFO] [stdout] | [INFO] [stdout] 197 | store.push_str("/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `store.push('/')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/s3/jd_s3.rs:214:28 [INFO] [stdout] | [INFO] [stdout] 214 | let _ = file.write(&*bytes).await; [INFO] [stdout] | ^^^^^^^ help: try: `&bytes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/s3/jd_s3.rs:238:13 [INFO] [stdout] | [INFO] [stdout] 238 | store.push_str("/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `store.push('/')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/s3/jd_s3.rs:255:32 [INFO] [stdout] | [INFO] [stdout] 255 | let _ = file.write(&*bytes).await; [INFO] [stdout] | ^^^^^^^ help: try: `&bytes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:349:17 [INFO] [stdout] | [INFO] [stdout] 349 | executor.transfer_record_options(vk).await; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 349 | let _ = executor.transfer_record_options(vk).await; [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/s3/oss.rs:258:17 [INFO] [stdout] | [INFO] [stdout] 258 | return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 257 - println!("{}", e.to_string()); [INFO] [stdout] 258 - return; [INFO] [stdout] 257 + println!("{}", e.to_string()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> src/s3/oss.rs:257:33 [INFO] [stdout] | [INFO] [stdout] 257 | println!("{}", e.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/s3/oss.rs:283:17 [INFO] [stdout] | [INFO] [stdout] 283 | return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 282 - println!("{}", e.to_string()); [INFO] [stdout] 283 - return; [INFO] [stdout] 282 + println!("{}", e.to_string()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> src/s3/oss.rs:282:33 [INFO] [stdout] | [INFO] [stdout] 282 | println!("{}", e.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/s3/oss_client.rs:70:5 [INFO] [stdout] | [INFO] [stdout] 70 | / pub async fn append_object_list_to_multi_files( [INFO] [stdout] 71 | | &self, [INFO] [stdout] 72 | | bucket: String, [INFO] [stdout] 73 | | prefix: Option, [INFO] [stdout] ... | [INFO] [stdout] 78 | | file_max_lines: usize, [INFO] [stdout] 79 | | ) -> Result> { [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: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/s3/oss_client.rs:101:21 [INFO] [stdout] | [INFO] [stdout] 101 | last_modify_filter.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `last_modify_filter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/s3/oss_client.rs:131:21 [INFO] [stdout] | [INFO] [stdout] 131 | last_modify_filter.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `last_modify_filter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/s3/oss_client.rs:173:9 [INFO] [stdout] | [INFO] [stdout] 173 | / return match content_len_usize.le(&splite_size) { [INFO] [stdout] 174 | | true => { [INFO] [stdout] 175 | | self.upload_object_bytes(bucket, key, expr, object.body) [INFO] [stdout] 176 | | .await [INFO] [stdout] ... | [INFO] [stdout] 189 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 173 ~ match content_len_usize.le(&splite_size) { [INFO] [stdout] 174 + true => { [INFO] [stdout] 175 + self.upload_object_bytes(bucket, key, expr, object.body) [INFO] [stdout] 176 + .await [INFO] [stdout] 177 + } [INFO] [stdout] 178 + false => { [INFO] [stdout] 179 + self.multipart_upload_byte_stream( [INFO] [stdout] 180 + bucket, [INFO] [stdout] 181 + key, [INFO] [stdout] 182 + expr, [INFO] [stdout] 183 + content_len_usize, [INFO] [stdout] 184 + chunk_size, [INFO] [stdout] 185 + object.body, [INFO] [stdout] 186 + ) [INFO] [stdout] 187 + .await [INFO] [stdout] 188 + } [INFO] [stdout] 189 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/s3/oss_client.rs:224:5 [INFO] [stdout] | [INFO] [stdout] 224 | / pub async fn upload_local_file_paralle( [INFO] [stdout] 225 | | &self, [INFO] [stdout] 226 | | local_file: &str, [INFO] [stdout] 227 | | bucket: &str, [INFO] [stdout] ... | [INFO] [stdout] 233 | | multi_part_parallelism: usize, [INFO] [stdout] 234 | | ) -> Result<()> { [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/s3/oss_client.rs:271:5 [INFO] [stdout] | [INFO] [stdout] 271 | / pub async fn download_object_by_range( [INFO] [stdout] 272 | | &self, [INFO] [stdout] 273 | | s_bucket: &str, [INFO] [stdout] 274 | | s_key: &str, [INFO] [stdout] ... | [INFO] [stdout] 279 | | multi_part_parallelism: usize, [INFO] [stdout] 280 | | ) -> Result<()> { [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/s3/oss_client.rs:342:15 [INFO] [stdout] | [INFO] [stdout] 342 | while joinset.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!joinset.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/s3/oss_client.rs:440:9 [INFO] [stdout] | [INFO] [stdout] 440 | / return match head.e_tag() { [INFO] [stdout] 441 | | Some(t) => Ok(Some(t.to_string())), [INFO] [stdout] 442 | | None => Ok(None), [INFO] [stdout] 443 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 440 ~ match head.e_tag() { [INFO] [stdout] 441 + Some(t) => Ok(Some(t.to_string())), [INFO] [stdout] 442 + None => Ok(None), [INFO] [stdout] 443 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/s3/oss_client.rs:479:12 [INFO] [stdout] | [INFO] [stdout] 479 | if vec.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vec.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/s3/oss_client.rs:631:5 [INFO] [stdout] | [INFO] [stdout] 631 | / pub async fn multipart_upload_local_file_paralle_batch( [INFO] [stdout] 632 | | &self, [INFO] [stdout] 633 | | file_path: &str, [INFO] [stdout] 634 | | bucket: &str, [INFO] [stdout] ... | [INFO] [stdout] 639 | | multi_part_parallelism: usize, [INFO] [stdout] 640 | | ) -> Result<()> { [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/s3/oss_client.rs:760:5 [INFO] [stdout] | [INFO] [stdout] 760 | / pub async fn upload_file_parts( [INFO] [stdout] 761 | | &self, [INFO] [stdout] 762 | | file_name: &str, [INFO] [stdout] 763 | | bucket: &str, [INFO] [stdout] ... | [INFO] [stdout] 769 | | multi_part_parallelism: usize, [INFO] [stdout] 770 | | ) -> Result> { [INFO] [stdout] | |___________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/s3/oss_client.rs:830:15 [INFO] [stdout] | [INFO] [stdout] 830 | while joinset.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!joinset.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/s3/oss_client.rs:958:21 [INFO] [stdout] | [INFO] [stdout] 958 | let l = last_modify_filter.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `last_modify_filter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/s3/oss_client.rs:980:25 [INFO] [stdout] | [INFO] [stdout] 980 | let l = last_modify_filter.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `last_modify_filter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/s3/oss_client.rs:992:19 [INFO] [stdout] | [INFO] [stdout] 992 | while let Some(_) = joinset.join_next().await {} [INFO] [stdout] | ----------^^^^^^^---------------------------- help: try: `while joinset.join_next().await.is_some()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/s3/oss_client.rs:1056:1 [INFO] [stdout] | [INFO] [stdout] 1056 | / pub async fn multipart_transfer_obj_paralle_by_range( [INFO] [stdout] 1057 | | s_client: Arc, [INFO] [stdout] 1058 | | s_bucket: &str, [INFO] [stdout] 1059 | | s_key: &str, [INFO] [stdout] ... | [INFO] [stdout] 1067 | | multi_part_parallelism: usize, [INFO] [stdout] 1068 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/s3/oss_client.rs:1105:1 [INFO] [stdout] | [INFO] [stdout] 1105 | / pub async fn transfer_object_parts_by_range( [INFO] [stdout] 1106 | | s_client: Arc, [INFO] [stdout] 1107 | | s_bucket: &str, [INFO] [stdout] 1108 | | s_key: &str, [INFO] [stdout] ... | [INFO] [stdout] 1116 | | multi_part_parallelism: usize, [INFO] [stdout] 1117 | | ) -> Result> { [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/s3/oss_client.rs:1172:11 [INFO] [stdout] | [INFO] [stdout] 1172 | while joinset.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!joinset.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/s3/oss_client.rs:1194:1 [INFO] [stdout] | [INFO] [stdout] 1194 | / pub async fn transfer_parts_batch_by_range( [INFO] [stdout] 1195 | | s_client: Arc, [INFO] [stdout] 1196 | | t_client: Arc, [INFO] [stdout] 1197 | | s_bucket: &str, [INFO] [stdout] ... | [INFO] [stdout] 1203 | | completed_parts_btree: Arc>>, [INFO] [stdout] 1204 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/s3/oss_client.rs:1240:1 [INFO] [stdout] | [INFO] [stdout] 1240 | / pub async fn upload_file_parts_batch( [INFO] [stdout] 1241 | | target_client: Arc, [INFO] [stdout] 1242 | | file_name: &str, [INFO] [stdout] 1243 | | bucket: &str, [INFO] [stdout] ... | [INFO] [stdout] 1248 | | completed_parts_btree: Arc>>, [INFO] [stdout] 1249 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/s3/oss_client.rs:1356:62 [INFO] [stdout] | [INFO] [stdout] 1356 | let mut t_file = OpenOptions::new().write(true).open(&file_path)?; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_path` [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: returning the result of a `let` binding from a block [INFO] [stdout] --> src/s3/oss_client.rs:1439:13 [INFO] [stdout] | [INFO] [stdout] 1438 | let input_file_builder = gen_current_input_writer(file_num)?; [INFO] [stdout] | ------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 1439 | input_file_builder [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 1438 ~ [INFO] [stdout] 1439 ~ gen_current_input_writer(file_num)? [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/s3/oss_client.rs:1470:13 [INFO] [stdout] | [INFO] [stdout] 1470 | / match current_file_lines.eq(&0) && file_num.eq(&0) { [INFO] [stdout] 1471 | | true => { [INFO] [stdout] 1472 | | write_sequence_file(file_num)?; [INFO] [stdout] ... | [INFO] [stdout] 1475 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1470 ~ if current_file_lines.eq(&0) && file_num.eq(&0) == true { [INFO] [stdout] 1471 + write_sequence_file(file_num)?; [INFO] [stdout] 1472 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/s3/oss_client.rs:1477:13 [INFO] [stdout] | [INFO] [stdout] 1477 | / match current_file_lines >= file_max_lines.try_into()? { [INFO] [stdout] 1478 | | true => { [INFO] [stdout] 1479 | | current_input_writer.flush()?; [INFO] [stdout] 1480 | | file_num += 1; [INFO] [stdout] ... | [INFO] [stdout] 1486 | | false => {} [INFO] [stdout] 1487 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1477 ~ if current_file_lines >= file_max_lines.try_into()? == true { [INFO] [stdout] 1478 + current_input_writer.flush()?; [INFO] [stdout] 1479 + file_num += 1; [INFO] [stdout] 1480 + current_file_lines = 0; [INFO] [stdout] 1481 + [INFO] [stdout] 1482 + current_input_writer = gen_current_input_writer(file_num)?; [INFO] [stdout] 1483 + write_sequence_file(file_num)?; [INFO] [stdout] 1484 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/compare/compare_local2oss.rs:208:66 [INFO] [stdout] | [INFO] [stdout] 208 | .compare_content_len(record, source_key, &obj_t, &target_key) [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `target_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/compare/compare_local2oss.rs:217:61 [INFO] [stdout] | [INFO] [stdout] 217 | .compare_content(record, source_key, obj_t, &target_key) [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `target_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/compare/compare_oss2local.rs:165:25 [INFO] [stdout] | [INFO] [stdout] 165 | .get_object(&self.source.bucket.as_str(), record.key.as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.source.bucket.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/compare/compare_oss2local.rs:201:74 [INFO] [stdout] | [INFO] [stdout] 201 | if let Some(diff) = self.compare_content_len(record, &obj_s, &target_key)? { [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `target_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/compare/compare_oss2local.rs:207:69 [INFO] [stdout] | [INFO] [stdout] 207 | if let Some(diff) = self.compare_content(record, obj_s, &target_key).await? { [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `target_key` [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: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/compare/compare_oss2local.rs:254:24 [INFO] [stdout] | [INFO] [stdout] 254 | let mut left = s_len.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `s_len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/compare/compare_oss2oss.rs:188:25 [INFO] [stdout] | [INFO] [stdout] 188 | .get_object(&self.source.bucket.as_str(), record.key.as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.source.bucket.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/compare/compare_oss2oss.rs:205:25 [INFO] [stdout] | [INFO] [stdout] 205 | .get_object(&self.target.bucket.as_str(), &target_key) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.target.bucket.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/compare/compare_oss2oss.rs:205:55 [INFO] [stdout] | [INFO] [stdout] 205 | .get_object(&self.target.bucket.as_str(), &target_key) [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `target_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/compare/compare_oss2oss.rs:240:82 [INFO] [stdout] | [INFO] [stdout] 240 | if let Some(diff) = self.compare_content_len(record, &obj_s, &obj_t, &target_key) { [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `target_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/compare/compare_oss2oss.rs:245:78 [INFO] [stdout] | [INFO] [stdout] 245 | if let Some(diff) = self.compare_expires(record, &obj_s, &obj_t, &target_key)? { [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `target_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/compare/compare_oss2oss.rs:251:80 [INFO] [stdout] | [INFO] [stdout] 251 | if let Some(diff) = self.compare_meta_data(record, &obj_s, &obj_t, &target_key) { [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `target_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/compare/compare_oss2oss.rs:258:56 [INFO] [stdout] | [INFO] [stdout] 258 | .compare_content(record, obj_s, obj_t, &target_key) [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `target_key` [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: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/compare/compare_oss2oss.rs:364:24 [INFO] [stdout] | [INFO] [stdout] 364 | let mut left = obj_len.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `obj_len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/tasks/compare/compare_oss2oss.rs:411:22 [INFO] [stdout] | [INFO] [stdout] 411 | let s_meta = match s_obj.metadata() { [INFO] [stdout] | ______________________^ [INFO] [stdout] 412 | | Some(m) => Some(m.clone()), [INFO] [stdout] 413 | | None => None, [INFO] [stdout] 414 | | }; [INFO] [stdout] | |_________^ help: try: `s_obj.metadata().map(|m| m.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/tasks/compare/compare_oss2oss.rs:416:22 [INFO] [stdout] | [INFO] [stdout] 416 | let t_meta = match t_obj.metadata() { [INFO] [stdout] | ______________________^ [INFO] [stdout] 417 | | Some(m) => Some(m.clone()), [INFO] [stdout] 418 | | None => None, [INFO] [stdout] 419 | | }; [INFO] [stdout] | |_________^ help: try: `t_obj.metadata().map(|m| m.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/tasks/compare/task_compare.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 48 | ExistsDiff(DiffExists), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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: variant name ends with the enum's name [INFO] [stdout] --> src/tasks/compare/task_compare.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 49 | LengthDiff(DiffLength), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/tasks/compare/task_compare.rs:50:5 [INFO] [stdout] | [INFO] [stdout] 50 | ExpiresDiff(DiffExpires), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/tasks/compare/task_compare.rs:51:5 [INFO] [stdout] | [INFO] [stdout] 51 | ContentDiff(DiffContent), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/tasks/compare/task_compare.rs:52:5 [INFO] [stdout] | [INFO] [stdout] 52 | MetaDiff(DiffMeta), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same postfix: `Diff` [INFO] [stdout] --> src/tasks/compare/task_compare.rs:47:1 [INFO] [stdout] | [INFO] [stdout] 47 | / pub enum Diff { [INFO] [stdout] 48 | | ExistsDiff(DiffExists), [INFO] [stdout] 49 | | LengthDiff(DiffLength), [INFO] [stdout] 50 | | ExpiresDiff(DiffExpires), [INFO] [stdout] 51 | | ContentDiff(DiffContent), [INFO] [stdout] 52 | | MetaDiff(DiffMeta), [INFO] [stdout] 53 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes 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] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/tasks/compare/task_compare.rs:133:9 [INFO] [stdout] | [INFO] [stdout] 133 | json.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `json.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/compare/task_compare.rs:245:15 [INFO] [stdout] | [INFO] [stdout] 245 | while exec_set.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!exec_set.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/compare/task_compare.rs:251:15 [INFO] [stdout] | [INFO] [stdout] 251 | while sys_set.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!sys_set.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/tasks/compare/task_compare.rs:275:36 [INFO] [stdout] | [INFO] [stdout] 275 | if key.starts_with(&COMPARE_RESULT_PREFIX) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `COMPARE_RESULT_PREFIX` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/tasks/compare/task_compare.rs:284:5 [INFO] [stdout] | [INFO] [stdout] 284 | / async fn compare_records_multi_files( [INFO] [stdout] 285 | | &self, [INFO] [stdout] 286 | | stop_mark: Arc, [INFO] [stdout] 287 | | err_occur: Arc, [INFO] [stdout] ... | [INFO] [stdout] 292 | | obj_list_files: Vec, [INFO] [stdout] 293 | | ) { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `FilePosition` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/compare/task_compare.rs:308:33 [INFO] [stdout] | [INFO] [stdout] 308 | let mut file_position = file_position.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*file_position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `file_num` is used as a loop counter [INFO] [stdout] --> src/tasks/compare/task_compare.rs:311:9 [INFO] [stdout] | [INFO] [stdout] 311 | for exec_file_desc in obj_list_files.iter().skip(file_num_usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (file_num, exec_file_desc) in (file_position.file_num..).zip(obj_list_files.iter().skip(file_num_usize))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `bytes` [INFO] [stdout] --> src/tasks/compare/task_compare.rs:336:35 [INFO] [stdout] | [INFO] [stdout] 336 | let len = key.bytes().len() + "\n".bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `key.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] = note: `#[warn(clippy::needless_as_bytes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `bytes` [INFO] [stdout] --> src/tasks/compare/task_compare.rs:336:55 [INFO] [stdout] | [INFO] [stdout] 336 | let len = key.bytes().len() + "\n".bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `"\n".len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/compare/task_compare.rs:375:28 [INFO] [stdout] | [INFO] [stdout] 375 | && vec_keys.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vec_keys.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tasks/compare/task_compare.rs:442:9 [INFO] [stdout] | [INFO] [stdout] 442 | / return match self.attributes.start_from_checkpoint { [INFO] [stdout] 443 | | true => { [INFO] [stdout] 444 | | let checkpoint = get_task_checkpoint(check_point_file.as_str()) [INFO] [stdout] 445 | | .context(format!("{}:{}", file!(), line!()))?; [INFO] [stdout] ... | [INFO] [stdout] 468 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 442 ~ match self.attributes.start_from_checkpoint { [INFO] [stdout] 443 + true => { [INFO] [stdout] 444 + let checkpoint = get_task_checkpoint(check_point_file.as_str()) [INFO] [stdout] 445 + .context(format!("{}:{}", file!(), line!()))?; [INFO] [stdout] 446 + let list_files_desc = self.gen_source_object_list_file_desc().context(format!( [INFO] [stdout] 447 + "{}:{}", [INFO] [stdout] 448 + file!(), [INFO] [stdout] 449 + line!() [INFO] [stdout] 450 + ))?; [INFO] [stdout] 451 + let list_file_position = checkpoint.executing_file_position.clone(); [INFO] [stdout] 452 + Ok((list_files_desc, list_file_position)) [INFO] [stdout] 453 + } [INFO] [stdout] 454 + false => { [INFO] [stdout] 455 + self.init_task() [INFO] [stdout] 456 + .await [INFO] [stdout] 457 + .context(format!("{}:{}", file!(), line!()))?; [INFO] [stdout] 458 + let list_files_desc = self.gen_source_object_list_file_desc().context(format!( [INFO] [stdout] 459 + "{}:{}", [INFO] [stdout] 460 + file!(), [INFO] [stdout] 461 + line!() [INFO] [stdout] 462 + ))?; [INFO] [stdout] 463 + let checkpoint = get_task_checkpoint(check_point_file.as_str()) [INFO] [stdout] 464 + .context(format!("{}:{}", file!(), line!()))?; [INFO] [stdout] 465 + let list_file_position = checkpoint.executing_file_position.clone(); [INFO] [stdout] 466 + Ok((list_files_desc, list_file_position)) [INFO] [stdout] 467 + } [INFO] [stdout] 468 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `FilePosition` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/compare/task_compare.rs:451:42 [INFO] [stdout] | [INFO] [stdout] 451 | let list_file_position = checkpoint.executing_file_position.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `checkpoint.executing_file_position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `FilePosition` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/compare/task_compare.rs:465:42 [INFO] [stdout] | [INFO] [stdout] 465 | let list_file_position = checkpoint.executing_file_position.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `checkpoint.executing_file_position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/tasks/compare/task_compare.rs:517:9 [INFO] [stdout] | [INFO] [stdout] 517 | checkpoint.executing_file = list_files[0].clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `models::model_checkpoint::CheckPoint { executing_file: list_files[0].clone(), task_begin_timestamp: i128::from(now.as_secs()), modify_checkpoint_timestamp: i128::from(now.as_secs()), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/tasks/compare/task_compare.rs:516:9 [INFO] [stdout] | [INFO] [stdout] 516 | let mut checkpoint = CheckPoint::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/tasks/compare/task_compare.rs:581:5 [INFO] [stdout] | [INFO] [stdout] 581 | / for line in lines { [INFO] [stdout] 582 | | if let Ok(str) = line { [INFO] [stdout] 583 | | let result = json_to_struct::(&str)?; [INFO] [stdout] 584 | | let source = result.source; [INFO] [stdout] ... | [INFO] [stdout] 591 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/tasks/compare/task_compare.rs:582:9 [INFO] [stdout] | [INFO] [stdout] 582 | / if let Ok(str) = line { [INFO] [stdout] 583 | | let result = json_to_struct::(&str)?; [INFO] [stdout] 584 | | let source = result.source; [INFO] [stdout] 585 | | let target = result.target; [INFO] [stdout] ... | [INFO] [stdout] 589 | | builder.push_record(raw); [INFO] [stdout] 590 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 581 ~ for str in lines.flatten() { [INFO] [stdout] 582 + let result = json_to_struct::(&str)?; [INFO] [stdout] 583 + let source = result.source; [INFO] [stdout] 584 + let target = result.target; [INFO] [stdout] 585 + let diff = result.diff; [INFO] [stdout] 586 + [INFO] [stdout] 587 + let raw = vec![source, target, diff.name(), diff.to_string()]; [INFO] [stdout] 588 + builder.push_record(raw); [INFO] [stdout] 589 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/tasks/task.rs:137:5 [INFO] [stdout] | [INFO] [stdout] 136 | let id = id_generator_generator.real_time_generate(); [INFO] [stdout] | ----------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 137 | id [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 136 ~ [INFO] [stdout] 137 ~ id_generator_generator.real_time_generate() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/tasks/task.rs:147:9 [INFO] [stdout] | [INFO] [stdout] 147 | file_name.push_str("/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `file_name.push('/')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `FilePosition` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/task_delete.rs:57:29 [INFO] [stdout] | [INFO] [stdout] 57 | let file_position = current_list_file_position.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `current_list_file_position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `bytes` [INFO] [stdout] --> src/tasks/task_delete.rs:106:35 [INFO] [stdout] | [INFO] [stdout] 106 | let len = key.bytes().len() + "\n".bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `key.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `bytes` [INFO] [stdout] --> src/tasks/task_delete.rs:106:55 [INFO] [stdout] | [INFO] [stdout] 106 | let len = key.bytes().len() + "\n".bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `"\n".len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/task_delete.rs:129:28 [INFO] [stdout] | [INFO] [stdout] 129 | && vec_record.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vec_record.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/task_delete.rs:162:15 [INFO] [stdout] | [INFO] [stdout] 162 | while execut_set.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!execut_set.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/task_delete.rs:171:15 [INFO] [stdout] | [INFO] [stdout] 171 | while sys_set.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!sys_set.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `FilePosition` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/task_delete.rs:195:42 [INFO] [stdout] | [INFO] [stdout] 195 | let list_file_position = checkpoint.executing_file_position.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `checkpoint.executing_file_position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tasks/task_pre_check.rs:15:17 [INFO] [stdout] | [INFO] [stdout] 15 | return Ok(path.exists()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 15 - return Ok(path.exists()); [INFO] [stdout] 15 + Ok(path.exists()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tasks/task_pre_check.rs:26:17 [INFO] [stdout] | [INFO] [stdout] 26 | return Ok(true); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 26 - return Ok(true); [INFO] [stdout] 26 + Ok(true) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `FilePosition` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/task_status.rs:67:41 [INFO] [stdout] | [INFO] [stdout] 67 | file_position = item.value().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*item.value()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `FilePosition` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/task_status.rs:71:45 [INFO] [stdout] | [INFO] [stdout] 71 | ... file_position = item.value().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*item.value()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tasks/task_status.rs:75:25 [INFO] [stdout] | [INFO] [stdout] 75 | / if file_position.file_num.eq(&item.value().file_num) { [INFO] [stdout] 76 | | if file_position.offset > item.value().offset { [INFO] [stdout] 77 | | file_position = item.value().clone(); [INFO] [stdout] 78 | | } [INFO] [stdout] 79 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 75 ~ if file_position.file_num.eq(&item.value().file_num) [INFO] [stdout] 76 ~ && file_position.offset > item.value().offset { [INFO] [stdout] 77 | file_position = item.value().clone(); [INFO] [stdout] 78 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `FilePosition` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/task_status.rs:77:49 [INFO] [stdout] | [INFO] [stdout] 77 | ... file_position = item.value().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*item.value()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `FilePosition` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/task_status.rs:85:50 [INFO] [stdout] | [INFO] [stdout] 85 | checkpoint.executing_file_position = file_position.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `file_position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/tasks/task_traits.rs:14:15 [INFO] [stdout] | [INFO] [stdout] 14 | #[async_trait] [INFO] [stdout] | _______________^ [INFO] [stdout] 15 | | pub trait TransferTaskActions { [INFO] [stdout] 16 | | async fn analyze_source(&self) -> Result>; [INFO] [stdout] ... | [INFO] [stdout] 59 | | async fn execute_increment( [INFO] [stdout] | |____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:133:16 [INFO] [stdout] | [INFO] [stdout] 133 | if obj_list_files.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!obj_list_files.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:198:15 [INFO] [stdout] | [INFO] [stdout] 198 | while exec_set.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!exec_set.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:267:15 [INFO] [stdout] | [INFO] [stdout] 267 | while sys_set.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!sys_set.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:329:9 [INFO] [stdout] | [INFO] [stdout] 329 | checkpoint.executing_file = list_files[0].clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `models::model_checkpoint::CheckPoint { executing_file: list_files[0].clone(), task_begin_timestamp: i128::from(now.as_secs()), modify_checkpoint_timestamp: i128::from(now.as_secs()), last_scan_timestamp: i128::from(now.as_secs()), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:328:9 [INFO] [stdout] | [INFO] [stdout] 328 | let mut checkpoint = CheckPoint::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:409:17 [INFO] [stdout] | [INFO] [stdout] 409 | return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 408 - log::error!("{:?}", e); [INFO] [stdout] 409 - return; [INFO] [stdout] 408 + log::error!("{:?}", e); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:498:50 [INFO] [stdout] | [INFO] [stdout] 498 | let mut checkpoint = get_task_checkpoint(&checkpoint_file)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `checkpoint_file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:500:28 [INFO] [stdout] | [INFO] [stdout] 500 | checkpoint.save_to(&checkpoint_file)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `checkpoint_file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:511:17 [INFO] [stdout] | [INFO] [stdout] 511 | &checkpoint_file, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `checkpoint_file` [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: using `clone` on type `FilePosition` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:746:33 [INFO] [stdout] | [INFO] [stdout] 746 | let mut file_position = file_position.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `file_position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `file_num` is used as a loop counter [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:748:9 [INFO] [stdout] | [INFO] [stdout] 748 | for exec_file_desc in obj_list_files.iter().skip(file_num_usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (file_num, exec_file_desc) in (file_position.file_num..).zip(obj_list_files.iter().skip(file_num_usize))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `map_err` over `inspect_err` [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:751:18 [INFO] [stdout] | [INFO] [stdout] 751 | .map_err(|e| { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect [INFO] [stdout] = note: `#[warn(clippy::manual_inspect)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 751 ~ .inspect_err(|e| { [INFO] [stdout] 752 | shared_marks [INFO] [stdout] ... [INFO] [stdout] 756 | .execute_stop_mark [INFO] [stdout] 757 ~ .store(true, std::sync::atomic::Ordering::SeqCst); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `map_err` over `inspect_err` [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:763:18 [INFO] [stdout] | [INFO] [stdout] 763 | .map_err(|e| { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 763 ~ .inspect_err(|e| { [INFO] [stdout] 764 | shared_marks [INFO] [stdout] ... [INFO] [stdout] 768 | .execute_stop_mark [INFO] [stdout] 769 ~ .store(true, std::sync::atomic::Ordering::SeqCst); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `map_err` over `inspect_err` [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:775:18 [INFO] [stdout] | [INFO] [stdout] 775 | .map_err(|e| { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 775 ~ .inspect_err(|e| { [INFO] [stdout] 776 | shared_marks [INFO] [stdout] ... [INFO] [stdout] 780 | .execute_stop_mark [INFO] [stdout] 781 ~ .store(true, std::sync::atomic::Ordering::SeqCst); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `bytes` [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:801:35 [INFO] [stdout] | [INFO] [stdout] 801 | let len = key.bytes().len() + "\n".bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `key.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `bytes` [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:801:55 [INFO] [stdout] | [INFO] [stdout] 801 | let len = key.bytes().len() + "\n".bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `"\n".len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:842:28 [INFO] [stdout] | [INFO] [stdout] 842 | && vec_keys.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vec_keys.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:900:5 [INFO] [stdout] | [INFO] [stdout] 900 | / async fn exec_record_descriptions_file( [INFO] [stdout] 901 | | &self, [INFO] [stdout] 902 | | stop_mark: Arc, [INFO] [stdout] 903 | | err_occur: Arc, [INFO] [stdout] ... | [INFO] [stdout] 908 | | executing_file: FileDescription, [INFO] [stdout] 909 | | ) { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/task_transfer.rs:939:74 [INFO] [stdout] | [INFO] [stdout] 939 | || idx.to_string().eq(&(total_lines - 1).to_string()) && vec_keys.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vec_keys.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:110:24 [INFO] [stdout] | [INFO] [stdout] 110 | if record_vec.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!record_vec.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-binding `let` on a future [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:120:25 [INFO] [stdout] | [INFO] [stdout] 120 | let _ = local2local.transfer_record_options(record_vec); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider awaiting the future or dropping explicitly with `std::mem::drop` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_future [INFO] [stdout] = note: `#[warn(clippy::let_underscore_future)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:468:5 [INFO] [stdout] | [INFO] [stdout] 468 | / async fn increment_notify( [INFO] [stdout] 469 | | &self, [INFO] [stdout] 470 | | _joinset: &mut JoinSet<()>, [INFO] [stdout] 471 | | stop_mark: Arc, [INFO] [stdout] ... | [INFO] [stdout] 478 | | ) -> Result<()> { [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:617:16 [INFO] [stdout] | [INFO] [stdout] 617 | if records.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!records.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:634:13 [INFO] [stdout] | [INFO] [stdout] 634 | / match error_file.metadata() { [INFO] [stdout] 635 | | Ok(meta) => { [INFO] [stdout] 636 | | if meta.len() == 0 { [INFO] [stdout] 637 | | let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] ... | [INFO] [stdout] 640 | | Err(_) => {} [INFO] [stdout] 641 | | }; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 634 ~ if let Ok(meta) = error_file.metadata() { [INFO] [stdout] 635 + if meta.len() == 0 { [INFO] [stdout] 636 + let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] 637 + } [INFO] [stdout] 638 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:660:5 [INFO] [stdout] | [INFO] [stdout] 660 | / async fn increment_scan( [INFO] [stdout] 661 | | &self, [INFO] [stdout] 662 | | execute_set: &mut JoinSet<()>, [INFO] [stdout] 663 | | stop_mark: Arc, [INFO] [stdout] ... | [INFO] [stdout] 669 | | interval: u64, [INFO] [stdout] 670 | | ) -> Result<()> { [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `bytes` [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:726:31 [INFO] [stdout] | [INFO] [stdout] 726 | let len = line_str.bytes().len() + "\n".bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `line_str.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `bytes` [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:726:56 [INFO] [stdout] | [INFO] [stdout] 726 | let len = line_str.bytes().len() + "\n".bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `"\n".len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:778:19 [INFO] [stdout] | [INFO] [stdout] 778 | while execute_set.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!execute_set.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:807:40 [INFO] [stdout] | [INFO] [stdout] 807 | let _ = checkpoint.save_to(&checkpoint_path); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `checkpoint_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:819:19 [INFO] [stdout] | [INFO] [stdout] 819 | .open(&to_file)?; [INFO] [stdout] | ^^^^^^^^ help: change this to: `to_file` [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] --> src/tasks/transfer/transfer_local2local.rs:865:19 [INFO] [stdout] | [INFO] [stdout] 865 | .open(&to_file)?; [INFO] [stdout] | ^^^^^^^^ help: change this to: `to_file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:959:21 [INFO] [stdout] | [INFO] [stdout] 959 | return Ok(record); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 959 - return Ok(record); [INFO] [stdout] 959 + Ok(record) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:974:21 [INFO] [stdout] | [INFO] [stdout] 974 | return Ok(record); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 974 - return Ok(record); [INFO] [stdout] 974 + Ok(record) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:979:13 [INFO] [stdout] | [INFO] [stdout] 979 | return Err(anyhow!("Unkown modify type")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 979 - return Err(anyhow!("Unkown modify type")); [INFO] [stdout] 979 + Err(anyhow!("Unkown modify type")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:1085:9 [INFO] [stdout] | [INFO] [stdout] 1085 | / match error_file.metadata() { [INFO] [stdout] 1086 | | Ok(meta) => { [INFO] [stdout] 1087 | | if meta.len() == 0 { [INFO] [stdout] 1088 | | let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] ... | [INFO] [stdout] 1091 | | Err(_) => {} [INFO] [stdout] 1092 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1085 ~ if let Ok(meta) = error_file.metadata() { [INFO] [stdout] 1086 + if meta.len() == 0 { [INFO] [stdout] 1087 + let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] 1088 + } [INFO] [stdout] 1089 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:1103:9 [INFO] [stdout] | [INFO] [stdout] 1103 | subffix.push_str("_"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `subffix.push('_')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:1145:9 [INFO] [stdout] | [INFO] [stdout] 1145 | / match error_file.metadata() { [INFO] [stdout] 1146 | | Ok(meta) => { [INFO] [stdout] 1147 | | if meta.len() == 0 { [INFO] [stdout] 1148 | | let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] ... | [INFO] [stdout] 1151 | | Err(_) => {} [INFO] [stdout] 1152 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1145 ~ if let Ok(meta) = error_file.metadata() { [INFO] [stdout] 1146 + if meta.len() == 0 { [INFO] [stdout] 1147 + let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] 1148 + } [INFO] [stdout] 1149 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tasks/transfer/transfer_local2local.rs:1172:9 [INFO] [stdout] | [INFO] [stdout] 1172 | / if self.attributes.target_exists_skip { [INFO] [stdout] 1173 | | if t_path.exists() { [INFO] [stdout] 1174 | | return Ok(()); [INFO] [stdout] 1175 | | } [INFO] [stdout] 1176 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1172 ~ if self.attributes.target_exists_skip [INFO] [stdout] 1173 ~ && t_path.exists() { [INFO] [stdout] 1174 | return Ok(()); [INFO] [stdout] 1175 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:86:13 [INFO] [stdout] | [INFO] [stdout] 86 | self.attributes.last_modify_filter.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.attributes.last_modify_filter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:128:24 [INFO] [stdout] | [INFO] [stdout] 128 | if record_vec.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!record_vec.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:303:5 [INFO] [stdout] | [INFO] [stdout] 303 | / async fn increment_notify( [INFO] [stdout] 304 | | &self, [INFO] [stdout] 305 | | _joinset: &mut JoinSet<()>, [INFO] [stdout] 306 | | stop_mark: Arc, [INFO] [stdout] ... | [INFO] [stdout] 313 | | ) -> Result<()> { [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:452:16 [INFO] [stdout] | [INFO] [stdout] 452 | if records.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!records.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:469:13 [INFO] [stdout] | [INFO] [stdout] 469 | / match error_file.metadata() { [INFO] [stdout] 470 | | Ok(meta) => { [INFO] [stdout] 471 | | if meta.len() == 0 { [INFO] [stdout] 472 | | let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] ... | [INFO] [stdout] 475 | | Err(_) => {} [INFO] [stdout] 476 | | }; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 469 ~ if let Ok(meta) = error_file.metadata() { [INFO] [stdout] 470 + if meta.len() == 0 { [INFO] [stdout] 471 + let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] 472 + } [INFO] [stdout] 473 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:497:5 [INFO] [stdout] | [INFO] [stdout] 497 | / async fn increment_scan( [INFO] [stdout] 498 | | &self, [INFO] [stdout] 499 | | execute_set: &mut JoinSet<()>, [INFO] [stdout] 500 | | stop_mark: Arc, [INFO] [stdout] ... | [INFO] [stdout] 505 | | interval: u64, [INFO] [stdout] 506 | | ) -> Result<()> { [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `bytes` [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:546:31 [INFO] [stdout] | [INFO] [stdout] 546 | let len = line_str.bytes().len() + "\n".bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `line_str.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `bytes` [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:546:56 [INFO] [stdout] | [INFO] [stdout] 546 | let len = line_str.bytes().len() + "\n".bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `"\n".len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:590:19 [INFO] [stdout] | [INFO] [stdout] 590 | while execute_set.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!execute_set.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:622:40 [INFO] [stdout] | [INFO] [stdout] 622 | let _ = checkpoint.save_to(&checkpoint_path); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `checkpoint_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:817:21 [INFO] [stdout] | [INFO] [stdout] 817 | return Ok(record); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 817 - return Ok(record); [INFO] [stdout] 817 + Ok(record) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:832:21 [INFO] [stdout] | [INFO] [stdout] 832 | return Ok(record); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 832 - return Ok(record); [INFO] [stdout] 832 + Ok(record) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:837:13 [INFO] [stdout] | [INFO] [stdout] 837 | return Err(anyhow!("Unkown modify type")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 837 - return Err(anyhow!("Unkown modify type")); [INFO] [stdout] 837 + Err(anyhow!("Unkown modify type")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:910:72 [INFO] [stdout] | [INFO] [stdout] 910 | let source_file_path = gen_file_path(self.source.as_str(), &record.key.as_str(), ""); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `record.key.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:968:9 [INFO] [stdout] | [INFO] [stdout] 968 | / match error_file.metadata() { [INFO] [stdout] 969 | | Ok(meta) => { [INFO] [stdout] 970 | | if 0.eq(&meta.len()) { [INFO] [stdout] 971 | | let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] ... | [INFO] [stdout] 974 | | Err(_) => {} [INFO] [stdout] 975 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 968 ~ if let Ok(meta) = error_file.metadata() { [INFO] [stdout] 969 + if 0.eq(&meta.len()) { [INFO] [stdout] 970 + let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] 971 + } [INFO] [stdout] 972 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:986:9 [INFO] [stdout] | [INFO] [stdout] 986 | subffix.push_str("_"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `subffix.push('_')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `FilePosition` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:1011:45 [INFO] [stdout] | [INFO] [stdout] 1011 | .insert(offset_key.clone(), record.list_file_position.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `record.list_file_position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/tasks/transfer/transfer_local2oss.rs:1085:9 [INFO] [stdout] | [INFO] [stdout] 1085 | / match error_file.metadata() { [INFO] [stdout] 1086 | | Ok(meta) => { [INFO] [stdout] 1087 | | if meta.len() == 0 { [INFO] [stdout] 1088 | | let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] ... | [INFO] [stdout] 1091 | | Err(_) => {} [INFO] [stdout] 1092 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1085 ~ if let Ok(meta) = error_file.metadata() { [INFO] [stdout] 1086 + if meta.len() == 0 { [INFO] [stdout] 1087 + let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] 1088 + } [INFO] [stdout] 1089 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:81:17 [INFO] [stdout] | [INFO] [stdout] 81 | self.attributes.last_modify_filter.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.attributes.last_modify_filter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:148:24 [INFO] [stdout] | [INFO] [stdout] 148 | if record_vec.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!record_vec.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `bytes` [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:292:31 [INFO] [stdout] | [INFO] [stdout] 292 | let len = line_str.bytes().len() + "\n".bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `line_str.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `bytes` [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:292:56 [INFO] [stdout] | [INFO] [stdout] 292 | let len = line_str.bytes().len() + "\n".bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `"\n".len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:336:16 [INFO] [stdout] | [INFO] [stdout] 336 | if vec_keys.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vec_keys.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:352:19 [INFO] [stdout] | [INFO] [stdout] 352 | while execute_set.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!execute_set.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:375:40 [INFO] [stdout] | [INFO] [stdout] 375 | let _ = checkpoint.save_to(&checkpoint_path); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `checkpoint_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:391:19 [INFO] [stdout] | [INFO] [stdout] 391 | .open(&to_file)?; [INFO] [stdout] | ^^^^^^^^ help: change this to: `to_file` [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] --> src/tasks/transfer/transfer_oss2local.rs:553:67 [INFO] [stdout] | [INFO] [stdout] 553 | let t_file_name = gen_file_path(self.target.as_str(), &record.key.as_str(), ""); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `record.key.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:595:9 [INFO] [stdout] | [INFO] [stdout] 595 | / match error_file.metadata() { [INFO] [stdout] 596 | | Ok(meta) => { [INFO] [stdout] 597 | | if meta.len() == 0 { [INFO] [stdout] 598 | | let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] ... | [INFO] [stdout] 601 | | Err(_) => {} [INFO] [stdout] 602 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 595 ~ if let Ok(meta) = error_file.metadata() { [INFO] [stdout] 596 + if meta.len() == 0 { [INFO] [stdout] 597 + let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] 598 + } [INFO] [stdout] 599 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:613:9 [INFO] [stdout] | [INFO] [stdout] 613 | subffix.push_str("_"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `subffix.push('_')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:637:13 [INFO] [stdout] | [INFO] [stdout] 637 | / if self.attributes.target_exists_skip { [INFO] [stdout] 638 | | if t_path.exists() { [INFO] [stdout] 639 | | continue; [INFO] [stdout] 640 | | } [INFO] [stdout] 641 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 637 ~ if self.attributes.target_exists_skip [INFO] [stdout] 638 ~ && t_path.exists() { [INFO] [stdout] 639 | continue; [INFO] [stdout] 640 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `FilePosition` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:650:53 [INFO] [stdout] | [INFO] [stdout] 650 | .insert(offset_key.clone(), record.list_file_position.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `record.list_file_position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:664:9 [INFO] [stdout] | [INFO] [stdout] 664 | / match error_file.metadata() { [INFO] [stdout] 665 | | Ok(meta) => { [INFO] [stdout] 666 | | if meta.len() == 0 { [INFO] [stdout] 667 | | let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] ... | [INFO] [stdout] 670 | | Err(_) => {} [INFO] [stdout] 671 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 664 ~ if let Ok(meta) = error_file.metadata() { [INFO] [stdout] 665 + if meta.len() == 0 { [INFO] [stdout] 666 + let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] 667 + } [INFO] [stdout] 668 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:690:9 [INFO] [stdout] | [INFO] [stdout] 690 | / if self.attributes.target_exists_skip { [INFO] [stdout] 691 | | if t_path.exists() { [INFO] [stdout] 692 | | return Ok(()); [INFO] [stdout] 693 | | } [INFO] [stdout] 694 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 690 ~ if self.attributes.target_exists_skip [INFO] [stdout] 691 ~ && t_path.exists() { [INFO] [stdout] 692 | return Ok(()); [INFO] [stdout] 693 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:697:25 [INFO] [stdout] | [INFO] [stdout] 697 | .get_object(&self.source.bucket.as_str(), record.key.as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.source.bucket.as_str()` [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: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:88:17 [INFO] [stdout] | [INFO] [stdout] 88 | self.attributes.last_modify_filter.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.attributes.last_modify_filter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:129:24 [INFO] [stdout] | [INFO] [stdout] 129 | if record_vec.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!record_vec.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-binding `let` on a future [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:137:25 [INFO] [stdout] | [INFO] [stdout] 137 | let _ = executor.transfer_record_options(record_vec); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider awaiting the future or dropping explicitly with `std::mem::drop` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_future [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `bytes` [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:307:31 [INFO] [stdout] | [INFO] [stdout] 307 | let len = line_str.bytes().len() + "\n".bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `line_str.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `bytes` [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:307:56 [INFO] [stdout] | [INFO] [stdout] 307 | let len = line_str.bytes().len() + "\n".bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `"\n".len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:332:28 [INFO] [stdout] | [INFO] [stdout] 332 | && vec_keys.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vec_keys.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:355:19 [INFO] [stdout] | [INFO] [stdout] 355 | while execute_set.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!execute_set.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:383:48 [INFO] [stdout] | [INFO] [stdout] 383 | if let Err(e) = checkpoint.save_to(&checkpoint_path) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `checkpoint_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:408:19 [INFO] [stdout] | [INFO] [stdout] 408 | .open(&to_file)?; [INFO] [stdout] | ^^^^^^^^ help: change this to: `to_file` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:685:9 [INFO] [stdout] | [INFO] [stdout] 685 | / match error_file.metadata() { [INFO] [stdout] 686 | | Ok(meta) => { [INFO] [stdout] 687 | | if meta.len() == 0 { [INFO] [stdout] 688 | | let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] ... | [INFO] [stdout] 691 | | Err(_) => {} [INFO] [stdout] 692 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 685 ~ if let Ok(meta) = error_file.metadata() { [INFO] [stdout] 686 + if meta.len() == 0 { [INFO] [stdout] 687 + let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] 688 + } [INFO] [stdout] 689 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:703:9 [INFO] [stdout] | [INFO] [stdout] 703 | subffix.push_str("_"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `subffix.push('_')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `FilePosition` which implements the `Copy` trait [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:745:49 [INFO] [stdout] | [INFO] [stdout] 745 | .insert(offset_key.clone(), record.list_file_position.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `record.list_file_position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:759:9 [INFO] [stdout] | [INFO] [stdout] 759 | / match error_file.metadata() { [INFO] [stdout] 760 | | Ok(meta) => { [INFO] [stdout] 761 | | if meta.len() == 0 { [INFO] [stdout] 762 | | let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] ... | [INFO] [stdout] 765 | | Err(_) => {} [INFO] [stdout] 766 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 759 ~ if let Ok(meta) = error_file.metadata() { [INFO] [stdout] 760 + if meta.len() == 0 { [INFO] [stdout] 761 + let _ = fs::remove_file(error_file_name.as_str()); [INFO] [stdout] 762 + } [INFO] [stdout] 763 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:830:9 [INFO] [stdout] | [INFO] [stdout] 830 | / return match content_len_usize.le(&self.attributes.large_file_size) { [INFO] [stdout] 831 | | true => { [INFO] [stdout] 832 | | target_oss [INFO] [stdout] 833 | | .upload_object_bytes( [INFO] [stdout] ... | [INFO] [stdout] 857 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 830 ~ match content_len_usize.le(&self.attributes.large_file_size) { [INFO] [stdout] 831 + true => { [INFO] [stdout] 832 + target_oss [INFO] [stdout] 833 + .upload_object_bytes( [INFO] [stdout] 834 + self.target.bucket.as_str(), [INFO] [stdout] 835 + target_key, [INFO] [stdout] 836 + expr, [INFO] [stdout] 837 + s_obj_output.body, [INFO] [stdout] 838 + ) [INFO] [stdout] 839 + .await [INFO] [stdout] 840 + } [INFO] [stdout] 841 + false => { [INFO] [stdout] 842 + multipart_transfer_obj_paralle_by_range( [INFO] [stdout] 843 + source_oss.clone(), [INFO] [stdout] 844 + &self.source.bucket, [INFO] [stdout] 845 + record.key.as_str(), [INFO] [stdout] 846 + target_oss.clone(), [INFO] [stdout] 847 + &self.target.bucket, [INFO] [stdout] 848 + target_key, [INFO] [stdout] 849 + expr, [INFO] [stdout] 850 + self.semaphore.clone(), [INFO] [stdout] 851 + self.attributes.multi_part_chunk_size, [INFO] [stdout] 852 + self.attributes.multi_part_chunks_per_batch, [INFO] [stdout] 853 + self.attributes.multi_part_parallelism, [INFO] [stdout] 854 + ) [INFO] [stdout] 855 + .await [INFO] [stdout] 856 + } [INFO] [stdout] 857 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tasks/transfer/transfer_oss2oss.rs:783:25 [INFO] [stdout] | [INFO] [stdout] 783 | .get_object(&self.source.bucket.as_str(), record.key.as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.source.bucket.as_str()` [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: unused `std::result::Result` that must be used [INFO] [stdout] --> src/tasks/transfer/transfer_oss2local.rs:349:17 [INFO] [stdout] | [INFO] [stdout] 349 | executor.transfer_record_options(vk).await; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 349 | let _ = executor.transfer_record_options(vk).await; [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2m 50s [INFO] running `Command { std: "docker" "inspect" "9ab0bd9299d0bfd6de86d3fd0308ce1fdb36a8056bf94603972cabcd15a87046", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9ab0bd9299d0bfd6de86d3fd0308ce1fdb36a8056bf94603972cabcd15a87046", kill_on_drop: false }` [INFO] [stdout] 9ab0bd9299d0bfd6de86d3fd0308ce1fdb36a8056bf94603972cabcd15a87046