[INFO] cloning repository https://github.com/theammir/promt [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/theammir/promt" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftheammir%2Fpromt", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftheammir%2Fpromt'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 9b7f183acc354e07cddead471979df6c57f45650 [INFO] linting theammir/promt against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftheammir%2Fpromt" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/theammir/promt [INFO] finished tweaking git repo https://github.com/theammir/promt [INFO] tweaked toml for git repo https://github.com/theammir/promt written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/theammir/promt 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/theammir/promt already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded num_threads v0.1.7 [INFO] [stderr] Downloaded yaml-rust v0.4.5 [INFO] [stderr] Downloaded atomic v0.6.1 [INFO] [stderr] Downloaded line-clipping v0.3.5 [INFO] [stderr] Downloaded document-features v0.2.12 [INFO] [stderr] Downloaded bincode v1.3.3 [INFO] [stderr] Downloaded lab v0.11.0 [INFO] [stderr] Downloaded aws-smithy-json v0.62.5 [INFO] [stderr] Downloaded wezterm-blob-leases v0.1.1 [INFO] [stderr] Downloaded aws-smithy-observability v0.2.6 [INFO] [stderr] Downloaded aws-smithy-xml v0.60.15 [INFO] [stderr] Downloaded outref v0.5.2 [INFO] [stderr] Downloaded aws-smithy-eventstream v0.60.20 [INFO] [stderr] Downloaded tokio-rustls v0.24.1 [INFO] [stderr] Downloaded impl-more v0.1.9 [INFO] [stderr] Downloaded bytestring v1.5.0 [INFO] [stderr] Downloaded openssl-sys v0.9.111 [INFO] [stderr] Downloaded actix-rt v2.11.0 [INFO] [stderr] Downloaded dispatch2 v0.3.1 [INFO] [stderr] Downloaded clap v4.5.60 [INFO] [stderr] Downloaded h2 v0.3.27 [INFO] [stderr] Downloaded awc v3.8.2 [INFO] [stderr] Downloaded png v0.18.1 [INFO] [stderr] Downloaded aws-config v1.8.15 [INFO] [stderr] Downloaded ratatui-widgets v0.3.0 [INFO] [stderr] Downloaded clap_builder v4.5.60 [INFO] [stderr] Downloaded zerocopy v0.8.40 [INFO] [stderr] Downloaded aws-sdk-bedrockruntime v1.127.0 [INFO] [stderr] Downloaded nix v0.29.0 [INFO] [stderr] Downloaded openssl v0.10.75 [INFO] [stderr] Downloaded llm v1.3.7 [INFO] [stderr] Downloaded objc2 v0.6.4 [INFO] [stderr] Downloaded brotli-decompressor v5.0.0 [INFO] [stderr] Downloaded actix-http v3.12.0 [INFO] [stderr] Downloaded aws-sdk-sts v1.100.0 [INFO] [stderr] Downloaded termwiz v0.23.3 [INFO] [stderr] Downloaded rustls v0.21.12 [INFO] [stderr] Downloaded aws-sdk-ssooidc v1.98.0 [INFO] [stderr] Downloaded aws-sdk-sso v1.96.0 [INFO] [stderr] Downloaded aws-sigv4 v1.4.2 [INFO] [stderr] Downloaded hyper v0.14.32 [INFO] [stderr] Downloaded quick-xml v0.38.4 [INFO] [stderr] Downloaded rustls-webpki v0.101.7 [INFO] [stderr] Downloaded reqwest v0.12.28 [INFO] [stderr] Downloaded actix-tls v3.5.0 [INFO] [stderr] Downloaded aws-runtime v1.7.2 [INFO] [stderr] Downloaded pulldown-cmark v0.13.1 [INFO] [stderr] Downloaded crossterm v0.29.0 [INFO] [stderr] Downloaded socket2 v0.5.10 [INFO] [stderr] Downloaded http v0.2.12 [INFO] [stderr] Downloaded pest v2.8.6 [INFO] [stderr] Downloaded ratatui-core v0.1.0 [INFO] [stderr] Downloaded actix-service v2.0.3 [INFO] [stderr] Downloaded syntect v5.3.0 [INFO] [stderr] Downloaded aws-smithy-runtime v1.10.3 [INFO] [stderr] Downloaded brotli v8.0.2 [INFO] [stderr] Downloaded derive_more-impl v2.1.1 [INFO] [stderr] Downloaded zerocopy-derive v0.8.40 [INFO] [stderr] Downloaded fancy-regex v0.16.2 [INFO] [stderr] Downloaded derive_more v2.1.1 [INFO] [stderr] Downloaded fancy-regex v0.11.0 [INFO] [stderr] Downloaded pxfm v0.1.28 [INFO] [stderr] Downloaded euclid v0.22.13 [INFO] [stderr] Downloaded darling_core v0.23.0 [INFO] [stderr] Downloaded aws-smithy-http-client v1.1.12 [INFO] [stderr] Downloaded aws-smithy-runtime-api v1.11.6 [INFO] [stderr] Downloaded regex-lite v0.1.9 [INFO] [stderr] Downloaded aws-smithy-types v1.4.6 [INFO] [stderr] Downloaded unsafe-libyaml v0.2.11 [INFO] [stderr] Downloaded serde_yaml v0.9.34+deprecated [INFO] [stderr] Downloaded litrs v1.0.0 [INFO] [stderr] Downloaded finl_unicode v1.4.0 [INFO] [stderr] Downloaded pest_meta v2.8.6 [INFO] [stderr] Downloaded wezterm-bidi v0.2.3 [INFO] [stderr] Downloaded compact_str v0.9.0 [INFO] [stderr] Downloaded flate2 v1.1.9 [INFO] [stderr] Downloaded aws-smithy-query v0.60.15 [INFO] [stderr] Downloaded xmlparser v0.13.6 [INFO] [stderr] Downloaded futures v0.3.32 [INFO] [stderr] Downloaded tempfile v3.26.0 [INFO] [stderr] Downloaded nucleo-matcher v0.3.1 [INFO] [stderr] Downloaded pest_generator v2.8.6 [INFO] [stderr] Downloaded ratatui v0.30.0 [INFO] [stderr] Downloaded plist v1.8.0 [INFO] [stderr] Downloaded hyper-rustls v0.24.2 [INFO] [stderr] Downloaded aws-types v1.3.14 [INFO] [stderr] Downloaded schannel v0.1.28 [INFO] [stderr] Downloaded wasm-streams v0.4.2 [INFO] [stderr] Downloaded nucleo v0.5.0 [INFO] [stderr] Downloaded pest_derive v2.8.6 [INFO] [stderr] Downloaded terminfo v0.9.0 [INFO] [stderr] Downloaded indoc v2.0.7 [INFO] [stderr] Downloaded kasuari v0.4.11 [INFO] [stderr] Downloaded lru v0.16.3 [INFO] [stderr] Downloaded aws-smithy-http v0.63.6 [INFO] [stderr] Downloaded sct v0.7.1 [INFO] [stderr] Downloaded aws-credential-types v1.2.14 [INFO] [stderr] Downloaded aws-smithy-async v1.2.14 [INFO] [stderr] Downloaded vsimd v0.8.0 [INFO] [stderr] Downloaded bytes-utils v0.1.4 [INFO] [stderr] Downloaded native-tls v0.2.18 [INFO] [stderr] Downloaded getopts v0.2.24 [INFO] [stderr] Downloaded ratatui-crossterm v0.1.0 [INFO] [stderr] Downloaded ratatui-macros v0.7.0 [INFO] [stderr] Downloaded termios v0.3.3 [INFO] [stderr] Downloaded phf_macros v0.11.3 [INFO] [stderr] Downloaded csscolorparser v0.6.2 [INFO] [stderr] Downloaded ordered-float v4.6.0 [INFO] [stderr] Downloaded wezterm-dynamic-derive v0.1.1 [INFO] [stderr] Downloaded wezterm-input-types v0.1.0 [INFO] [stderr] Downloaded ratatui-termwiz v0.1.0 [INFO] [stderr] Downloaded darling v0.23.0 [INFO] [stderr] Downloaded unicode-truncate v2.0.1 [INFO] [stderr] Downloaded serde_bytes v0.11.19 [INFO] [stderr] Downloaded pulldown-cmark-escape v0.11.0 [INFO] [stderr] Downloaded signal-hook-mio v0.2.5 [INFO] [stderr] Downloaded base64-simd v0.8.0 [INFO] [stderr] Downloaded hyper-tls v0.6.0 [INFO] [stderr] Downloaded filedescriptor v0.8.3 [INFO] [stderr] Downloaded memmem v0.1.1 [INFO] [stderr] Downloaded vtparse v0.6.2 [INFO] [stderr] Downloaded mac_address v1.1.8 [INFO] [stderr] Downloaded deltae v0.3.2 [INFO] [stderr] Downloaded siphasher v1.0.2 [INFO] [stderr] Downloaded wezterm-color-types v0.3.0 [INFO] [stderr] Downloaded darling_macro v0.23.0 [INFO] [stderr] Downloaded wezterm-dynamic v0.2.1 [INFO] [stderr] Downloaded instability v0.3.11 [INFO] [stderr] Downloaded castaway v0.2.4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 79a6b21faed280477d556077000a7eab3ad8b76e6428c245808a3848384317fb [INFO] running `Command { std: "docker" "start" "-a" "79a6b21faed280477d556077000a7eab3ad8b76e6428c245808a3848384317fb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "79a6b21faed280477d556077000a7eab3ad8b76e6428c245808a3848384317fb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "79a6b21faed280477d556077000a7eab3ad8b76e6428c245808a3848384317fb", kill_on_drop: false }` [INFO] [stdout] 79a6b21faed280477d556077000a7eab3ad8b76e6428c245808a3848384317fb [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-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] a8a05e7cd66c36c6bd32c51e4ffb0c10da26b0a42008cfb94e13daf64f4edff6 [INFO] running `Command { std: "docker" "start" "-a" "a8a05e7cd66c36c6bd32c51e4ffb0c10da26b0a42008cfb94e13daf64f4edff6", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.106 [INFO] [stderr] Compiling unicode-ident v1.0.24 [INFO] [stderr] Compiling quote v1.0.45 [INFO] [stderr] Compiling libc v0.2.182 [INFO] [stderr] Checking cfg-if v1.0.4 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Checking log v0.4.29 [INFO] [stderr] Checking itoa v1.0.17 [INFO] [stderr] Checking pin-project-lite v0.2.17 [INFO] [stderr] Compiling find-msvc-tools v0.1.9 [INFO] [stderr] Compiling parking_lot_core v0.9.12 [INFO] [stderr] Checking bytes v1.11.1 [INFO] [stderr] Compiling serde_core v1.0.228 [INFO] [stderr] Checking futures-core v0.3.32 [INFO] [stderr] Checking lock_api v0.4.14 [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Checking memchr v2.8.0 [INFO] [stderr] Checking futures-sink v0.3.32 [INFO] [stderr] Checking once_cell v1.21.3 [INFO] [stderr] Checking foldhash v0.2.0 [INFO] [stderr] Checking equivalent v1.0.2 [INFO] [stderr] Checking allocator-api2 v0.2.21 [INFO] [stderr] Checking slab v0.4.12 [INFO] [stderr] Checking futures-channel v0.3.32 [INFO] [stderr] Checking futures-io v0.3.32 [INFO] [stderr] Checking futures-task v0.3.32 [INFO] [stderr] Checking tracing-core v0.1.36 [INFO] [stderr] Checking ryu v1.0.23 [INFO] [stderr] Compiling time-core v0.1.8 [INFO] [stderr] Compiling num-conv v0.2.0 [INFO] [stderr] Checking powerfmt v0.2.0 [INFO] [stderr] Checking num_threads v0.1.7 [INFO] [stderr] Compiling autocfg v1.5.0 [INFO] [stderr] Checking deranged v0.5.8 [INFO] [stderr] Checking zeroize v1.8.2 [INFO] [stderr] Checking bitflags v2.11.0 [INFO] [stderr] Checking percent-encoding v2.3.2 [INFO] [stderr] Compiling dunce v1.0.5 [INFO] [stderr] Compiling fs_extra v1.3.0 [INFO] [stderr] Checking untrusted v0.9.0 [INFO] [stderr] Checking subtle v2.6.1 [INFO] [stderr] Compiling crc32fast v1.5.0 [INFO] [stderr] Checking outref v0.5.2 [INFO] [stderr] Checking http v1.4.0 [INFO] [stderr] Checking http v0.2.12 [INFO] [stderr] Checking vsimd v0.8.0 [INFO] [stderr] Compiling time-macros v0.2.27 [INFO] [stderr] Compiling pkg-config v0.3.32 [INFO] [stderr] Compiling typenum v1.19.0 [INFO] [stderr] Checking hashbrown v0.16.1 [INFO] [stderr] Compiling generic-array v0.14.7 [INFO] [stderr] Compiling aws-lc-rs v1.16.1 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling syn v2.0.117 [INFO] [stderr] Checking http-body v0.4.6 [INFO] [stderr] Checking rustls-pki-types v1.14.0 [INFO] [stderr] Checking openssl-probe v0.2.1 [INFO] [stderr] Checking base64 v0.22.1 [INFO] [stderr] Compiling jobserver v0.1.34 [INFO] [stderr] Checking try-lock v0.2.5 [INFO] [stderr] Checking base64-simd v0.8.0 [INFO] [stderr] Checking want v0.3.1 [INFO] [stderr] Checking stable_deref_trait v1.2.1 [INFO] [stderr] Compiling rustls v0.23.37 [INFO] [stderr] Checking atomic-waker v1.1.2 [INFO] [stderr] Compiling rustls v0.21.12 [INFO] [stderr] Compiling cc v1.2.56 [INFO] [stderr] Checking indexmap v2.13.0 [INFO] [stderr] Checking ipnet v2.12.0 [INFO] [stderr] Checking form_urlencoded v1.2.2 [INFO] [stderr] Checking sync_wrapper v1.0.2 [INFO] [stderr] Checking cpufeatures v0.2.17 [INFO] [stderr] Compiling vcpkg v0.2.15 [INFO] [stderr] Compiling semver v1.0.27 [INFO] [stderr] Checking errno v0.3.14 [INFO] [stderr] Checking mio v1.1.1 [INFO] [stderr] Checking socket2 v0.6.3 [INFO] [stderr] Checking getrandom v0.2.17 [INFO] [stderr] Checking rustls-native-certs v0.8.3 [INFO] [stderr] Checking socket2 v0.5.10 [INFO] [stderr] Checking signal-hook-registry v1.4.8 [INFO] [stderr] Compiling zerocopy v0.8.40 [INFO] [stderr] Checking simd-adler32 v0.3.8 [INFO] [stderr] Compiling getrandom v0.4.2 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Checking litemap v0.8.1 [INFO] [stderr] Checking writeable v0.6.2 [INFO] [stderr] Checking http-body v1.0.1 [INFO] [stderr] Compiling rustc_version v0.4.1 [INFO] [stderr] Checking adler2 v2.0.1 [INFO] [stderr] Compiling heck v0.5.0 [INFO] [stderr] Compiling icu_properties_data v2.1.2 [INFO] [stderr] Checking http-body-util v0.1.3 [INFO] [stderr] Compiling icu_normalizer_data v2.1.1 [INFO] [stderr] Compiling rustversion v1.0.22 [INFO] [stderr] Compiling thiserror v2.0.18 [INFO] [stderr] Compiling unicode-segmentation v1.12.0 [INFO] [stderr] Checking miniz_oxide v0.8.9 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Compiling ident_case v1.0.1 [INFO] [stderr] Checking fastrand v2.3.0 [INFO] [stderr] Compiling aws-types v1.3.14 [INFO] [stderr] Compiling strsim v0.11.1 [INFO] [stderr] Compiling getrandom v0.3.4 [INFO] [stderr] Checking hex v0.4.3 [INFO] [stderr] Checking unicode-width v0.2.2 [INFO] [stderr] Compiling unicode-xid v0.2.6 [INFO] [stderr] Compiling rustix v1.1.4 [INFO] [stderr] Checking block-buffer v0.10.4 [INFO] [stderr] Checking crypto-common v0.1.7 [INFO] [stderr] Checking uuid v1.22.0 [INFO] [stderr] Compiling zmij v1.0.21 [INFO] [stderr] Compiling openssl v0.10.75 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking linux-raw-sys v0.12.1 [INFO] [stderr] Compiling native-tls v0.2.18 [INFO] [stderr] Checking time v0.3.47 [INFO] [stderr] Compiling serde_json v1.0.149 [INFO] [stderr] Compiling instability v0.3.11 [INFO] [stderr] Compiling convert_case v0.10.0 [INFO] [stderr] Checking flate2 v1.1.9 [INFO] [stderr] Checking local-waker v0.1.4 [INFO] [stderr] Compiling indoc v2.0.7 [INFO] [stderr] Compiling zstd-safe v7.2.4 [INFO] [stderr] Checking alloc-no-stdlib v2.0.4 [INFO] [stderr] Compiling signal-hook v0.3.18 [INFO] [stderr] Compiling cmake v0.1.57 [INFO] [stderr] Checking sha2 v0.10.9 [INFO] [stderr] Checking hmac v0.12.1 [INFO] [stderr] Checking regex-lite v0.1.9 [INFO] [stderr] Checking rand_core v0.9.5 [INFO] [stderr] Checking alloc-stdlib v0.2.2 [INFO] [stderr] Checking lru v0.16.3 [INFO] [stderr] Checking aho-corasick v1.1.4 [INFO] [stderr] Compiling unicase v2.9.0 [INFO] [stderr] Checking regex-syntax v0.8.10 [INFO] [stderr] Checking castaway v0.2.4 [INFO] [stderr] Checking utf8_iter v1.0.4 [INFO] [stderr] Checking brotli-decompressor v5.0.0 [INFO] [stderr] Checking compact_str v0.9.0 [INFO] [stderr] Checking sha1 v0.10.6 [INFO] [stderr] Checking actix-utils v3.0.1 [INFO] [stderr] Compiling mime_guess v2.0.5 [INFO] [stderr] Compiling cookie v0.16.2 [INFO] [stderr] Checking actix-service v2.0.3 [INFO] [stderr] Checking xmlparser v0.13.6 [INFO] [stderr] Compiling litrs v1.0.0 [INFO] [stderr] Compiling rayon-core v1.13.0 [INFO] [stderr] Checking utf8parse v0.2.2 [INFO] [stderr] Checking urlencoding v2.1.3 [INFO] [stderr] Checking anstyle-parse v0.2.7 [INFO] [stderr] Checking signal-hook-mio v0.2.5 [INFO] [stderr] Checking local-channel v0.1.5 [INFO] [stderr] Checking aws-smithy-xml v0.60.15 [INFO] [stderr] Checking fdeflate v0.3.7 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking line-clipping v0.3.5 [INFO] [stderr] Checking bytestring v1.5.0 [INFO] [stderr] Checking encoding_rs v0.8.35 [INFO] [stderr] Checking colorchoice v1.0.4 [INFO] [stderr] Compiling aws-lc-sys v0.38.0 [INFO] [stderr] Compiling ring v0.17.14 [INFO] [stderr] Compiling openssl-sys v0.9.111 [INFO] [stderr] Compiling zstd-sys v2.0.16+zstd.1.5.7 [INFO] [stderr] Checking toml_write v0.1.2 [INFO] [stderr] Checking pxfm v0.1.28 [INFO] [stderr] Checking brotli v8.0.2 [INFO] [stderr] Checking is_terminal_polyfill v1.70.2 [INFO] [stderr] Compiling document-features v0.2.12 [INFO] [stderr] Checking bit-vec v0.8.0 [INFO] [stderr] Checking iri-string v0.7.10 [INFO] [stderr] Checking option-ext v0.2.0 [INFO] [stderr] Checking winnow v0.7.15 [INFO] [stderr] Checking foldhash v0.1.5 [INFO] [stderr] Checking language-tags v0.3.2 [INFO] [stderr] Checking anstyle-query v1.1.5 [INFO] [stderr] Checking anstyle v1.0.13 [INFO] [stderr] Checking impl-more v0.1.9 [INFO] [stderr] Checking anstream v0.6.21 [INFO] [stderr] Checking dirs-sys v0.5.0 [INFO] [stderr] Checking bit-set v0.8.0 [INFO] [stderr] Checking png v0.18.1 [INFO] [stderr] Checking quick-xml v0.38.4 [INFO] [stderr] Checking unsafe-libyaml v0.2.11 [INFO] [stderr] Checking x11rb-protocol v0.13.2 [INFO] [stderr] Checking regex-automata v0.4.14 [INFO] [stderr] Checking linked-hash-map v0.5.6 [INFO] [stderr] Checking byteorder-lite v0.1.0 [INFO] [stderr] Compiling pulldown-cmark v0.13.1 [INFO] [stderr] Checking bytemuck v1.25.0 [INFO] [stderr] Checking iana-time-zone v0.1.65 [INFO] [stderr] Checking clap_lex v1.0.0 [INFO] [stderr] Checking yaml-rust v0.4.5 [INFO] [stderr] Checking dirs v6.0.0 [INFO] [stderr] Checking nucleo-matcher v0.3.1 [INFO] [stderr] Checking clap_builder v4.5.60 [INFO] [stderr] Checking getopts v0.2.24 [INFO] [stderr] Checking serde_bytes v0.11.19 [INFO] [stderr] Checking pulldown-cmark-escape v0.11.0 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling darling_core v0.23.0 [INFO] [stderr] Checking moxcms v0.7.11 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking gethostname v1.1.0 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling tokio-macros v2.6.1 [INFO] [stderr] Compiling futures-macro v0.3.32 [INFO] [stderr] Compiling tracing-attributes v0.1.31 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.1 [INFO] [stderr] Compiling zerovec-derive v0.11.2 [INFO] [stderr] Checking tokio v1.50.0 [INFO] [stderr] Checking futures-util v0.3.32 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Checking rustls-webpki v0.101.7 [INFO] [stderr] Checking sct v0.7.1 [INFO] [stderr] Compiling thiserror-impl v2.0.18 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Compiling derive_more-impl v2.1.1 [INFO] [stderr] Compiling strum_macros v0.27.2 [INFO] [stderr] Checking yoke v0.8.1 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Checking zerovec v0.11.5 [INFO] [stderr] Compiling darling_macro v0.23.0 [INFO] [stderr] Checking tracing v0.1.44 [INFO] [stderr] Checking zerotrie v0.2.3 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Compiling darling v0.23.0 [INFO] [stderr] Checking x11rb v0.13.2 [INFO] [stderr] Checking tinystr v0.8.2 [INFO] [stderr] Checking potential_utf v0.1.4 [INFO] [stderr] Checking icu_locale_core v2.1.1 [INFO] [stderr] Checking icu_collections v2.1.1 [INFO] [stderr] Checking fancy-regex v0.16.2 [INFO] [stderr] Checking regex v1.12.3 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking kasuari v0.4.11 [INFO] [stderr] Compiling clap_derive v4.5.55 [INFO] [stderr] Compiling async-trait v0.1.89 [INFO] [stderr] Checking futures-executor v0.3.32 [INFO] [stderr] Checking futures v0.3.32 [INFO] [stderr] Checking icu_provider v2.1.1 [INFO] [stderr] Checking strum v0.27.2 [INFO] [stderr] Checking icu_properties v2.1.2 [INFO] [stderr] Checking icu_normalizer v2.1.1 [INFO] [stderr] Checking image v0.25.9 [INFO] [stderr] Checking derive_more v2.1.1 [INFO] [stderr] Checking crossterm v0.29.0 [INFO] [stderr] Checking either v1.15.0 [INFO] [stderr] Checking toml_datetime v0.6.11 [INFO] [stderr] Checking bytes-utils v0.1.4 [INFO] [stderr] Checking itertools v0.14.0 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking serde_spanned v0.6.9 [INFO] [stderr] Checking rayon v1.11.0 [INFO] [stderr] Checking toml_edit v0.22.27 [INFO] [stderr] Checking chrono v0.4.44 [INFO] [stderr] Checking bincode v1.3.3 [INFO] [stderr] Checking serde_yaml v0.9.34+deprecated [INFO] [stderr] Checking plist v1.8.0 [INFO] [stderr] Checking clap v4.5.60 [INFO] [stderr] Checking syntect v5.3.0 [INFO] [stderr] Checking tokio-util v0.7.18 [INFO] [stderr] Checking aws-smithy-async v1.2.14 [INFO] [stderr] Checking tower v0.5.3 [INFO] [stderr] Checking tokio-rustls v0.24.1 [INFO] [stderr] Checking aws-smithy-types v1.4.6 [INFO] [stderr] Checking h2 v0.4.13 [INFO] [stderr] Checking h2 v0.3.27 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking actix-rt v2.11.0 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking actix-codec v0.5.2 [INFO] [stderr] Checking arboard v3.6.1 [INFO] [stderr] Checking url v2.5.8 [INFO] [stderr] Checking nucleo v0.5.0 [INFO] [stderr] Checking tower-http v0.6.8 [INFO] [stderr] Checking unicode-truncate v2.0.1 [INFO] [stderr] Checking zstd v0.13.3 [INFO] [stderr] Checking ratatui-core v0.1.0 [INFO] [stderr] Checking aws-smithy-runtime-api v1.11.6 [INFO] [stderr] Checking aws-smithy-eventstream v0.60.20 [INFO] [stderr] Checking aws-smithy-json v0.62.5 [INFO] [stderr] Checking aws-smithy-query v0.60.15 [INFO] [stderr] Checking ratatui-widgets v0.3.0 [INFO] [stderr] Checking ratatui-crossterm v0.1.0 [INFO] [stderr] Checking toml v0.8.23 [INFO] [stderr] Checking aws-smithy-http v0.63.6 [INFO] [stderr] Checking aws-credential-types v1.2.14 [INFO] [stderr] Checking aws-smithy-observability v0.2.6 [INFO] [stderr] Checking aws-sigv4 v1.4.2 [INFO] [stderr] Checking ratatui-macros v0.7.0 [INFO] [stderr] Checking ratatui v0.30.0 [INFO] [stderr] Checking hyper v0.14.32 [INFO] [stderr] Checking actix-http v3.12.0 [INFO] [stderr] Checking hyper v1.8.1 [INFO] [stderr] Checking hyper-util v0.1.20 [INFO] [stderr] Checking hyper-tls v0.6.0 [INFO] [stderr] Checking reqwest v0.12.28 [INFO] [stderr] Checking hyper-rustls v0.24.2 [INFO] [stderr] Checking rustls-webpki v0.103.9 [INFO] [stderr] Checking tokio-rustls v0.26.4 [INFO] [stderr] Checking hyper-rustls v0.27.7 [INFO] [stderr] Checking actix-tls v3.5.0 [INFO] [stderr] Checking aws-smithy-http-client v1.1.12 [INFO] [stderr] Checking awc v3.8.2 [INFO] [stderr] Checking aws-smithy-runtime v1.10.3 [INFO] [stderr] Checking aws-runtime v1.7.2 [INFO] [stderr] Checking aws-sdk-sso v1.96.0 [INFO] [stderr] Checking aws-sdk-sts v1.100.0 [INFO] [stderr] Checking aws-sdk-ssooidc v1.98.0 [INFO] [stderr] Checking aws-sdk-bedrockruntime v1.127.0 [INFO] [stderr] Checking aws-config v1.8.15 [INFO] [stderr] Checking llm v1.3.7 [INFO] [stderr] Checking promt v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/app.rs:272:29 [INFO] [stdout] | [INFO] [stdout] 272 | / ... if self.mode.is_insert() { [INFO] [stdout] 273 | | ... self.input.paste(&text); [INFO] [stdout] 274 | | ... self.ensure_input_visible(); [INFO] [stdout] 275 | | ... } [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] 271 ~ Some(Ok(Event::Paste(text))) [INFO] [stdout] 272 ~ if self.mode.is_insert() => { [INFO] [stdout] 273 | self.input.paste(&text); [INFO] [stdout] 274 | self.ensure_input_visible(); [INFO] [stdout] 275 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:729:17 [INFO] [stdout] | [INFO] [stdout] 729 | / if let Some(idx) = self.message_list.selected { [INFO] [stdout] 730 | | if let Some(rendered) = self.message_list.rendered.get(idx) { [INFO] [stdout] 731 | | let count = crate::ui::codeblock::count_codeblocks(&rendered.blocks); [INFO] [stdout] ... | [INFO] [stdout] 741 | | } [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] 729 ~ if let Some(idx) = self.message_list.selected [INFO] [stdout] 730 ~ && let Some(rendered) = self.message_list.rendered.get(idx) { [INFO] [stdout] 731 | let count = crate::ui::codeblock::count_codeblocks(&rendered.blocks); [INFO] [stdout] ... [INFO] [stdout] 739 | } [INFO] [stdout] 740 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:773:17 [INFO] [stdout] | [INFO] [stdout] 773 | / if let Some(ref mut cs) = self.codeblock_select { [INFO] [stdout] 774 | | if cs.cursor.row > 0 { [INFO] [stdout] 775 | | cs.cursor.row -= 1; [INFO] [stdout] 776 | | } [INFO] [stdout] 777 | | } [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] 773 ~ if let Some(ref mut cs) = self.codeblock_select [INFO] [stdout] 774 ~ && cs.cursor.row > 0 { [INFO] [stdout] 775 | cs.cursor.row -= 1; [INFO] [stdout] 776 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:791:17 [INFO] [stdout] | [INFO] [stdout] 791 | / if let Some(ref mut cs) = self.codeblock_select { [INFO] [stdout] 792 | | if cs.cursor.row < max_row { [INFO] [stdout] 793 | | cs.cursor.row += 1; [INFO] [stdout] 794 | | } [INFO] [stdout] 795 | | } [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] 791 ~ if let Some(ref mut cs) = self.codeblock_select [INFO] [stdout] 792 ~ && cs.cursor.row < max_row { [INFO] [stdout] 793 | cs.cursor.row += 1; [INFO] [stdout] 794 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:806:17 [INFO] [stdout] | [INFO] [stdout] 806 | / if let Some(ref mut cs) = self.codeblock_select { [INFO] [stdout] 807 | | if cs.cursor.col > 0 { [INFO] [stdout] 808 | | cs.cursor.col -= 1; [INFO] [stdout] 809 | | } [INFO] [stdout] 810 | | } [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] 806 ~ if let Some(ref mut cs) = self.codeblock_select [INFO] [stdout] 807 ~ && cs.cursor.col > 0 { [INFO] [stdout] 808 | cs.cursor.col -= 1; [INFO] [stdout] 809 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:816:17 [INFO] [stdout] | [INFO] [stdout] 816 | / if let Some(ref mut cs) = self.codeblock_select { [INFO] [stdout] 817 | | if cs.cursor.col < max_col { [INFO] [stdout] 818 | | cs.cursor.col += 1; [INFO] [stdout] 819 | | } [INFO] [stdout] 820 | | } [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] 816 ~ if let Some(ref mut cs) = self.codeblock_select [INFO] [stdout] 817 ~ && cs.cursor.col < max_col { [INFO] [stdout] 818 | cs.cursor.col += 1; [INFO] [stdout] 819 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:837:17 [INFO] [stdout] | [INFO] [stdout] 837 | / if let (Some(cs), Some(msg_idx)) = [INFO] [stdout] 838 | | (&self.codeblock_select, self.message_list.selected) [INFO] [stdout] 839 | | { [INFO] [stdout] 840 | | if let Some(rendered) = self.message_list.rendered.get(msg_idx) { [INFO] [stdout] ... | [INFO] [stdout] 859 | | } [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] 838 ~ (&self.codeblock_select, self.message_list.selected) [INFO] [stdout] 839 ~ && let Some(rendered) = self.message_list.rendered.get(msg_idx) { [INFO] [stdout] 840 | if let Some(code) = [INFO] [stdout] ... [INFO] [stdout] 856 | } [INFO] [stdout] 857 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:840:21 [INFO] [stdout] | [INFO] [stdout] 840 | / if let Some(rendered) = self.message_list.rendered.get(msg_idx) { [INFO] [stdout] 841 | | if let Some(code) = [INFO] [stdout] 842 | | crate::ui::codeblock::get_codeblock_content(&rendered.blocks, cs.selected) [INFO] [stdout] ... | [INFO] [stdout] 858 | | } [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] 840 ~ if let Some(rendered) = self.message_list.rendered.get(msg_idx) [INFO] [stdout] 841 ~ && let Some(code) = [INFO] [stdout] 842 | crate::ui::codeblock::get_codeblock_content(&rendered.blocks, cs.selected) [INFO] [stdout] ... [INFO] [stdout] 856 | } [INFO] [stdout] 857 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:862:17 [INFO] [stdout] | [INFO] [stdout] 862 | / if let (Some(cs), Some(msg_idx)) = [INFO] [stdout] 863 | | (&self.codeblock_select, self.message_list.selected) [INFO] [stdout] 864 | | { [INFO] [stdout] 865 | | if let Some(rendered) = self.message_list.rendered.get(msg_idx) { [INFO] [stdout] ... | [INFO] [stdout] 908 | | } [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] 863 ~ (&self.codeblock_select, self.message_list.selected) [INFO] [stdout] 864 ~ && let Some(rendered) = self.message_list.rendered.get(msg_idx) { [INFO] [stdout] 865 | if let Some(code) = [INFO] [stdout] ... [INFO] [stdout] 905 | } [INFO] [stdout] 906 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:865:21 [INFO] [stdout] | [INFO] [stdout] 865 | / if let Some(rendered) = self.message_list.rendered.get(msg_idx) { [INFO] [stdout] 866 | | if let Some(code) = [INFO] [stdout] 867 | | crate::ui::codeblock::get_codeblock_content(&rendered.blocks, cs.selected) [INFO] [stdout] ... | [INFO] [stdout] 907 | | } [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] 865 ~ if let Some(rendered) = self.message_list.rendered.get(msg_idx) [INFO] [stdout] 866 ~ && let Some(code) = [INFO] [stdout] 867 | crate::ui::codeblock::get_codeblock_content(&rendered.blocks, cs.selected) [INFO] [stdout] ... [INFO] [stdout] 905 | ); [INFO] [stdout] 906 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:929:17 [INFO] [stdout] | [INFO] [stdout] 929 | / if let Some(vs) = &mut self.visual_selection { [INFO] [stdout] 930 | | if vs.cursor.col > 0 { [INFO] [stdout] 931 | | vs.cursor.col -= 1; [INFO] [stdout] 932 | | } [INFO] [stdout] 933 | | } [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] 929 ~ if let Some(vs) = &mut self.visual_selection [INFO] [stdout] 930 ~ && vs.cursor.col > 0 { [INFO] [stdout] 931 | vs.cursor.col -= 1; [INFO] [stdout] 932 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:940:17 [INFO] [stdout] | [INFO] [stdout] 940 | / if let Some(vs) = &mut self.visual_selection { [INFO] [stdout] 941 | | if vs.cursor.col < max_col { [INFO] [stdout] 942 | | vs.cursor.col += 1; [INFO] [stdout] 943 | | } [INFO] [stdout] 944 | | } [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] 940 ~ if let Some(vs) = &mut self.visual_selection [INFO] [stdout] 941 ~ && vs.cursor.col < max_col { [INFO] [stdout] 942 | vs.cursor.col += 1; [INFO] [stdout] 943 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:947:17 [INFO] [stdout] | [INFO] [stdout] 947 | / if let Some(vs) = &mut self.visual_selection { [INFO] [stdout] 948 | | if vs.cursor.row > 0 { [INFO] [stdout] 949 | | vs.cursor.row -= 1; [INFO] [stdout] 950 | | } [INFO] [stdout] 951 | | } [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] 947 ~ if let Some(vs) = &mut self.visual_selection [INFO] [stdout] 948 ~ && vs.cursor.row > 0 { [INFO] [stdout] 949 | vs.cursor.row -= 1; [INFO] [stdout] 950 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:965:17 [INFO] [stdout] | [INFO] [stdout] 965 | / if let Some(vs) = &mut self.visual_selection { [INFO] [stdout] 966 | | if vs.cursor.row < max_row { [INFO] [stdout] 967 | | vs.cursor.row += 1; [INFO] [stdout] 968 | | } [INFO] [stdout] 969 | | } [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] 965 ~ if let Some(vs) = &mut self.visual_selection [INFO] [stdout] 966 ~ && vs.cursor.row < max_row { [INFO] [stdout] 967 | vs.cursor.row += 1; [INFO] [stdout] 968 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `row` is used to index `lines` [INFO] [stdout] --> src/app.rs:1313:32 [INFO] [stdout] | [INFO] [stdout] 1313 | for row in start.row..=end.row.min(lines.len() - 1) { [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] 1313 - for row in start.row..=end.row.min(lines.len() - 1) { [INFO] [stdout] 1313 + for (row, ) in lines.iter().enumerate().take(end.row.min(lines.len() - 1) + 1).skip(start.row) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:1342:9 [INFO] [stdout] | [INFO] [stdout] 1342 | / if self.status.is_streaming { [INFO] [stdout] 1343 | | if let Some(last) = self.message_list.rendered.last_mut() { [INFO] [stdout] 1344 | | let mut inc = crate::ui::markdown::IncrementalParser::new(); [INFO] [stdout] 1345 | | if let Some(msg) = self.conversation.messages.last() { [INFO] [stdout] ... | [INFO] [stdout] 1350 | | } [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] 1342 ~ if self.status.is_streaming [INFO] [stdout] 1343 ~ && let Some(last) = self.message_list.rendered.last_mut() { [INFO] [stdout] 1344 | let mut inc = crate::ui::markdown::IncrementalParser::new(); [INFO] [stdout] ... [INFO] [stdout] 1348 | last.incremental = Some(inc); [INFO] [stdout] 1349 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:1367:9 [INFO] [stdout] | [INFO] [stdout] 1367 | / if let Some(at) = self.status_message_at { [INFO] [stdout] 1368 | | if at.elapsed() > Duration::from_secs(3) { [INFO] [stdout] 1369 | | self.status.status_message = None; [INFO] [stdout] 1370 | | self.status_message_at = None; [INFO] [stdout] 1371 | | } [INFO] [stdout] 1372 | | } [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] 1367 ~ if let Some(at) = self.status_message_at [INFO] [stdout] 1368 ~ && at.elapsed() > Duration::from_secs(3) { [INFO] [stdout] 1369 | self.status.status_message = None; [INFO] [stdout] 1370 | self.status_message_at = None; [INFO] [stdout] 1371 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/app.rs:1495:56 [INFO] [stdout] | [INFO] [stdout] 1495 | Ok(true) => Some(event::read().map_err(|e| io::Error::new(io::ErrorKind::Other, e))), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 1495 - Ok(true) => Some(event::read().map_err(|e| io::Error::new(io::ErrorKind::Other, e))), [INFO] [stdout] 1495 + Ok(true) => Some(event::read().map_err(|e| io::Error::other(e))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/app.rs:1497:32 [INFO] [stdout] | [INFO] [stdout] 1497 | Err(e) => Some(Err(io::Error::new(io::ErrorKind::Other, e))), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 1497 - Err(e) => Some(Err(io::Error::new(io::ErrorKind::Other, e))), [INFO] [stdout] 1497 + Err(e) => Some(Err(io::Error::other(e))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/clipboard.rs:93:9 [INFO] [stdout] | [INFO] [stdout] 93 | / if let Ok(mut child) = Command::new(cmd) [INFO] [stdout] 94 | | .args(args) [INFO] [stdout] 95 | | .stdin(Stdio::piped()) [INFO] [stdout] 96 | | .stdout(Stdio::null()) [INFO] [stdout] ... | [INFO] [stdout] 110 | | } [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] 98 ~ .spawn() [INFO] [stdout] 99 ~ && let Some(ref mut stdin) = child.stdin { [INFO] [stdout] 100 | if stdin.write_all(text.as_bytes()).is_ok() { [INFO] [stdout] ... [INFO] [stdout] 107 | } [INFO] [stdout] 108 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/clipboard.rs:100:13 [INFO] [stdout] | [INFO] [stdout] 100 | / if let Some(ref mut stdin) = child.stdin { [INFO] [stdout] 101 | | if stdin.write_all(text.as_bytes()).is_ok() { [INFO] [stdout] 102 | | drop(child.stdin.take()); [INFO] [stdout] 103 | | if let Ok(status) = child.wait() { [INFO] [stdout] ... | [INFO] [stdout] 109 | | } [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] 100 ~ if let Some(ref mut stdin) = child.stdin [INFO] [stdout] 101 ~ && stdin.write_all(text.as_bytes()).is_ok() { [INFO] [stdout] 102 | drop(child.stdin.take()); [INFO] [stdout] ... [INFO] [stdout] 107 | } [INFO] [stdout] 108 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/clipboard.rs:103:21 [INFO] [stdout] | [INFO] [stdout] 103 | / if let Ok(status) = child.wait() { [INFO] [stdout] 104 | | if status.success() { [INFO] [stdout] 105 | | return true; [INFO] [stdout] 106 | | } [INFO] [stdout] 107 | | } [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] 103 ~ if let Ok(status) = child.wait() [INFO] [stdout] 104 ~ && status.success() { [INFO] [stdout] 105 | return true; [INFO] [stdout] 106 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config.rs:78:1 [INFO] [stdout] | [INFO] [stdout] 78 | / impl Default for Config { [INFO] [stdout] 79 | | fn default() -> Self { [INFO] [stdout] 80 | | Self { [INFO] [stdout] 81 | | general: GeneralConfig::default(), [INFO] [stdout] ... | [INFO] [stdout] 86 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 7 + #[derive(Default)] [INFO] [stdout] 8 | pub struct Config { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/conversation.rs:97:26 [INFO] [stdout] | [INFO] [stdout] 97 | .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 97 - .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))?; [INFO] [stdout] 97 + .map_err(|e| std::io::Error::other(e))?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/conversation.rs:104:49 [INFO] [stdout] | [INFO] [stdout] 104 | serde_json::from_str(&data).map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 104 - serde_json::from_str(&data).map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e)) [INFO] [stdout] 104 + serde_json::from_str(&data).map_err(|e| std::io::Error::other(e)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/app.rs:272:29 [INFO] [stdout] | [INFO] [stdout] 272 | / ... if self.mode.is_insert() { [INFO] [stdout] 273 | | ... self.input.paste(&text); [INFO] [stdout] 274 | | ... self.ensure_input_visible(); [INFO] [stdout] 275 | | ... } [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] 271 ~ Some(Ok(Event::Paste(text))) [INFO] [stdout] 272 ~ if self.mode.is_insert() => { [INFO] [stdout] 273 | self.input.paste(&text); [INFO] [stdout] 274 | self.ensure_input_visible(); [INFO] [stdout] 275 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/mode.rs:39:1 [INFO] [stdout] | [INFO] [stdout] 39 | / impl Default for Mode { [INFO] [stdout] 40 | | fn default() -> Self { [INFO] [stdout] 41 | | Mode::Insert [INFO] [stdout] 42 | | } [INFO] [stdout] 43 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 9 + #[derive(Default)] [INFO] [stdout] 10 | pub enum Mode { [INFO] [stdout] 11 | /// Default mode. Input area is active, user can type and send messages. [INFO] [stdout] 12 ~ #[default] [INFO] [stdout] 13 ~ Insert, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:729:17 [INFO] [stdout] | [INFO] [stdout] 729 | / if let Some(idx) = self.message_list.selected { [INFO] [stdout] 730 | | if let Some(rendered) = self.message_list.rendered.get(idx) { [INFO] [stdout] 731 | | let count = crate::ui::codeblock::count_codeblocks(&rendered.blocks); [INFO] [stdout] ... | [INFO] [stdout] 741 | | } [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] 729 ~ if let Some(idx) = self.message_list.selected [INFO] [stdout] 730 ~ && let Some(rendered) = self.message_list.rendered.get(idx) { [INFO] [stdout] 731 | let count = crate::ui::codeblock::count_codeblocks(&rendered.blocks); [INFO] [stdout] ... [INFO] [stdout] 739 | } [INFO] [stdout] 740 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:773:17 [INFO] [stdout] | [INFO] [stdout] 773 | / if let Some(ref mut cs) = self.codeblock_select { [INFO] [stdout] 774 | | if cs.cursor.row > 0 { [INFO] [stdout] 775 | | cs.cursor.row -= 1; [INFO] [stdout] 776 | | } [INFO] [stdout] 777 | | } [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] 773 ~ if let Some(ref mut cs) = self.codeblock_select [INFO] [stdout] 774 ~ && cs.cursor.row > 0 { [INFO] [stdout] 775 | cs.cursor.row -= 1; [INFO] [stdout] 776 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:791:17 [INFO] [stdout] | [INFO] [stdout] 791 | / if let Some(ref mut cs) = self.codeblock_select { [INFO] [stdout] 792 | | if cs.cursor.row < max_row { [INFO] [stdout] 793 | | cs.cursor.row += 1; [INFO] [stdout] 794 | | } [INFO] [stdout] 795 | | } [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] 791 ~ if let Some(ref mut cs) = self.codeblock_select [INFO] [stdout] 792 ~ && cs.cursor.row < max_row { [INFO] [stdout] 793 | cs.cursor.row += 1; [INFO] [stdout] 794 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:806:17 [INFO] [stdout] | [INFO] [stdout] 806 | / if let Some(ref mut cs) = self.codeblock_select { [INFO] [stdout] 807 | | if cs.cursor.col > 0 { [INFO] [stdout] 808 | | cs.cursor.col -= 1; [INFO] [stdout] 809 | | } [INFO] [stdout] 810 | | } [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] 806 ~ if let Some(ref mut cs) = self.codeblock_select [INFO] [stdout] 807 ~ && cs.cursor.col > 0 { [INFO] [stdout] 808 | cs.cursor.col -= 1; [INFO] [stdout] 809 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:816:17 [INFO] [stdout] | [INFO] [stdout] 816 | / if let Some(ref mut cs) = self.codeblock_select { [INFO] [stdout] 817 | | if cs.cursor.col < max_col { [INFO] [stdout] 818 | | cs.cursor.col += 1; [INFO] [stdout] 819 | | } [INFO] [stdout] 820 | | } [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] 816 ~ if let Some(ref mut cs) = self.codeblock_select [INFO] [stdout] 817 ~ && cs.cursor.col < max_col { [INFO] [stdout] 818 | cs.cursor.col += 1; [INFO] [stdout] 819 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:837:17 [INFO] [stdout] | [INFO] [stdout] 837 | / if let (Some(cs), Some(msg_idx)) = [INFO] [stdout] 838 | | (&self.codeblock_select, self.message_list.selected) [INFO] [stdout] 839 | | { [INFO] [stdout] 840 | | if let Some(rendered) = self.message_list.rendered.get(msg_idx) { [INFO] [stdout] ... | [INFO] [stdout] 859 | | } [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] 838 ~ (&self.codeblock_select, self.message_list.selected) [INFO] [stdout] 839 ~ && let Some(rendered) = self.message_list.rendered.get(msg_idx) { [INFO] [stdout] 840 | if let Some(code) = [INFO] [stdout] ... [INFO] [stdout] 856 | } [INFO] [stdout] 857 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:840:21 [INFO] [stdout] | [INFO] [stdout] 840 | / if let Some(rendered) = self.message_list.rendered.get(msg_idx) { [INFO] [stdout] 841 | | if let Some(code) = [INFO] [stdout] 842 | | crate::ui::codeblock::get_codeblock_content(&rendered.blocks, cs.selected) [INFO] [stdout] ... | [INFO] [stdout] 858 | | } [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] 840 ~ if let Some(rendered) = self.message_list.rendered.get(msg_idx) [INFO] [stdout] 841 ~ && let Some(code) = [INFO] [stdout] 842 | crate::ui::codeblock::get_codeblock_content(&rendered.blocks, cs.selected) [INFO] [stdout] ... [INFO] [stdout] 856 | } [INFO] [stdout] 857 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:862:17 [INFO] [stdout] | [INFO] [stdout] 862 | / if let (Some(cs), Some(msg_idx)) = [INFO] [stdout] 863 | | (&self.codeblock_select, self.message_list.selected) [INFO] [stdout] 864 | | { [INFO] [stdout] 865 | | if let Some(rendered) = self.message_list.rendered.get(msg_idx) { [INFO] [stdout] ... | [INFO] [stdout] 908 | | } [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] 863 ~ (&self.codeblock_select, self.message_list.selected) [INFO] [stdout] 864 ~ && let Some(rendered) = self.message_list.rendered.get(msg_idx) { [INFO] [stdout] 865 | if let Some(code) = [INFO] [stdout] ... [INFO] [stdout] 905 | } [INFO] [stdout] 906 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:865:21 [INFO] [stdout] | [INFO] [stdout] 865 | / if let Some(rendered) = self.message_list.rendered.get(msg_idx) { [INFO] [stdout] 866 | | if let Some(code) = [INFO] [stdout] 867 | | crate::ui::codeblock::get_codeblock_content(&rendered.blocks, cs.selected) [INFO] [stdout] ... | [INFO] [stdout] 907 | | } [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] 865 ~ if let Some(rendered) = self.message_list.rendered.get(msg_idx) [INFO] [stdout] 866 ~ && let Some(code) = [INFO] [stdout] 867 | crate::ui::codeblock::get_codeblock_content(&rendered.blocks, cs.selected) [INFO] [stdout] ... [INFO] [stdout] 905 | ); [INFO] [stdout] 906 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:929:17 [INFO] [stdout] | [INFO] [stdout] 929 | / if let Some(vs) = &mut self.visual_selection { [INFO] [stdout] 930 | | if vs.cursor.col > 0 { [INFO] [stdout] 931 | | vs.cursor.col -= 1; [INFO] [stdout] 932 | | } [INFO] [stdout] 933 | | } [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] 929 ~ if let Some(vs) = &mut self.visual_selection [INFO] [stdout] 930 ~ && vs.cursor.col > 0 { [INFO] [stdout] 931 | vs.cursor.col -= 1; [INFO] [stdout] 932 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:940:17 [INFO] [stdout] | [INFO] [stdout] 940 | / if let Some(vs) = &mut self.visual_selection { [INFO] [stdout] 941 | | if vs.cursor.col < max_col { [INFO] [stdout] 942 | | vs.cursor.col += 1; [INFO] [stdout] 943 | | } [INFO] [stdout] 944 | | } [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] 940 ~ if let Some(vs) = &mut self.visual_selection [INFO] [stdout] 941 ~ && vs.cursor.col < max_col { [INFO] [stdout] 942 | vs.cursor.col += 1; [INFO] [stdout] 943 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:947:17 [INFO] [stdout] | [INFO] [stdout] 947 | / if let Some(vs) = &mut self.visual_selection { [INFO] [stdout] 948 | | if vs.cursor.row > 0 { [INFO] [stdout] 949 | | vs.cursor.row -= 1; [INFO] [stdout] 950 | | } [INFO] [stdout] 951 | | } [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] 947 ~ if let Some(vs) = &mut self.visual_selection [INFO] [stdout] 948 ~ && vs.cursor.row > 0 { [INFO] [stdout] 949 | vs.cursor.row -= 1; [INFO] [stdout] 950 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implicitly performing saturating subtraction [INFO] [stdout] --> src/ui/markdown.rs:229:17 [INFO] [stdout] | [INFO] [stdout] 229 | / if depth > 0 { [INFO] [stdout] 230 | | depth -= 1; [INFO] [stdout] 231 | | } [INFO] [stdout] | |_________________^ help: try: `depth = depth.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 `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:965:17 [INFO] [stdout] | [INFO] [stdout] 965 | / if let Some(vs) = &mut self.visual_selection { [INFO] [stdout] 966 | | if vs.cursor.row < max_row { [INFO] [stdout] 967 | | vs.cursor.row += 1; [INFO] [stdout] 968 | | } [INFO] [stdout] 969 | | } [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] 965 ~ if let Some(vs) = &mut self.visual_selection [INFO] [stdout] 966 ~ && vs.cursor.row < max_row { [INFO] [stdout] 967 | vs.cursor.row += 1; [INFO] [stdout] 968 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to move all elements into a new `Vec` [INFO] [stdout] --> src/ui/markdown.rs:458:31 [INFO] [stdout] | [INFO] [stdout] 458 | lines.push(Line::from(spans.drain(..).collect::>())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `mem::take`: `std::mem::take(spans)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#drain_collect [INFO] [stdout] = note: `#[warn(clippy::drain_collect)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to move all elements into a new `Vec` [INFO] [stdout] --> src/ui/markdown.rs:464:41 [INFO] [stdout] | [INFO] [stdout] 464 | blocks.push(MarkdownBlock::Text(lines.drain(..).collect())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `mem::take`: `std::mem::take(lines)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#drain_collect [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `row` is used to index `lines` [INFO] [stdout] --> src/app.rs:1313:32 [INFO] [stdout] | [INFO] [stdout] 1313 | for row in start.row..=end.row.min(lines.len() - 1) { [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] 1313 - for row in start.row..=end.row.min(lines.len() - 1) { [INFO] [stdout] 1313 + for (row, ) in lines.iter().enumerate().take(end.row.min(lines.len() - 1) + 1).skip(start.row) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:1342:9 [INFO] [stdout] | [INFO] [stdout] 1342 | / if self.status.is_streaming { [INFO] [stdout] 1343 | | if let Some(last) = self.message_list.rendered.last_mut() { [INFO] [stdout] 1344 | | let mut inc = crate::ui::markdown::IncrementalParser::new(); [INFO] [stdout] 1345 | | if let Some(msg) = self.conversation.messages.last() { [INFO] [stdout] ... | [INFO] [stdout] 1350 | | } [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] 1342 ~ if self.status.is_streaming [INFO] [stdout] 1343 ~ && let Some(last) = self.message_list.rendered.last_mut() { [INFO] [stdout] 1344 | let mut inc = crate::ui::markdown::IncrementalParser::new(); [INFO] [stdout] ... [INFO] [stdout] 1348 | last.incremental = Some(inc); [INFO] [stdout] 1349 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:1367:9 [INFO] [stdout] | [INFO] [stdout] 1367 | / if let Some(at) = self.status_message_at { [INFO] [stdout] 1368 | | if at.elapsed() > Duration::from_secs(3) { [INFO] [stdout] 1369 | | self.status.status_message = None; [INFO] [stdout] 1370 | | self.status_message_at = None; [INFO] [stdout] 1371 | | } [INFO] [stdout] 1372 | | } [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] 1367 ~ if let Some(at) = self.status_message_at [INFO] [stdout] 1368 ~ && at.elapsed() > Duration::from_secs(3) { [INFO] [stdout] 1369 | self.status.status_message = None; [INFO] [stdout] 1370 | self.status_message_at = None; [INFO] [stdout] 1371 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/app.rs:1495:56 [INFO] [stdout] | [INFO] [stdout] 1495 | Ok(true) => Some(event::read().map_err(|e| io::Error::new(io::ErrorKind::Other, e))), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 1495 - Ok(true) => Some(event::read().map_err(|e| io::Error::new(io::ErrorKind::Other, e))), [INFO] [stdout] 1495 + Ok(true) => Some(event::read().map_err(|e| io::Error::other(e))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/app.rs:1497:32 [INFO] [stdout] | [INFO] [stdout] 1497 | Err(e) => Some(Err(io::Error::new(io::ErrorKind::Other, e))), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 1497 - Err(e) => Some(Err(io::Error::new(io::ErrorKind::Other, e))), [INFO] [stdout] 1497 + Err(e) => Some(Err(io::Error::other(e))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/messages.rs:560:17 [INFO] [stdout] | [INFO] [stdout] 560 | / if let Some(cli) = fl.content_line_idx { [INFO] [stdout] 561 | | if let Some(cb_idx) = selected_cb_idx { [INFO] [stdout] 562 | | if let Some(&(start, end, fence_offset)) = cb_ranges.get(cb_idx) { [INFO] [stdout] 563 | | if cli >= start && cli < end { [INFO] [stdout] ... | [INFO] [stdout] 610 | | } [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] 560 ~ if let Some(cli) = fl.content_line_idx [INFO] [stdout] 561 ~ && let Some(cb_idx) = selected_cb_idx { [INFO] [stdout] 562 | if let Some(&(start, end, fence_offset)) = cb_ranges.get(cb_idx) { [INFO] [stdout] ... [INFO] [stdout] 608 | } [INFO] [stdout] 609 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/messages.rs:561:21 [INFO] [stdout] | [INFO] [stdout] 561 | / if let Some(cb_idx) = selected_cb_idx { [INFO] [stdout] 562 | | if let Some(&(start, end, fence_offset)) = cb_ranges.get(cb_idx) { [INFO] [stdout] 563 | | if cli >= start && cli < end { [INFO] [stdout] ... | [INFO] [stdout] 609 | | } [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] 561 ~ if let Some(cb_idx) = selected_cb_idx [INFO] [stdout] 562 ~ && let Some(&(start, end, fence_offset)) = cb_ranges.get(cb_idx) { [INFO] [stdout] 563 | if cli >= start && cli < end { [INFO] [stdout] ... [INFO] [stdout] 607 | } [INFO] [stdout] 608 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/messages.rs:562:25 [INFO] [stdout] | [INFO] [stdout] 562 | / if let Some(&(start, end, fence_offset)) = cb_ranges.get(cb_idx) { [INFO] [stdout] 563 | | if cli >= start && cli < end { [INFO] [stdout] 564 | | // This line is in the selected codeblock. [INFO] [stdout] 565 | | line_bg = Some(CODEBLOCK_SELECT_BG); [INFO] [stdout] ... | [INFO] [stdout] 608 | | } [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] 562 ~ if let Some(&(start, end, fence_offset)) = cb_ranges.get(cb_idx) [INFO] [stdout] 563 ~ && cli >= start && cli < end { [INFO] [stdout] 564 | // This line is in the selected codeblock. [INFO] [stdout] ... [INFO] [stdout] 606 | } [INFO] [stdout] 607 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/messages.rs:574:37 [INFO] [stdout] | [INFO] [stdout] 574 | / ... if let Some(vs) = self.visual_selection { [INFO] [stdout] 575 | | ... if vs.block_index == cb_idx { [INFO] [stdout] 576 | | ... match self.mode { [INFO] [stdout] 577 | | ... Mode::VisualLine => { [INFO] [stdout] ... | [INFO] [stdout] 605 | | ... } [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] 574 ~ if let Some(vs) = self.visual_selection [INFO] [stdout] 575 ~ && vs.block_index == cb_idx { [INFO] [stdout] 576 | match self.mode { [INFO] [stdout] ... [INFO] [stdout] 603 | } [INFO] [stdout] 604 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ui/messages.rs:620:21 [INFO] [stdout] | [INFO] [stdout] 620 | / buf.cell_mut((x, y)).map(|cell| { [INFO] [stdout] 621 | | cell.set_style(bg_style); [INFO] [stdout] 622 | | }); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] = note: `#[warn(clippy::option_map_unit_fn)]` on by default [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 620 - buf.cell_mut((x, y)).map(|cell| { [INFO] [stdout] 621 - cell.set_style(bg_style); [INFO] [stdout] 622 - }); [INFO] [stdout] 620 + if let Some(cell) = buf.cell_mut((x, y)) { cell.set_style(bg_style); } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/clipboard.rs:93:9 [INFO] [stdout] | [INFO] [stdout] 93 | / if let Ok(mut child) = Command::new(cmd) [INFO] [stdout] 94 | | .args(args) [INFO] [stdout] 95 | | .stdin(Stdio::piped()) [INFO] [stdout] 96 | | .stdout(Stdio::null()) [INFO] [stdout] ... | [INFO] [stdout] 110 | | } [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] 98 ~ .spawn() [INFO] [stdout] 99 ~ && let Some(ref mut stdin) = child.stdin { [INFO] [stdout] 100 | if stdin.write_all(text.as_bytes()).is_ok() { [INFO] [stdout] ... [INFO] [stdout] 107 | } [INFO] [stdout] 108 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/clipboard.rs:100:13 [INFO] [stdout] | [INFO] [stdout] 100 | / if let Some(ref mut stdin) = child.stdin { [INFO] [stdout] 101 | | if stdin.write_all(text.as_bytes()).is_ok() { [INFO] [stdout] 102 | | drop(child.stdin.take()); [INFO] [stdout] 103 | | if let Ok(status) = child.wait() { [INFO] [stdout] ... | [INFO] [stdout] 109 | | } [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] 100 ~ if let Some(ref mut stdin) = child.stdin [INFO] [stdout] 101 ~ && stdin.write_all(text.as_bytes()).is_ok() { [INFO] [stdout] 102 | drop(child.stdin.take()); [INFO] [stdout] ... [INFO] [stdout] 107 | } [INFO] [stdout] 108 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/clipboard.rs:103:21 [INFO] [stdout] | [INFO] [stdout] 103 | / if let Ok(status) = child.wait() { [INFO] [stdout] 104 | | if status.success() { [INFO] [stdout] 105 | | return true; [INFO] [stdout] 106 | | } [INFO] [stdout] 107 | | } [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] 103 ~ if let Ok(status) = child.wait() [INFO] [stdout] 104 ~ && status.success() { [INFO] [stdout] 105 | return true; [INFO] [stdout] 106 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ui/messages.rs:647:37 [INFO] [stdout] | [INFO] [stdout] 647 | / ... buf.cell_mut((cx + dx, y)).map(|cell| { [INFO] [stdout] 648 | | ... cell.set_style(visual_style); [INFO] [stdout] 649 | | ... }); [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 647 - buf.cell_mut((cx + dx, y)).map(|cell| { [INFO] [stdout] 648 - cell.set_style(visual_style); [INFO] [stdout] 649 - }); [INFO] [stdout] 647 + if let Some(cell) = buf.cell_mut((cx + dx, y)) { cell.set_style(visual_style); } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/messages.rs:663:13 [INFO] [stdout] | [INFO] [stdout] 663 | / if fl.is_selected_msg { [INFO] [stdout] 664 | | if let Some(cli) = fl.content_line_idx { [INFO] [stdout] 665 | | if let Some(cb_idx) = selected_cb_idx { [INFO] [stdout] 666 | | if let Some(&(start, end, fence_offset)) = cb_ranges.get(cb_idx) { [INFO] [stdout] ... | [INFO] [stdout] 703 | | } [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] 663 ~ if fl.is_selected_msg [INFO] [stdout] 664 ~ && let Some(cli) = fl.content_line_idx { [INFO] [stdout] 665 | if let Some(cb_idx) = selected_cb_idx { [INFO] [stdout] ... [INFO] [stdout] 701 | } [INFO] [stdout] 702 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/messages.rs:664:17 [INFO] [stdout] | [INFO] [stdout] 664 | / if let Some(cli) = fl.content_line_idx { [INFO] [stdout] 665 | | if let Some(cb_idx) = selected_cb_idx { [INFO] [stdout] 666 | | if let Some(&(start, end, fence_offset)) = cb_ranges.get(cb_idx) { [INFO] [stdout] 667 | | if cli >= start && cli < end { [INFO] [stdout] ... | [INFO] [stdout] 702 | | } [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] 664 ~ if let Some(cli) = fl.content_line_idx [INFO] [stdout] 665 ~ && let Some(cb_idx) = selected_cb_idx { [INFO] [stdout] 666 | if let Some(&(start, end, fence_offset)) = cb_ranges.get(cb_idx) { [INFO] [stdout] ... [INFO] [stdout] 700 | } [INFO] [stdout] 701 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/messages.rs:665:21 [INFO] [stdout] | [INFO] [stdout] 665 | / if let Some(cb_idx) = selected_cb_idx { [INFO] [stdout] 666 | | if let Some(&(start, end, fence_offset)) = cb_ranges.get(cb_idx) { [INFO] [stdout] 667 | | if cli >= start && cli < end { [INFO] [stdout] ... | [INFO] [stdout] 701 | | } [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] 665 ~ if let Some(cb_idx) = selected_cb_idx [INFO] [stdout] 666 ~ && let Some(&(start, end, fence_offset)) = cb_ranges.get(cb_idx) { [INFO] [stdout] 667 | if cli >= start && cli < end { [INFO] [stdout] ... [INFO] [stdout] 699 | } [INFO] [stdout] 700 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/messages.rs:666:25 [INFO] [stdout] | [INFO] [stdout] 666 | / if let Some(&(start, end, fence_offset)) = cb_ranges.get(cb_idx) { [INFO] [stdout] 667 | | if cli >= start && cli < end { [INFO] [stdout] 668 | | // Map flat line index to code line (skip fence markers). [INFO] [stdout] 669 | | let code_start = start + fence_offset; [INFO] [stdout] ... | [INFO] [stdout] 700 | | } [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] 666 ~ if let Some(&(start, end, fence_offset)) = cb_ranges.get(cb_idx) [INFO] [stdout] 667 ~ && cli >= start && cli < end { [INFO] [stdout] 668 | // Map flat line index to code line (skip fence markers). [INFO] [stdout] ... [INFO] [stdout] 698 | } [INFO] [stdout] 699 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ui/messages.rs:680:49 [INFO] [stdout] | [INFO] [stdout] 680 | / ... buf.cell_mut((cx, y)).map(|cell| { [INFO] [stdout] 681 | | ... cell.set_style(VISUAL_ACTIVE_END_STYLE); [INFO] [stdout] 682 | | ... }); [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 680 - buf.cell_mut((cx, y)).map(|cell| { [INFO] [stdout] 681 - cell.set_style(VISUAL_ACTIVE_END_STYLE); [INFO] [stdout] 682 - }); [INFO] [stdout] 680 + if let Some(cell) = buf.cell_mut((cx, y)) { cell.set_style(VISUAL_ACTIVE_END_STYLE); } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/messages.rs:687:41 [INFO] [stdout] | [INFO] [stdout] 687 | / ... if let Some(cs) = self.codeblock_select { [INFO] [stdout] 688 | | ... if code_line == cs.cursor.row { [INFO] [stdout] 689 | | ... let cx = content_x + cs.cursor.col as u16; [INFO] [stdout] 690 | | ... if cx < area.x + area.width { [INFO] [stdout] ... | [INFO] [stdout] 696 | | ... } [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] 687 ~ if let Some(cs) = self.codeblock_select [INFO] [stdout] 688 ~ && code_line == cs.cursor.row { [INFO] [stdout] 689 | let cx = content_x + cs.cursor.col as u16; [INFO] [stdout] ... [INFO] [stdout] 694 | } [INFO] [stdout] 695 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ui/messages.rs:691:53 [INFO] [stdout] | [INFO] [stdout] 691 | / ... buf.cell_mut((cx, y)).map(|cell| { [INFO] [stdout] 692 | | ... cell.set_style(CURSOR_STYLE); [INFO] [stdout] 693 | | ... }); [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 691 - buf.cell_mut((cx, y)).map(|cell| { [INFO] [stdout] 692 - cell.set_style(CURSOR_STYLE); [INFO] [stdout] 693 - }); [INFO] [stdout] 691 + if let Some(cell) = buf.cell_mut((cx, y)) { cell.set_style(CURSOR_STYLE); } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/ui/picker.rs:67:13 [INFO] [stdout] | [INFO] [stdout] 67 | scored.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 67 - scored.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] 67 + scored.sort_by_key(|b| std::cmp::Reverse(b.1)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/ui/picker.rs:107:28 [INFO] [stdout] | [INFO] [stdout] 107 | let picker_width = area.width.min(50).max(20); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `area.width.clamp(20, 50)` [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: clamp-like pattern without using clamp function [INFO] [stdout] --> src/ui/picker.rs:108:29 [INFO] [stdout] | [INFO] [stdout] 108 | let picker_height = area.height.min(16).max(4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `area.height.clamp(4, 16)` [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: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ui/picker.rs:135:21 [INFO] [stdout] | [INFO] [stdout] 135 | / buf.cell_mut((cx, cy)).map(|cell| { [INFO] [stdout] 136 | | cell.set_char(' '); [INFO] [stdout] 137 | | cell.set_style(bg); [INFO] [stdout] 138 | | }); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 135 - buf.cell_mut((cx, cy)).map(|cell| { [INFO] [stdout] 136 - cell.set_char(' '); [INFO] [stdout] 137 - cell.set_style(bg); [INFO] [stdout] 138 - }); [INFO] [stdout] 135 + if let Some(cell) = buf.cell_mut((cx, cy)) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/ui/picker.rs:146:43 [INFO] [stdout] | [INFO] [stdout] 146 | let mut border_chars: Vec = std::iter::repeat('\u{2500}').take(border_len).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n('\u{2500}', border_len)` [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: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ui/picker.rs:161:17 [INFO] [stdout] | [INFO] [stdout] 161 | / buf.cell_mut((x + dx, query_y)).map(|cell| { [INFO] [stdout] 162 | | cell.set_char(' '); [INFO] [stdout] 163 | | cell.set_style(query_style); [INFO] [stdout] 164 | | }); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 161 - buf.cell_mut((x + dx, query_y)).map(|cell| { [INFO] [stdout] 162 - cell.set_char(' '); [INFO] [stdout] 163 - cell.set_style(query_style); [INFO] [stdout] 164 - }); [INFO] [stdout] 161 + if let Some(cell) = buf.cell_mut((x + dx, query_y)) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `str::repeat` using iterators [INFO] [stdout] --> src/ui/picker.rs:175:31 [INFO] [stdout] | [INFO] [stdout] 175 | let sep: String = std::iter::repeat('\u{2500}') [INFO] [stdout] | _______________________________^ [INFO] [stdout] 176 | | .take(picker_width as usize) [INFO] [stdout] 177 | | .collect(); [INFO] [stdout] | |__________________________^ help: try: `"\u{2500}".repeat(picker_width as usize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_str_repeat [INFO] [stdout] = note: `#[warn(clippy::manual_str_repeat)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/ui/picker.rs:175:31 [INFO] [stdout] | [INFO] [stdout] 175 | let sep: String = std::iter::repeat('\u{2500}') [INFO] [stdout] | _______________________________^ [INFO] [stdout] 176 | | .take(picker_width as usize) [INFO] [stdout] | |____________________________________________^ help: consider using `repeat_n()` instead: `std::iter::repeat_n('\u{2500}', picker_width as usize)` [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: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ui/picker.rs:212:17 [INFO] [stdout] | [INFO] [stdout] 212 | / buf.cell_mut((x + dx, item_y)).map(|cell| { [INFO] [stdout] 213 | | cell.set_char(' '); [INFO] [stdout] 214 | | cell.set_style(style); [INFO] [stdout] 215 | | }); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 212 - buf.cell_mut((x + dx, item_y)).map(|cell| { [INFO] [stdout] 213 - cell.set_char(' '); [INFO] [stdout] 214 - cell.set_style(style); [INFO] [stdout] 215 - }); [INFO] [stdout] 212 + if let Some(cell) = buf.cell_mut((x + dx, item_y)) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `str::repeat` using iterators [INFO] [stdout] --> src/ui/picker.rs:232:41 [INFO] [stdout] | [INFO] [stdout] 232 | let bottom_border: String = std::iter::repeat('\u{2500}') [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 233 | | .take(picker_width as usize) [INFO] [stdout] 234 | | .collect(); [INFO] [stdout] | |__________________________^ help: try: `"\u{2500}".repeat(picker_width as usize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_str_repeat [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/ui/picker.rs:232:41 [INFO] [stdout] | [INFO] [stdout] 232 | let bottom_border: String = std::iter::repeat('\u{2500}') [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 233 | | .take(picker_width as usize) [INFO] [stdout] | |____________________________________________^ help: consider using `repeat_n()` instead: `std::iter::repeat_n('\u{2500}', picker_width as usize)` [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: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/ui/search.rs:61:13 [INFO] [stdout] | [INFO] [stdout] 61 | .enumerate() [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 61 ~ [INFO] [stdout] 62 ~ .map(|(msg_idx, preview)| SearchMatch { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/ui/search.rs:107:13 [INFO] [stdout] | [INFO] [stdout] 107 | self.matches.sort_by(|a, b| b.score.cmp(&a.score)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 107 - self.matches.sort_by(|a, b| b.score.cmp(&a.score)); [INFO] [stdout] 107 + self.matches.sort_by_key(|b| std::cmp::Reverse(b.score)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/ui/search.rs:145:29 [INFO] [stdout] | [INFO] [stdout] 145 | let overlay_width = area.width.min(60).max(20); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `area.width.clamp(20, 60)` [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: clamp-like pattern without using clamp function [INFO] [stdout] --> src/ui/search.rs:146:30 [INFO] [stdout] | [INFO] [stdout] 146 | let overlay_height = area.height.min(16).max(4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `area.height.clamp(4, 16)` [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: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ui/search.rs:173:21 [INFO] [stdout] | [INFO] [stdout] 173 | / buf.cell_mut((cx, cy)).map(|cell| { [INFO] [stdout] 174 | | cell.set_char(' '); [INFO] [stdout] 175 | | cell.set_style(bg); [INFO] [stdout] 176 | | }); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 173 - buf.cell_mut((cx, cy)).map(|cell| { [INFO] [stdout] 174 - cell.set_char(' '); [INFO] [stdout] 175 - cell.set_style(bg); [INFO] [stdout] 176 - }); [INFO] [stdout] 173 + if let Some(cell) = buf.cell_mut((cx, cy)) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/ui/search.rs:184:43 [INFO] [stdout] | [INFO] [stdout] 184 | let mut border_chars: Vec = std::iter::repeat('\u{2500}').take(border_len).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n('\u{2500}', border_len)` [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: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ui/search.rs:198:17 [INFO] [stdout] | [INFO] [stdout] 198 | / buf.cell_mut((x + dx, query_y)).map(|cell| { [INFO] [stdout] 199 | | cell.set_char(' '); [INFO] [stdout] 200 | | cell.set_style(query_style); [INFO] [stdout] 201 | | }); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 198 - buf.cell_mut((x + dx, query_y)).map(|cell| { [INFO] [stdout] 199 - cell.set_char(' '); [INFO] [stdout] 200 - cell.set_style(query_style); [INFO] [stdout] 201 - }); [INFO] [stdout] 198 + if let Some(cell) = buf.cell_mut((x + dx, query_y)) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `str::repeat` using iterators [INFO] [stdout] --> src/ui/search.rs:212:31 [INFO] [stdout] | [INFO] [stdout] 212 | let sep: String = std::iter::repeat('\u{2500}') [INFO] [stdout] | _______________________________^ [INFO] [stdout] 213 | | .take(overlay_width as usize) [INFO] [stdout] 214 | | .collect(); [INFO] [stdout] | |__________________________^ help: try: `"\u{2500}".repeat(overlay_width as usize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_str_repeat [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/ui/search.rs:212:31 [INFO] [stdout] | [INFO] [stdout] 212 | let sep: String = std::iter::repeat('\u{2500}') [INFO] [stdout] | _______________________________^ [INFO] [stdout] 213 | | .take(overlay_width as usize) [INFO] [stdout] | |_____________________________________________^ help: consider using `repeat_n()` instead: `std::iter::repeat_n('\u{2500}', overlay_width as usize)` [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 `impl` can be derived [INFO] [stdout] --> src/config.rs:78:1 [INFO] [stdout] | [INFO] [stdout] 78 | / impl Default for Config { [INFO] [stdout] 79 | | fn default() -> Self { [INFO] [stdout] 80 | | Self { [INFO] [stdout] 81 | | general: GeneralConfig::default(), [INFO] [stdout] ... | [INFO] [stdout] 86 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 7 + #[derive(Default)] [INFO] [stdout] 8 | pub struct Config { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ui/search.rs:246:17 [INFO] [stdout] | [INFO] [stdout] 246 | / buf.cell_mut((x + dx, item_y)).map(|cell| { [INFO] [stdout] 247 | | cell.set_char(' '); [INFO] [stdout] 248 | | cell.set_style(style); [INFO] [stdout] 249 | | }); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 246 - buf.cell_mut((x + dx, item_y)).map(|cell| { [INFO] [stdout] 247 - cell.set_char(' '); [INFO] [stdout] 248 - cell.set_style(style); [INFO] [stdout] 249 - }); [INFO] [stdout] 246 + if let Some(cell) = buf.cell_mut((x + dx, item_y)) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `str::repeat` using iterators [INFO] [stdout] --> src/ui/search.rs:266:41 [INFO] [stdout] | [INFO] [stdout] 266 | let bottom_border: String = std::iter::repeat('\u{2500}') [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 267 | | .take(overlay_width as usize) [INFO] [stdout] 268 | | .collect(); [INFO] [stdout] | |__________________________^ help: try: `"\u{2500}".repeat(overlay_width as usize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_str_repeat [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/ui/search.rs:266:41 [INFO] [stdout] | [INFO] [stdout] 266 | let bottom_border: String = std::iter::repeat('\u{2500}') [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 267 | | .take(overlay_width as usize) [INFO] [stdout] | |_____________________________________________^ help: consider using `repeat_n()` instead: `std::iter::repeat_n('\u{2500}', overlay_width as usize)` [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: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ui/status.rs:51:13 [INFO] [stdout] | [INFO] [stdout] 51 | / buf.cell_mut((x, area.y)).map(|cell| { [INFO] [stdout] 52 | | cell.set_style(bg); [INFO] [stdout] 53 | | cell.set_char(' '); [INFO] [stdout] 54 | | }); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 51 - buf.cell_mut((x, area.y)).map(|cell| { [INFO] [stdout] 52 - cell.set_style(bg); [INFO] [stdout] 53 - cell.set_char(' '); [INFO] [stdout] 54 - }); [INFO] [stdout] 51 + if let Some(cell) = buf.cell_mut((x, area.y)) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ui/mod.rs:292:17 [INFO] [stdout] | [INFO] [stdout] 292 | / buf.cell_mut((cx, cy)).map(|cell| { [INFO] [stdout] 293 | | cell.set_char(' '); [INFO] [stdout] 294 | | cell.set_style(bg); [INFO] [stdout] 295 | | }); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 292 - buf.cell_mut((cx, cy)).map(|cell| { [INFO] [stdout] 293 - cell.set_char(' '); [INFO] [stdout] 294 - cell.set_style(bg); [INFO] [stdout] 295 - }); [INFO] [stdout] 292 + if let Some(cell) = buf.cell_mut((cx, cy)) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/ui/mod.rs:303:39 [INFO] [stdout] | [INFO] [stdout] 303 | let mut border_chars: Vec = std::iter::repeat('\u{2500}').take(border_len).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n('\u{2500}', border_len)` [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 implementation of `str::repeat` using iterators [INFO] [stdout] --> src/ui/mod.rs:341:37 [INFO] [stdout] | [INFO] [stdout] 341 | let bottom_border: String = std::iter::repeat('\u{2500}').take(border_len).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"\u{2500}".repeat(border_len)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_str_repeat [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/ui/mod.rs:341:37 [INFO] [stdout] | [INFO] [stdout] 341 | let bottom_border: String = std::iter::repeat('\u{2500}').take(border_len).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n('\u{2500}', border_len)` [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 can be `std::io::Error::other(_)` [INFO] [stdout] --> src/conversation.rs:97:26 [INFO] [stdout] | [INFO] [stdout] 97 | .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 97 - .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))?; [INFO] [stdout] 97 + .map_err(|e| std::io::Error::other(e))?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/conversation.rs:104:49 [INFO] [stdout] | [INFO] [stdout] 104 | serde_json::from_str(&data).map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 104 - serde_json::from_str(&data).map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e)) [INFO] [stdout] 104 + serde_json::from_str(&data).map_err(|e| std::io::Error::other(e)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:70:5 [INFO] [stdout] | [INFO] [stdout] 70 | / if let Some(path) = Config::path() { [INFO] [stdout] 71 | | if !path.exists() { [INFO] [stdout] 72 | | if let Err(e) = config.save() { [INFO] [stdout] 73 | | eprintln!("Note: could not create default config: {e}"); [INFO] [stdout] ... | [INFO] [stdout] 78 | | } [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] 70 ~ if let Some(path) = Config::path() [INFO] [stdout] 71 ~ && !path.exists() { [INFO] [stdout] 72 | if let Err(e) = config.save() { [INFO] [stdout] ... [INFO] [stdout] 76 | } [INFO] [stdout] 77 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:123:17 [INFO] [stdout] | [INFO] [stdout] 123 | / if cli.r#continue { [INFO] [stdout] 124 | | if let Some(dir) = Config::conversations_dir() { [INFO] [stdout] 125 | | match Conversation::list(&dir) { [INFO] [stdout] 126 | | Ok(paths) if !paths.is_empty() => { [INFO] [stdout] ... | [INFO] [stdout] 163 | | } [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] 123 ~ if cli.r#continue [INFO] [stdout] 124 ~ && let Some(dir) = Config::conversations_dir() { [INFO] [stdout] 125 | match Conversation::list(&dir) { [INFO] [stdout] ... [INFO] [stdout] 161 | } [INFO] [stdout] 162 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:256:5 [INFO] [stdout] | [INFO] [stdout] 256 | / if !io::stdin().is_terminal() { [INFO] [stdout] 257 | | if let Err(e) = io::stdin().read_to_string(&mut prompt_text) { [INFO] [stdout] 258 | | eprintln!("Failed to read stdin: {e}"); [INFO] [stdout] 259 | | std::process::exit(1); [INFO] [stdout] 260 | | } [INFO] [stdout] 261 | | } [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] 256 ~ if !io::stdin().is_terminal() [INFO] [stdout] 257 ~ && let Err(e) = io::stdin().read_to_string(&mut prompt_text) { [INFO] [stdout] 258 | eprintln!("Failed to read stdin: {e}"); [INFO] [stdout] 259 | std::process::exit(1); [INFO] [stdout] 260 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/mode.rs:39:1 [INFO] [stdout] | [INFO] [stdout] 39 | / impl Default for Mode { [INFO] [stdout] 40 | | fn default() -> Self { [INFO] [stdout] 41 | | Mode::Insert [INFO] [stdout] 42 | | } [INFO] [stdout] 43 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 9 + #[derive(Default)] [INFO] [stdout] 10 | pub enum Mode { [INFO] [stdout] 11 | /// Default mode. Input area is active, user can type and send messages. [INFO] [stdout] 12 ~ #[default] [INFO] [stdout] 13 ~ Insert, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implicitly performing saturating subtraction [INFO] [stdout] --> src/ui/markdown.rs:229:17 [INFO] [stdout] | [INFO] [stdout] 229 | / if depth > 0 { [INFO] [stdout] 230 | | depth -= 1; [INFO] [stdout] 231 | | } [INFO] [stdout] | |_________________^ help: try: `depth = depth.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: you seem to be trying to move all elements into a new `Vec` [INFO] [stdout] --> src/ui/markdown.rs:458:31 [INFO] [stdout] | [INFO] [stdout] 458 | lines.push(Line::from(spans.drain(..).collect::>())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `mem::take`: `std::mem::take(spans)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#drain_collect [INFO] [stdout] = note: `#[warn(clippy::drain_collect)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to move all elements into a new `Vec` [INFO] [stdout] --> src/ui/markdown.rs:464:41 [INFO] [stdout] | [INFO] [stdout] 464 | blocks.push(MarkdownBlock::Text(lines.drain(..).collect())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `mem::take`: `std::mem::take(lines)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#drain_collect [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/messages.rs:560:17 [INFO] [stdout] | [INFO] [stdout] 560 | / if let Some(cli) = fl.content_line_idx { [INFO] [stdout] 561 | | if let Some(cb_idx) = selected_cb_idx { [INFO] [stdout] 562 | | if let Some(&(start, end, fence_offset)) = cb_ranges.get(cb_idx) { [INFO] [stdout] 563 | | if cli >= start && cli < end { [INFO] [stdout] ... | [INFO] [stdout] 610 | | } [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] 560 ~ if let Some(cli) = fl.content_line_idx [INFO] [stdout] 561 ~ && let Some(cb_idx) = selected_cb_idx { [INFO] [stdout] 562 | if let Some(&(start, end, fence_offset)) = cb_ranges.get(cb_idx) { [INFO] [stdout] ... [INFO] [stdout] 608 | } [INFO] [stdout] 609 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/messages.rs:561:21 [INFO] [stdout] | [INFO] [stdout] 561 | / if let Some(cb_idx) = selected_cb_idx { [INFO] [stdout] 562 | | if let Some(&(start, end, fence_offset)) = cb_ranges.get(cb_idx) { [INFO] [stdout] 563 | | if cli >= start && cli < end { [INFO] [stdout] ... | [INFO] [stdout] 609 | | } [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] 561 ~ if let Some(cb_idx) = selected_cb_idx [INFO] [stdout] 562 ~ && let Some(&(start, end, fence_offset)) = cb_ranges.get(cb_idx) { [INFO] [stdout] 563 | if cli >= start && cli < end { [INFO] [stdout] ... [INFO] [stdout] 607 | } [INFO] [stdout] 608 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/messages.rs:562:25 [INFO] [stdout] | [INFO] [stdout] 562 | / if let Some(&(start, end, fence_offset)) = cb_ranges.get(cb_idx) { [INFO] [stdout] 563 | | if cli >= start && cli < end { [INFO] [stdout] 564 | | // This line is in the selected codeblock. [INFO] [stdout] 565 | | line_bg = Some(CODEBLOCK_SELECT_BG); [INFO] [stdout] ... | [INFO] [stdout] 608 | | } [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] 562 ~ if let Some(&(start, end, fence_offset)) = cb_ranges.get(cb_idx) [INFO] [stdout] 563 ~ && cli >= start && cli < end { [INFO] [stdout] 564 | // This line is in the selected codeblock. [INFO] [stdout] ... [INFO] [stdout] 606 | } [INFO] [stdout] 607 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/messages.rs:574:37 [INFO] [stdout] | [INFO] [stdout] 574 | / ... if let Some(vs) = self.visual_selection { [INFO] [stdout] 575 | | ... if vs.block_index == cb_idx { [INFO] [stdout] 576 | | ... match self.mode { [INFO] [stdout] 577 | | ... Mode::VisualLine => { [INFO] [stdout] ... | [INFO] [stdout] 605 | | ... } [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] 574 ~ if let Some(vs) = self.visual_selection [INFO] [stdout] 575 ~ && vs.block_index == cb_idx { [INFO] [stdout] 576 | match self.mode { [INFO] [stdout] ... [INFO] [stdout] 603 | } [INFO] [stdout] 604 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ui/messages.rs:620:21 [INFO] [stdout] | [INFO] [stdout] 620 | / buf.cell_mut((x, y)).map(|cell| { [INFO] [stdout] 621 | | cell.set_style(bg_style); [INFO] [stdout] 622 | | }); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] = note: `#[warn(clippy::option_map_unit_fn)]` on by default [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 620 - buf.cell_mut((x, y)).map(|cell| { [INFO] [stdout] 621 - cell.set_style(bg_style); [INFO] [stdout] 622 - }); [INFO] [stdout] 620 + if let Some(cell) = buf.cell_mut((x, y)) { cell.set_style(bg_style); } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ui/messages.rs:647:37 [INFO] [stdout] | [INFO] [stdout] 647 | / ... buf.cell_mut((cx + dx, y)).map(|cell| { [INFO] [stdout] 648 | | ... cell.set_style(visual_style); [INFO] [stdout] 649 | | ... }); [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 647 - buf.cell_mut((cx + dx, y)).map(|cell| { [INFO] [stdout] 648 - cell.set_style(visual_style); [INFO] [stdout] 649 - }); [INFO] [stdout] 647 + if let Some(cell) = buf.cell_mut((cx + dx, y)) { cell.set_style(visual_style); } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/messages.rs:663:13 [INFO] [stdout] | [INFO] [stdout] 663 | / if fl.is_selected_msg { [INFO] [stdout] 664 | | if let Some(cli) = fl.content_line_idx { [INFO] [stdout] 665 | | if let Some(cb_idx) = selected_cb_idx { [INFO] [stdout] 666 | | if let Some(&(start, end, fence_offset)) = cb_ranges.get(cb_idx) { [INFO] [stdout] ... | [INFO] [stdout] 703 | | } [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] 663 ~ if fl.is_selected_msg [INFO] [stdout] 664 ~ && let Some(cli) = fl.content_line_idx { [INFO] [stdout] 665 | if let Some(cb_idx) = selected_cb_idx { [INFO] [stdout] ... [INFO] [stdout] 701 | } [INFO] [stdout] 702 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/messages.rs:664:17 [INFO] [stdout] | [INFO] [stdout] 664 | / if let Some(cli) = fl.content_line_idx { [INFO] [stdout] 665 | | if let Some(cb_idx) = selected_cb_idx { [INFO] [stdout] 666 | | if let Some(&(start, end, fence_offset)) = cb_ranges.get(cb_idx) { [INFO] [stdout] 667 | | if cli >= start && cli < end { [INFO] [stdout] ... | [INFO] [stdout] 702 | | } [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] 664 ~ if let Some(cli) = fl.content_line_idx [INFO] [stdout] 665 ~ && let Some(cb_idx) = selected_cb_idx { [INFO] [stdout] 666 | if let Some(&(start, end, fence_offset)) = cb_ranges.get(cb_idx) { [INFO] [stdout] ... [INFO] [stdout] 700 | } [INFO] [stdout] 701 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/messages.rs:665:21 [INFO] [stdout] | [INFO] [stdout] 665 | / if let Some(cb_idx) = selected_cb_idx { [INFO] [stdout] 666 | | if let Some(&(start, end, fence_offset)) = cb_ranges.get(cb_idx) { [INFO] [stdout] 667 | | if cli >= start && cli < end { [INFO] [stdout] ... | [INFO] [stdout] 701 | | } [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] 665 ~ if let Some(cb_idx) = selected_cb_idx [INFO] [stdout] 666 ~ && let Some(&(start, end, fence_offset)) = cb_ranges.get(cb_idx) { [INFO] [stdout] 667 | if cli >= start && cli < end { [INFO] [stdout] ... [INFO] [stdout] 699 | } [INFO] [stdout] 700 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/messages.rs:666:25 [INFO] [stdout] | [INFO] [stdout] 666 | / if let Some(&(start, end, fence_offset)) = cb_ranges.get(cb_idx) { [INFO] [stdout] 667 | | if cli >= start && cli < end { [INFO] [stdout] 668 | | // Map flat line index to code line (skip fence markers). [INFO] [stdout] 669 | | let code_start = start + fence_offset; [INFO] [stdout] ... | [INFO] [stdout] 700 | | } [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] 666 ~ if let Some(&(start, end, fence_offset)) = cb_ranges.get(cb_idx) [INFO] [stdout] 667 ~ && cli >= start && cli < end { [INFO] [stdout] 668 | // Map flat line index to code line (skip fence markers). [INFO] [stdout] ... [INFO] [stdout] 698 | } [INFO] [stdout] 699 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ui/messages.rs:680:49 [INFO] [stdout] | [INFO] [stdout] 680 | / ... buf.cell_mut((cx, y)).map(|cell| { [INFO] [stdout] 681 | | ... cell.set_style(VISUAL_ACTIVE_END_STYLE); [INFO] [stdout] 682 | | ... }); [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 680 - buf.cell_mut((cx, y)).map(|cell| { [INFO] [stdout] 681 - cell.set_style(VISUAL_ACTIVE_END_STYLE); [INFO] [stdout] 682 - }); [INFO] [stdout] 680 + if let Some(cell) = buf.cell_mut((cx, y)) { cell.set_style(VISUAL_ACTIVE_END_STYLE); } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/messages.rs:687:41 [INFO] [stdout] | [INFO] [stdout] 687 | / ... if let Some(cs) = self.codeblock_select { [INFO] [stdout] 688 | | ... if code_line == cs.cursor.row { [INFO] [stdout] 689 | | ... let cx = content_x + cs.cursor.col as u16; [INFO] [stdout] 690 | | ... if cx < area.x + area.width { [INFO] [stdout] ... | [INFO] [stdout] 696 | | ... } [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] 687 ~ if let Some(cs) = self.codeblock_select [INFO] [stdout] 688 ~ && code_line == cs.cursor.row { [INFO] [stdout] 689 | let cx = content_x + cs.cursor.col as u16; [INFO] [stdout] ... [INFO] [stdout] 694 | } [INFO] [stdout] 695 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ui/messages.rs:691:53 [INFO] [stdout] | [INFO] [stdout] 691 | / ... buf.cell_mut((cx, y)).map(|cell| { [INFO] [stdout] 692 | | ... cell.set_style(CURSOR_STYLE); [INFO] [stdout] 693 | | ... }); [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 691 - buf.cell_mut((cx, y)).map(|cell| { [INFO] [stdout] 692 - cell.set_style(CURSOR_STYLE); [INFO] [stdout] 693 - }); [INFO] [stdout] 691 + if let Some(cell) = buf.cell_mut((cx, y)) { cell.set_style(CURSOR_STYLE); } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/ui/picker.rs:67:13 [INFO] [stdout] | [INFO] [stdout] 67 | scored.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 67 - scored.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] 67 + scored.sort_by_key(|b| std::cmp::Reverse(b.1)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/ui/picker.rs:107:28 [INFO] [stdout] | [INFO] [stdout] 107 | let picker_width = area.width.min(50).max(20); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `area.width.clamp(20, 50)` [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: clamp-like pattern without using clamp function [INFO] [stdout] --> src/ui/picker.rs:108:29 [INFO] [stdout] | [INFO] [stdout] 108 | let picker_height = area.height.min(16).max(4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `area.height.clamp(4, 16)` [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: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ui/picker.rs:135:21 [INFO] [stdout] | [INFO] [stdout] 135 | / buf.cell_mut((cx, cy)).map(|cell| { [INFO] [stdout] 136 | | cell.set_char(' '); [INFO] [stdout] 137 | | cell.set_style(bg); [INFO] [stdout] 138 | | }); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 135 - buf.cell_mut((cx, cy)).map(|cell| { [INFO] [stdout] 136 - cell.set_char(' '); [INFO] [stdout] 137 - cell.set_style(bg); [INFO] [stdout] 138 - }); [INFO] [stdout] 135 + if let Some(cell) = buf.cell_mut((cx, cy)) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/ui/picker.rs:146:43 [INFO] [stdout] | [INFO] [stdout] 146 | let mut border_chars: Vec = std::iter::repeat('\u{2500}').take(border_len).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n('\u{2500}', border_len)` [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: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ui/picker.rs:161:17 [INFO] [stdout] | [INFO] [stdout] 161 | / buf.cell_mut((x + dx, query_y)).map(|cell| { [INFO] [stdout] 162 | | cell.set_char(' '); [INFO] [stdout] 163 | | cell.set_style(query_style); [INFO] [stdout] 164 | | }); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 161 - buf.cell_mut((x + dx, query_y)).map(|cell| { [INFO] [stdout] 162 - cell.set_char(' '); [INFO] [stdout] 163 - cell.set_style(query_style); [INFO] [stdout] 164 - }); [INFO] [stdout] 161 + if let Some(cell) = buf.cell_mut((x + dx, query_y)) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `str::repeat` using iterators [INFO] [stdout] --> src/ui/picker.rs:175:31 [INFO] [stdout] | [INFO] [stdout] 175 | let sep: String = std::iter::repeat('\u{2500}') [INFO] [stdout] | _______________________________^ [INFO] [stdout] 176 | | .take(picker_width as usize) [INFO] [stdout] 177 | | .collect(); [INFO] [stdout] | |__________________________^ help: try: `"\u{2500}".repeat(picker_width as usize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_str_repeat [INFO] [stdout] = note: `#[warn(clippy::manual_str_repeat)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/ui/picker.rs:175:31 [INFO] [stdout] | [INFO] [stdout] 175 | let sep: String = std::iter::repeat('\u{2500}') [INFO] [stdout] | _______________________________^ [INFO] [stdout] 176 | | .take(picker_width as usize) [INFO] [stdout] | |____________________________________________^ help: consider using `repeat_n()` instead: `std::iter::repeat_n('\u{2500}', picker_width as usize)` [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: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ui/picker.rs:212:17 [INFO] [stdout] | [INFO] [stdout] 212 | / buf.cell_mut((x + dx, item_y)).map(|cell| { [INFO] [stdout] 213 | | cell.set_char(' '); [INFO] [stdout] 214 | | cell.set_style(style); [INFO] [stdout] 215 | | }); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 212 - buf.cell_mut((x + dx, item_y)).map(|cell| { [INFO] [stdout] 213 - cell.set_char(' '); [INFO] [stdout] 214 - cell.set_style(style); [INFO] [stdout] 215 - }); [INFO] [stdout] 212 + if let Some(cell) = buf.cell_mut((x + dx, item_y)) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `str::repeat` using iterators [INFO] [stdout] --> src/ui/picker.rs:232:41 [INFO] [stdout] | [INFO] [stdout] 232 | let bottom_border: String = std::iter::repeat('\u{2500}') [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 233 | | .take(picker_width as usize) [INFO] [stdout] 234 | | .collect(); [INFO] [stdout] | |__________________________^ help: try: `"\u{2500}".repeat(picker_width as usize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_str_repeat [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/ui/picker.rs:232:41 [INFO] [stdout] | [INFO] [stdout] 232 | let bottom_border: String = std::iter::repeat('\u{2500}') [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 233 | | .take(picker_width as usize) [INFO] [stdout] | |____________________________________________^ help: consider using `repeat_n()` instead: `std::iter::repeat_n('\u{2500}', picker_width as usize)` [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: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/ui/search.rs:61:13 [INFO] [stdout] | [INFO] [stdout] 61 | .enumerate() [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 61 ~ [INFO] [stdout] 62 ~ .map(|(msg_idx, preview)| SearchMatch { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/ui/search.rs:107:13 [INFO] [stdout] | [INFO] [stdout] 107 | self.matches.sort_by(|a, b| b.score.cmp(&a.score)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 107 - self.matches.sort_by(|a, b| b.score.cmp(&a.score)); [INFO] [stdout] 107 + self.matches.sort_by_key(|b| std::cmp::Reverse(b.score)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/ui/search.rs:145:29 [INFO] [stdout] | [INFO] [stdout] 145 | let overlay_width = area.width.min(60).max(20); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `area.width.clamp(20, 60)` [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: clamp-like pattern without using clamp function [INFO] [stdout] --> src/ui/search.rs:146:30 [INFO] [stdout] | [INFO] [stdout] 146 | let overlay_height = area.height.min(16).max(4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `area.height.clamp(4, 16)` [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: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ui/search.rs:173:21 [INFO] [stdout] | [INFO] [stdout] 173 | / buf.cell_mut((cx, cy)).map(|cell| { [INFO] [stdout] 174 | | cell.set_char(' '); [INFO] [stdout] 175 | | cell.set_style(bg); [INFO] [stdout] 176 | | }); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 173 - buf.cell_mut((cx, cy)).map(|cell| { [INFO] [stdout] 174 - cell.set_char(' '); [INFO] [stdout] 175 - cell.set_style(bg); [INFO] [stdout] 176 - }); [INFO] [stdout] 173 + if let Some(cell) = buf.cell_mut((cx, cy)) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/ui/search.rs:184:43 [INFO] [stdout] | [INFO] [stdout] 184 | let mut border_chars: Vec = std::iter::repeat('\u{2500}').take(border_len).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n('\u{2500}', border_len)` [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: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ui/search.rs:198:17 [INFO] [stdout] | [INFO] [stdout] 198 | / buf.cell_mut((x + dx, query_y)).map(|cell| { [INFO] [stdout] 199 | | cell.set_char(' '); [INFO] [stdout] 200 | | cell.set_style(query_style); [INFO] [stdout] 201 | | }); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 198 - buf.cell_mut((x + dx, query_y)).map(|cell| { [INFO] [stdout] 199 - cell.set_char(' '); [INFO] [stdout] 200 - cell.set_style(query_style); [INFO] [stdout] 201 - }); [INFO] [stdout] 198 + if let Some(cell) = buf.cell_mut((x + dx, query_y)) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `str::repeat` using iterators [INFO] [stdout] --> src/ui/search.rs:212:31 [INFO] [stdout] | [INFO] [stdout] 212 | let sep: String = std::iter::repeat('\u{2500}') [INFO] [stdout] | _______________________________^ [INFO] [stdout] 213 | | .take(overlay_width as usize) [INFO] [stdout] 214 | | .collect(); [INFO] [stdout] | |__________________________^ help: try: `"\u{2500}".repeat(overlay_width as usize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_str_repeat [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/ui/search.rs:212:31 [INFO] [stdout] | [INFO] [stdout] 212 | let sep: String = std::iter::repeat('\u{2500}') [INFO] [stdout] | _______________________________^ [INFO] [stdout] 213 | | .take(overlay_width as usize) [INFO] [stdout] | |_____________________________________________^ help: consider using `repeat_n()` instead: `std::iter::repeat_n('\u{2500}', overlay_width as usize)` [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: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ui/search.rs:246:17 [INFO] [stdout] | [INFO] [stdout] 246 | / buf.cell_mut((x + dx, item_y)).map(|cell| { [INFO] [stdout] 247 | | cell.set_char(' '); [INFO] [stdout] 248 | | cell.set_style(style); [INFO] [stdout] 249 | | }); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 246 - buf.cell_mut((x + dx, item_y)).map(|cell| { [INFO] [stdout] 247 - cell.set_char(' '); [INFO] [stdout] 248 - cell.set_style(style); [INFO] [stdout] 249 - }); [INFO] [stdout] 246 + if let Some(cell) = buf.cell_mut((x + dx, item_y)) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `str::repeat` using iterators [INFO] [stdout] --> src/ui/search.rs:266:41 [INFO] [stdout] | [INFO] [stdout] 266 | let bottom_border: String = std::iter::repeat('\u{2500}') [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 267 | | .take(overlay_width as usize) [INFO] [stdout] 268 | | .collect(); [INFO] [stdout] | |__________________________^ help: try: `"\u{2500}".repeat(overlay_width as usize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_str_repeat [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/ui/search.rs:266:41 [INFO] [stdout] | [INFO] [stdout] 266 | let bottom_border: String = std::iter::repeat('\u{2500}') [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 267 | | .take(overlay_width as usize) [INFO] [stdout] | |_____________________________________________^ help: consider using `repeat_n()` instead: `std::iter::repeat_n('\u{2500}', overlay_width as usize)` [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: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ui/status.rs:51:13 [INFO] [stdout] | [INFO] [stdout] 51 | / buf.cell_mut((x, area.y)).map(|cell| { [INFO] [stdout] 52 | | cell.set_style(bg); [INFO] [stdout] 53 | | cell.set_char(' '); [INFO] [stdout] 54 | | }); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 51 - buf.cell_mut((x, area.y)).map(|cell| { [INFO] [stdout] 52 - cell.set_style(bg); [INFO] [stdout] 53 - cell.set_char(' '); [INFO] [stdout] 54 - }); [INFO] [stdout] 51 + if let Some(cell) = buf.cell_mut((x, area.y)) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/ui/mod.rs:292:17 [INFO] [stdout] | [INFO] [stdout] 292 | / buf.cell_mut((cx, cy)).map(|cell| { [INFO] [stdout] 293 | | cell.set_char(' '); [INFO] [stdout] 294 | | cell.set_style(bg); [INFO] [stdout] 295 | | }); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 292 - buf.cell_mut((cx, cy)).map(|cell| { [INFO] [stdout] 293 - cell.set_char(' '); [INFO] [stdout] 294 - cell.set_style(bg); [INFO] [stdout] 295 - }); [INFO] [stdout] 292 + if let Some(cell) = buf.cell_mut((cx, cy)) { ... } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/ui/mod.rs:303:39 [INFO] [stdout] | [INFO] [stdout] 303 | let mut border_chars: Vec = std::iter::repeat('\u{2500}').take(border_len).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n('\u{2500}', border_len)` [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 implementation of `str::repeat` using iterators [INFO] [stdout] --> src/ui/mod.rs:341:37 [INFO] [stdout] | [INFO] [stdout] 341 | let bottom_border: String = std::iter::repeat('\u{2500}').take(border_len).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"\u{2500}".repeat(border_len)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_str_repeat [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/ui/mod.rs:341:37 [INFO] [stdout] | [INFO] [stdout] 341 | let bottom_border: String = std::iter::repeat('\u{2500}').take(border_len).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n('\u{2500}', border_len)` [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 `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:70:5 [INFO] [stdout] | [INFO] [stdout] 70 | / if let Some(path) = Config::path() { [INFO] [stdout] 71 | | if !path.exists() { [INFO] [stdout] 72 | | if let Err(e) = config.save() { [INFO] [stdout] 73 | | eprintln!("Note: could not create default config: {e}"); [INFO] [stdout] ... | [INFO] [stdout] 78 | | } [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] 70 ~ if let Some(path) = Config::path() [INFO] [stdout] 71 ~ && !path.exists() { [INFO] [stdout] 72 | if let Err(e) = config.save() { [INFO] [stdout] ... [INFO] [stdout] 76 | } [INFO] [stdout] 77 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:123:17 [INFO] [stdout] | [INFO] [stdout] 123 | / if cli.r#continue { [INFO] [stdout] 124 | | if let Some(dir) = Config::conversations_dir() { [INFO] [stdout] 125 | | match Conversation::list(&dir) { [INFO] [stdout] 126 | | Ok(paths) if !paths.is_empty() => { [INFO] [stdout] ... | [INFO] [stdout] 163 | | } [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] 123 ~ if cli.r#continue [INFO] [stdout] 124 ~ && let Some(dir) = Config::conversations_dir() { [INFO] [stdout] 125 | match Conversation::list(&dir) { [INFO] [stdout] ... [INFO] [stdout] 161 | } [INFO] [stdout] 162 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:256:5 [INFO] [stdout] | [INFO] [stdout] 256 | / if !io::stdin().is_terminal() { [INFO] [stdout] 257 | | if let Err(e) = io::stdin().read_to_string(&mut prompt_text) { [INFO] [stdout] 258 | | eprintln!("Failed to read stdin: {e}"); [INFO] [stdout] 259 | | std::process::exit(1); [INFO] [stdout] 260 | | } [INFO] [stdout] 261 | | } [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] 256 ~ if !io::stdin().is_terminal() [INFO] [stdout] 257 ~ && let Err(e) = io::stdin().read_to_string(&mut prompt_text) { [INFO] [stdout] 258 | eprintln!("Failed to read stdin: {e}"); [INFO] [stdout] 259 | std::process::exit(1); [INFO] [stdout] 260 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2m 13s [INFO] running `Command { std: "docker" "inspect" "a8a05e7cd66c36c6bd32c51e4ffb0c10da26b0a42008cfb94e13daf64f4edff6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a8a05e7cd66c36c6bd32c51e4ffb0c10da26b0a42008cfb94e13daf64f4edff6", kill_on_drop: false }` [INFO] [stdout] a8a05e7cd66c36c6bd32c51e4ffb0c10da26b0a42008cfb94e13daf64f4edff6