[INFO] cloning repository https://github.com/eugenehp/espeak-ng-rs [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/eugenehp/espeak-ng-rs" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Feugenehp%2Fespeak-ng-rs", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Feugenehp%2Fespeak-ng-rs'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 033e88777ccd8644c72964f5f4c8b1042454f491 [INFO] linting eugenehp/espeak-ng-rs against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Feugenehp%2Fespeak-ng-rs" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/eugenehp/espeak-ng-rs [INFO] finished tweaking git repo https://github.com/eugenehp/espeak-ng-rs [INFO] tweaked toml for git repo https://github.com/eugenehp/espeak-ng-rs written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/eugenehp/espeak-ng-rs 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/eugenehp/espeak-ng-rs 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] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 1a0c07b907f2620aa884c84d59126e92b2bcb9becc2c54b63229a6ecee32c156 [INFO] running `Command { std: "docker" "start" "-a" "1a0c07b907f2620aa884c84d59126e92b2bcb9becc2c54b63229a6ecee32c156", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "1a0c07b907f2620aa884c84d59126e92b2bcb9becc2c54b63229a6ecee32c156", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1a0c07b907f2620aa884c84d59126e92b2bcb9becc2c54b63229a6ecee32c156", kill_on_drop: false }` [INFO] [stdout] 1a0c07b907f2620aa884c84d59126e92b2bcb9becc2c54b63229a6ecee32c156 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 7bcfa002a3ecadefe23f9561eb6d65cc293060ed1f9b61ec2ac21f12dec2c501 [INFO] running `Command { std: "docker" "start" "-a" "7bcfa002a3ecadefe23f9561eb6d65cc293060ed1f9b61ec2ac21f12dec2c501", kill_on_drop: false }` [INFO] [stderr] Compiling zerocopy v0.8.42 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking ciborium-io v0.2.2 [INFO] [stderr] Checking plotters-backend v0.3.7 [INFO] [stderr] Checking clap_builder v4.5.60 [INFO] [stderr] Checking itertools v0.10.5 [INFO] [stderr] Compiling espeak-ng v0.1.0 (/opt/rustwide/workdir) [INFO] [stderr] Compiling syn v2.0.117 [INFO] [stderr] Checking regex-automata v0.4.14 [INFO] [stderr] Checking is-terminal v0.4.17 [INFO] [stderr] Compiling espeak-ng-data-dict-pt v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-pt) [INFO] [stderr] Compiling espeak-ng-data-dict-pa v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-pa) [INFO] [stderr] Compiling espeak-ng-data-dict-nci v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-nci) [INFO] [stderr] Compiling espeak-ng-data-dict-chr v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-chr) [INFO] [stderr] Compiling espeak-ng-data-dict-shn v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-shn) [INFO] [stderr] Compiling espeak-ng-data-dict-haw v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-haw) [INFO] [stderr] Compiling espeak-ng-data-dict-hy v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-hy) [INFO] [stderr] Compiling espeak-ng-data-dict-kn v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-kn) [INFO] [stderr] Compiling espeak-ng-data-dict-hu v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-hu) [INFO] [stderr] Compiling espeak-ng-data-dict-cs v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-cs) [INFO] [stderr] Checking plotters-svg v0.3.7 [INFO] [stderr] Compiling espeak-ng-data-dict-vi v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-vi) [INFO] [stderr] Compiling espeak-ng-data-dict-en v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-en) [INFO] [stderr] Compiling espeak-ng-data-dict-sv v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-sv) [INFO] [stderr] Compiling espeak-ng-data-dict-ug v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-ug) [INFO] [stderr] Compiling espeak-ng-data-dict-sk v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-sk) [INFO] [stderr] Compiling espeak-ng-data-dict-sq v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-sq) [INFO] [stderr] Compiling espeak-ng-data-dict-uk v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-uk) [INFO] [stderr] Compiling espeak-ng-data-dict-no v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-no) [INFO] [stderr] Compiling espeak-ng-data-dict-qya v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-qya) [INFO] [stderr] Compiling espeak-ng-data-dict-ia v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-ia) [INFO] [stderr] Compiling espeak-ng-data-dict-hi v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-hi) [INFO] [stderr] Compiling espeak-ng-data-dict-fr v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-fr) [INFO] [stderr] Compiling espeak-ng-data-dict-gn v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-gn) [INFO] [stderr] Compiling espeak-ng-data-dict-si v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-si) [INFO] [stderr] Compiling espeak-ng-data-dict-mr v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-mr) [INFO] [stderr] Compiling espeak-ng-data-dict-eu v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-eu) [INFO] [stderr] Compiling espeak-ng-data-dict-ga v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-ga) [INFO] [stderr] Compiling espeak-ng-data-dict-mk v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-mk) [INFO] [stderr] Compiling espeak-ng-data-dict-ko v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-ko) [INFO] [stderr] Compiling espeak-ng-data-dict-jbo v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-jbo) [INFO] [stderr] Compiling espeak-ng-data-dict-lv v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-lv) [INFO] [stderr] Compiling espeak-ng-data-dict-id v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-id) [INFO] [stderr] Compiling espeak-ng-data-dict-or v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-or) [INFO] [stderr] Compiling espeak-ng-data-dict-ml v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-ml) [INFO] [stderr] Compiling espeak-ng-data-dict-la v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-la) [INFO] [stderr] Compiling espeak-ng-data-dict-ru v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-ru) [INFO] [stderr] Checking plotters v0.3.7 [INFO] [stderr] Compiling espeak-ng-data-dict-ja v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-ja) [INFO] [stderr] Compiling espeak-ng-data-dicts v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dicts) [INFO] [stderr] Compiling espeak-ng-data-dict-grc v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-grc) [INFO] [stderr] Compiling espeak-ng-data-dict-mto v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-mto) [INFO] [stderr] Compiling espeak-ng-data-dict-ar v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-ar) [INFO] [stderr] Compiling espeak-ng-data-dict-quc v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-quc) [INFO] [stderr] Compiling espeak-ng-data-dict-tt v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-tt) [INFO] [stderr] Compiling espeak-ng-data-dict-te v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-te) [INFO] [stderr] Checking criterion-plot v0.5.0 [INFO] [stderr] Compiling espeak-ng-data-dict-tn v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-tn) [INFO] [stderr] Compiling espeak-ng-data-dict-lfn v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-lfn) [INFO] [stderr] Compiling espeak-ng-data-dict-nog v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-nog) [INFO] [stderr] Compiling espeak-ng-data-dict-piqd v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-piqd) [INFO] [stderr] Compiling espeak-ng-data-dict-ku v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-ku) [INFO] [stderr] Compiling espeak-ng-data-dict-de v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-de) [INFO] [stderr] Compiling espeak-ng-data-dict-bg v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-bg) [INFO] [stderr] Compiling espeak-ng-data-dict-sr v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-sr) [INFO] [stderr] Compiling espeak-ng-data-dict-sl v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-sl) [INFO] [stderr] Compiling espeak-ng-data-dict-my v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-my) [INFO] [stderr] Compiling espeak-ng-data-dict-ba v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-ba) [INFO] [stderr] Compiling espeak-ng-data-dict-tk v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-tk) [INFO] [stderr] Compiling espeak-ng-data-dict-yue v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-yue) [INFO] [stderr] Compiling espeak-ng-data-dict-be v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-be) [INFO] [stderr] Checking regex v1.12.3 [INFO] [stderr] Compiling espeak-ng-data-dict-kok v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-kok) [INFO] [stderr] Compiling espeak-ng-data-dict-bpy v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-bpy) [INFO] [stderr] Compiling espeak-ng-data-dict-nl v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-nl) [INFO] [stderr] Compiling espeak-ng-data-dict-es v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-es) [INFO] [stderr] Compiling espeak-ng-data-dict-ms v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-ms) [INFO] [stderr] Compiling espeak-ng-data-dict-da v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-da) [INFO] [stderr] Compiling espeak-ng-data-dict-sjn v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-sjn) [INFO] [stderr] Compiling espeak-ng-data-dict-smj v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-smj) [INFO] [stderr] Compiling espeak-ng-data-dict-ht v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-ht) [INFO] [stderr] Compiling espeak-ng-data-dict-gu v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-gu) [INFO] [stderr] Compiling espeak-ng-data-dict-io v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-io) [INFO] [stderr] Compiling espeak-ng-data-dict-ka v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-ka) [INFO] [stderr] Compiling espeak-ng-data-dict-uz v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-uz) [INFO] [stderr] Compiling espeak-ng-data-dict-pl v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-pl) [INFO] [stderr] Compiling espeak-ng-data-dict-cmn v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-cmn) [INFO] [stderr] Checking clap v4.5.60 [INFO] [stderr] Compiling espeak-ng-data-dict-ro v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-ro) [INFO] [stderr] Compiling espeak-ng-data-dict-as v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-as) [INFO] [stderr] Compiling espeak-ng-data-dict-ca v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-ca) [INFO] [stderr] Compiling espeak-ng-data-dict-eo v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-eo) [INFO] [stderr] Compiling espeak-ng-data-dict-mi v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-mi) [INFO] [stderr] Compiling espeak-ng-data-dict-kk v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-kk) [INFO] [stderr] Compiling espeak-ng-data-dict-hr v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-hr) [INFO] [stderr] Compiling espeak-ng-data-dict-ti v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-ti) [INFO] [stderr] Compiling espeak-ng-data-dict-sd v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-sd) [INFO] [stderr] Compiling espeak-ng-data-dict-ky v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-ky) [INFO] [stderr] Compiling espeak-ng-data-dict-it v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-it) [INFO] [stderr] Compiling espeak-ng-data-dict-et v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-et) [INFO] [stderr] Compiling espeak-ng-data-dict-an v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-an) [INFO] [stderr] Compiling espeak-ng-data-dict-sw v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-sw) [INFO] [stderr] Compiling espeak-ng-data-dict-el v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-el) [INFO] [stderr] Compiling espeak-ng-data-dict-kl v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-kl) [INFO] [stderr] Compiling espeak-ng-data-dict-hak v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-hak) [INFO] [stderr] Compiling espeak-ng-data-dict-lt v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-lt) [INFO] [stderr] Compiling espeak-ng-data-dict-ta v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-ta) [INFO] [stderr] Compiling espeak-ng-data-dict-fa v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-fa) [INFO] [stderr] Compiling espeak-ng-data-phonemes v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-phonemes) [INFO] [stderr] Compiling espeak-ng-data-dict-th v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-th) [INFO] [stderr] Compiling espeak-ng-data-dict-qdb v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-qdb) [INFO] [stderr] Compiling espeak-ng-data-dict-py v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-py) [INFO] [stderr] Compiling espeak-ng-data-dict-tr v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-tr) [INFO] [stderr] Compiling espeak-ng-data-dict-mt v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-mt) [INFO] [stderr] Compiling espeak-ng-data-dict-lb v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-lb) [INFO] [stderr] Compiling espeak-ng-data-dict-cy v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-cy) [INFO] [stderr] Compiling espeak-ng-data-dict-he v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-he) [INFO] [stderr] Compiling espeak-ng-data-dict-af v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-af) [INFO] [stderr] Compiling espeak-ng-data-dict-ne v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-ne) [INFO] [stderr] Compiling espeak-ng-data-dict-om v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-om) [INFO] [stderr] Compiling espeak-ng-data-dict-ur v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-ur) [INFO] [stderr] Compiling espeak-ng-data-dict-bn v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-bn) [INFO] [stderr] Compiling espeak-ng-data-dict-pap v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-pap) [INFO] [stderr] Compiling espeak-ng-data-dict-gd v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-gd) [INFO] [stderr] Compiling espeak-ng-data-dict-is v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-is) [INFO] [stderr] Compiling espeak-ng-data-dict-qu v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-qu) [INFO] [stderr] Compiling espeak-ng-data-dict-am v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-am) [INFO] [stderr] Compiling espeak-ng-data-dict-az v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-az) [INFO] [stderr] Compiling espeak-ng-data-dict-bs v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-bs) [INFO] [stderr] Compiling espeak-ng-data-dict-fi v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-fi) [INFO] [stderr] Compiling espeak-ng-data-dict-cv v0.1.0 (/opt/rustwide/workdir/data-crates/espeak-ng-data-dict-cv) [INFO] [stderr] Compiling zerocopy-derive v0.8.42 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/encoding/mod.rs:328:23 [INFO] [stdout] | [INFO] [stdout] 328 | debug_assert!(buf.len() >= 1); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!buf.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: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> src/phoneme/feature.rs:168:5 [INFO] [stdout] | [INFO] [stdout] 168 | / pub fn from_str(s: &str) -> Option { [INFO] [stdout] 169 | | let b = s.as_bytes(); [INFO] [stdout] 170 | | if b.len() != 3 { [INFO] [stdout] 171 | | return None; [INFO] [stdout] ... | [INFO] [stdout] 174 | | Some(Self(value)) [INFO] [stdout] 175 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/phoneme/load.rs:421:31 [INFO] [stdout] | [INFO] [stdout] 421 | let n_words = (data + 1) / 2; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `data.div_ceil(2)` [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: redundant closure [INFO] [stdout] --> src/phoneme/load.rs:500:34 [INFO] [stdout] | [INFO] [stdout] 500 | std::fs::read(&path).map_err(|e| Error::Io(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::Io` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/dictionary/file.rs:139:22 [INFO] [stdout] | [INFO] [stdout] 139 | .map_err(|e| Error::Io(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::Io` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `hash` is used to index `hashtab` [INFO] [stdout] --> src/dictionary/file.rs:171:25 [INFO] [stdout] | [INFO] [stdout] 171 | for hash in 0..N_HASH_DICT { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 171 - for hash in 0..N_HASH_DICT { [INFO] [stdout] 171 + for (hash, ) in hashtab.iter_mut().enumerate().take(N_HASH_DICT) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/dictionary/lookup.rs:278:16 [INFO] [stdout] | [INFO] [stdout] 278 | if !ctx.expect_verb && !(ctx.expect_verb_s && (end_flags & super::FLAG_SUFX_S != 0)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(ctx.expect_verb || ctx.expect_verb_s && (end_flags & super::FLAG_SUFX_S != 0))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dictionary/lookup.rs:277:9 [INFO] [stdout] | [INFO] [stdout] 277 | / if flags2.is_verb() { [INFO] [stdout] 278 | | if !ctx.expect_verb && !(ctx.expect_verb_s && (end_flags & super::FLAG_SUFX_S != 0)) { [INFO] [stdout] 279 | | pos = entry_end; [INFO] [stdout] 280 | | continue; [INFO] [stdout] 281 | | } [INFO] [stdout] 282 | | } [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] 277 ~ if flags2.is_verb() [INFO] [stdout] 278 ~ && !ctx.expect_verb && !(ctx.expect_verb_s && (end_flags & super::FLAG_SUFX_S != 0)) { [INFO] [stdout] 279 | pos = entry_end; [INFO] [stdout] 280 | continue; [INFO] [stdout] 281 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/dictionary/rules.rs:84:40 [INFO] [stdout] | [INFO] [stdout] 84 | (c as u8).is_ascii_alphabetic() || (c >= 0xc0 && c < 0x2c0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0xc0..0x2c0).contains(&c)` [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 `RangeInclusive::contains` implementation [INFO] [stdout] --> src/dictionary/rules.rs:88:47 [INFO] [stdout] | [INFO] [stdout] 88 | (c >= b'0' as u32 && c <= b'9' as u32) || (c >= 0x660 && c <= 0x669) // Arabic-Indic [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0x660..=0x669).contains(&c)` [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: implicitly performing saturating subtraction [INFO] [stdout] --> src/dictionary/rules.rs:613:21 [INFO] [stdout] | [INFO] [stdout] 613 | if pre_ptr > 0 { pre_ptr -= 1; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `pre_ptr = pre_ptr.saturating_sub(1);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub [INFO] [stdout] = note: `#[warn(clippy::implicit_saturating_sub)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/dictionary/rules.rs:835:1 [INFO] [stdout] | [INFO] [stdout] 835 | / pub fn translate_rules( [INFO] [stdout] 836 | | dict: &Dictionary, [INFO] [stdout] 837 | | word_buf: &[u8], [INFO] [stdout] 838 | | word_start: usize, // index of the first non-space char in word_buf [INFO] [stdout] ... | [INFO] [stdout] 844 | | word_stressed_count: &mut i32, [INFO] [stdout] 845 | | ) -> RulesResult { [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: this function has too many arguments (10/7) [INFO] [stdout] --> src/dictionary/rules.rs:854:1 [INFO] [stdout] | [INFO] [stdout] 854 | / pub fn translate_rules_phdata( [INFO] [stdout] 855 | | dict: &Dictionary, [INFO] [stdout] 856 | | word_buf: &[u8], [INFO] [stdout] 857 | | word_start: usize, [INFO] [stdout] ... | [INFO] [stdout] 864 | | phdata: Option<&crate::phoneme::load::PhonemeData>, [INFO] [stdout] 865 | | ) -> RulesResult { [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 (10/7) [INFO] [stdout] --> src/dictionary/rules.rs:1087:1 [INFO] [stdout] | [INFO] [stdout] 1087 | / fn make_ctx<'a>( [INFO] [stdout] 1088 | | word: &'a [u8], [INFO] [stdout] 1089 | | pos: usize, [INFO] [stdout] 1090 | | group_length: usize, [INFO] [stdout] ... | [INFO] [stdout] 1097 | | stressed_count: i32, [INFO] [stdout] 1098 | | ) -> RuleContext<'a> { [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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/dictionary/stress.rs:241:45 [INFO] [stdout] | [INFO] [stdout] 241 | pub fn apply_word_final_devoicing(phonemes: &mut Vec, phdata: &PhonemeData) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 241 - pub fn apply_word_final_devoicing(phonemes: &mut Vec, phdata: &PhonemeData) { [INFO] [stdout] 241 + pub fn apply_word_final_devoicing(phonemes: &mut [u8], phdata: &PhonemeData) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/dictionary/stress.rs:280:43 [INFO] [stdout] | [INFO] [stdout] 280 | pub fn apply_alt_stress_upgrade(phonemes: &mut Vec, phdata: &PhonemeData) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 280 - pub fn apply_alt_stress_upgrade(phonemes: &mut Vec, phdata: &PhonemeData) { [INFO] [stdout] 280 + pub fn apply_alt_stress_upgrade(phonemes: &mut [u8], phdata: &PhonemeData) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i8` -> `i8`) [INFO] [stdout] --> src/dictionary/stress.rs:355:58 [INFO] [stdout] | [INFO] [stdout] 355 | while j > 0 && stressed_syllable == 0 && (vowel_stress[j as usize] as i8) < STRESS_IS_PRIMARY { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `vowel_stress[j as usize]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dictionary/stress.rs:403:17 [INFO] [stdout] | [INFO] [stdout] 403 | / if stress < 0 && (control & 1) != 0 { [INFO] [stdout] 404 | | if ph.map(|p| p.phflags & PH_UNSTRESSED != 0).unwrap_or(false) { [INFO] [stdout] 405 | | vowel_stress[count as usize] = STRESS_IS_UNSTRESSED; [INFO] [stdout] 406 | | } [INFO] [stdout] 407 | | } [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] 403 ~ if stress < 0 && (control & 1) != 0 [INFO] [stdout] 404 ~ && ph.map(|p| p.phflags & PH_UNSTRESSED != 0).unwrap_or(false) { [INFO] [stdout] 405 | vowel_stress[count as usize] = STRESS_IS_UNSTRESSED; [INFO] [stdout] 406 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dictionary/stress.rs:412:16 [INFO] [stdout] | [INFO] [stdout] 412 | } else if is_syllabic { [INFO] [stdout] | ________________^ [INFO] [stdout] 413 | | if count < 99 { [INFO] [stdout] 414 | | vowel_stress[count as usize] = stress as i8; [INFO] [stdout] 415 | | if stress < 0 && (control & 1) != 0 { [INFO] [stdout] ... | [INFO] [stdout] 420 | | } [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] 412 ~ } else if is_syllabic [INFO] [stdout] 413 ~ && count < 99 { [INFO] [stdout] 414 | vowel_stress[count as usize] = stress as i8; [INFO] [stdout] ... [INFO] [stdout] 418 | count += 1; [INFO] [stdout] 419 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/dictionary/stress.rs:495:33 [INFO] [stdout] | [INFO] [stdout] 495 | let mut stressed_syllable = (dflags & 0x7) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `(dflags & 0x7)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/dictionary/stress.rs:498:29 [INFO] [stdout] | [INFO] [stdout] 498 | stressed_syllable = (dflags & 0x3) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `(dflags & 0x3)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/dictionary/stress.rs:563:13 [INFO] [stdout] | [INFO] [stdout] 563 | / if stressed_syllable == 0 { [INFO] [stdout] 564 | | max_stress = STRESS_IS_PRIMARY as i32; [INFO] [stdout] 565 | | let mut ss = if vowel_count > 2 { vowel_count - 2 } else { 1 }; [INFO] [stdout] ... | [INFO] [stdout] 601 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 561 ~ STRESSPOSN_2R [INFO] [stdout] 562 | // Penultimate vowel [INFO] [stdout] 563 ~ if stressed_syllable == 0 => { [INFO] [stdout] 564 | max_stress = STRESS_IS_PRIMARY as i32; [INFO] [stdout] ... [INFO] [stdout] 600 | } [INFO] [stdout] 601 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/dictionary/stress.rs:605:13 [INFO] [stdout] | [INFO] [stdout] 605 | / if stressed_syllable == 0 { [INFO] [stdout] 606 | | let mut ss = vowel_count - 1; [INFO] [stdout] 607 | | while ss > 0 { [INFO] [stdout] 608 | | if vowel_stress[ss as usize] < STRESS_IS_DIMINISHED { [INFO] [stdout] ... | [INFO] [stdout] 614 | | max_stress = STRESS_IS_PRIMARY as i32; [INFO] [stdout] 615 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 603 ~ STRESSPOSN_1R [INFO] [stdout] 604 | // Final vowel [INFO] [stdout] 605 ~ if stressed_syllable == 0 => { [INFO] [stdout] 606 | let mut ss = vowel_count - 1; [INFO] [stdout] ... [INFO] [stdout] 614 | max_stress = STRESS_IS_PRIMARY as i32; [INFO] [stdout] 615 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/dictionary/stress.rs:619:13 [INFO] [stdout] | [INFO] [stdout] 619 | / if stressed_syllable == 0 { [INFO] [stdout] 620 | | let mut ss = vowel_count - 3; [INFO] [stdout] 621 | | if ss < 1 { ss = 1; } [INFO] [stdout] 622 | | if max_stress == STRESS_IS_DIMINISHED as i32 { [INFO] [stdout] ... | [INFO] [stdout] 625 | | max_stress = STRESS_IS_PRIMARY as i32; [INFO] [stdout] 626 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 617 ~ STRESSPOSN_3R [INFO] [stdout] 618 | // Antipenultimate vowel [INFO] [stdout] 619 ~ if stressed_syllable == 0 => { [INFO] [stdout] 620 | let mut ss = vowel_count - 3; [INFO] [stdout] ... [INFO] [stdout] 625 | max_stress = STRESS_IS_PRIMARY as i32; [INFO] [stdout] 626 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/dictionary/stress.rs:630:13 [INFO] [stdout] | [INFO] [stdout] 630 | / if stressed_syllable == 0 { [INFO] [stdout] 631 | | const GUESS_RU: [i32; 16] = [0,0,1,1,2,3,3,4,5,6,7,7,8,9,10,11]; [INFO] [stdout] 632 | | const GUESS_RU_V: [i32; 16] = [0,0,1,1,2,2,3,3,4,5,6,7,7,8,9,10]; [INFO] [stdout] 633 | | const GUESS_RU_T: [i32; 16] = [0,0,1,2,3,3,3,4,5,6,7,7,7,8,9,10]; [INFO] [stdout] ... | [INFO] [stdout] 650 | | max_stress = STRESS_IS_PRIMARY as i32; [INFO] [stdout] 651 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 628 ~ STRESSPOSN_SYLCOUNT [INFO] [stdout] 629 | // Russian-style: guess from syllable count [INFO] [stdout] 630 ~ if stressed_syllable == 0 => { [INFO] [stdout] 631 | const GUESS_RU: [i32; 16] = [0,0,1,1,2,3,3,4,5,6,7,7,8,9,10,11]; [INFO] [stdout] ... [INFO] [stdout] 650 | max_stress = STRESS_IS_PRIMARY as i32; [INFO] [stdout] 651 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/dictionary/stress.rs:655:13 [INFO] [stdout] | [INFO] [stdout] 655 | / if stressed_syllable == 0 { [INFO] [stdout] 656 | | let mut max_weight = -1i8; [INFO] [stdout] 657 | | let mut ss = 1i32; [INFO] [stdout] 658 | | for ix in 1..vowel_count-1 { [INFO] [stdout] ... | [INFO] [stdout] 673 | | max_stress = STRESS_IS_PRIMARY as i32; [INFO] [stdout] 674 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 653 ~ STRESSPOSN_1RH [INFO] [stdout] 654 | // Heaviest syllable (Hindi) [INFO] [stdout] 655 ~ if stressed_syllable == 0 => { [INFO] [stdout] 656 | let mut max_weight = -1i8; [INFO] [stdout] ... [INFO] [stdout] 673 | max_stress = STRESS_IS_PRIMARY as i32; [INFO] [stdout] 674 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/dictionary/stress.rs:678:13 [INFO] [stdout] | [INFO] [stdout] 678 | / if stressed_syllable == 0 { [INFO] [stdout] 679 | | let mut ss = vowel_count - 1; [INFO] [stdout] 680 | | for ix in 1..vowel_count { [INFO] [stdout] 681 | | if vowel_stress[ix as usize] == STRESS_IS_UNSTRESSED { [INFO] [stdout] ... | [INFO] [stdout] 687 | | max_stress = STRESS_IS_PRIMARY as i32; [INFO] [stdout] 688 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 676 ~ STRESSPOSN_1RU [INFO] [stdout] 677 | // Turkish: last syllable before any unstressed vowel [INFO] [stdout] 678 ~ if stressed_syllable == 0 => { [INFO] [stdout] 679 | let mut ss = vowel_count - 1; [INFO] [stdout] ... [INFO] [stdout] 687 | max_stress = STRESS_IS_PRIMARY as i32; [INFO] [stdout] 688 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/dictionary/stress.rs:717:13 [INFO] [stdout] | [INFO] [stdout] 717 | / if stressed_syllable == 0 { [INFO] [stdout] 718 | | let ss = if vowel_length[1] == 0 && vowel_count > 2 && vowel_length[2] > 0 { 2i32 } else { 1i32 }; [INFO] [stdout] 719 | | vowel_stress[ss as usize] = STRESS_IS_PRIMARY; [INFO] [stdout] 720 | | max_stress = STRESS_IS_PRIMARY as i32; [INFO] [stdout] 721 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 716 ~ STRESSPOSN_1SL [INFO] [stdout] 717 ~ if stressed_syllable == 0 => { [INFO] [stdout] 718 | let ss = if vowel_length[1] == 0 && vowel_count > 2 && vowel_length[2] > 0 { 2i32 } else { 1i32 }; [INFO] [stdout] 719 | vowel_stress[ss as usize] = STRESS_IS_PRIMARY; [INFO] [stdout] 720 | max_stress = STRESS_IS_PRIMARY as i32; [INFO] [stdout] 721 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/dictionary/stress.rs:724:13 [INFO] [stdout] | [INFO] [stdout] 724 | / if stressed_syllable == 0 && vowel_count > 2 { [INFO] [stdout] 725 | | for ix in 1..vowel_count { [INFO] [stdout] 726 | | vowel_stress[ix as usize] = STRESS_IS_DIMINISHED; [INFO] [stdout] ... | [INFO] [stdout] 736 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 723 ~ STRESSPOSN_EU [INFO] [stdout] 724 ~ if stressed_syllable == 0 && vowel_count > 2 => { [INFO] [stdout] 725 | for ix in 1..vowel_count { [INFO] [stdout] ... [INFO] [stdout] 735 | } [INFO] [stdout] 736 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dictionary/stress.rs:573:25 [INFO] [stdout] | [INFO] [stdout] 573 | / if mnem != b'n' as u32 && mnem != b's' as u32 { [INFO] [stdout] 574 | | if ph2_type == PH_VOWEL { [INFO] [stdout] 575 | | ss = vowel_count - 1; [INFO] [stdout] 576 | | } [INFO] [stdout] 577 | | } [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] 573 ~ if mnem != b'n' as u32 && mnem != b's' as u32 [INFO] [stdout] 574 ~ && ph2_type == PH_VOWEL { [INFO] [stdout] 575 | ss = vowel_count - 1; [INFO] [stdout] 576 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dictionary/stress.rs:581:17 [INFO] [stdout] | [INFO] [stdout] 581 | / if stressflags & S_FINAL_LONG != 0 { [INFO] [stdout] 582 | | if vowel_length[(vowel_count-1) as usize] > vowel_length[(vowel_count-2) as usize] { [INFO] [stdout] 583 | | ss = vowel_count - 1; [INFO] [stdout] 584 | | } [INFO] [stdout] 585 | | } [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] 581 ~ if stressflags & S_FINAL_LONG != 0 [INFO] [stdout] 582 ~ && vowel_length[(vowel_count-1) as usize] > vowel_length[(vowel_count-2) as usize] { [INFO] [stdout] 583 | ss = vowel_count - 1; [INFO] [stdout] 584 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dictionary/stress.rs:744:5 [INFO] [stdout] | [INFO] [stdout] 744 | / if stressflags & S_FINAL_VOWEL_UNSTRESSED != 0 [INFO] [stdout] 745 | | && (control & 2) == 0 [INFO] [stdout] 746 | | && vowel_count > 2 [INFO] [stdout] 747 | | && max_stress_input < STRESS_IS_SECONDARY as i32 [INFO] [stdout] ... | [INFO] [stdout] 754 | | } [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] 748 ~ && vowel_stress[(vowel_count-1) as usize] == STRESS_IS_PRIMARY [INFO] [stdout] 749 ~ && phdata.get(final_ph).map(|p| p.typ == PH_VOWEL).unwrap_or(false) { [INFO] [stdout] 750 | vowel_stress[(vowel_count-1) as usize] = STRESS_IS_UNSTRESSED; [INFO] [stdout] 751 | vowel_stress[(vowel_count-2) as usize] = STRESS_IS_PRIMARY; [INFO] [stdout] 752 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dictionary/stress.rs:769:9 [INFO] [stdout] | [INFO] [stdout] 769 | / if stressflags & S_INITIAL_2 != 0 && vowel_stress[1] < STRESS_IS_DIMINISHED { [INFO] [stdout] 770 | | if vowel_count > 3 && vowel_stress[2] >= STRESS_IS_PRIMARY { [INFO] [stdout] 771 | | vowel_stress[1] = STRESS_IS_SECONDARY; [INFO] [stdout] 772 | | } [INFO] [stdout] 773 | | } [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] 769 ~ if stressflags & S_INITIAL_2 != 0 && vowel_stress[1] < STRESS_IS_DIMINISHED [INFO] [stdout] 770 ~ && vowel_count > 3 && vowel_stress[2] >= STRESS_IS_PRIMARY { [INFO] [stdout] 771 | vowel_stress[1] = STRESS_IS_SECONDARY; [INFO] [stdout] 772 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dictionary/stress.rs:851:9 [INFO] [stdout] | [INFO] [stdout] 851 | / if tonic > ms || ms <= STRESS_IS_PRIMARY as i32 { [INFO] [stdout] 852 | | if ms_posn > 0 && ms_posn < 100 { [INFO] [stdout] 853 | | vowel_stress[ms_posn as usize] = tonic as i8; [INFO] [stdout] 854 | | } [INFO] [stdout] 855 | | } [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] 851 ~ if (tonic > ms || ms <= STRESS_IS_PRIMARY as i32) { [INFO] [stdout] 852 ~ && ms_posn > 0 && ms_posn < 100 { [INFO] [stdout] 853 | vowel_stress[ms_posn as usize] = tonic as i8; [INFO] [stdout] 854 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/dictionary/stress.rs:903:21 [INFO] [stdout] | [INFO] [stdout] 903 | / { [INFO] [stdout] 904 | | v_stress = STRESS_IS_UNSTRESSED as i32; [INFO] [stdout] 905 | | } else if v == vowel_count - 2 [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/dictionary/stress.rs:907:21 [INFO] [stdout] | [INFO] [stdout] 907 | / { [INFO] [stdout] 908 | | v_stress = STRESS_IS_UNSTRESSED as i32; [INFO] [stdout] 909 | | } else { [INFO] [stdout] | |_____________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/dictionary/stress.rs:925:31 [INFO] [stdout] | [INFO] [stdout] 925 | let idx = v_stress.max(0).min(6) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `v_stress.clamp(0, 6)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `ix` is only used to index `vowel_stress` [INFO] [stdout] --> src/dictionary/stress.rs:971:19 [INFO] [stdout] | [INFO] [stdout] 971 | for ix in 1..vowel_count as usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 971 - for ix in 1..vowel_count as usize { [INFO] [stdout] 971 + for in vowel_stress.iter_mut().take(vowel_count as usize).skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `ix` is only used to index `vowel_stress` [INFO] [stdout] --> src/dictionary/stress.rs:979:19 [INFO] [stdout] | [INFO] [stdout] 979 | for ix in 1..vowel_count as usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 979 - for ix in 1..vowel_count as usize { [INFO] [stdout] 979 + for in vowel_stress.iter_mut().take(vowel_count as usize).skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/dictionary/stress.rs:1005:45 [INFO] [stdout] | [INFO] [stdout] 1005 | output.push(STRESS_PHONEMES[vs.max(0).min(6) as usize]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace with clamp: `vs.clamp(0, 6)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/dictionary/transpose.rs:284:47 [INFO] [stdout] | [INFO] [stdout] 284 | let mut out: Vec = Vec::with_capacity((codes.len() * 6 + 7) / 8); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `(codes.len() * 6).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] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/translate/ipa_table.rs:57:8 [INFO] [stdout] | [INFO] [stdout] 57 | if c >= 0x20 && c < 0x80 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `(0x20..0x80).contains(&c)` [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 `RangeInclusive::contains` implementation [INFO] [stdout] --> src/translate/mod.rs:692:24 [INFO] [stdout] | [INFO] [stdout] 692 | let is_year_form = value >= 1100 && value <= 9999 && value % 100 == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1100..=9999).contains(&value)` [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 implementation of `.is_multiple_of()` [INFO] [stdout] --> src/translate/mod.rs:692:58 [INFO] [stdout] | [INFO] [stdout] 692 | let is_year_form = value >= 1100 && value <= 9999 && value % 100 == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace with: `value.is_multiple_of(100)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/translate/mod.rs:790:70 [INFO] [stdout] | [INFO] [stdout] 790 | set_word_stress(&mut phonemes, phdata, stress_opts, Some(dict_flags as u32), -1, 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `dict_flags` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/translate/mod.rs:838:9 [INFO] [stdout] | [INFO] [stdout] 838 | &letter_bits, [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `letter_bits` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/translate/mod.rs:889:65 [INFO] [stdout] | [INFO] [stdout] 889 | dict, &stem_buf, 1, FLAG_SUFFIX_REMOVED, 0, &letter_bits, 0, [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `letter_bits` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/translate/mod.rs:952:18 [INFO] [stdout] | [INFO] [stdout] 952 | Some(dict_flags_from_lookup as u32) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `dict_flags_from_lookup` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `entries` [INFO] [stdout] --> src/translate/mod.rs:1208:22 [INFO] [stdout] | [INFO] [stdout] 1208 | for i in 0..entries.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 1208 - for i in 0..entries.len() { [INFO] [stdout] 1208 + for (i, ) in entries.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/synthesize/phondata.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | f.frflags = u16::from_le_bytes([data[0], data[1]]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `synthesize::phondata::SpectFrame { frflags: u16::from_le_bytes([data[0], data[1]]), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/synthesize/phondata.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | let mut f = SpectFrame::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/synthesize/phondata.rs:96:9 [INFO] [stdout] | [INFO] [stdout] 96 | f.frflags = u16::from_le_bytes([data[0], data[1]]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `synthesize::phondata::SpectFrame { frflags: u16::from_le_bytes([data[0], data[1]]), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/synthesize/phondata.rs:95:9 [INFO] [stdout] | [INFO] [stdout] 95 | let mut f = SpectFrame::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: manually reimplementing `div_ceil` [INFO] [stdout] --> src/synthesize/bytecode.rs:63:21 [INFO] [stdout] | [INFO] [stdout] 63 | 1 + (data + 1) / 2 // header + ceil(data/2) words [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `data.div_ceil(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this OR pattern can be rewritten using a range [INFO] [stdout] --> src/synthesize/bytecode.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | 0xb | 0xc | 0xd | 0xe | 0xf => 2, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `0xb..=0xf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns [INFO] [stdout] = note: `#[warn(clippy::manual_range_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/synthesize/wavegen.rs:150:47 [INFO] [stdout] | [INFO] [stdout] 150 | let height = (fr.fheight[ix] as i64 * VOICE_HEIGHT[ix.min(8)] as i64) << 6; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `VOICE_HEIGHT[ix.min(8)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/synthesize/wavegen.rs:153:49 [INFO] [stdout] | [INFO] [stdout] 153 | let width = (fr.fwidth[ix] as i64 * VOICE_WIDTH[ix.min(8)] as i64) << 10; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `VOICE_WIDTH[ix.min(8)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/synthesize/wavegen.rs:156:50 [INFO] [stdout] | [INFO] [stdout] 156 | let rw = (fr.fright[ix] as i64 * VOICE_WIDTH[ix.min(8)] as i64) << 10; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `VOICE_WIDTH[ix.min(8)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `pk` is only used to index `peaks` [INFO] [stdout] --> src/synthesize/wavegen.rs:212:15 [INFO] [stdout] | [INFO] [stdout] 212 | for pk in 0..=N_HARMONIC_PEAKS { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 212 - for pk in 0..=N_HARMONIC_PEAKS { [INFO] [stdout] 212 + for in peaks.iter().take(N_HARMONIC_PEAKS + 1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `h` is used to index `htab` [INFO] [stdout] --> src/synthesize/wavegen.rs:284:14 [INFO] [stdout] | [INFO] [stdout] 284 | for h in 1..=hmax { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 284 - for h in 1..=hmax { [INFO] [stdout] 284 + for (h, ) in htab.iter_mut().enumerate().take(hmax + 1).skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/synthesize/wavegen.rs:425:21 [INFO] [stdout] | [INFO] [stdout] 425 | let x = (interp[fk].height >> 14) as i64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(interp[fk].height >> 14)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `output` [INFO] [stdout] --> src/synthesize/wavegen.rs:431:14 [INFO] [stdout] | [INFO] [stdout] 431 | for i in 0..n { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 431 - for i in 0..n { [INFO] [stdout] 431 + for (i, ) in output.iter_mut().enumerate().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `h` is only used to index `htab` [INFO] [stdout] --> src/synthesize/wavegen.rs:510:22 [INFO] [stdout] | [INFO] [stdout] 510 | for h in 1..=h_switch_sign { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 510 - for h in 1..=h_switch_sign { [INFO] [stdout] 510 + for in htab.iter().take(h_switch_sign + 1).skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `h` is only used to index `htab` [INFO] [stdout] --> src/synthesize/wavegen.rs:515:22 [INFO] [stdout] | [INFO] [stdout] 515 | for h in (h_switch_sign + 1)..=mh { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 515 - for h in (h_switch_sign + 1)..=mh { [INFO] [stdout] 515 + for in htab.iter().take(mh + 1).skip((h_switch_sign + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/synthesize/setlengths.rs:89:5 [INFO] [stdout] | [INFO] [stdout] 89 | /// 0↔1 swap** that CalcLengths applies. [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] = note: `#[warn(clippy::doc_overindented_list_items)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/synthesize/setlengths.rs:94:5 [INFO] [stdout] | [INFO] [stdout] 94 | /// clause boundary. [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/synthesize/mod.rs:295:39 [INFO] [stdout] | [INFO] [stdout] 295 | output_i16.extend(std::iter::repeat(0i16).take(n)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0i16, n)` [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: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/synthesize/mod.rs:300:39 [INFO] [stdout] | [INFO] [stdout] 300 | output_i16.extend(std::iter::repeat(0i16).take(n)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0i16, n)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/synthesize/mod.rs:303:39 [INFO] [stdout] | [INFO] [stdout] 303 | output_i16.extend(std::iter::repeat(0i16).take(*n)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0i16, *n)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/synthesize/mod.rs:435:24 [INFO] [stdout] | [INFO] [stdout] 435 | if nc >= 1 && nc <= 7 { continue; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use: `(1..=7).contains(&nc)` [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 `RangeInclusive::contains` implementation [INFO] [stdout] --> src/synthesize/mod.rs:447:24 [INFO] [stdout] | [INFO] [stdout] 447 | if nc >= 1 && nc <= 7 { continue; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use: `(1..=7).contains(&nc)` [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: the loop variable `jj` is only used to index `flat` [INFO] [stdout] --> src/synthesize/mod.rs:460:31 [INFO] [stdout] | [INFO] [stdout] 460 | for jj in i..n { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 460 - for jj in i..n { [INFO] [stdout] 460 + for in flat.iter().take(n).skip(i) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/synthesize/mod.rs:464:28 [INFO] [stdout] | [INFO] [stdout] 464 | if c2 >= 1 && c2 <= 7 { continue; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use: `(1..=7).contains(&c2)` [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: `((fr.length as usize * scale256 / 256).max(1) as u8)` is never greater than `255` and has therefore no effect [INFO] [stdout] --> src/synthesize/mod.rs:633:39 [INFO] [stdout] | [INFO] [stdout] 633 | let new_len = ((fr.length as usize * scale256 / 256).max(1) as u8).min(255); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((fr.length as usize * scale256 / 256).max(1) as u8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_min_or_max [INFO] [stdout] = note: `#[warn(clippy::unnecessary_min_or_max)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/synthesize/mod.rs:694:23 [INFO] [stdout] | [INFO] [stdout] 694 | if z >= 32768 { [INFO] [stdout] | _______________________^ [INFO] [stdout] 695 | | let ov = if z1 != 0 { 8_388_608i64 / (z1 as i64).abs() - 1 } else { 0 }; [INFO] [stdout] 696 | | if ov < agc { agc = ov.max(1); } [INFO] [stdout] 697 | | let z2 = (z1 as i64 * agc) >> 8; [INFO] [stdout] 698 | | out.push(z2.clamp(-32767, 32767) as i16); [INFO] [stdout] 699 | | } else if z <= -32768 { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/synthesize/mod.rs:699:31 [INFO] [stdout] | [INFO] [stdout] 699 | } else if z <= -32768 { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 700 | | let ov = if z1 != 0 { 8_388_608i64 / (z1 as i64).abs() - 1 } else { 0 }; [INFO] [stdout] 701 | | if ov < agc { agc = ov.max(1); } [INFO] [stdout] 702 | | let z2 = (z1 as i64 * agc) >> 8; [INFO] [stdout] 703 | | out.push(z2.clamp(-32767, 32767) as i16); [INFO] [stdout] 704 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking tinytemplate v1.2.1 [INFO] [stderr] Checking half v2.7.1 [INFO] [stderr] Checking ciborium-ll v0.2.2 [INFO] [stderr] Checking ciborium v0.2.2 [INFO] [stderr] Checking criterion v0.5.1 [INFO] [stdout] warning: calling `repeat(1)` on str [INFO] [stdout] --> examples/debug_ru4.rs:10:47 [INFO] [stdout] | [INFO] [stdout] 10 | for word in &["привет", "да", "нет", "я", "я".repeat(1).as_str()] { [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider using `.to_string()` instead: `"я".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#repeat_once [INFO] [stdout] = note: `#[warn(clippy::repeat_once)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/synthesize/engine.rs:477:37 [INFO] [stdout] | [INFO] [stdout] 477 | assert!(out.iter().all(|&s| s >= i16::MIN + 1), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change it to: `s > i16::MIN` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/synthesize/mod.rs:777:37 [INFO] [stdout] | [INFO] [stdout] 777 | assert!(pcm.iter().all(|&x| x >= i16::MIN + 1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change it to: `x > i16::MIN` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> tests/dictionary_integration.rs:158:49 [INFO] [stdout] | [INFO] [stdout] 158 | let dict = Dictionary::load(lang, &dir).expect(&format!("load {}_dict", lang)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("load {}_dict", lang))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> tests/synthesis_integration.rs:174:5 [INFO] [stdout] | [INFO] [stdout] 174 | normal_voice.speed_percent = 100; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `espeak_ng::VoiceParams { speed_percent: 100, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> tests/synthesis_integration.rs:173:5 [INFO] [stdout] | [INFO] [stdout] 173 | let mut normal_voice = VoiceParams::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] --> tests/synthesis_integration.rs:177:5 [INFO] [stdout] | [INFO] [stdout] 177 | fast_voice.speed_percent = 200; // double speed [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `espeak_ng::VoiceParams { speed_percent: 200, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> tests/synthesis_integration.rs:176:5 [INFO] [stdout] | [INFO] [stdout] 176 | let mut fast_voice = VoiceParams::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: the loop variable `pos` is only used to index `raw_data` [INFO] [stdout] --> tests/dictionary_integration.rs:781:16 [INFO] [stdout] | [INFO] [stdout] 781 | for pos in 4370..4450 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 781 - for pos in 4370..4450 { [INFO] [stdout] 781 + for in raw_data.iter().take(4450).skip(4370) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/encoding/mod.rs:328:23 [INFO] [stdout] | [INFO] [stdout] 328 | debug_assert!(buf.len() >= 1); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!buf.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: the loop variable `i` is used to index `table` [INFO] [stdout] --> src/encoding/mod.rs:765:18 [INFO] [stdout] | [INFO] [stdout] 765 | for i in 0usize..128 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 765 - for i in 0usize..128 { [INFO] [stdout] 765 + for (i, ) in table.iter().enumerate().take(128) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> src/phoneme/feature.rs:168:5 [INFO] [stdout] | [INFO] [stdout] 168 | / pub fn from_str(s: &str) -> Option { [INFO] [stdout] 169 | | let b = s.as_bytes(); [INFO] [stdout] 170 | | if b.len() != 3 { [INFO] [stdout] 171 | | return None; [INFO] [stdout] ... | [INFO] [stdout] 174 | | Some(Self(value)) [INFO] [stdout] 175 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/phoneme/load.rs:421:31 [INFO] [stdout] | [INFO] [stdout] 421 | let n_words = (data + 1) / 2; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `data.div_ceil(2)` [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: redundant closure [INFO] [stdout] --> src/phoneme/load.rs:500:34 [INFO] [stdout] | [INFO] [stdout] 500 | std::fs::read(&path).map_err(|e| Error::Io(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::Io` [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: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/phoneme/table.rs:155:13 [INFO] [stdout] | [INFO] [stdout] 155 | ph.mnemonic = packed; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `phoneme::table::PhonemeTab { mnemonic: packed, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/phoneme/table.rs:154:13 [INFO] [stdout] | [INFO] [stdout] 154 | let mut ph = PhonemeTab::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: redundant closure [INFO] [stdout] --> src/dictionary/file.rs:139:22 [INFO] [stdout] | [INFO] [stdout] 139 | .map_err(|e| Error::Io(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::Io` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `hash` is used to index `hashtab` [INFO] [stdout] --> src/dictionary/file.rs:171:25 [INFO] [stdout] | [INFO] [stdout] 171 | for hash in 0..N_HASH_DICT { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 171 - for hash in 0..N_HASH_DICT { [INFO] [stdout] 171 + for (hash, ) in hashtab.iter_mut().enumerate().take(N_HASH_DICT) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/dictionary/lookup.rs:278:16 [INFO] [stdout] | [INFO] [stdout] 278 | if !ctx.expect_verb && !(ctx.expect_verb_s && (end_flags & super::FLAG_SUFX_S != 0)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(ctx.expect_verb || ctx.expect_verb_s && (end_flags & super::FLAG_SUFX_S != 0))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dictionary/lookup.rs:277:9 [INFO] [stdout] | [INFO] [stdout] 277 | / if flags2.is_verb() { [INFO] [stdout] 278 | | if !ctx.expect_verb && !(ctx.expect_verb_s && (end_flags & super::FLAG_SUFX_S != 0)) { [INFO] [stdout] 279 | | pos = entry_end; [INFO] [stdout] 280 | | continue; [INFO] [stdout] 281 | | } [INFO] [stdout] 282 | | } [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] 277 ~ if flags2.is_verb() [INFO] [stdout] 278 ~ && !ctx.expect_verb && !(ctx.expect_verb_s && (end_flags & super::FLAG_SUFX_S != 0)) { [INFO] [stdout] 279 | pos = entry_end; [INFO] [stdout] 280 | continue; [INFO] [stdout] 281 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/dictionary/rules.rs:84:40 [INFO] [stdout] | [INFO] [stdout] 84 | (c as u8).is_ascii_alphabetic() || (c >= 0xc0 && c < 0x2c0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0xc0..0x2c0).contains(&c)` [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 `RangeInclusive::contains` implementation [INFO] [stdout] --> src/dictionary/rules.rs:88:47 [INFO] [stdout] | [INFO] [stdout] 88 | (c >= b'0' as u32 && c <= b'9' as u32) || (c >= 0x660 && c <= 0x669) // Arabic-Indic [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0x660..=0x669).contains(&c)` [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: implicitly performing saturating subtraction [INFO] [stdout] --> src/dictionary/rules.rs:613:21 [INFO] [stdout] | [INFO] [stdout] 613 | if pre_ptr > 0 { pre_ptr -= 1; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `pre_ptr = pre_ptr.saturating_sub(1);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub [INFO] [stdout] = note: `#[warn(clippy::implicit_saturating_sub)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/dictionary/rules.rs:835:1 [INFO] [stdout] | [INFO] [stdout] 835 | / pub fn translate_rules( [INFO] [stdout] 836 | | dict: &Dictionary, [INFO] [stdout] 837 | | word_buf: &[u8], [INFO] [stdout] 838 | | word_start: usize, // index of the first non-space char in word_buf [INFO] [stdout] ... | [INFO] [stdout] 844 | | word_stressed_count: &mut i32, [INFO] [stdout] 845 | | ) -> RulesResult { [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: this function has too many arguments (10/7) [INFO] [stdout] --> src/dictionary/rules.rs:854:1 [INFO] [stdout] | [INFO] [stdout] 854 | / pub fn translate_rules_phdata( [INFO] [stdout] 855 | | dict: &Dictionary, [INFO] [stdout] 856 | | word_buf: &[u8], [INFO] [stdout] 857 | | word_start: usize, [INFO] [stdout] ... | [INFO] [stdout] 864 | | phdata: Option<&crate::phoneme::load::PhonemeData>, [INFO] [stdout] 865 | | ) -> RulesResult { [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 (10/7) [INFO] [stdout] --> src/dictionary/rules.rs:1087:1 [INFO] [stdout] | [INFO] [stdout] 1087 | / fn make_ctx<'a>( [INFO] [stdout] 1088 | | word: &'a [u8], [INFO] [stdout] 1089 | | pos: usize, [INFO] [stdout] 1090 | | group_length: usize, [INFO] [stdout] ... | [INFO] [stdout] 1097 | | stressed_count: i32, [INFO] [stdout] 1098 | | ) -> RuleContext<'a> { [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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/dictionary/stress.rs:241:45 [INFO] [stdout] | [INFO] [stdout] 241 | pub fn apply_word_final_devoicing(phonemes: &mut Vec, phdata: &PhonemeData) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 241 - pub fn apply_word_final_devoicing(phonemes: &mut Vec, phdata: &PhonemeData) { [INFO] [stdout] 241 + pub fn apply_word_final_devoicing(phonemes: &mut [u8], phdata: &PhonemeData) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/dictionary/stress.rs:280:43 [INFO] [stdout] | [INFO] [stdout] 280 | pub fn apply_alt_stress_upgrade(phonemes: &mut Vec, phdata: &PhonemeData) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 280 - pub fn apply_alt_stress_upgrade(phonemes: &mut Vec, phdata: &PhonemeData) { [INFO] [stdout] 280 + pub fn apply_alt_stress_upgrade(phonemes: &mut [u8], phdata: &PhonemeData) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i8` -> `i8`) [INFO] [stdout] --> src/dictionary/stress.rs:355:58 [INFO] [stdout] | [INFO] [stdout] 355 | while j > 0 && stressed_syllable == 0 && (vowel_stress[j as usize] as i8) < STRESS_IS_PRIMARY { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `vowel_stress[j as usize]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dictionary/stress.rs:403:17 [INFO] [stdout] | [INFO] [stdout] 403 | / if stress < 0 && (control & 1) != 0 { [INFO] [stdout] 404 | | if ph.map(|p| p.phflags & PH_UNSTRESSED != 0).unwrap_or(false) { [INFO] [stdout] 405 | | vowel_stress[count as usize] = STRESS_IS_UNSTRESSED; [INFO] [stdout] 406 | | } [INFO] [stdout] 407 | | } [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] 403 ~ if stress < 0 && (control & 1) != 0 [INFO] [stdout] 404 ~ && ph.map(|p| p.phflags & PH_UNSTRESSED != 0).unwrap_or(false) { [INFO] [stdout] 405 | vowel_stress[count as usize] = STRESS_IS_UNSTRESSED; [INFO] [stdout] 406 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dictionary/stress.rs:412:16 [INFO] [stdout] | [INFO] [stdout] 412 | } else if is_syllabic { [INFO] [stdout] | ________________^ [INFO] [stdout] 413 | | if count < 99 { [INFO] [stdout] 414 | | vowel_stress[count as usize] = stress as i8; [INFO] [stdout] 415 | | if stress < 0 && (control & 1) != 0 { [INFO] [stdout] ... | [INFO] [stdout] 420 | | } [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] 412 ~ } else if is_syllabic [INFO] [stdout] 413 ~ && count < 99 { [INFO] [stdout] 414 | vowel_stress[count as usize] = stress as i8; [INFO] [stdout] ... [INFO] [stdout] 418 | count += 1; [INFO] [stdout] 419 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/dictionary/stress.rs:495:33 [INFO] [stdout] | [INFO] [stdout] 495 | let mut stressed_syllable = (dflags & 0x7) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `(dflags & 0x7)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/dictionary/stress.rs:498:29 [INFO] [stdout] | [INFO] [stdout] 498 | stressed_syllable = (dflags & 0x3) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `(dflags & 0x3)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/dictionary/stress.rs:563:13 [INFO] [stdout] | [INFO] [stdout] 563 | / if stressed_syllable == 0 { [INFO] [stdout] 564 | | max_stress = STRESS_IS_PRIMARY as i32; [INFO] [stdout] 565 | | let mut ss = if vowel_count > 2 { vowel_count - 2 } else { 1 }; [INFO] [stdout] ... | [INFO] [stdout] 601 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 561 ~ STRESSPOSN_2R [INFO] [stdout] 562 | // Penultimate vowel [INFO] [stdout] 563 ~ if stressed_syllable == 0 => { [INFO] [stdout] 564 | max_stress = STRESS_IS_PRIMARY as i32; [INFO] [stdout] ... [INFO] [stdout] 600 | } [INFO] [stdout] 601 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/dictionary/stress.rs:605:13 [INFO] [stdout] | [INFO] [stdout] 605 | / if stressed_syllable == 0 { [INFO] [stdout] 606 | | let mut ss = vowel_count - 1; [INFO] [stdout] 607 | | while ss > 0 { [INFO] [stdout] 608 | | if vowel_stress[ss as usize] < STRESS_IS_DIMINISHED { [INFO] [stdout] ... | [INFO] [stdout] 614 | | max_stress = STRESS_IS_PRIMARY as i32; [INFO] [stdout] 615 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 603 ~ STRESSPOSN_1R [INFO] [stdout] 604 | // Final vowel [INFO] [stdout] 605 ~ if stressed_syllable == 0 => { [INFO] [stdout] 606 | let mut ss = vowel_count - 1; [INFO] [stdout] ... [INFO] [stdout] 614 | max_stress = STRESS_IS_PRIMARY as i32; [INFO] [stdout] 615 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/dictionary/stress.rs:619:13 [INFO] [stdout] | [INFO] [stdout] 619 | / if stressed_syllable == 0 { [INFO] [stdout] 620 | | let mut ss = vowel_count - 3; [INFO] [stdout] 621 | | if ss < 1 { ss = 1; } [INFO] [stdout] 622 | | if max_stress == STRESS_IS_DIMINISHED as i32 { [INFO] [stdout] ... | [INFO] [stdout] 625 | | max_stress = STRESS_IS_PRIMARY as i32; [INFO] [stdout] 626 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 617 ~ STRESSPOSN_3R [INFO] [stdout] 618 | // Antipenultimate vowel [INFO] [stdout] 619 ~ if stressed_syllable == 0 => { [INFO] [stdout] 620 | let mut ss = vowel_count - 3; [INFO] [stdout] ... [INFO] [stdout] 625 | max_stress = STRESS_IS_PRIMARY as i32; [INFO] [stdout] 626 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/dictionary/stress.rs:630:13 [INFO] [stdout] | [INFO] [stdout] 630 | / if stressed_syllable == 0 { [INFO] [stdout] 631 | | const GUESS_RU: [i32; 16] = [0,0,1,1,2,3,3,4,5,6,7,7,8,9,10,11]; [INFO] [stdout] 632 | | const GUESS_RU_V: [i32; 16] = [0,0,1,1,2,2,3,3,4,5,6,7,7,8,9,10]; [INFO] [stdout] 633 | | const GUESS_RU_T: [i32; 16] = [0,0,1,2,3,3,3,4,5,6,7,7,7,8,9,10]; [INFO] [stdout] ... | [INFO] [stdout] 650 | | max_stress = STRESS_IS_PRIMARY as i32; [INFO] [stdout] 651 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 628 ~ STRESSPOSN_SYLCOUNT [INFO] [stdout] 629 | // Russian-style: guess from syllable count [INFO] [stdout] 630 ~ if stressed_syllable == 0 => { [INFO] [stdout] 631 | const GUESS_RU: [i32; 16] = [0,0,1,1,2,3,3,4,5,6,7,7,8,9,10,11]; [INFO] [stdout] ... [INFO] [stdout] 650 | max_stress = STRESS_IS_PRIMARY as i32; [INFO] [stdout] 651 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/dictionary/stress.rs:655:13 [INFO] [stdout] | [INFO] [stdout] 655 | / if stressed_syllable == 0 { [INFO] [stdout] 656 | | let mut max_weight = -1i8; [INFO] [stdout] 657 | | let mut ss = 1i32; [INFO] [stdout] 658 | | for ix in 1..vowel_count-1 { [INFO] [stdout] ... | [INFO] [stdout] 673 | | max_stress = STRESS_IS_PRIMARY as i32; [INFO] [stdout] 674 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 653 ~ STRESSPOSN_1RH [INFO] [stdout] 654 | // Heaviest syllable (Hindi) [INFO] [stdout] 655 ~ if stressed_syllable == 0 => { [INFO] [stdout] 656 | let mut max_weight = -1i8; [INFO] [stdout] ... [INFO] [stdout] 673 | max_stress = STRESS_IS_PRIMARY as i32; [INFO] [stdout] 674 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/dictionary/stress.rs:678:13 [INFO] [stdout] | [INFO] [stdout] 678 | / if stressed_syllable == 0 { [INFO] [stdout] 679 | | let mut ss = vowel_count - 1; [INFO] [stdout] 680 | | for ix in 1..vowel_count { [INFO] [stdout] 681 | | if vowel_stress[ix as usize] == STRESS_IS_UNSTRESSED { [INFO] [stdout] ... | [INFO] [stdout] 687 | | max_stress = STRESS_IS_PRIMARY as i32; [INFO] [stdout] 688 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 676 ~ STRESSPOSN_1RU [INFO] [stdout] 677 | // Turkish: last syllable before any unstressed vowel [INFO] [stdout] 678 ~ if stressed_syllable == 0 => { [INFO] [stdout] 679 | let mut ss = vowel_count - 1; [INFO] [stdout] ... [INFO] [stdout] 687 | max_stress = STRESS_IS_PRIMARY as i32; [INFO] [stdout] 688 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/dictionary/stress.rs:717:13 [INFO] [stdout] | [INFO] [stdout] 717 | / if stressed_syllable == 0 { [INFO] [stdout] 718 | | let ss = if vowel_length[1] == 0 && vowel_count > 2 && vowel_length[2] > 0 { 2i32 } else { 1i32 }; [INFO] [stdout] 719 | | vowel_stress[ss as usize] = STRESS_IS_PRIMARY; [INFO] [stdout] 720 | | max_stress = STRESS_IS_PRIMARY as i32; [INFO] [stdout] 721 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 716 ~ STRESSPOSN_1SL [INFO] [stdout] 717 ~ if stressed_syllable == 0 => { [INFO] [stdout] 718 | let ss = if vowel_length[1] == 0 && vowel_count > 2 && vowel_length[2] > 0 { 2i32 } else { 1i32 }; [INFO] [stdout] 719 | vowel_stress[ss as usize] = STRESS_IS_PRIMARY; [INFO] [stdout] 720 | max_stress = STRESS_IS_PRIMARY as i32; [INFO] [stdout] 721 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/dictionary/stress.rs:724:13 [INFO] [stdout] | [INFO] [stdout] 724 | / if stressed_syllable == 0 && vowel_count > 2 { [INFO] [stdout] 725 | | for ix in 1..vowel_count { [INFO] [stdout] 726 | | vowel_stress[ix as usize] = STRESS_IS_DIMINISHED; [INFO] [stdout] ... | [INFO] [stdout] 736 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 723 ~ STRESSPOSN_EU [INFO] [stdout] 724 ~ if stressed_syllable == 0 && vowel_count > 2 => { [INFO] [stdout] 725 | for ix in 1..vowel_count { [INFO] [stdout] ... [INFO] [stdout] 735 | } [INFO] [stdout] 736 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dictionary/stress.rs:573:25 [INFO] [stdout] | [INFO] [stdout] 573 | / if mnem != b'n' as u32 && mnem != b's' as u32 { [INFO] [stdout] 574 | | if ph2_type == PH_VOWEL { [INFO] [stdout] 575 | | ss = vowel_count - 1; [INFO] [stdout] 576 | | } [INFO] [stdout] 577 | | } [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] 573 ~ if mnem != b'n' as u32 && mnem != b's' as u32 [INFO] [stdout] 574 ~ && ph2_type == PH_VOWEL { [INFO] [stdout] 575 | ss = vowel_count - 1; [INFO] [stdout] 576 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dictionary/stress.rs:581:17 [INFO] [stdout] | [INFO] [stdout] 581 | / if stressflags & S_FINAL_LONG != 0 { [INFO] [stdout] 582 | | if vowel_length[(vowel_count-1) as usize] > vowel_length[(vowel_count-2) as usize] { [INFO] [stdout] 583 | | ss = vowel_count - 1; [INFO] [stdout] 584 | | } [INFO] [stdout] 585 | | } [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] 581 ~ if stressflags & S_FINAL_LONG != 0 [INFO] [stdout] 582 ~ && vowel_length[(vowel_count-1) as usize] > vowel_length[(vowel_count-2) as usize] { [INFO] [stdout] 583 | ss = vowel_count - 1; [INFO] [stdout] 584 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dictionary/stress.rs:744:5 [INFO] [stdout] | [INFO] [stdout] 744 | / if stressflags & S_FINAL_VOWEL_UNSTRESSED != 0 [INFO] [stdout] 745 | | && (control & 2) == 0 [INFO] [stdout] 746 | | && vowel_count > 2 [INFO] [stdout] 747 | | && max_stress_input < STRESS_IS_SECONDARY as i32 [INFO] [stdout] ... | [INFO] [stdout] 754 | | } [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] 748 ~ && vowel_stress[(vowel_count-1) as usize] == STRESS_IS_PRIMARY [INFO] [stdout] 749 ~ && phdata.get(final_ph).map(|p| p.typ == PH_VOWEL).unwrap_or(false) { [INFO] [stdout] 750 | vowel_stress[(vowel_count-1) as usize] = STRESS_IS_UNSTRESSED; [INFO] [stdout] 751 | vowel_stress[(vowel_count-2) as usize] = STRESS_IS_PRIMARY; [INFO] [stdout] 752 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dictionary/stress.rs:769:9 [INFO] [stdout] | [INFO] [stdout] 769 | / if stressflags & S_INITIAL_2 != 0 && vowel_stress[1] < STRESS_IS_DIMINISHED { [INFO] [stdout] 770 | | if vowel_count > 3 && vowel_stress[2] >= STRESS_IS_PRIMARY { [INFO] [stdout] 771 | | vowel_stress[1] = STRESS_IS_SECONDARY; [INFO] [stdout] 772 | | } [INFO] [stdout] 773 | | } [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] 769 ~ if stressflags & S_INITIAL_2 != 0 && vowel_stress[1] < STRESS_IS_DIMINISHED [INFO] [stdout] 770 ~ && vowel_count > 3 && vowel_stress[2] >= STRESS_IS_PRIMARY { [INFO] [stdout] 771 | vowel_stress[1] = STRESS_IS_SECONDARY; [INFO] [stdout] 772 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dictionary/stress.rs:851:9 [INFO] [stdout] | [INFO] [stdout] 851 | / if tonic > ms || ms <= STRESS_IS_PRIMARY as i32 { [INFO] [stdout] 852 | | if ms_posn > 0 && ms_posn < 100 { [INFO] [stdout] 853 | | vowel_stress[ms_posn as usize] = tonic as i8; [INFO] [stdout] 854 | | } [INFO] [stdout] 855 | | } [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] 851 ~ if (tonic > ms || ms <= STRESS_IS_PRIMARY as i32) { [INFO] [stdout] 852 ~ && ms_posn > 0 && ms_posn < 100 { [INFO] [stdout] 853 | vowel_stress[ms_posn as usize] = tonic as i8; [INFO] [stdout] 854 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/dictionary/stress.rs:903:21 [INFO] [stdout] | [INFO] [stdout] 903 | / { [INFO] [stdout] 904 | | v_stress = STRESS_IS_UNSTRESSED as i32; [INFO] [stdout] 905 | | } else if v == vowel_count - 2 [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/dictionary/stress.rs:907:21 [INFO] [stdout] | [INFO] [stdout] 907 | / { [INFO] [stdout] 908 | | v_stress = STRESS_IS_UNSTRESSED as i32; [INFO] [stdout] 909 | | } else { [INFO] [stdout] | |_____________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/dictionary/stress.rs:925:31 [INFO] [stdout] | [INFO] [stdout] 925 | let idx = v_stress.max(0).min(6) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `v_stress.clamp(0, 6)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `ix` is only used to index `vowel_stress` [INFO] [stdout] --> src/dictionary/stress.rs:971:19 [INFO] [stdout] | [INFO] [stdout] 971 | for ix in 1..vowel_count as usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 971 - for ix in 1..vowel_count as usize { [INFO] [stdout] 971 + for in vowel_stress.iter_mut().take(vowel_count as usize).skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `ix` is only used to index `vowel_stress` [INFO] [stdout] --> src/dictionary/stress.rs:979:19 [INFO] [stdout] | [INFO] [stdout] 979 | for ix in 1..vowel_count as usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 979 - for ix in 1..vowel_count as usize { [INFO] [stdout] 979 + for in vowel_stress.iter_mut().take(vowel_count as usize).skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/dictionary/stress.rs:1005:45 [INFO] [stdout] | [INFO] [stdout] 1005 | output.push(STRESS_PHONEMES[vs.max(0).min(6) as usize]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace with clamp: `vs.clamp(0, 6)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/dictionary/transpose.rs:284:47 [INFO] [stdout] | [INFO] [stdout] 284 | let mut out: Vec = Vec::with_capacity((codes.len() * 6 + 7) / 8); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `(codes.len() * 6).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] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/translate/ipa_table.rs:57:8 [INFO] [stdout] | [INFO] [stdout] 57 | if c >= 0x20 && c < 0x80 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `(0x20..0x80).contains(&c)` [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 `RangeInclusive::contains` implementation [INFO] [stdout] --> src/translate/mod.rs:692:24 [INFO] [stdout] | [INFO] [stdout] 692 | let is_year_form = value >= 1100 && value <= 9999 && value % 100 == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1100..=9999).contains(&value)` [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 implementation of `.is_multiple_of()` [INFO] [stdout] --> src/translate/mod.rs:692:58 [INFO] [stdout] | [INFO] [stdout] 692 | let is_year_form = value >= 1100 && value <= 9999 && value % 100 == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace with: `value.is_multiple_of(100)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/translate/mod.rs:790:70 [INFO] [stdout] | [INFO] [stdout] 790 | set_word_stress(&mut phonemes, phdata, stress_opts, Some(dict_flags as u32), -1, 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `dict_flags` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/translate/mod.rs:838:9 [INFO] [stdout] | [INFO] [stdout] 838 | &letter_bits, [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `letter_bits` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/translate/mod.rs:889:65 [INFO] [stdout] | [INFO] [stdout] 889 | dict, &stem_buf, 1, FLAG_SUFFIX_REMOVED, 0, &letter_bits, 0, [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `letter_bits` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/translate/mod.rs:952:18 [INFO] [stdout] | [INFO] [stdout] 952 | Some(dict_flags_from_lookup as u32) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `dict_flags_from_lookup` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `entries` [INFO] [stdout] --> src/translate/mod.rs:1208:22 [INFO] [stdout] | [INFO] [stdout] 1208 | for i in 0..entries.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 1208 - for i in 0..entries.len() { [INFO] [stdout] 1208 + for (i, ) in entries.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/synthesize/phondata.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | f.frflags = u16::from_le_bytes([data[0], data[1]]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `synthesize::phondata::SpectFrame { frflags: u16::from_le_bytes([data[0], data[1]]), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/synthesize/phondata.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | let mut f = SpectFrame::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/synthesize/phondata.rs:96:9 [INFO] [stdout] | [INFO] [stdout] 96 | f.frflags = u16::from_le_bytes([data[0], data[1]]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `synthesize::phondata::SpectFrame { frflags: u16::from_le_bytes([data[0], data[1]]), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/synthesize/phondata.rs:95:9 [INFO] [stdout] | [INFO] [stdout] 95 | let mut f = SpectFrame::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/synthesize/phondata.rs:311:9 [INFO] [stdout] | [INFO] [stdout] 311 | f.length = 4; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `synthesize::phondata::SpectFrame { length: 4, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/synthesize/phondata.rs:310:9 [INFO] [stdout] | [INFO] [stdout] 310 | let mut f = SpectFrame::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: manually reimplementing `div_ceil` [INFO] [stdout] --> src/synthesize/bytecode.rs:63:21 [INFO] [stdout] | [INFO] [stdout] 63 | 1 + (data + 1) / 2 // header + ceil(data/2) words [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `data.div_ceil(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this OR pattern can be rewritten using a range [INFO] [stdout] --> src/synthesize/bytecode.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | 0xb | 0xc | 0xd | 0xe | 0xf => 2, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `0xb..=0xf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns [INFO] [stdout] = note: `#[warn(clippy::manual_range_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> src/synthesize/bytecode.rs:318:31 [INFO] [stdout] | [INFO] [stdout] 318 | let ipa_instn: u16 = ((I_IPA_NAME as u16) << 8) | 2; // 0x0d02 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `I_IPA_NAME` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> src/synthesize/bytecode.rs:387:27 [INFO] [stdout] | [INFO] [stdout] 387 | let instn: u16 = ((I_IPA_NAME as u16) << 8) | 4; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `I_IPA_NAME` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/synthesize/wavegen.rs:150:47 [INFO] [stdout] | [INFO] [stdout] 150 | let height = (fr.fheight[ix] as i64 * VOICE_HEIGHT[ix.min(8)] as i64) << 6; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `VOICE_HEIGHT[ix.min(8)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/synthesize/wavegen.rs:153:49 [INFO] [stdout] | [INFO] [stdout] 153 | let width = (fr.fwidth[ix] as i64 * VOICE_WIDTH[ix.min(8)] as i64) << 10; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `VOICE_WIDTH[ix.min(8)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/synthesize/wavegen.rs:156:50 [INFO] [stdout] | [INFO] [stdout] 156 | let rw = (fr.fright[ix] as i64 * VOICE_WIDTH[ix.min(8)] as i64) << 10; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `VOICE_WIDTH[ix.min(8)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `pk` is only used to index `peaks` [INFO] [stdout] --> src/synthesize/wavegen.rs:212:15 [INFO] [stdout] | [INFO] [stdout] 212 | for pk in 0..=N_HARMONIC_PEAKS { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 212 - for pk in 0..=N_HARMONIC_PEAKS { [INFO] [stdout] 212 + for in peaks.iter().take(N_HARMONIC_PEAKS + 1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `h` is used to index `htab` [INFO] [stdout] --> src/synthesize/wavegen.rs:284:14 [INFO] [stdout] | [INFO] [stdout] 284 | for h in 1..=hmax { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 284 - for h in 1..=hmax { [INFO] [stdout] 284 + for (h, ) in htab.iter_mut().enumerate().take(hmax + 1).skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/synthesize/wavegen.rs:425:21 [INFO] [stdout] | [INFO] [stdout] 425 | let x = (interp[fk].height >> 14) as i64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(interp[fk].height >> 14)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `output` [INFO] [stdout] --> src/synthesize/wavegen.rs:431:14 [INFO] [stdout] | [INFO] [stdout] 431 | for i in 0..n { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 431 - for i in 0..n { [INFO] [stdout] 431 + for (i, ) in output.iter_mut().enumerate().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `h` is only used to index `htab` [INFO] [stdout] --> src/synthesize/wavegen.rs:510:22 [INFO] [stdout] | [INFO] [stdout] 510 | for h in 1..=h_switch_sign { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 510 - for h in 1..=h_switch_sign { [INFO] [stdout] 510 + for in htab.iter().take(h_switch_sign + 1).skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `h` is only used to index `htab` [INFO] [stdout] --> src/synthesize/wavegen.rs:515:22 [INFO] [stdout] | [INFO] [stdout] 515 | for h in (h_switch_sign + 1)..=mh { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 515 - for h in (h_switch_sign + 1)..=mh { [INFO] [stdout] 515 + for in htab.iter().take(mh + 1).skip((h_switch_sign + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/synthesize/setlengths.rs:89:5 [INFO] [stdout] | [INFO] [stdout] 89 | /// 0↔1 swap** that CalcLengths applies. [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] = note: `#[warn(clippy::doc_overindented_list_items)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/synthesize/setlengths.rs:94:5 [INFO] [stdout] | [INFO] [stdout] 94 | /// clause boundary. [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/synthesize/mod.rs:295:39 [INFO] [stdout] | [INFO] [stdout] 295 | output_i16.extend(std::iter::repeat(0i16).take(n)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0i16, n)` [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: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/synthesize/mod.rs:300:39 [INFO] [stdout] | [INFO] [stdout] 300 | output_i16.extend(std::iter::repeat(0i16).take(n)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0i16, n)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/synthesize/mod.rs:303:39 [INFO] [stdout] | [INFO] [stdout] 303 | output_i16.extend(std::iter::repeat(0i16).take(*n)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0i16, *n)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/synthesize/mod.rs:435:24 [INFO] [stdout] | [INFO] [stdout] 435 | if nc >= 1 && nc <= 7 { continue; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use: `(1..=7).contains(&nc)` [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 `RangeInclusive::contains` implementation [INFO] [stdout] --> src/synthesize/mod.rs:447:24 [INFO] [stdout] | [INFO] [stdout] 447 | if nc >= 1 && nc <= 7 { continue; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use: `(1..=7).contains(&nc)` [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: the loop variable `jj` is only used to index `flat` [INFO] [stdout] --> src/synthesize/mod.rs:460:31 [INFO] [stdout] | [INFO] [stdout] 460 | for jj in i..n { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 460 - for jj in i..n { [INFO] [stdout] 460 + for in flat.iter().take(n).skip(i) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/synthesize/mod.rs:464:28 [INFO] [stdout] | [INFO] [stdout] 464 | if c2 >= 1 && c2 <= 7 { continue; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use: `(1..=7).contains(&c2)` [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: `((fr.length as usize * scale256 / 256).max(1) as u8)` is never greater than `255` and has therefore no effect [INFO] [stdout] --> src/synthesize/mod.rs:633:39 [INFO] [stdout] | [INFO] [stdout] 633 | let new_len = ((fr.length as usize * scale256 / 256).max(1) as u8).min(255); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((fr.length as usize * scale256 / 256).max(1) as u8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_min_or_max [INFO] [stdout] = note: `#[warn(clippy::unnecessary_min_or_max)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/synthesize/mod.rs:694:23 [INFO] [stdout] | [INFO] [stdout] 694 | if z >= 32768 { [INFO] [stdout] | _______________________^ [INFO] [stdout] 695 | | let ov = if z1 != 0 { 8_388_608i64 / (z1 as i64).abs() - 1 } else { 0 }; [INFO] [stdout] 696 | | if ov < agc { agc = ov.max(1); } [INFO] [stdout] 697 | | let z2 = (z1 as i64 * agc) >> 8; [INFO] [stdout] 698 | | out.push(z2.clamp(-32767, 32767) as i16); [INFO] [stdout] 699 | | } else if z <= -32768 { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/synthesize/mod.rs:699:31 [INFO] [stdout] | [INFO] [stdout] 699 | } else if z <= -32768 { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 700 | | let ov = if z1 != 0 { 8_388_608i64 / (z1 as i64).abs() - 1 } else { 0 }; [INFO] [stdout] 701 | | if ov < agc { agc = ov.max(1); } [INFO] [stdout] 702 | | let z2 = (z1 as i64 * agc) >> 8; [INFO] [stdout] 703 | | out.push(z2.clamp(-32767, 32767) as i16); [INFO] [stdout] 704 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/synthesize/mod.rs:822:9 [INFO] [stdout] | [INFO] [stdout] 822 | fast_voice.speed_percent = 200; // double speed → half duration [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `synthesize::VoiceParams { speed_percent: 200, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/synthesize/mod.rs:821:9 [INFO] [stdout] | [INFO] [stdout] 821 | let mut fast_voice = VoiceParams::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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 39.61s [INFO] running `Command { std: "docker" "inspect" "7bcfa002a3ecadefe23f9561eb6d65cc293060ed1f9b61ec2ac21f12dec2c501", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "7bcfa002a3ecadefe23f9561eb6d65cc293060ed1f9b61ec2ac21f12dec2c501", kill_on_drop: false }` [INFO] [stdout] 7bcfa002a3ecadefe23f9561eb6d65cc293060ed1f9b61ec2ac21f12dec2c501