[INFO] cloning repository https://github.com/JasonHonKL/PengyAgent [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/JasonHonKL/PengyAgent" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FJasonHonKL%2FPengyAgent", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FJasonHonKL%2FPengyAgent'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 3f124562de37994317acbe9e74de72159bae5b1f [INFO] linting JasonHonKL/PengyAgent against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FJasonHonKL%2FPengyAgent" "/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/JasonHonKL/PengyAgent [INFO] finished tweaking git repo https://github.com/JasonHonKL/PengyAgent [INFO] tweaked toml for git repo https://github.com/JasonHonKL/PengyAgent written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/JasonHonKL/PengyAgent 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/JasonHonKL/PengyAgent 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 instability v0.3.10 [INFO] [stderr] Downloaded windows-registry v0.6.1 [INFO] [stderr] Downloaded cc v1.0.106 [INFO] [stderr] Downloaded type1-encoding-parser v0.1.0 [INFO] [stderr] Downloaded smawk v0.3.2 [INFO] [stderr] Downloaded adobe-cmap-parser v0.4.1 [INFO] [stderr] Downloaded display-info v0.4.8 [INFO] [stderr] Downloaded screenshots v0.7.3 [INFO] [stderr] Downloaded rustls-pki-types v1.13.1 [INFO] [stderr] Downloaded euclid v0.20.14 [INFO] [stderr] Downloaded pdf-extract v0.7.12 [INFO] [stderr] Downloaded tracing v0.1.43 [INFO] [stderr] Downloaded dbus v0.9.9 [INFO] [stderr] Downloaded tree-sitter-javascript v0.20.4 [INFO] [stderr] Downloaded pom v1.1.0 [INFO] [stderr] Downloaded moxcms v0.7.10 [INFO] [stderr] Downloaded tree-sitter-python v0.20.4 [INFO] [stderr] Downloaded tower-http v0.6.7 [INFO] [stderr] Downloaded unicode-normalization v0.1.25 [INFO] [stderr] Downloaded iri-string v0.7.9 [INFO] [stderr] Downloaded reqwest v0.12.24 [INFO] [stderr] Downloaded tree-sitter-c v0.20.8 [INFO] [stderr] Downloaded tree-sitter-rust v0.20.4 [INFO] [stderr] Downloaded tree-sitter v0.20.10 [INFO] [stderr] Downloaded widestring v1.2.1 [INFO] [stderr] Downloaded tree-sitter-go v0.20.0 [INFO] [stderr] Downloaded tree-sitter-java v0.20.2 [INFO] [stderr] Downloaded postscript v0.14.1 [INFO] [stderr] Downloaded tracing-core v0.1.35 [INFO] [stderr] Downloaded tui-textarea v0.4.0 [INFO] [stderr] Downloaded libdbus-sys v0.2.6 [INFO] [stderr] Downloaded tree-sitter-cpp v0.20.5 [INFO] [stderr] Downloaded tree-sitter-typescript v0.20.5 [INFO] [stderr] Downloaded ring v0.17.9 [INFO] [stderr] Downloaded lopdf v0.34.0 [INFO] [stderr] Downloaded windows v0.52.0 [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] c75a2dcefadaa3e38d568ac106fe538114d3395d715b27e06b8e46e318733919 [INFO] running `Command { std: "docker" "start" "-a" "c75a2dcefadaa3e38d568ac106fe538114d3395d715b27e06b8e46e318733919", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "c75a2dcefadaa3e38d568ac106fe538114d3395d715b27e06b8e46e318733919", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c75a2dcefadaa3e38d568ac106fe538114d3395d715b27e06b8e46e318733919", kill_on_drop: false }` [INFO] [stdout] c75a2dcefadaa3e38d568ac106fe538114d3395d715b27e06b8e46e318733919 [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] 272a630ad65ed6bd4ef8681a2d79ef79c41e7585a8e7b9102015c1ca8971cdc1 [INFO] running `Command { std: "docker" "start" "-a" "272a630ad65ed6bd4ef8681a2d79ef79c41e7585a8e7b9102015c1ca8971cdc1", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.103 [INFO] [stderr] Compiling quote v1.0.42 [INFO] [stderr] Compiling cc v1.0.106 [INFO] [stderr] Compiling libc v0.2.178 [INFO] [stderr] Checking stable_deref_trait v1.2.1 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Checking bitflags v2.10.0 [INFO] [stderr] Checking bytes v1.11.0 [INFO] [stderr] Checking simd-adler32 v0.3.7 [INFO] [stderr] Checking regex-automata v0.4.13 [INFO] [stderr] Checking adler2 v2.0.1 [INFO] [stderr] Compiling crc32fast v1.5.0 [INFO] [stderr] Compiling typenum v1.19.0 [INFO] [stderr] Checking writeable v0.6.2 [INFO] [stderr] Checking litemap v0.8.1 [INFO] [stderr] Compiling rustversion v1.0.22 [INFO] [stderr] Checking indexmap v2.12.1 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Checking miniz_oxide v0.8.9 [INFO] [stderr] Compiling signal-hook v0.3.18 [INFO] [stderr] Compiling icu_properties_data v2.1.1 [INFO] [stderr] Compiling icu_normalizer_data v2.1.1 [INFO] [stderr] Compiling paste v1.0.15 [INFO] [stderr] Checking tracing-core v0.1.35 [INFO] [stderr] Checking arrayvec v0.7.6 [INFO] [stderr] Compiling openssl v0.10.75 [INFO] [stderr] Checking num-bigint v0.4.6 [INFO] [stderr] Compiling memchr v2.7.6 [INFO] [stderr] Compiling zerocopy v0.8.31 [INFO] [stderr] Checking http v1.4.0 [INFO] [stderr] Checking futures-task v0.3.31 [INFO] [stderr] Compiling thiserror v2.0.17 [INFO] [stderr] Compiling httparse v1.10.1 [INFO] [stderr] Checking futures-sink v0.3.31 [INFO] [stderr] Checking tracing v0.1.43 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking flate2 v1.1.5 [INFO] [stderr] Checking rayon v1.11.0 [INFO] [stderr] Checking as-slice v0.2.1 [INFO] [stderr] Checking weezl v0.1.12 [INFO] [stderr] Compiling av-scenechange v0.14.1 [INFO] [stderr] Compiling built v0.8.0 [INFO] [stderr] Compiling quick-xml v0.30.0 [INFO] [stderr] Compiling native-tls v0.2.14 [INFO] [stderr] Compiling rustix v0.38.44 [INFO] [stderr] Checking aligned v0.4.2 [INFO] [stderr] Checking fdeflate v0.3.7 [INFO] [stderr] Checking futures-channel v0.3.31 [INFO] [stderr] Compiling tree-sitter v0.20.10 [INFO] [stderr] Compiling openssl-sys v0.9.111 [INFO] [stderr] Checking http-body v1.0.1 [INFO] [stderr] Checking num-rational v0.4.2 [INFO] [stderr] Compiling libdbus-sys v0.2.6 [INFO] [stderr] Checking nom v8.0.0 [INFO] [stderr] Compiling syn v2.0.111 [INFO] [stderr] Checking generic-array v0.14.7 [INFO] [stderr] Checking core2 v0.4.0 [INFO] [stderr] Checking quick-error v2.0.1 [INFO] [stderr] Checking foldhash v0.1.5 [INFO] [stderr] Checking allocator-api2 v0.2.21 [INFO] [stderr] Checking y4m v0.8.0 [INFO] [stderr] Checking linux-raw-sys v0.4.15 [INFO] [stderr] Compiling pastey v0.1.1 [INFO] [stderr] Compiling instability v0.3.10 [INFO] [stderr] Checking openssl-probe v0.1.6 [INFO] [stderr] Compiling rav1e v0.8.1 [INFO] [stderr] Checking bitstream-io v4.9.0 [INFO] [stderr] Checking deranged v0.5.5 [INFO] [stderr] Compiling simd_helpers v0.1.0 [INFO] [stderr] Checking hashbrown v0.15.5 [INFO] [stderr] Compiling xcb v1.6.0 [INFO] [stderr] Checking castaway v0.2.4 [INFO] [stderr] Checking crypto-common v0.1.7 [INFO] [stderr] Checking mio v1.1.1 [INFO] [stderr] Checking socket2 v0.6.1 [INFO] [stderr] Checking signal-hook-registry v1.4.7 [INFO] [stderr] Checking mio v0.8.11 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking block-buffer v0.10.4 [INFO] [stderr] Checking form_urlencoded v1.2.2 [INFO] [stderr] Checking regex v1.12.2 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Checking signal-hook-mio v0.2.5 [INFO] [stderr] Checking itertools v0.13.0 [INFO] [stderr] Checking itertools v0.14.0 [INFO] [stderr] Checking sync_wrapper v1.0.2 [INFO] [stderr] Checking encoding_rs v0.8.35 [INFO] [stderr] Checking static_assertions v1.1.0 [INFO] [stderr] Checking zune-core v0.4.12 [INFO] [stderr] Checking minimal-lexical v0.2.1 [INFO] [stderr] Checking utf8_iter v1.0.4 [INFO] [stderr] Compiling serde_json v1.0.145 [INFO] [stderr] Checking new_debug_unreachable v1.0.6 [INFO] [stderr] Compiling indoc v2.0.7 [INFO] [stderr] Compiling noop_proc_macro v0.3.0 [INFO] [stderr] Checking ipnet v2.11.0 [INFO] [stderr] Checking imgref v1.12.0 [INFO] [stderr] Checking num-conv v0.1.0 [INFO] [stderr] Checking time-core v0.1.6 [INFO] [stderr] Checking unicode-segmentation v1.12.0 [INFO] [stderr] Checking unicode-width v0.1.14 [INFO] [stderr] Checking pom v1.1.0 [INFO] [stderr] Checking loop9 v0.1.5 [INFO] [stderr] Checking tinyvec v1.10.0 [INFO] [stderr] Checking crossterm v0.28.1 [INFO] [stderr] Checking nom v7.1.3 [INFO] [stderr] Checking zune-jpeg v0.4.21 [INFO] [stderr] Checking compact_str v0.8.1 [INFO] [stderr] Checking md-5 v0.10.6 [INFO] [stderr] Checking time v0.3.44 [INFO] [stderr] Checking lru v0.12.5 [INFO] [stderr] Checking http-body-util v0.1.3 [INFO] [stderr] Compiling tree-sitter-python v0.20.4 [INFO] [stderr] Checking maybe-rayon v0.1.1 [INFO] [stderr] Compiling tree-sitter-typescript v0.20.5 [INFO] [stderr] Compiling tree-sitter-rust v0.20.4 [INFO] [stderr] Compiling tree-sitter-javascript v0.20.4 [INFO] [stderr] Compiling tree-sitter-go v0.20.0 [INFO] [stderr] Compiling tree-sitter-java v0.20.2 [INFO] [stderr] Compiling tree-sitter-c v0.20.8 [INFO] [stderr] Compiling tree-sitter-cpp v0.20.5 [INFO] [stderr] Checking avif-serialize v0.8.6 [INFO] [stderr] Checking zune-inflate v0.2.54 [INFO] [stderr] Checking pxfm v0.1.27 [INFO] [stderr] Checking color_quant v1.1.0 [INFO] [stderr] Checking cassowary v0.3.0 [INFO] [stderr] Checking zune-core v0.5.0 [INFO] [stderr] Checking bit_field v0.10.3 [INFO] [stderr] Checking rgb v0.8.52 [INFO] [stderr] Checking iri-string v0.7.9 [INFO] [stderr] Checking zeroize v1.8.2 [INFO] [stderr] Checking bytemuck v1.24.0 [INFO] [stderr] Checking rangemap v1.7.0 [INFO] [stderr] Checking byteorder-lite v0.1.0 [INFO] [stderr] Checking lebe v0.5.3 [INFO] [stderr] Checking gif v0.14.1 [INFO] [stderr] Checking rustls-pki-types v1.13.1 [INFO] [stderr] Checking zune-jpeg v0.5.5 [INFO] [stderr] Checking qoi v0.4.1 [INFO] [stderr] Checking unicode-truncate v1.1.0 [INFO] [stderr] Checking unicode-normalization v0.1.25 [INFO] [stderr] Checking image-webp v0.2.4 [INFO] [stderr] Checking type1-encoding-parser v0.1.0 [INFO] [stderr] Checking adobe-cmap-parser v0.4.1 [INFO] [stderr] Checking lopdf v0.34.0 [INFO] [stderr] Checking crossterm v0.27.0 [INFO] [stderr] Checking png v0.17.16 [INFO] [stderr] Checking png v0.18.0 [INFO] [stderr] Checking euclid v0.20.14 [INFO] [stderr] Checking unicode-linebreak v0.1.5 [INFO] [stderr] Checking smawk v0.3.2 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling darling_core v0.20.11 [INFO] [stderr] Checking postscript v0.14.1 [INFO] [stderr] Checking textwrap v0.16.2 [INFO] [stderr] Compiling rustix v1.1.2 [INFO] [stderr] Checking getrandom v0.3.4 [INFO] [stderr] Checking pdf-extract v0.7.12 [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] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling tokio-macros v2.6.0 [INFO] [stderr] Compiling equator-macro v0.4.2 [INFO] [stderr] Compiling thiserror-impl v2.0.17 [INFO] [stderr] Compiling zerocopy-derive v0.8.31 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Compiling profiling-procmacros v1.0.17 [INFO] [stderr] Checking equator v0.4.2 [INFO] [stderr] Compiling arg_enum_proc_macro v0.3.4 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Checking tokio v1.48.0 [INFO] [stderr] Checking profiling v1.0.17 [INFO] [stderr] Compiling strum_macros v0.26.4 [INFO] [stderr] Checking aligned-vec v0.6.4 [INFO] [stderr] Compiling fax_derive v0.2.0 [INFO] [stderr] Checking v_frame v0.3.9 [INFO] [stderr] Checking av1-grain v0.2.5 [INFO] [stderr] Compiling num-derive v0.4.2 [INFO] [stderr] Checking dbus v0.9.9 [INFO] [stderr] Checking fax v0.2.6 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking yoke v0.8.1 [INFO] [stderr] Checking moxcms v0.7.10 [INFO] [stderr] Checking zerovec v0.11.5 [INFO] [stderr] Checking zerotrie v0.2.3 [INFO] [stderr] Checking display-info v0.4.8 [INFO] [stderr] Checking tempfile v3.23.0 [INFO] [stderr] Compiling darling_macro v0.20.11 [INFO] [stderr] Checking tinystr v0.8.2 [INFO] [stderr] Checking potential_utf v0.1.4 [INFO] [stderr] Compiling darling v0.20.11 [INFO] [stderr] Checking icu_locale_core v2.1.1 [INFO] [stderr] Checking icu_collections v2.1.1 [INFO] [stderr] Checking strum v0.26.3 [INFO] [stderr] Checking half v2.7.1 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking tiff v0.10.3 [INFO] [stderr] Checking exr v1.74.0 [INFO] [stderr] Checking screenshots v0.7.3 [INFO] [stderr] Checking ratatui v0.29.0 [INFO] [stderr] Checking icu_provider v2.1.1 [INFO] [stderr] Checking icu_normalizer v2.1.1 [INFO] [stderr] Checking icu_properties v2.1.1 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking tokio-util v0.7.17 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking tower v0.5.2 [INFO] [stderr] Checking tower-http v0.6.7 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking h2 v0.4.12 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking url v2.5.7 [INFO] [stderr] Checking tui-textarea v0.4.0 [INFO] [stderr] Checking hyper v1.8.1 [INFO] [stderr] Checking ravif v0.12.0 [INFO] [stderr] Checking image v0.25.9 [INFO] [stderr] Checking hyper-util v0.1.19 [INFO] [stderr] Checking hyper-tls v0.6.0 [INFO] [stderr] Checking reqwest v0.12.24 [INFO] [stderr] Checking pengy_agent v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/agent/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod agent; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/agent/agent.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod agent { [INFO] [stdout] 2 | | use crate::model::model::model::{Message, Model, Role}; [INFO] [stdout] 3 | | use crate::tool::tool::tool::ToolCall; [INFO] [stdout] 4 | | use serde_json; [INFO] [stdout] ... | [INFO] [stdout] 919 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/agent/agent.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | / let mut messages = Vec::new(); [INFO] [stdout] 56 | | messages.push(Message::new(Role::System, system_prompt.clone())); [INFO] [stdout] | |_____________________________________________________________________________^ help: consider using the `vec![]` macro: `let messages = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/agent/agent.rs:269:81 [INFO] [stdout] | [INFO] [stdout] 269 | ... let chars = value_part[1..] [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/agent/agent.rs:267:65 [INFO] [stdout] | [INFO] [stdout] 267 | ... if value_part.starts_with('"') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 267 ~ if let Some() = value_part.strip_prefix('"') { [INFO] [stdout] 268 | // Find the closing quote, handling escaped quotes [INFO] [stdout] 269 ~ let chars = [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/agent/agent.rs:312:81 [INFO] [stdout] | [INFO] [stdout] 312 | ... let chars = value_part[1..] [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/agent/agent.rs:310:65 [INFO] [stdout] | [INFO] [stdout] 310 | ... if value_part.starts_with('"') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 310 ~ if let Some() = value_part.strip_prefix('"') { [INFO] [stdout] 311 | // Find the closing quote, handling escaped quotes and nested JSON [INFO] [stdout] 312 ~ let chars = [INFO] [stdout] 313 | .char_indices(); [INFO] [stdout] ... [INFO] [stdout] 347 | if let Some(comma_idx) = [INFO] [stdout] 348 ~ [INFO] [stdout] 349 | .find(',') [INFO] [stdout] ... [INFO] [stdout] 357 | brace_idx, [INFO] [stdout] 358 ~ ) = [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/agent/agent.rs:525:73 [INFO] [stdout] | [INFO] [stdout] 525 | ... value_part[1..].find('"') [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/agent/agent.rs:523:65 [INFO] [stdout] | [INFO] [stdout] 523 | ... if value_part.starts_with('"') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 523 ~ if let Some() = value_part.strip_prefix('"') { [INFO] [stdout] 524 | if let Some(end_idx) = [INFO] [stdout] 525 ~ .find('"') [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/agent/code_researcher.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod code_researcher { [INFO] [stdout] 2 | | use crate::agent::agent::agent::Agent; [INFO] [stdout] 3 | | use crate::model::model::model::Model; [INFO] [stdout] 4 | | use crate::tool::bash::bash::BashTool; [INFO] [stdout] ... | [INFO] [stdout] 127 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/agent/coder.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod coder { [INFO] [stdout] 2 | | use crate::agent::agent::agent::Agent; [INFO] [stdout] 3 | | use crate::model::model::model::Model; [INFO] [stdout] 4 | | use crate::prompt::coder::coder_system_prompt; [INFO] [stdout] ... | [INFO] [stdout] 73 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/agent/coder_v2.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod coder_v2 { [INFO] [stdout] 2 | | use crate::agent::agent::agent::Agent; [INFO] [stdout] 3 | | use crate::model::model::model::Model; [INFO] [stdout] 4 | | use crate::prompt::coder::coder_v2_system_prompt; [INFO] [stdout] ... | [INFO] [stdout] 68 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/agent/control_agent.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod control_agent { [INFO] [stdout] 2 | | use crate::agent::agent::agent::Agent; [INFO] [stdout] 3 | | use crate::model::model::model::Model; [INFO] [stdout] 4 | | use crate::tool::bash::bash::BashTool; [INFO] [stdout] ... | [INFO] [stdout] 92 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/agent/issue_agent.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod issue_agent { [INFO] [stdout] 2 | | use crate::agent::agent::agent::Agent; [INFO] [stdout] 3 | | use crate::model::model::model::Model; [INFO] [stdout] 4 | | use crate::tool::bash::bash::BashTool; [INFO] [stdout] ... | [INFO] [stdout] 81 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/agent/pengy_agent.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod pengy_agent { [INFO] [stdout] 2 | | use crate::agent::agent::agent::AgentEvent; [INFO] [stdout] 3 | | use crate::agent::code_researcher::code_researcher::create_code_researcher_agent; [INFO] [stdout] 4 | | use crate::agent::coder::coder::create_coder_agent; [INFO] [stdout] ... | [INFO] [stdout] 141 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/agent/pengy_agent.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | / pub async fn run_pengy_agent( [INFO] [stdout] 27 | | model: Model, [INFO] [stdout] 28 | | api_key: String, [INFO] [stdout] 29 | | base_url: String, [INFO] [stdout] ... | [INFO] [stdout] 37 | | where [INFO] [stdout] 38 | | F: Fn(AgentEvent) + Send + Sync + 'static + Clone, [INFO] [stdout] | |__________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/agent/simple_agent.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod simple_agent { [INFO] [stdout] 2 | | use crate::agent::agent::agent::Agent; [INFO] [stdout] 3 | | use crate::model::model::model::Model; [INFO] [stdout] 4 | | use crate::tool::bash::bash::BashTool; [INFO] [stdout] ... | [INFO] [stdout] 50 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/agent/test_agent.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod test_agent { [INFO] [stdout] 2 | | use crate::agent::agent::agent::Agent; [INFO] [stdout] 3 | | use crate::model::model::model::Model; [INFO] [stdout] 4 | | use crate::tool::bash::bash::BashTool; [INFO] [stdout] ... | [INFO] [stdout] 129 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/agent/chat_agent.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod chat_agent { [INFO] [stdout] 2 | | use crate::{ [INFO] [stdout] 3 | | agent::agent::agent::Agent, [INFO] [stdout] 4 | | model::model::model::Model, [INFO] [stdout] ... | [INFO] [stdout] 40 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/model/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod model; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/model/model.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod model { [INFO] [stdout] 2 | | use std::error::Error; [INFO] [stdout] 3 | | [INFO] [stdout] 4 | | use serde::{Deserialize, Serialize}; [INFO] [stdout] ... | [INFO] [stdout] 1218 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/model/model.rs:313:29 [INFO] [stdout] | [INFO] [stdout] 313 | if let Some(ref tools_vec) = tools { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 313 - if let Some(ref tools_vec) = tools { [INFO] [stdout] 313 + if let Some(tools_vec) = tools { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/model/model.rs:557:25 [INFO] [stdout] | [INFO] [stdout] 557 | if let Some(ref tools_vec) = tools { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 557 - if let Some(ref tools_vec) = tools { [INFO] [stdout] 557 + if let Some(tools_vec) = tools { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/model/model.rs:685:13 [INFO] [stdout] | [INFO] [stdout] 685 | / if let Some(choice) = response_json.choices.first() { [INFO] [stdout] 686 | | if let Some(content) = &choice.message.content { [INFO] [stdout] 687 | | return Ok(content.clone()); [INFO] [stdout] 688 | | } [INFO] [stdout] 689 | | } [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] 685 ~ if let Some(choice) = response_json.choices.first() [INFO] [stdout] 686 ~ && let Some(content) = &choice.message.content { [INFO] [stdout] 687 | return Ok(content.clone()); [INFO] [stdout] 688 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/tool/find_replace.rs:159:17 [INFO] [stdout] | [INFO] [stdout] 159 | let mut tmp = NamedTempFile::new().unwrap(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/tool/find_replace.rs:181:17 [INFO] [stdout] | [INFO] [stdout] 181 | let mut tmp = NamedTempFile::new().unwrap(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/bash.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod bash { [INFO] [stdout] 2 | | //! Execute bash commands in a persistent shell session. [INFO] [stdout] 3 | | //! Tracks working directory and environment variables between calls so [INFO] [stdout] 4 | | //! agents can run incremental commands without losing context. [INFO] [stdout] ... | [INFO] [stdout] 214 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `BashTool` [INFO] [stdout] --> src/tool/bash.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | / pub fn new() -> Self { [INFO] [stdout] 29 | | let mut parameters = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 72 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 26 ~ impl Default for BashTool { [INFO] [stdout] 27 + fn default() -> Self { [INFO] [stdout] 28 + Self::new() [INFO] [stdout] 29 + } [INFO] [stdout] 30 + } [INFO] [stdout] 31 + [INFO] [stdout] 32 ~ impl BashTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/codebase_search.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod codebase_search { [INFO] [stdout] 2 | | //! Lightweight semantic-like search across the workspace. This scans text [INFO] [stdout] 3 | | //! files for a query substring (case-insensitive) and returns matching lines [INFO] [stdout] 4 | | //! with file paths and line numbers. It is intentionally simple to avoid [INFO] [stdout] ... | [INFO] [stdout] 198 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `CodebaseSearchTool` [INFO] [stdout] --> src/tool/codebase_search.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | / pub fn new() -> Self { [INFO] [stdout] 24 | | let mut parameters = HashMap::new(); [INFO] [stdout] 25 | | [INFO] [stdout] 26 | | let mut query_items = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 69 | | Self { tool } [INFO] [stdout] 70 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 21 ~ impl Default for CodebaseSearchTool { [INFO] [stdout] 22 + fn default() -> Self { [INFO] [stdout] 23 + Self::new() [INFO] [stdout] 24 + } [INFO] [stdout] 25 + } [INFO] [stdout] 26 + [INFO] [stdout] 27 ~ impl CodebaseSearchTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tool/codebase_search.rs:99:13 [INFO] [stdout] | [INFO] [stdout] 99 | / if let Ok(meta) = fs::metadata(path) { [INFO] [stdout] 100 | | if meta.len() > MAX_FILE_SIZE_BYTES || !meta.is_file() { [INFO] [stdout] 101 | | return Ok(()); [INFO] [stdout] 102 | | } [INFO] [stdout] 103 | | } [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] 99 ~ if let Ok(meta) = fs::metadata(path) [INFO] [stdout] 100 ~ && (meta.len() > MAX_FILE_SIZE_BYTES || !meta.is_file()) { [INFO] [stdout] 101 | return Ok(()); [INFO] [stdout] 102 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/delete_file.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod delete_file { [INFO] [stdout] 2 | | //! Delete a file (or directory) within the current workspace, with safety [INFO] [stdout] 3 | | //! checks to avoid accidentally removing paths outside the project. [INFO] [stdout] 4 | | use crate::tool::tool::tool::{Parameter, Tool, ToolCall}; [INFO] [stdout] ... | [INFO] [stdout] 106 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `DeleteFileTool` [INFO] [stdout] --> src/tool/delete_file.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | / pub fn new() -> Self { [INFO] [stdout] 20 | | let mut parameters = HashMap::new(); [INFO] [stdout] 21 | | [INFO] [stdout] 22 | | let mut path_items = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 49 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 18 ~ impl Default for DeleteFileTool { [INFO] [stdout] 19 + fn default() -> Self { [INFO] [stdout] 20 + Self::new() [INFO] [stdout] 21 + } [INFO] [stdout] 22 + } [INFO] [stdout] 23 + [INFO] [stdout] 24 ~ impl DeleteFileTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/diff_history.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod diff_history { [INFO] [stdout] 2 | | //! Show recent changes using `git diff --stat`. This is a lightweight view [INFO] [stdout] 3 | | //! of uncommitted work. [INFO] [stdout] 4 | | use crate::tool::tool::tool::{Tool, ToolCall}; [INFO] [stdout] ... | [INFO] [stdout] 57 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `DiffHistoryTool` [INFO] [stdout] --> src/tool/diff_history.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | / pub fn new() -> Self { [INFO] [stdout] 17 | | let parameters = HashMap::new(); [INFO] [stdout] 18 | | let tool = Tool { [INFO] [stdout] 19 | | name: "diff_history".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 24 | | Self { tool } [INFO] [stdout] 25 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 15 ~ impl Default for DiffHistoryTool { [INFO] [stdout] 16 + fn default() -> Self { [INFO] [stdout] 17 + Self::new() [INFO] [stdout] 18 + } [INFO] [stdout] 19 + } [INFO] [stdout] 20 + [INFO] [stdout] 21 ~ impl DiffHistoryTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/docs_reader.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod docs_reader { [INFO] [stdout] 2 | | //! Read PDF documents and return text snippets with optional line/word [INFO] [stdout] 3 | | //! limits. Uses multiple backends (pandoc, pdf_extract, pdftotext) to [INFO] [stdout] 4 | | //! maximize extraction success and adds truncation metadata for the caller. [INFO] [stdout] ... | [INFO] [stdout] 232 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `DocsReaderTool` [INFO] [stdout] --> src/tool/docs_reader.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | / pub fn new() -> Self { [INFO] [stdout] 23 | | let mut parameters = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 64 | | Self { tool } [INFO] [stdout] 65 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 19 ~ impl Default for DocsReaderTool { [INFO] [stdout] 20 + fn default() -> Self { [INFO] [stdout] 21 + Self::new() [INFO] [stdout] 22 + } [INFO] [stdout] 23 + } [INFO] [stdout] 24 + [INFO] [stdout] 25 ~ impl DocsReaderTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/tool/docs_reader.rs:69:50 [INFO] [stdout] | [INFO] [stdout] 69 | fn convert_pdf_to_text(&self, file_path: &PathBuf) -> Result> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 69 ~ fn convert_pdf_to_text(&self, file_path: &Path) -> Result> { [INFO] [stdout] 70 | // First, try to use pandoc if available (converts PDF to markdown, then we can use as text) [INFO] [stdout] ... [INFO] [stdout] 85 | // Fallback: try pdf-extract library [INFO] [stdout] 86 ~ match pdf_extract::extract_text(file_path) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tool/docs_reader.rs:71:13 [INFO] [stdout] | [INFO] [stdout] 71 | / if let Ok(output) = Command::new("pandoc") [INFO] [stdout] 72 | | .arg(file_path.as_os_str()) [INFO] [stdout] 73 | | .arg("-t") [INFO] [stdout] 74 | | .arg("markdown") [INFO] [stdout] ... | [INFO] [stdout] 83 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 75 ~ .output() [INFO] [stdout] 76 ~ && output.status.success() { [INFO] [stdout] 77 | let text = String::from_utf8_lossy(&output.stdout).to_string(); [INFO] [stdout] ... [INFO] [stdout] 80 | } [INFO] [stdout] 81 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tool/docs_reader.rs:94:21 [INFO] [stdout] | [INFO] [stdout] 94 | / if let Ok(output) = Command::new("pdftotext") [INFO] [stdout] 95 | | .arg(file_path.as_os_str()) [INFO] [stdout] 96 | | .arg("-") [INFO] [stdout] 97 | | .output() [INFO] [stdout] ... | [INFO] [stdout] 105 | | } [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] 97 ~ .output() [INFO] [stdout] 98 ~ && output.status.success() { [INFO] [stdout] 99 | let text = String::from_utf8_lossy(&output.stdout).to_string(); [INFO] [stdout] ... [INFO] [stdout] 102 | } [INFO] [stdout] 103 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/tool/docs_reader.rs:122:17 [INFO] [stdout] | [INFO] [stdout] 122 | "lines" | _ => { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] = note: `#[warn(clippy::wildcard_in_or_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/docs_researcher.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod docs_researcher { [INFO] [stdout] 2 | | //! Lightweight research notebook that stores findings as Markdown under [INFO] [stdout] 3 | | //! `pengy_docs/`. Supports creating documents, reading them back, and [INFO] [stdout] 4 | | //! searching with contextual snippets to reuse prior work. [INFO] [stdout] ... | [INFO] [stdout] 256 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `DocsResearcherTool` [INFO] [stdout] --> src/tool/docs_researcher.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | / pub fn new() -> Self { [INFO] [stdout] 22 | | let mut parameters = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 80 | | Self { tool, docs_dir } [INFO] [stdout] 81 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 19 ~ impl Default for DocsResearcherTool { [INFO] [stdout] 20 + fn default() -> Self { [INFO] [stdout] 21 + Self::new() [INFO] [stdout] 22 + } [INFO] [stdout] 23 + } [INFO] [stdout] 24 + [INFO] [stdout] 25 ~ impl DocsResearcherTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `lines` [INFO] [stdout] --> src/tool/docs_researcher.rs:168:30 [INFO] [stdout] | [INFO] [stdout] 168 | for i in start_line..end_line { [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] 168 - for i in start_line..end_line { [INFO] [stdout] 168 + for (i, ) in lines.iter().enumerate().take(end_line).skip(start_line) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/edit.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod edit { [INFO] [stdout] 2 | | //! Perform targeted string replacements within files using a series of [INFO] [stdout] 3 | | //! fallback matching strategies to handle whitespace, casing, and line [INFO] [stdout] 4 | | //! ending differences. [INFO] [stdout] ... | [INFO] [stdout] 511 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `EditTool` [INFO] [stdout] --> src/tool/edit.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | / pub fn new() -> Self { [INFO] [stdout] 22 | | let mut parameters = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 80 | | Self { tool } [INFO] [stdout] 81 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 19 ~ impl Default for EditTool { [INFO] [stdout] 20 + fn default() -> Self { [INFO] [stdout] 21 + Self::new() [INFO] [stdout] 22 + } [INFO] [stdout] 23 + } [INFO] [stdout] 24 + [INFO] [stdout] 25 ~ impl EditTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `line_count` is used as a loop counter [INFO] [stdout] --> src/tool/edit.rs:294:21 [INFO] [stdout] | [INFO] [stdout] 294 | for (pos, _) in content.match_indices('\n') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (line_count, (pos, _)) in content.match_indices('\n').enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `line_count` is used as a loop counter [INFO] [stdout] --> src/tool/edit.rs:346:21 [INFO] [stdout] | [INFO] [stdout] 346 | for (pos, _) in content.match_indices('\n') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (line_count, (pos, _)) in content.match_indices('\n').enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/edit_file.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod edit_file { [INFO] [stdout] 2 | | //! Compatibility wrapper that exposes the existing `edit` tool under the [INFO] [stdout] 3 | | //! `edit_file` name. [INFO] [stdout] 4 | | use crate::tool::edit::edit::EditTool; [INFO] [stdout] ... | [INFO] [stdout] 46 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `EditFileTool` [INFO] [stdout] --> src/tool/edit_file.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | / pub fn new() -> Self { [INFO] [stdout] 16 | | Self { [INFO] [stdout] 17 | | inner: EditTool::new(), [INFO] [stdout] 18 | | } [INFO] [stdout] 19 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 14 ~ impl Default for EditFileTool { [INFO] [stdout] 15 + fn default() -> Self { [INFO] [stdout] 16 + Self::new() [INFO] [stdout] 17 + } [INFO] [stdout] 18 + } [INFO] [stdout] 19 + [INFO] [stdout] 20 ~ impl EditFileTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tool/edit_file.rs:25:13 [INFO] [stdout] | [INFO] [stdout] 25 | / if let Some(obj) = json.as_object_mut() { [INFO] [stdout] 26 | | if let Some(function_obj) = obj.get_mut("function") { [INFO] [stdout] 27 | | if let Some(f) = function_obj.as_object_mut() { [INFO] [stdout] 28 | | f.insert( [INFO] [stdout] ... | [INFO] [stdout] 34 | | } [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] 25 ~ if let Some(obj) = json.as_object_mut() [INFO] [stdout] 26 ~ && let Some(function_obj) = obj.get_mut("function") { [INFO] [stdout] 27 | if let Some(f) = function_obj.as_object_mut() { [INFO] [stdout] ... [INFO] [stdout] 32 | } [INFO] [stdout] 33 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tool/edit_file.rs:26:17 [INFO] [stdout] | [INFO] [stdout] 26 | / if let Some(function_obj) = obj.get_mut("function") { [INFO] [stdout] 27 | | if let Some(f) = function_obj.as_object_mut() { [INFO] [stdout] 28 | | f.insert( [INFO] [stdout] 29 | | "name".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 33 | | } [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] 26 ~ if let Some(function_obj) = obj.get_mut("function") [INFO] [stdout] 27 ~ && let Some(f) = function_obj.as_object_mut() { [INFO] [stdout] 28 | f.insert( [INFO] [stdout] ... [INFO] [stdout] 31 | ); [INFO] [stdout] 32 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/end.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod end { [INFO] [stdout] 2 | | //! Tool that signals the agent loop to finish early and return control to [INFO] [stdout] 3 | | //! the caller with an optional user-facing reason. [INFO] [stdout] ... | [INFO] [stdout] 76 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `EndTool` [INFO] [stdout] --> src/tool/end.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | / pub fn new() -> Self { [INFO] [stdout] 20 | | let mut parameters = HashMap::new(); [INFO] [stdout] 21 | | [INFO] [stdout] 22 | | let mut reason_items = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 42 | | Self { tool } [INFO] [stdout] 43 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 16 ~ impl Default for EndTool { [INFO] [stdout] 17 + fn default() -> Self { [INFO] [stdout] 18 + Self::new() [INFO] [stdout] 19 + } [INFO] [stdout] 20 + } [INFO] [stdout] 21 + [INFO] [stdout] 22 ~ impl EndTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/file_manager.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod file_manager { [INFO] [stdout] 2 | | //! Create files or directories within the current workspace while enforcing [INFO] [stdout] 3 | | //! path safety and optional partial replacements. [INFO] [stdout] ... | [INFO] [stdout] 480 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `FileManagerTool` [INFO] [stdout] --> src/tool/file_manager.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | / pub fn new() -> Self { [INFO] [stdout] 24 | | let mut parameters = HashMap::new(); [INFO] [stdout] 25 | | [INFO] [stdout] 26 | | let mut path_items = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 135 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 20 ~ impl Default for FileManagerTool { [INFO] [stdout] 21 + fn default() -> Self { [INFO] [stdout] 22 + Self::new() [INFO] [stdout] 23 + } [INFO] [stdout] 24 + } [INFO] [stdout] 25 + [INFO] [stdout] 26 ~ impl FileManagerTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> src/tool/file_manager.rs:199:16 [INFO] [stdout] | [INFO] [stdout] 199 | Ok(normalized.canonicalize().unwrap_or_else(|_| normalized)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 199 - Ok(normalized.canonicalize().unwrap_or_else(|_| normalized)) [INFO] [stdout] 199 + Ok(normalized.canonicalize().unwrap_or(normalized)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/file_search.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod file_search { [INFO] [stdout] 2 | | //! Fuzzy-ish search for files by name substring across the workspace. [INFO] [stdout] 3 | | use crate::tool::tool::tool::{Parameter, Tool, ToolCall}; [INFO] [stdout] 4 | | use serde_json; [INFO] [stdout] ... | [INFO] [stdout] 159 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `FileSearchTool` [INFO] [stdout] --> src/tool/file_search.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | / pub fn new() -> Self { [INFO] [stdout] 20 | | let mut parameters = HashMap::new(); [INFO] [stdout] 21 | | [INFO] [stdout] 22 | | let mut query_items = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 66 | | Self { tool } [INFO] [stdout] 67 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 18 ~ impl Default for FileSearchTool { [INFO] [stdout] 19 + fn default() -> Self { [INFO] [stdout] 20 + Self::new() [INFO] [stdout] 21 + } [INFO] [stdout] 22 + } [INFO] [stdout] 23 + [INFO] [stdout] 24 ~ impl FileSearchTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tool/file_search.rs:107:28 [INFO] [stdout] | [INFO] [stdout] 107 | } else if meta.is_file() { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 108 | | if let Some(path_str) = path.to_str() { [INFO] [stdout] 109 | | if path_str.to_lowercase().contains(query_lower) { [INFO] [stdout] 110 | | results.push(path_str.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 113 | | } [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] 107 ~ } else if meta.is_file() [INFO] [stdout] 108 ~ && let Some(path_str) = path.to_str() { [INFO] [stdout] 109 | if path_str.to_lowercase().contains(query_lower) { [INFO] [stdout] 110 | results.push(path_str.to_string()); [INFO] [stdout] 111 | } [INFO] [stdout] 112 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tool/file_search.rs:108:25 [INFO] [stdout] | [INFO] [stdout] 108 | / if let Some(path_str) = path.to_str() { [INFO] [stdout] 109 | | if path_str.to_lowercase().contains(query_lower) { [INFO] [stdout] 110 | | results.push(path_str.to_string()); [INFO] [stdout] 111 | | } [INFO] [stdout] 112 | | } [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] 108 ~ if let Some(path_str) = path.to_str() [INFO] [stdout] 109 ~ && path_str.to_lowercase().contains(query_lower) { [INFO] [stdout] 110 | results.push(path_str.to_string()); [INFO] [stdout] 111 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/agent/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod agent; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/find_replace.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod find_replace { [INFO] [stdout] 2 | | //! Simple find-and-replace tool that performs exact string substitutions [INFO] [stdout] 3 | | //! across an entire file. [INFO] [stdout] 4 | | //! [INFO] [stdout] ... | [INFO] [stdout] 198 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `FindReplaceTool` [INFO] [stdout] --> src/tool/find_replace.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | / pub fn new() -> Self { [INFO] [stdout] 23 | | let mut parameters = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 74 | | Self { tool } [INFO] [stdout] 75 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 20 ~ impl Default for FindReplaceTool { [INFO] [stdout] 21 + fn default() -> Self { [INFO] [stdout] 22 + Self::new() [INFO] [stdout] 23 + } [INFO] [stdout] 24 + } [INFO] [stdout] 25 + [INFO] [stdout] 26 ~ impl FindReplaceTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/agent/agent.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod agent { [INFO] [stdout] 2 | | use crate::model::model::model::{Message, Model, Role}; [INFO] [stdout] 3 | | use crate::tool::tool::tool::ToolCall; [INFO] [stdout] 4 | | use serde_json; [INFO] [stdout] ... | [INFO] [stdout] 919 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/github_tool.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod github_tool { [INFO] [stdout] 2 | | //! Wrapper around `gh` CLI operations for viewing and creating issues or [INFO] [stdout] 3 | | //! pull requests, with a unified tool schema for agent consumption. [INFO] [stdout] ... | [INFO] [stdout] 273 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `GithubTool` [INFO] [stdout] --> src/tool/github_tool.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | / pub fn new() -> Self { [INFO] [stdout] 20 | | let mut parameters = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 153 | | Self { tool } [INFO] [stdout] 154 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 17 ~ impl Default for GithubTool { [INFO] [stdout] 18 + fn default() -> Self { [INFO] [stdout] 19 + Self::new() [INFO] [stdout] 20 + } [INFO] [stdout] 21 + } [INFO] [stdout] 22 + [INFO] [stdout] 23 ~ impl GithubTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/agent/agent.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | / let mut messages = Vec::new(); [INFO] [stdout] 56 | | messages.push(Message::new(Role::System, system_prompt.clone())); [INFO] [stdout] | |_____________________________________________________________________________^ help: consider using the `vec![]` macro: `let messages = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/grep.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod grep { [INFO] [stdout] 2 | | //! Search file contents via ripgrep with a grep fallback, returning matched [INFO] [stdout] 3 | | //! lines with file paths and numbers for quick navigation. [INFO] [stdout] ... | [INFO] [stdout] 268 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/agent/agent.rs:269:81 [INFO] [stdout] | [INFO] [stdout] 269 | ... let chars = value_part[1..] [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/agent/agent.rs:267:65 [INFO] [stdout] | [INFO] [stdout] 267 | ... if value_part.starts_with('"') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 267 ~ if let Some() = value_part.strip_prefix('"') { [INFO] [stdout] 268 | // Find the closing quote, handling escaped quotes [INFO] [stdout] 269 ~ let chars = [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `GrepTool` [INFO] [stdout] --> src/tool/grep.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | / pub fn new() -> Self { [INFO] [stdout] 19 | | let mut parameters = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 59 | | Self { tool } [INFO] [stdout] 60 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 16 ~ impl Default for GrepTool { [INFO] [stdout] 17 + fn default() -> Self { [INFO] [stdout] 18 + Self::new() [INFO] [stdout] 19 + } [INFO] [stdout] 20 + } [INFO] [stdout] 21 + [INFO] [stdout] 22 ~ impl GrepTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/agent/agent.rs:312:81 [INFO] [stdout] | [INFO] [stdout] 312 | ... let chars = value_part[1..] [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/agent/agent.rs:310:65 [INFO] [stdout] | [INFO] [stdout] 310 | ... if value_part.starts_with('"') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 310 ~ if let Some() = value_part.strip_prefix('"') { [INFO] [stdout] 311 | // Find the closing quote, handling escaped quotes and nested JSON [INFO] [stdout] 312 ~ let chars = [INFO] [stdout] 313 | .char_indices(); [INFO] [stdout] ... [INFO] [stdout] 347 | if let Some(comma_idx) = [INFO] [stdout] 348 ~ [INFO] [stdout] 349 | .find(',') [INFO] [stdout] ... [INFO] [stdout] 357 | brace_idx, [INFO] [stdout] 358 ~ ) = [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/tool/grep.rs:126:29 [INFO] [stdout] | [INFO] [stdout] 126 | ... result_str.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result_str.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/tool/grep.rs:168:31 [INFO] [stdout] | [INFO] [stdout] 168 | let ext = &include_pattern[1..]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/tool/grep.rs:167:17 [INFO] [stdout] | [INFO] [stdout] 167 | if include_pattern.starts_with(".") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 167 ~ if let Some(ext) = include_pattern.strip_prefix(".") { [INFO] [stdout] 168 ~ if ext.contains("{") && ext.contains("}") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/tool/grep.rs:213:21 [INFO] [stdout] | [INFO] [stdout] 213 | result_str.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result_str.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/agent/agent.rs:525:73 [INFO] [stdout] | [INFO] [stdout] 525 | ... value_part[1..].find('"') [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/agent/agent.rs:523:65 [INFO] [stdout] | [INFO] [stdout] 523 | ... if value_part.starts_with('"') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 523 ~ if let Some() = value_part.strip_prefix('"') { [INFO] [stdout] 524 | if let Some(end_idx) = [INFO] [stdout] 525 ~ .find('"') [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/grep_search.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod grep_search { [INFO] [stdout] 2 | | //! Thin wrapper that exposes the existing grep tool under the [INFO] [stdout] 3 | | //! `grep_search` name for compatibility with external tool callers. [INFO] [stdout] 4 | | use crate::tool::grep::grep::GrepTool; [INFO] [stdout] ... | [INFO] [stdout] 46 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `GrepSearchTool` [INFO] [stdout] --> src/tool/grep_search.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | / pub fn new() -> Self { [INFO] [stdout] 16 | | let inner = GrepTool::new(); [INFO] [stdout] 17 | | Self { inner } [INFO] [stdout] 18 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 14 ~ impl Default for GrepSearchTool { [INFO] [stdout] 15 + fn default() -> Self { [INFO] [stdout] 16 + Self::new() [INFO] [stdout] 17 + } [INFO] [stdout] 18 + } [INFO] [stdout] 19 + [INFO] [stdout] 20 ~ impl GrepSearchTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tool/grep_search.rs:25:13 [INFO] [stdout] | [INFO] [stdout] 25 | / if let Some(obj) = json.as_object_mut() { [INFO] [stdout] 26 | | if let Some(function_obj) = obj.get_mut("function") { [INFO] [stdout] 27 | | if let Some(f) = function_obj.as_object_mut() { [INFO] [stdout] 28 | | f.insert( [INFO] [stdout] ... | [INFO] [stdout] 34 | | } [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] 25 ~ if let Some(obj) = json.as_object_mut() [INFO] [stdout] 26 ~ && let Some(function_obj) = obj.get_mut("function") { [INFO] [stdout] 27 | if let Some(f) = function_obj.as_object_mut() { [INFO] [stdout] ... [INFO] [stdout] 32 | } [INFO] [stdout] 33 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tool/grep_search.rs:26:17 [INFO] [stdout] | [INFO] [stdout] 26 | / if let Some(function_obj) = obj.get_mut("function") { [INFO] [stdout] 27 | | if let Some(f) = function_obj.as_object_mut() { [INFO] [stdout] 28 | | f.insert( [INFO] [stdout] 29 | | "name".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 33 | | } [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] 26 ~ if let Some(function_obj) = obj.get_mut("function") [INFO] [stdout] 27 ~ && let Some(f) = function_obj.as_object_mut() { [INFO] [stdout] 28 | f.insert( [INFO] [stdout] ... [INFO] [stdout] 31 | ); [INFO] [stdout] 32 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/list_dir.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod list_dir { [INFO] [stdout] 2 | | //! List directory contents with optional hidden filtering and entry limits. [INFO] [stdout] 3 | | use crate::tool::tool::tool::{Parameter, Tool, ToolCall}; [INFO] [stdout] 4 | | use serde_json; [INFO] [stdout] ... | [INFO] [stdout] 126 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ListDirTool` [INFO] [stdout] --> src/tool/list_dir.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | / pub fn new() -> Self { [INFO] [stdout] 19 | | let mut parameters = HashMap::new(); [INFO] [stdout] 20 | | [INFO] [stdout] 21 | | let mut path_items = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 62 | | Self { tool } [INFO] [stdout] 63 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 17 ~ impl Default for ListDirTool { [INFO] [stdout] 18 + fn default() -> Self { [INFO] [stdout] 19 + Self::new() [INFO] [stdout] 20 + } [INFO] [stdout] 21 + } [INFO] [stdout] 22 + [INFO] [stdout] 23 ~ impl ListDirTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/multi_tool_use.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod multi_tool_use { [INFO] [stdout] 2 | | //! Compatibility wrapper for a hypothetical parallel executor. This runtime [INFO] [stdout] 3 | | //! executes tools sequentially, so the tool returns a message describing the [INFO] [stdout] 4 | | //! limitation. [INFO] [stdout] ... | [INFO] [stdout] 55 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ParallelTool` [INFO] [stdout] --> src/tool/multi_tool_use.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | / pub fn new() -> Self { [INFO] [stdout] 16 | | let mut parameters = HashMap::new(); [INFO] [stdout] 17 | | // Accept an arbitrary payload to stay compatible, but ignore it. [INFO] [stdout] 18 | | let mut tool_uses_items = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 38 | | Self { tool } [INFO] [stdout] 39 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 14 ~ impl Default for ParallelTool { [INFO] [stdout] 15 + fn default() -> Self { [INFO] [stdout] 16 + Self::new() [INFO] [stdout] 17 + } [INFO] [stdout] 18 + } [INFO] [stdout] 19 + [INFO] [stdout] 20 ~ impl ParallelTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/read_file.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod read_file { [INFO] [stdout] 2 | | //! Read file contents with optional line slicing. This is intended for quick [INFO] [stdout] 3 | | //! inspection of files without modifying them. [INFO] [stdout] 4 | | use crate::tool::tool::tool::{Parameter, Tool, ToolCall}; [INFO] [stdout] ... | [INFO] [stdout] 153 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ReadFileTool` [INFO] [stdout] --> src/tool/read_file.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | / pub fn new() -> Self { [INFO] [stdout] 21 | | let mut parameters = HashMap::new(); [INFO] [stdout] 22 | | [INFO] [stdout] 23 | | let mut target_items = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 75 | | Self { tool } [INFO] [stdout] 76 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 18 ~ impl Default for ReadFileTool { [INFO] [stdout] 19 + fn default() -> Self { [INFO] [stdout] 20 + Self::new() [INFO] [stdout] 21 + } [INFO] [stdout] 22 + } [INFO] [stdout] 23 + [INFO] [stdout] 24 ~ impl ReadFileTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/agent/code_researcher.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod code_researcher { [INFO] [stdout] 2 | | use crate::agent::agent::agent::Agent; [INFO] [stdout] 3 | | use crate::model::model::model::Model; [INFO] [stdout] 4 | | use crate::tool::bash::bash::BashTool; [INFO] [stdout] ... | [INFO] [stdout] 127 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/reapply.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod reapply { [INFO] [stdout] 2 | | //! Placeholder tool for compatibility. The system does not track prior edits, [INFO] [stdout] 3 | | //! so this tool returns an informative message instead of performing an [INFO] [stdout] 4 | | //! action. [INFO] [stdout] ... | [INFO] [stdout] 42 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/agent/coder.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod coder { [INFO] [stdout] 2 | | use crate::agent::agent::agent::Agent; [INFO] [stdout] 3 | | use crate::model::model::model::Model; [INFO] [stdout] 4 | | use crate::prompt::coder::coder_system_prompt; [INFO] [stdout] ... | [INFO] [stdout] 73 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ReapplyTool` [INFO] [stdout] --> src/tool/reapply.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | / pub fn new() -> Self { [INFO] [stdout] 16 | | let parameters = HashMap::new(); [INFO] [stdout] 17 | | let tool = Tool { [INFO] [stdout] 18 | | name: "reapply".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 25 | | Self { tool } [INFO] [stdout] 26 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 14 ~ impl Default for ReapplyTool { [INFO] [stdout] 15 + fn default() -> Self { [INFO] [stdout] 16 + Self::new() [INFO] [stdout] 17 + } [INFO] [stdout] 18 + } [INFO] [stdout] 19 + [INFO] [stdout] 20 ~ impl ReapplyTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/run_terminal_cmd.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod run_terminal_cmd { [INFO] [stdout] 2 | | //! Execute a shell command. This is a minimal wrapper over `bash -c` and is [INFO] [stdout] 3 | | //! intended for short, non-interactive commands. For persistent state, use [INFO] [stdout] 4 | | //! the `bash` tool. [INFO] [stdout] ... | [INFO] [stdout] 125 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `RunTerminalCmdTool` [INFO] [stdout] --> src/tool/run_terminal_cmd.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | / pub fn new() -> Self { [INFO] [stdout] 18 | | let mut parameters = HashMap::new(); [INFO] [stdout] 19 | | [INFO] [stdout] 20 | | let mut cmd_items = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 61 | | Self { tool } [INFO] [stdout] 62 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 16 ~ impl Default for RunTerminalCmdTool { [INFO] [stdout] 17 + fn default() -> Self { [INFO] [stdout] 18 + Self::new() [INFO] [stdout] 19 + } [INFO] [stdout] 20 + } [INFO] [stdout] 21 + [INFO] [stdout] 22 ~ impl RunTerminalCmdTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/agent/coder_v2.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod coder_v2 { [INFO] [stdout] 2 | | use crate::agent::agent::agent::Agent; [INFO] [stdout] 3 | | use crate::model::model::model::Model; [INFO] [stdout] 4 | | use crate::prompt::coder::coder_v2_system_prompt; [INFO] [stdout] ... | [INFO] [stdout] 68 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/agent/control_agent.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod control_agent { [INFO] [stdout] 2 | | use crate::agent::agent::agent::Agent; [INFO] [stdout] 3 | | use crate::model::model::model::Model; [INFO] [stdout] 4 | | use crate::tool::bash::bash::BashTool; [INFO] [stdout] ... | [INFO] [stdout] 92 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/agent/issue_agent.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod issue_agent { [INFO] [stdout] 2 | | use crate::agent::agent::agent::Agent; [INFO] [stdout] 3 | | use crate::model::model::model::Model; [INFO] [stdout] 4 | | use crate::tool::bash::bash::BashTool; [INFO] [stdout] ... | [INFO] [stdout] 81 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/summarizer.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod summarizer { [INFO] [stdout] 2 | | //! Emits a marker indicating the conversation should be summarized to keep [INFO] [stdout] 3 | | //! context length manageable. [INFO] [stdout] ... | [INFO] [stdout] 49 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SummarizerTool` [INFO] [stdout] --> src/tool/summarizer.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | / ... pub fn new() -> Self { [INFO] [stdout] 18 | | ... let tool = Tool { [INFO] [stdout] 19 | | ... name: "summarizer".to_string(), [INFO] [stdout] 20 | | ... description: "Summarize the previous conversation to avoid context explosion. This tool takes no parameters and shou... [INFO] [stdout] ... | [INFO] [stdout] 25 | | ... Self { tool } [INFO] [stdout] 26 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 15 ~ impl Default for SummarizerTool { [INFO] [stdout] 16 + fn default() -> Self { [INFO] [stdout] 17 + Self::new() [INFO] [stdout] 18 + } [INFO] [stdout] 19 + } [INFO] [stdout] 20 + [INFO] [stdout] 21 ~ impl SummarizerTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/agent/pengy_agent.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod pengy_agent { [INFO] [stdout] 2 | | use crate::agent::agent::agent::AgentEvent; [INFO] [stdout] 3 | | use crate::agent::code_researcher::code_researcher::create_code_researcher_agent; [INFO] [stdout] 4 | | use crate::agent::coder::coder::create_coder_agent; [INFO] [stdout] ... | [INFO] [stdout] 141 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/think.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod think { [INFO] [stdout] 2 | | //! Internal thinking tool that logs a free-form thought without performing [INFO] [stdout] 3 | | //! any external actions or mutations. Helpful for complex reasoning or [INFO] [stdout] 4 | | //! capturing intermediate ideas. [INFO] [stdout] ... | [INFO] [stdout] 75 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/agent/pengy_agent.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | / pub async fn run_pengy_agent( [INFO] [stdout] 27 | | model: Model, [INFO] [stdout] 28 | | api_key: String, [INFO] [stdout] 29 | | base_url: String, [INFO] [stdout] ... | [INFO] [stdout] 37 | | where [INFO] [stdout] 38 | | F: Fn(AgentEvent) + Send + Sync + 'static + Clone, [INFO] [stdout] | |__________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ThinkTool` [INFO] [stdout] --> src/tool/think.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | / pub fn new() -> Self { [INFO] [stdout] 20 | | let mut parameters = HashMap::new(); [INFO] [stdout] 21 | | [INFO] [stdout] 22 | | let mut thought_items = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 42 | | Self { tool } [INFO] [stdout] 43 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 16 ~ impl Default for ThinkTool { [INFO] [stdout] 17 + fn default() -> Self { [INFO] [stdout] 18 + Self::new() [INFO] [stdout] 19 + } [INFO] [stdout] 20 + } [INFO] [stdout] 21 + [INFO] [stdout] 22 ~ impl ThinkTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/todo.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod todo { [INFO] [stdout] 2 | | //! Maintain a lightweight todo list persisted to `.pengy_todo.json`, with [INFO] [stdout] 3 | | //! support for reading, ticking, inserting, deleting, and batch updates. [INFO] [stdout] ... | [INFO] [stdout] 390 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/agent/simple_agent.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod simple_agent { [INFO] [stdout] 2 | | use crate::agent::agent::agent::Agent; [INFO] [stdout] 3 | | use crate::model::model::model::Model; [INFO] [stdout] 4 | | use crate::tool::bash::bash::BashTool; [INFO] [stdout] ... | [INFO] [stdout] 50 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/agent/test_agent.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod test_agent { [INFO] [stdout] 2 | | use crate::agent::agent::agent::Agent; [INFO] [stdout] 3 | | use crate::model::model::model::Model; [INFO] [stdout] 4 | | use crate::tool::bash::bash::BashTool; [INFO] [stdout] ... | [INFO] [stdout] 129 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/agent/chat_agent.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod chat_agent { [INFO] [stdout] 2 | | use crate::{ [INFO] [stdout] 3 | | agent::agent::agent::Agent, [INFO] [stdout] 4 | | model::model::model::Model, [INFO] [stdout] ... | [INFO] [stdout] 40 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TodoTool` [INFO] [stdout] --> src/tool/todo.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | / pub fn new() -> Self { [INFO] [stdout] 33 | | let mut parameters = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 119 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 30 ~ impl Default for TodoTool { [INFO] [stdout] 31 + fn default() -> Self { [INFO] [stdout] 32 + Self::new() [INFO] [stdout] 33 + } [INFO] [stdout] 34 + } [INFO] [stdout] 35 + [INFO] [stdout] 36 ~ impl TodoTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/model/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod model; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/model/model.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod model { [INFO] [stdout] 2 | | use std::error::Error; [INFO] [stdout] 3 | | [INFO] [stdout] 4 | | use serde::{Deserialize, Serialize}; [INFO] [stdout] ... | [INFO] [stdout] 1218 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/mod.rs:29:1 [INFO] [stdout] | [INFO] [stdout] 29 | pub mod tool; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/tool.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod tool { [INFO] [stdout] 2 | | //! Core tool abstractions and schema serialization helpers shared by all [INFO] [stdout] 3 | | //! tool implementations. [INFO] [stdout] ... | [INFO] [stdout] 219 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/vector_search.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod vector_search { [INFO] [stdout] 2 | | //! Perform semantic vector search across provided text files by chunking, [INFO] [stdout] 3 | | //! embedding, and scoring content against a query. [INFO] [stdout] ... | [INFO] [stdout] 325 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/vision_judge.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod vision_judge { [INFO] [stdout] 2 | | //! Capture screenshots or read images from disk and return them as data URLs [INFO] [stdout] 3 | | //! for downstream vision model consumption. [INFO] [stdout] ... | [INFO] [stdout] 161 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `VisionJudgeTool` [INFO] [stdout] --> src/tool/vision_judge.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | / pub fn new() -> Self { [INFO] [stdout] 21 | | let mut parameters = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 53 | | Self { tool } [INFO] [stdout] 54 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 17 ~ impl Default for VisionJudgeTool { [INFO] [stdout] 18 + fn default() -> Self { [INFO] [stdout] 19 + Self::new() [INFO] [stdout] 20 + } [INFO] [stdout] 21 + } [INFO] [stdout] 22 + [INFO] [stdout] 23 ~ impl VisionJudgeTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/web.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod web { [INFO] [stdout] 2 | | //! Fetch remote web content with optional timeout handling and basic HTML [INFO] [stdout] 3 | | //! text extraction for easier downstream processing. [INFO] [stdout] ... | [INFO] [stdout] 238 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `WebTool` [INFO] [stdout] --> src/tool/web.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | / pub fn new() -> Self { [INFO] [stdout] 20 | | let mut parameters = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 60 | | Self { tool, client } [INFO] [stdout] 61 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 17 ~ impl Default for WebTool { [INFO] [stdout] 18 + fn default() -> Self { [INFO] [stdout] 19 + Self::new() [INFO] [stdout] 20 + } [INFO] [stdout] 21 + } [INFO] [stdout] 22 + [INFO] [stdout] 23 ~ impl WebTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/web_search.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod web_search { [INFO] [stdout] 2 | | //! Compatibility wrapper exposing the existing `web` tool as `web_search`. [INFO] [stdout] 3 | | use crate::tool::tool::tool::ToolCall; [INFO] [stdout] 4 | | use crate::tool::web::web::WebTool; [INFO] [stdout] ... | [INFO] [stdout] 44 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `WebSearchTool` [INFO] [stdout] --> src/tool/web_search.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | / pub fn new() -> Self { [INFO] [stdout] 14 | | Self { [INFO] [stdout] 15 | | inner: WebTool::new(), [INFO] [stdout] 16 | | } [INFO] [stdout] 17 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 12 ~ impl Default for WebSearchTool { [INFO] [stdout] 13 + fn default() -> Self { [INFO] [stdout] 14 + Self::new() [INFO] [stdout] 15 + } [INFO] [stdout] 16 + } [INFO] [stdout] 17 + [INFO] [stdout] 18 ~ impl WebSearchTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tool/web_search.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | / if let Some(obj) = json.as_object_mut() { [INFO] [stdout] 24 | | if let Some(function_obj) = obj.get_mut("function") { [INFO] [stdout] 25 | | if let Some(f) = function_obj.as_object_mut() { [INFO] [stdout] 26 | | f.insert( [INFO] [stdout] ... | [INFO] [stdout] 32 | | } [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] 23 ~ if let Some(obj) = json.as_object_mut() [INFO] [stdout] 24 ~ && let Some(function_obj) = obj.get_mut("function") { [INFO] [stdout] 25 | if let Some(f) = function_obj.as_object_mut() { [INFO] [stdout] ... [INFO] [stdout] 30 | } [INFO] [stdout] 31 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tool/web_search.rs:24:17 [INFO] [stdout] | [INFO] [stdout] 24 | / if let Some(function_obj) = obj.get_mut("function") { [INFO] [stdout] 25 | | if let Some(f) = function_obj.as_object_mut() { [INFO] [stdout] 26 | | f.insert( [INFO] [stdout] 27 | | "name".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 31 | | } [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] 24 ~ if let Some(function_obj) = obj.get_mut("function") [INFO] [stdout] 25 ~ && let Some(f) = function_obj.as_object_mut() { [INFO] [stdout] 26 | f.insert( [INFO] [stdout] ... [INFO] [stdout] 29 | ); [INFO] [stdout] 30 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/util/github_control.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod github_control { [INFO] [stdout] 2 | | use std::error::Error; [INFO] [stdout] 3 | | use std::process::Command; [INFO] [stdout] ... | [INFO] [stdout] 274 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/util/github_control.rs:198:9 [INFO] [stdout] | [INFO] [stdout] 198 | / if let Some(labels) = labels { [INFO] [stdout] 199 | | if !labels.is_empty() { [INFO] [stdout] 200 | | cmd.arg("--label"); [INFO] [stdout] 201 | | cmd.arg(labels.join(",")); [INFO] [stdout] 202 | | } [INFO] [stdout] 203 | | } [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] 198 ~ if let Some(labels) = labels [INFO] [stdout] 199 ~ && !labels.is_empty() { [INFO] [stdout] 200 | cmd.arg("--label"); [INFO] [stdout] 201 | cmd.arg(labels.join(",")); [INFO] [stdout] 202 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/model/model.rs:313:29 [INFO] [stdout] | [INFO] [stdout] 313 | if let Some(ref tools_vec) = tools { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 313 - if let Some(ref tools_vec) = tools { [INFO] [stdout] 313 + if let Some(tools_vec) = tools { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/model/model.rs:557:25 [INFO] [stdout] | [INFO] [stdout] 557 | if let Some(ref tools_vec) = tools { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 557 - if let Some(ref tools_vec) = tools { [INFO] [stdout] 557 + if let Some(tools_vec) = tools { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/model/model.rs:685:13 [INFO] [stdout] | [INFO] [stdout] 685 | / if let Some(choice) = response_json.choices.first() { [INFO] [stdout] 686 | | if let Some(content) = &choice.message.content { [INFO] [stdout] 687 | | return Ok(content.clone()); [INFO] [stdout] 688 | | } [INFO] [stdout] 689 | | } [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] 685 ~ if let Some(choice) = response_json.choices.first() [INFO] [stdout] 686 ~ && let Some(content) = &choice.message.content { [INFO] [stdout] 687 | return Ok(content.clone()); [INFO] [stdout] 688 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.as_ref().map(|t| t.as_slice())` on an `Option` value [INFO] [stdout] --> src/model/model.rs:986:45 [INFO] [stdout] | [INFO] [stdout] 986 | .complete(messages.clone(), tools.as_ref().map(|t| t.as_slice())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using as_deref: `tools.as_deref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_as_ref_deref [INFO] [stdout] = note: `#[warn(clippy::option_as_ref_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.as_ref().map(|t| t.as_slice())` on an `Option` value [INFO] [stdout] --> src/model/model.rs:1002:57 [INFO] [stdout] | [INFO] [stdout] 1002 | ... .complete(messages.clone(), tools.as_ref().map(|t| t.as_slice())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using as_deref: `tools.as_deref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_as_ref_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/model/model.rs:1192:25 [INFO] [stdout] | [INFO] [stdout] 1192 | embedding.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!embedding.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/bash.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod bash { [INFO] [stdout] 2 | | //! Execute bash commands in a persistent shell session. [INFO] [stdout] 3 | | //! Tracks working directory and environment variables between calls so [INFO] [stdout] 4 | | //! agents can run incremental commands without losing context. [INFO] [stdout] ... | [INFO] [stdout] 214 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `BashTool` [INFO] [stdout] --> src/tool/bash.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | / pub fn new() -> Self { [INFO] [stdout] 29 | | let mut parameters = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 72 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 26 ~ impl Default for BashTool { [INFO] [stdout] 27 + fn default() -> Self { [INFO] [stdout] 28 + Self::new() [INFO] [stdout] 29 + } [INFO] [stdout] 30 + } [INFO] [stdout] 31 + [INFO] [stdout] 32 ~ impl BashTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/codebase_search.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod codebase_search { [INFO] [stdout] 2 | | //! Lightweight semantic-like search across the workspace. This scans text [INFO] [stdout] 3 | | //! files for a query substring (case-insensitive) and returns matching lines [INFO] [stdout] 4 | | //! with file paths and line numbers. It is intentionally simple to avoid [INFO] [stdout] ... | [INFO] [stdout] 198 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `CodebaseSearchTool` [INFO] [stdout] --> src/tool/codebase_search.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | / pub fn new() -> Self { [INFO] [stdout] 24 | | let mut parameters = HashMap::new(); [INFO] [stdout] 25 | | [INFO] [stdout] 26 | | let mut query_items = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 69 | | Self { tool } [INFO] [stdout] 70 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 21 ~ impl Default for CodebaseSearchTool { [INFO] [stdout] 22 + fn default() -> Self { [INFO] [stdout] 23 + Self::new() [INFO] [stdout] 24 + } [INFO] [stdout] 25 + } [INFO] [stdout] 26 + [INFO] [stdout] 27 ~ impl CodebaseSearchTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tool/codebase_search.rs:99:13 [INFO] [stdout] | [INFO] [stdout] 99 | / if let Ok(meta) = fs::metadata(path) { [INFO] [stdout] 100 | | if meta.len() > MAX_FILE_SIZE_BYTES || !meta.is_file() { [INFO] [stdout] 101 | | return Ok(()); [INFO] [stdout] 102 | | } [INFO] [stdout] 103 | | } [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] 99 ~ if let Ok(meta) = fs::metadata(path) [INFO] [stdout] 100 ~ && (meta.len() > MAX_FILE_SIZE_BYTES || !meta.is_file()) { [INFO] [stdout] 101 | return Ok(()); [INFO] [stdout] 102 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/delete_file.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod delete_file { [INFO] [stdout] 2 | | //! Delete a file (or directory) within the current workspace, with safety [INFO] [stdout] 3 | | //! checks to avoid accidentally removing paths outside the project. [INFO] [stdout] 4 | | use crate::tool::tool::tool::{Parameter, Tool, ToolCall}; [INFO] [stdout] ... | [INFO] [stdout] 106 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `DeleteFileTool` [INFO] [stdout] --> src/tool/delete_file.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | / pub fn new() -> Self { [INFO] [stdout] 20 | | let mut parameters = HashMap::new(); [INFO] [stdout] 21 | | [INFO] [stdout] 22 | | let mut path_items = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 49 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 18 ~ impl Default for DeleteFileTool { [INFO] [stdout] 19 + fn default() -> Self { [INFO] [stdout] 20 + Self::new() [INFO] [stdout] 21 + } [INFO] [stdout] 22 + } [INFO] [stdout] 23 + [INFO] [stdout] 24 ~ impl DeleteFileTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/diff_history.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod diff_history { [INFO] [stdout] 2 | | //! Show recent changes using `git diff --stat`. This is a lightweight view [INFO] [stdout] 3 | | //! of uncommitted work. [INFO] [stdout] 4 | | use crate::tool::tool::tool::{Tool, ToolCall}; [INFO] [stdout] ... | [INFO] [stdout] 57 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `DiffHistoryTool` [INFO] [stdout] --> src/tool/diff_history.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | / pub fn new() -> Self { [INFO] [stdout] 17 | | let parameters = HashMap::new(); [INFO] [stdout] 18 | | let tool = Tool { [INFO] [stdout] 19 | | name: "diff_history".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 24 | | Self { tool } [INFO] [stdout] 25 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 15 ~ impl Default for DiffHistoryTool { [INFO] [stdout] 16 + fn default() -> Self { [INFO] [stdout] 17 + Self::new() [INFO] [stdout] 18 + } [INFO] [stdout] 19 + } [INFO] [stdout] 20 + [INFO] [stdout] 21 ~ impl DiffHistoryTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/docs_reader.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod docs_reader { [INFO] [stdout] 2 | | //! Read PDF documents and return text snippets with optional line/word [INFO] [stdout] 3 | | //! limits. Uses multiple backends (pandoc, pdf_extract, pdftotext) to [INFO] [stdout] 4 | | //! maximize extraction success and adds truncation metadata for the caller. [INFO] [stdout] ... | [INFO] [stdout] 232 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `DocsReaderTool` [INFO] [stdout] --> src/tool/docs_reader.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | / pub fn new() -> Self { [INFO] [stdout] 23 | | let mut parameters = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 64 | | Self { tool } [INFO] [stdout] 65 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 19 ~ impl Default for DocsReaderTool { [INFO] [stdout] 20 + fn default() -> Self { [INFO] [stdout] 21 + Self::new() [INFO] [stdout] 22 + } [INFO] [stdout] 23 + } [INFO] [stdout] 24 + [INFO] [stdout] 25 ~ impl DocsReaderTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/tool/docs_reader.rs:69:50 [INFO] [stdout] | [INFO] [stdout] 69 | fn convert_pdf_to_text(&self, file_path: &PathBuf) -> Result> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 69 ~ fn convert_pdf_to_text(&self, file_path: &Path) -> Result> { [INFO] [stdout] 70 | // First, try to use pandoc if available (converts PDF to markdown, then we can use as text) [INFO] [stdout] ... [INFO] [stdout] 85 | // Fallback: try pdf-extract library [INFO] [stdout] 86 ~ match pdf_extract::extract_text(file_path) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tool/docs_reader.rs:71:13 [INFO] [stdout] | [INFO] [stdout] 71 | / if let Ok(output) = Command::new("pandoc") [INFO] [stdout] 72 | | .arg(file_path.as_os_str()) [INFO] [stdout] 73 | | .arg("-t") [INFO] [stdout] 74 | | .arg("markdown") [INFO] [stdout] ... | [INFO] [stdout] 83 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 75 ~ .output() [INFO] [stdout] 76 ~ && output.status.success() { [INFO] [stdout] 77 | let text = String::from_utf8_lossy(&output.stdout).to_string(); [INFO] [stdout] ... [INFO] [stdout] 80 | } [INFO] [stdout] 81 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tool/docs_reader.rs:94:21 [INFO] [stdout] | [INFO] [stdout] 94 | / if let Ok(output) = Command::new("pdftotext") [INFO] [stdout] 95 | | .arg(file_path.as_os_str()) [INFO] [stdout] 96 | | .arg("-") [INFO] [stdout] 97 | | .output() [INFO] [stdout] ... | [INFO] [stdout] 105 | | } [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] 97 ~ .output() [INFO] [stdout] 98 ~ && output.status.success() { [INFO] [stdout] 99 | let text = String::from_utf8_lossy(&output.stdout).to_string(); [INFO] [stdout] ... [INFO] [stdout] 102 | } [INFO] [stdout] 103 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/tool/docs_reader.rs:122:17 [INFO] [stdout] | [INFO] [stdout] 122 | "lines" | _ => { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] = note: `#[warn(clippy::wildcard_in_or_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/docs_researcher.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod docs_researcher { [INFO] [stdout] 2 | | //! Lightweight research notebook that stores findings as Markdown under [INFO] [stdout] 3 | | //! `pengy_docs/`. Supports creating documents, reading them back, and [INFO] [stdout] 4 | | //! searching with contextual snippets to reuse prior work. [INFO] [stdout] ... | [INFO] [stdout] 256 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `DocsResearcherTool` [INFO] [stdout] --> src/tool/docs_researcher.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | / pub fn new() -> Self { [INFO] [stdout] 22 | | let mut parameters = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 80 | | Self { tool, docs_dir } [INFO] [stdout] 81 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 19 ~ impl Default for DocsResearcherTool { [INFO] [stdout] 20 + fn default() -> Self { [INFO] [stdout] 21 + Self::new() [INFO] [stdout] 22 + } [INFO] [stdout] 23 + } [INFO] [stdout] 24 + [INFO] [stdout] 25 ~ impl DocsResearcherTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `lines` [INFO] [stdout] --> src/tool/docs_researcher.rs:168:30 [INFO] [stdout] | [INFO] [stdout] 168 | for i in start_line..end_line { [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] 168 - for i in start_line..end_line { [INFO] [stdout] 168 + for (i, ) in lines.iter().enumerate().take(end_line).skip(start_line) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/edit.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod edit { [INFO] [stdout] 2 | | //! Perform targeted string replacements within files using a series of [INFO] [stdout] 3 | | //! fallback matching strategies to handle whitespace, casing, and line [INFO] [stdout] 4 | | //! ending differences. [INFO] [stdout] ... | [INFO] [stdout] 511 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `EditTool` [INFO] [stdout] --> src/tool/edit.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | / pub fn new() -> Self { [INFO] [stdout] 22 | | let mut parameters = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 80 | | Self { tool } [INFO] [stdout] 81 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 19 ~ impl Default for EditTool { [INFO] [stdout] 20 + fn default() -> Self { [INFO] [stdout] 21 + Self::new() [INFO] [stdout] 22 + } [INFO] [stdout] 23 + } [INFO] [stdout] 24 + [INFO] [stdout] 25 ~ impl EditTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `line_count` is used as a loop counter [INFO] [stdout] --> src/tool/edit.rs:294:21 [INFO] [stdout] | [INFO] [stdout] 294 | for (pos, _) in content.match_indices('\n') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (line_count, (pos, _)) in content.match_indices('\n').enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `line_count` is used as a loop counter [INFO] [stdout] --> src/tool/edit.rs:346:21 [INFO] [stdout] | [INFO] [stdout] 346 | for (pos, _) in content.match_indices('\n') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (line_count, (pos, _)) in content.match_indices('\n').enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/edit_file.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod edit_file { [INFO] [stdout] 2 | | //! Compatibility wrapper that exposes the existing `edit` tool under the [INFO] [stdout] 3 | | //! `edit_file` name. [INFO] [stdout] 4 | | use crate::tool::edit::edit::EditTool; [INFO] [stdout] ... | [INFO] [stdout] 46 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `EditFileTool` [INFO] [stdout] --> src/tool/edit_file.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | / pub fn new() -> Self { [INFO] [stdout] 16 | | Self { [INFO] [stdout] 17 | | inner: EditTool::new(), [INFO] [stdout] 18 | | } [INFO] [stdout] 19 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 14 ~ impl Default for EditFileTool { [INFO] [stdout] 15 + fn default() -> Self { [INFO] [stdout] 16 + Self::new() [INFO] [stdout] 17 + } [INFO] [stdout] 18 + } [INFO] [stdout] 19 + [INFO] [stdout] 20 ~ impl EditFileTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tool/edit_file.rs:25:13 [INFO] [stdout] | [INFO] [stdout] 25 | / if let Some(obj) = json.as_object_mut() { [INFO] [stdout] 26 | | if let Some(function_obj) = obj.get_mut("function") { [INFO] [stdout] 27 | | if let Some(f) = function_obj.as_object_mut() { [INFO] [stdout] 28 | | f.insert( [INFO] [stdout] ... | [INFO] [stdout] 34 | | } [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] 25 ~ if let Some(obj) = json.as_object_mut() [INFO] [stdout] 26 ~ && let Some(function_obj) = obj.get_mut("function") { [INFO] [stdout] 27 | if let Some(f) = function_obj.as_object_mut() { [INFO] [stdout] ... [INFO] [stdout] 32 | } [INFO] [stdout] 33 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tool/edit_file.rs:26:17 [INFO] [stdout] | [INFO] [stdout] 26 | / if let Some(function_obj) = obj.get_mut("function") { [INFO] [stdout] 27 | | if let Some(f) = function_obj.as_object_mut() { [INFO] [stdout] 28 | | f.insert( [INFO] [stdout] 29 | | "name".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 33 | | } [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] 26 ~ if let Some(function_obj) = obj.get_mut("function") [INFO] [stdout] 27 ~ && let Some(f) = function_obj.as_object_mut() { [INFO] [stdout] 28 | f.insert( [INFO] [stdout] ... [INFO] [stdout] 31 | ); [INFO] [stdout] 32 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/end.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod end { [INFO] [stdout] 2 | | //! Tool that signals the agent loop to finish early and return control to [INFO] [stdout] 3 | | //! the caller with an optional user-facing reason. [INFO] [stdout] ... | [INFO] [stdout] 76 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `EndTool` [INFO] [stdout] --> src/tool/end.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | / pub fn new() -> Self { [INFO] [stdout] 20 | | let mut parameters = HashMap::new(); [INFO] [stdout] 21 | | [INFO] [stdout] 22 | | let mut reason_items = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 42 | | Self { tool } [INFO] [stdout] 43 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 16 ~ impl Default for EndTool { [INFO] [stdout] 17 + fn default() -> Self { [INFO] [stdout] 18 + Self::new() [INFO] [stdout] 19 + } [INFO] [stdout] 20 + } [INFO] [stdout] 21 + [INFO] [stdout] 22 ~ impl EndTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/file_manager.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod file_manager { [INFO] [stdout] 2 | | //! Create files or directories within the current workspace while enforcing [INFO] [stdout] 3 | | //! path safety and optional partial replacements. [INFO] [stdout] ... | [INFO] [stdout] 480 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `FileManagerTool` [INFO] [stdout] --> src/tool/file_manager.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | / pub fn new() -> Self { [INFO] [stdout] 24 | | let mut parameters = HashMap::new(); [INFO] [stdout] 25 | | [INFO] [stdout] 26 | | let mut path_items = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 135 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 20 ~ impl Default for FileManagerTool { [INFO] [stdout] 21 + fn default() -> Self { [INFO] [stdout] 22 + Self::new() [INFO] [stdout] 23 + } [INFO] [stdout] 24 + } [INFO] [stdout] 25 + [INFO] [stdout] 26 ~ impl FileManagerTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> src/tool/file_manager.rs:199:16 [INFO] [stdout] | [INFO] [stdout] 199 | Ok(normalized.canonicalize().unwrap_or_else(|_| normalized)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 199 - Ok(normalized.canonicalize().unwrap_or_else(|_| normalized)) [INFO] [stdout] 199 + Ok(normalized.canonicalize().unwrap_or(normalized)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/bin/cli/app.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | use serde_json; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/file_search.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod file_search { [INFO] [stdout] 2 | | //! Fuzzy-ish search for files by name substring across the workspace. [INFO] [stdout] 3 | | use crate::tool::tool::tool::{Parameter, Tool, ToolCall}; [INFO] [stdout] 4 | | use serde_json; [INFO] [stdout] ... | [INFO] [stdout] 159 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `FileSearchTool` [INFO] [stdout] --> src/tool/file_search.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | / pub fn new() -> Self { [INFO] [stdout] 20 | | let mut parameters = HashMap::new(); [INFO] [stdout] 21 | | [INFO] [stdout] 22 | | let mut query_items = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 66 | | Self { tool } [INFO] [stdout] 67 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 18 ~ impl Default for FileSearchTool { [INFO] [stdout] 19 + fn default() -> Self { [INFO] [stdout] 20 + Self::new() [INFO] [stdout] 21 + } [INFO] [stdout] 22 + } [INFO] [stdout] 23 + [INFO] [stdout] 24 ~ impl FileSearchTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tool/file_search.rs:107:28 [INFO] [stdout] | [INFO] [stdout] 107 | } else if meta.is_file() { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 108 | | if let Some(path_str) = path.to_str() { [INFO] [stdout] 109 | | if path_str.to_lowercase().contains(query_lower) { [INFO] [stdout] 110 | | results.push(path_str.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 113 | | } [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] 107 ~ } else if meta.is_file() [INFO] [stdout] 108 ~ && let Some(path_str) = path.to_str() { [INFO] [stdout] 109 | if path_str.to_lowercase().contains(query_lower) { [INFO] [stdout] 110 | results.push(path_str.to_string()); [INFO] [stdout] 111 | } [INFO] [stdout] 112 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tool/file_search.rs:108:25 [INFO] [stdout] | [INFO] [stdout] 108 | / if let Some(path_str) = path.to_str() { [INFO] [stdout] 109 | | if path_str.to_lowercase().contains(query_lower) { [INFO] [stdout] 110 | | results.push(path_str.to_string()); [INFO] [stdout] 111 | | } [INFO] [stdout] 112 | | } [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] 108 ~ if let Some(path_str) = path.to_str() [INFO] [stdout] 109 ~ && path_str.to_lowercase().contains(query_lower) { [INFO] [stdout] 110 | results.push(path_str.to_string()); [INFO] [stdout] 111 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/find_replace.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod find_replace { [INFO] [stdout] 2 | | //! Simple find-and-replace tool that performs exact string substitutions [INFO] [stdout] 3 | | //! across an entire file. [INFO] [stdout] 4 | | //! [INFO] [stdout] ... | [INFO] [stdout] 198 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `FindReplaceTool` [INFO] [stdout] --> src/tool/find_replace.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | / pub fn new() -> Self { [INFO] [stdout] 23 | | let mut parameters = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 74 | | Self { tool } [INFO] [stdout] 75 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 20 ~ impl Default for FindReplaceTool { [INFO] [stdout] 21 + fn default() -> Self { [INFO] [stdout] 22 + Self::new() [INFO] [stdout] 23 + } [INFO] [stdout] 24 + } [INFO] [stdout] 25 + [INFO] [stdout] 26 ~ impl FindReplaceTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/bin/cli/ui.rs:15:1 [INFO] [stdout] | [INFO] [stdout] 15 | use serde_json; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/github_tool.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod github_tool { [INFO] [stdout] 2 | | //! Wrapper around `gh` CLI operations for viewing and creating issues or [INFO] [stdout] 3 | | //! pull requests, with a unified tool schema for agent consumption. [INFO] [stdout] ... | [INFO] [stdout] 273 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `GithubTool` [INFO] [stdout] --> src/tool/github_tool.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | / pub fn new() -> Self { [INFO] [stdout] 20 | | let mut parameters = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 153 | | Self { tool } [INFO] [stdout] 154 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 17 ~ impl Default for GithubTool { [INFO] [stdout] 18 + fn default() -> Self { [INFO] [stdout] 19 + Self::new() [INFO] [stdout] 20 + } [INFO] [stdout] 21 + } [INFO] [stdout] 22 + [INFO] [stdout] 23 ~ impl GithubTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/grep.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod grep { [INFO] [stdout] 2 | | //! Search file contents via ripgrep with a grep fallback, returning matched [INFO] [stdout] 3 | | //! lines with file paths and numbers for quick navigation. [INFO] [stdout] ... | [INFO] [stdout] 268 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `GrepTool` [INFO] [stdout] --> src/tool/grep.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | / pub fn new() -> Self { [INFO] [stdout] 19 | | let mut parameters = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 59 | | Self { tool } [INFO] [stdout] 60 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 16 ~ impl Default for GrepTool { [INFO] [stdout] 17 + fn default() -> Self { [INFO] [stdout] 18 + Self::new() [INFO] [stdout] 19 + } [INFO] [stdout] 20 + } [INFO] [stdout] 21 + [INFO] [stdout] 22 ~ impl GrepTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/tool/grep.rs:126:29 [INFO] [stdout] | [INFO] [stdout] 126 | ... result_str.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result_str.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/tool/grep.rs:168:31 [INFO] [stdout] | [INFO] [stdout] 168 | let ext = &include_pattern[1..]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/tool/grep.rs:167:17 [INFO] [stdout] | [INFO] [stdout] 167 | if include_pattern.starts_with(".") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 167 ~ if let Some(ext) = include_pattern.strip_prefix(".") { [INFO] [stdout] 168 ~ if ext.contains("{") && ext.contains("}") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/tool/grep.rs:213:21 [INFO] [stdout] | [INFO] [stdout] 213 | result_str.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result_str.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/grep_search.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod grep_search { [INFO] [stdout] 2 | | //! Thin wrapper that exposes the existing grep tool under the [INFO] [stdout] 3 | | //! `grep_search` name for compatibility with external tool callers. [INFO] [stdout] 4 | | use crate::tool::grep::grep::GrepTool; [INFO] [stdout] ... | [INFO] [stdout] 46 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `GrepSearchTool` [INFO] [stdout] --> src/tool/grep_search.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | / pub fn new() -> Self { [INFO] [stdout] 16 | | let inner = GrepTool::new(); [INFO] [stdout] 17 | | Self { inner } [INFO] [stdout] 18 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 14 ~ impl Default for GrepSearchTool { [INFO] [stdout] 15 + fn default() -> Self { [INFO] [stdout] 16 + Self::new() [INFO] [stdout] 17 + } [INFO] [stdout] 18 + } [INFO] [stdout] 19 + [INFO] [stdout] 20 ~ impl GrepSearchTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tool/grep_search.rs:25:13 [INFO] [stdout] | [INFO] [stdout] 25 | / if let Some(obj) = json.as_object_mut() { [INFO] [stdout] 26 | | if let Some(function_obj) = obj.get_mut("function") { [INFO] [stdout] 27 | | if let Some(f) = function_obj.as_object_mut() { [INFO] [stdout] 28 | | f.insert( [INFO] [stdout] ... | [INFO] [stdout] 34 | | } [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] 25 ~ if let Some(obj) = json.as_object_mut() [INFO] [stdout] 26 ~ && let Some(function_obj) = obj.get_mut("function") { [INFO] [stdout] 27 | if let Some(f) = function_obj.as_object_mut() { [INFO] [stdout] ... [INFO] [stdout] 32 | } [INFO] [stdout] 33 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tool/grep_search.rs:26:17 [INFO] [stdout] | [INFO] [stdout] 26 | / if let Some(function_obj) = obj.get_mut("function") { [INFO] [stdout] 27 | | if let Some(f) = function_obj.as_object_mut() { [INFO] [stdout] 28 | | f.insert( [INFO] [stdout] 29 | | "name".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 33 | | } [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] 26 ~ if let Some(function_obj) = obj.get_mut("function") [INFO] [stdout] 27 ~ && let Some(f) = function_obj.as_object_mut() { [INFO] [stdout] 28 | f.insert( [INFO] [stdout] ... [INFO] [stdout] 31 | ); [INFO] [stdout] 32 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/list_dir.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod list_dir { [INFO] [stdout] 2 | | //! List directory contents with optional hidden filtering and entry limits. [INFO] [stdout] 3 | | use crate::tool::tool::tool::{Parameter, Tool, ToolCall}; [INFO] [stdout] 4 | | use serde_json; [INFO] [stdout] ... | [INFO] [stdout] 126 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ListDirTool` [INFO] [stdout] --> src/tool/list_dir.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | / pub fn new() -> Self { [INFO] [stdout] 19 | | let mut parameters = HashMap::new(); [INFO] [stdout] 20 | | [INFO] [stdout] 21 | | let mut path_items = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 62 | | Self { tool } [INFO] [stdout] 63 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 17 ~ impl Default for ListDirTool { [INFO] [stdout] 18 + fn default() -> Self { [INFO] [stdout] 19 + Self::new() [INFO] [stdout] 20 + } [INFO] [stdout] 21 + } [INFO] [stdout] 22 + [INFO] [stdout] 23 ~ impl ListDirTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/multi_tool_use.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod multi_tool_use { [INFO] [stdout] 2 | | //! Compatibility wrapper for a hypothetical parallel executor. This runtime [INFO] [stdout] 3 | | //! executes tools sequentially, so the tool returns a message describing the [INFO] [stdout] 4 | | //! limitation. [INFO] [stdout] ... | [INFO] [stdout] 55 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ParallelTool` [INFO] [stdout] --> src/tool/multi_tool_use.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | / pub fn new() -> Self { [INFO] [stdout] 16 | | let mut parameters = HashMap::new(); [INFO] [stdout] 17 | | // Accept an arbitrary payload to stay compatible, but ignore it. [INFO] [stdout] 18 | | let mut tool_uses_items = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 38 | | Self { tool } [INFO] [stdout] 39 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 14 ~ impl Default for ParallelTool { [INFO] [stdout] 15 + fn default() -> Self { [INFO] [stdout] 16 + Self::new() [INFO] [stdout] 17 + } [INFO] [stdout] 18 + } [INFO] [stdout] 19 + [INFO] [stdout] 20 ~ impl ParallelTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/read_file.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod read_file { [INFO] [stdout] 2 | | //! Read file contents with optional line slicing. This is intended for quick [INFO] [stdout] 3 | | //! inspection of files without modifying them. [INFO] [stdout] 4 | | use crate::tool::tool::tool::{Parameter, Tool, ToolCall}; [INFO] [stdout] ... | [INFO] [stdout] 153 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ReadFileTool` [INFO] [stdout] --> src/tool/read_file.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | / pub fn new() -> Self { [INFO] [stdout] 21 | | let mut parameters = HashMap::new(); [INFO] [stdout] 22 | | [INFO] [stdout] 23 | | let mut target_items = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 75 | | Self { tool } [INFO] [stdout] 76 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 18 ~ impl Default for ReadFileTool { [INFO] [stdout] 19 + fn default() -> Self { [INFO] [stdout] 20 + Self::new() [INFO] [stdout] 21 + } [INFO] [stdout] 22 + } [INFO] [stdout] 23 + [INFO] [stdout] 24 ~ impl ReadFileTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/reapply.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod reapply { [INFO] [stdout] 2 | | //! Placeholder tool for compatibility. The system does not track prior edits, [INFO] [stdout] 3 | | //! so this tool returns an informative message instead of performing an [INFO] [stdout] 4 | | //! action. [INFO] [stdout] ... | [INFO] [stdout] 42 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ReapplyTool` [INFO] [stdout] --> src/tool/reapply.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | / pub fn new() -> Self { [INFO] [stdout] 16 | | let parameters = HashMap::new(); [INFO] [stdout] 17 | | let tool = Tool { [INFO] [stdout] 18 | | name: "reapply".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 25 | | Self { tool } [INFO] [stdout] 26 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 14 ~ impl Default for ReapplyTool { [INFO] [stdout] 15 + fn default() -> Self { [INFO] [stdout] 16 + Self::new() [INFO] [stdout] 17 + } [INFO] [stdout] 18 + } [INFO] [stdout] 19 + [INFO] [stdout] 20 ~ impl ReapplyTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/run_terminal_cmd.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod run_terminal_cmd { [INFO] [stdout] 2 | | //! Execute a shell command. This is a minimal wrapper over `bash -c` and is [INFO] [stdout] 3 | | //! intended for short, non-interactive commands. For persistent state, use [INFO] [stdout] 4 | | //! the `bash` tool. [INFO] [stdout] ... | [INFO] [stdout] 125 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `RunTerminalCmdTool` [INFO] [stdout] --> src/tool/run_terminal_cmd.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | / pub fn new() -> Self { [INFO] [stdout] 18 | | let mut parameters = HashMap::new(); [INFO] [stdout] 19 | | [INFO] [stdout] 20 | | let mut cmd_items = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 61 | | Self { tool } [INFO] [stdout] 62 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 16 ~ impl Default for RunTerminalCmdTool { [INFO] [stdout] 17 + fn default() -> Self { [INFO] [stdout] 18 + Self::new() [INFO] [stdout] 19 + } [INFO] [stdout] 20 + } [INFO] [stdout] 21 + [INFO] [stdout] 22 ~ impl RunTerminalCmdTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/summarizer.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod summarizer { [INFO] [stdout] 2 | | //! Emits a marker indicating the conversation should be summarized to keep [INFO] [stdout] 3 | | //! context length manageable. [INFO] [stdout] ... | [INFO] [stdout] 49 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SummarizerTool` [INFO] [stdout] --> src/tool/summarizer.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | / ... pub fn new() -> Self { [INFO] [stdout] 18 | | ... let tool = Tool { [INFO] [stdout] 19 | | ... name: "summarizer".to_string(), [INFO] [stdout] 20 | | ... description: "Summarize the previous conversation to avoid context explosion. This tool takes no parameters and shou... [INFO] [stdout] ... | [INFO] [stdout] 25 | | ... Self { tool } [INFO] [stdout] 26 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 15 ~ impl Default for SummarizerTool { [INFO] [stdout] 16 + fn default() -> Self { [INFO] [stdout] 17 + Self::new() [INFO] [stdout] 18 + } [INFO] [stdout] 19 + } [INFO] [stdout] 20 + [INFO] [stdout] 21 ~ impl SummarizerTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/think.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod think { [INFO] [stdout] 2 | | //! Internal thinking tool that logs a free-form thought without performing [INFO] [stdout] 3 | | //! any external actions or mutations. Helpful for complex reasoning or [INFO] [stdout] 4 | | //! capturing intermediate ideas. [INFO] [stdout] ... | [INFO] [stdout] 75 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ThinkTool` [INFO] [stdout] --> src/tool/think.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | / pub fn new() -> Self { [INFO] [stdout] 20 | | let mut parameters = HashMap::new(); [INFO] [stdout] 21 | | [INFO] [stdout] 22 | | let mut thought_items = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 42 | | Self { tool } [INFO] [stdout] 43 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 16 ~ impl Default for ThinkTool { [INFO] [stdout] 17 + fn default() -> Self { [INFO] [stdout] 18 + Self::new() [INFO] [stdout] 19 + } [INFO] [stdout] 20 + } [INFO] [stdout] 21 + [INFO] [stdout] 22 ~ impl ThinkTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/todo.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod todo { [INFO] [stdout] 2 | | //! Maintain a lightweight todo list persisted to `.pengy_todo.json`, with [INFO] [stdout] 3 | | //! support for reading, ticking, inserting, deleting, and batch updates. [INFO] [stdout] ... | [INFO] [stdout] 390 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TodoTool` [INFO] [stdout] --> src/tool/todo.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | / pub fn new() -> Self { [INFO] [stdout] 33 | | let mut parameters = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 119 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 30 ~ impl Default for TodoTool { [INFO] [stdout] 31 + fn default() -> Self { [INFO] [stdout] 32 + Self::new() [INFO] [stdout] 33 + } [INFO] [stdout] 34 + } [INFO] [stdout] 35 + [INFO] [stdout] 36 ~ impl TodoTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/mod.rs:29:1 [INFO] [stdout] | [INFO] [stdout] 29 | pub mod tool; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/tool.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod tool { [INFO] [stdout] 2 | | //! Core tool abstractions and schema serialization helpers shared by all [INFO] [stdout] 3 | | //! tool implementations. [INFO] [stdout] ... | [INFO] [stdout] 219 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/vector_search.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod vector_search { [INFO] [stdout] 2 | | //! Perform semantic vector search across provided text files by chunking, [INFO] [stdout] 3 | | //! embedding, and scoring content against a query. [INFO] [stdout] ... | [INFO] [stdout] 325 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/bin/cmd/main.rs:68:20 [INFO] [stdout] | [INFO] [stdout] 68 | fn parse_args() -> Result<(String, AgentType, String, String, Option, bool), Box> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/vision_judge.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod vision_judge { [INFO] [stdout] 2 | | //! Capture screenshots or read images from disk and return them as data URLs [INFO] [stdout] 3 | | //! for downstream vision model consumption. [INFO] [stdout] ... | [INFO] [stdout] 161 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `VisionJudgeTool` [INFO] [stdout] --> src/tool/vision_judge.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | / pub fn new() -> Self { [INFO] [stdout] 21 | | let mut parameters = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 53 | | Self { tool } [INFO] [stdout] 54 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 17 ~ impl Default for VisionJudgeTool { [INFO] [stdout] 18 + fn default() -> Self { [INFO] [stdout] 19 + Self::new() [INFO] [stdout] 20 + } [INFO] [stdout] 21 + } [INFO] [stdout] 22 + [INFO] [stdout] 23 ~ impl VisionJudgeTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/web.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod web { [INFO] [stdout] 2 | | //! Fetch remote web content with optional timeout handling and basic HTML [INFO] [stdout] 3 | | //! text extraction for easier downstream processing. [INFO] [stdout] ... | [INFO] [stdout] 238 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `WebTool` [INFO] [stdout] --> src/tool/web.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | / pub fn new() -> Self { [INFO] [stdout] 20 | | let mut parameters = HashMap::new(); [INFO] [stdout] ... | [INFO] [stdout] 60 | | Self { tool, client } [INFO] [stdout] 61 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 17 ~ impl Default for WebTool { [INFO] [stdout] 18 + fn default() -> Self { [INFO] [stdout] 19 + Self::new() [INFO] [stdout] 20 + } [INFO] [stdout] 21 + } [INFO] [stdout] 22 + [INFO] [stdout] 23 ~ impl WebTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tool/web_search.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod web_search { [INFO] [stdout] 2 | | //! Compatibility wrapper exposing the existing `web` tool as `web_search`. [INFO] [stdout] 3 | | use crate::tool::tool::tool::ToolCall; [INFO] [stdout] 4 | | use crate::tool::web::web::WebTool; [INFO] [stdout] ... | [INFO] [stdout] 44 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `WebSearchTool` [INFO] [stdout] --> src/tool/web_search.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | / pub fn new() -> Self { [INFO] [stdout] 14 | | Self { [INFO] [stdout] 15 | | inner: WebTool::new(), [INFO] [stdout] 16 | | } [INFO] [stdout] 17 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 12 ~ impl Default for WebSearchTool { [INFO] [stdout] 13 + fn default() -> Self { [INFO] [stdout] 14 + Self::new() [INFO] [stdout] 15 + } [INFO] [stdout] 16 + } [INFO] [stdout] 17 + [INFO] [stdout] 18 ~ impl WebSearchTool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tool/web_search.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | / if let Some(obj) = json.as_object_mut() { [INFO] [stdout] 24 | | if let Some(function_obj) = obj.get_mut("function") { [INFO] [stdout] 25 | | if let Some(f) = function_obj.as_object_mut() { [INFO] [stdout] 26 | | f.insert( [INFO] [stdout] ... | [INFO] [stdout] 32 | | } [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] 23 ~ if let Some(obj) = json.as_object_mut() [INFO] [stdout] 24 ~ && let Some(function_obj) = obj.get_mut("function") { [INFO] [stdout] 25 | if let Some(f) = function_obj.as_object_mut() { [INFO] [stdout] ... [INFO] [stdout] 30 | } [INFO] [stdout] 31 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tool/web_search.rs:24:17 [INFO] [stdout] | [INFO] [stdout] 24 | / if let Some(function_obj) = obj.get_mut("function") { [INFO] [stdout] 25 | | if let Some(f) = function_obj.as_object_mut() { [INFO] [stdout] 26 | | f.insert( [INFO] [stdout] 27 | | "name".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 31 | | } [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] 24 ~ if let Some(function_obj) = obj.get_mut("function") [INFO] [stdout] 25 ~ && let Some(f) = function_obj.as_object_mut() { [INFO] [stdout] 26 | f.insert( [INFO] [stdout] ... [INFO] [stdout] 29 | ); [INFO] [stdout] 30 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/util/github_control.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod github_control { [INFO] [stdout] 2 | | use std::error::Error; [INFO] [stdout] 3 | | use std::process::Command; [INFO] [stdout] ... | [INFO] [stdout] 274 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/util/github_control.rs:198:9 [INFO] [stdout] | [INFO] [stdout] 198 | / if let Some(labels) = labels { [INFO] [stdout] 199 | | if !labels.is_empty() { [INFO] [stdout] 200 | | cmd.arg("--label"); [INFO] [stdout] 201 | | cmd.arg(labels.join(",")); [INFO] [stdout] 202 | | } [INFO] [stdout] 203 | | } [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] 198 ~ if let Some(labels) = labels [INFO] [stdout] 199 ~ && !labels.is_empty() { [INFO] [stdout] 200 | cmd.arg("--label"); [INFO] [stdout] 201 | cmd.arg(labels.join(",")); [INFO] [stdout] 202 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/bin/cli/app.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | use serde_json; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/bin/cmd/main.rs:68:20 [INFO] [stdout] | [INFO] [stdout] 68 | fn parse_args() -> Result<(String, AgentType, String, String, Option, bool), Box> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/bin/cli/ui.rs:15:1 [INFO] [stdout] | [INFO] [stdout] 15 | use serde_json; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `theme` [INFO] [stdout] --> src/bin/cli/editor/editor_ui.rs:400:59 [INFO] [stdout] | [INFO] [stdout] 400 | fn render_status_bar(f: &mut Frame, editor: &EditorState, theme: &crate::theme::Theme, area: Rect) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_theme` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/cli/syntax.rs:336:9 [INFO] [stdout] | [INFO] [stdout] 336 | let mut in_comment = false; [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `theme` [INFO] [stdout] --> src/bin/cli/editor/editor_ui.rs:400:59 [INFO] [stdout] | [INFO] [stdout] 400 | fn render_status_bar(f: &mut Frame, editor: &EditorState, theme: &crate::theme::Theme, area: Rect) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_theme` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/cli/syntax.rs:336:9 [INFO] [stdout] | [INFO] [stdout] 336 | let mut in_comment = false; [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Punctuation` is never constructed [INFO] [stdout] --> src/bin/cli/syntax.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 31 | pub enum TokenKind { [INFO] [stdout] | --------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 40 | Punctuation, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `TokenKind` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `keyword_set` is never used [INFO] [stdout] --> src/bin/cli/ui.rs:67:4 [INFO] [stdout] | [INFO] [stdout] 67 | fn keyword_set(lang: &str) -> HashSet<&'static str> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `TokenType` is never used [INFO] [stdout] --> src/bin/cli/ui.rs:98:6 [INFO] [stdout] | [INFO] [stdout] 98 | enum TokenType { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `tokenize_line` is never used [INFO] [stdout] --> src/bin/cli/ui.rs:109:4 [INFO] [stdout] | [INFO] [stdout] 109 | fn tokenize_line(line: &str) -> Vec<(TokenType, String)> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_operator` is never used [INFO] [stdout] --> src/bin/cli/ui.rs:239:4 [INFO] [stdout] | [INFO] [stdout] 239 | fn is_operator(ch: char) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_two_char_operator` is never used [INFO] [stdout] --> src/bin/cli/ui.rs:243:4 [INFO] [stdout] | [INFO] [stdout] 243 | fn is_two_char_operator(op: &str) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_punctuation` is never used [INFO] [stdout] --> src/bin/cli/ui.rs:247:4 [INFO] [stdout] | [INFO] [stdout] 247 | fn is_punctuation(ch: char) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `style_token` is never used [INFO] [stdout] --> src/bin/cli/ui.rs:251:4 [INFO] [stdout] | [INFO] [stdout] 251 | fn style_token(token_type: TokenType, token: &str, lang: &str, accent: Color, bg: Color) -> Span<'static> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/app.rs:297:17 [INFO] [stdout] | [INFO] [stdout] 297 | / if let Ok(meta) = entry.metadata() { [INFO] [stdout] 298 | | if entry [INFO] [stdout] 299 | | .path() [INFO] [stdout] 300 | | .extension() [INFO] [stdout] ... | [INFO] [stdout] 307 | | } [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] 297 ~ if let Ok(meta) = entry.metadata() [INFO] [stdout] 298 ~ && entry [INFO] [stdout] 299 | .path() [INFO] [stdout] ... [INFO] [stdout] 305 | entries.push((modified, entry.path())); [INFO] [stdout] 306 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/bin/cli/app.rs:312:9 [INFO] [stdout] | [INFO] [stdout] 312 | entries.sort_by(|a, b| b.0.cmp(&a.0)); [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] 312 - entries.sort_by(|a, b| b.0.cmp(&a.0)); [INFO] [stdout] 312 + entries.sort_by_key(|b| std::cmp::Reverse(b.0)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/app.rs:338:9 [INFO] [stdout] | [INFO] [stdout] 338 | / if let Some(path) = self.session_paths.get(idx).cloned() { [INFO] [stdout] 339 | | if let Some((title, messages)) = Self::read_session_file(&path) { [INFO] [stdout] 340 | | if let Some(slot) = self.sessions.get_mut(idx) { [INFO] [stdout] 341 | | *slot = title; [INFO] [stdout] ... | [INFO] [stdout] 351 | | } [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] 338 ~ if let Some(path) = self.session_paths.get(idx).cloned() [INFO] [stdout] 339 ~ && let Some((title, messages)) = Self::read_session_file(&path) { [INFO] [stdout] 340 | if let Some(slot) = self.sessions.get_mut(idx) { [INFO] [stdout] ... [INFO] [stdout] 349 | self.session_dirty = false; [INFO] [stdout] 350 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/app.rs:485:9 [INFO] [stdout] | [INFO] [stdout] 485 | / if config_path.exists() { [INFO] [stdout] 486 | | if let Ok(content) = std::fs::read_to_string(&config_path) { [INFO] [stdout] 487 | | if let Ok(config) = serde_json::from_str::(&content) { [INFO] [stdout] 488 | | return config; [INFO] [stdout] ... | [INFO] [stdout] 491 | | } [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] 485 ~ if config_path.exists() [INFO] [stdout] 486 ~ && let Ok(content) = std::fs::read_to_string(&config_path) { [INFO] [stdout] 487 | if let Ok(config) = serde_json::from_str::(&content) { [INFO] [stdout] 488 | return config; [INFO] [stdout] 489 | } [INFO] [stdout] 490 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/app.rs:486:13 [INFO] [stdout] | [INFO] [stdout] 486 | / if let Ok(content) = std::fs::read_to_string(&config_path) { [INFO] [stdout] 487 | | if let Ok(config) = serde_json::from_str::(&content) { [INFO] [stdout] 488 | | return config; [INFO] [stdout] 489 | | } [INFO] [stdout] 490 | | } [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] 486 ~ if let Ok(content) = std::fs::read_to_string(&config_path) [INFO] [stdout] 487 ~ && let Ok(config) = serde_json::from_str::(&content) { [INFO] [stdout] 488 | return config; [INFO] [stdout] 489 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/bin/cli/app.rs:839:46 [INFO] [stdout] | [INFO] [stdout] 839 | if c.is_ascii_alphanumeric() { [INFO] [stdout] | ______________________________________________^ [INFO] [stdout] 840 | | c [INFO] [stdout] 841 | | } else if c == '-' || c == '_' { [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/bin/cli/app.rs:841:48 [INFO] [stdout] | [INFO] [stdout] 841 | } else if c == '-' || c == '_' { [INFO] [stdout] | ________________________________________________^ [INFO] [stdout] 842 | | c [INFO] [stdout] 843 | | } else { [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/app.rs:919:9 [INFO] [stdout] | [INFO] [stdout] 919 | / if self.sandbox_enabled { [INFO] [stdout] 920 | | if let Some(branch) = &self.sandbox_branch { [INFO] [stdout] 921 | | return Ok(format!( [INFO] [stdout] 922 | | "Sandbox already enabled on branch {}. Use /save to merge.", [INFO] [stdout] ... | [INFO] [stdout] 926 | | } [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] 919 ~ if self.sandbox_enabled [INFO] [stdout] 920 ~ && let Some(branch) = &self.sandbox_branch { [INFO] [stdout] 921 | return Ok(format!( [INFO] [stdout] ... [INFO] [stdout] 924 | )); [INFO] [stdout] 925 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/app.rs:1306:25 [INFO] [stdout] | [INFO] [stdout] 1306 | / if pending.name == "edit" || pending.name == "edit_file" { [INFO] [stdout] 1307 | | if let Ok(json_args) = [INFO] [stdout] 1308 | | serde_json::from_str::(&pending.args) [INFO] [stdout] ... | [INFO] [stdout] 1319 | | } [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] 1306 ~ if (pending.name == "edit" || pending.name == "edit_file") { [INFO] [stdout] 1307 ~ && let Ok(json_args) = [INFO] [stdout] 1308 | serde_json::from_str::(&pending.args) [INFO] [stdout] ... [INFO] [stdout] 1317 | } [INFO] [stdout] 1318 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/app.rs:1307:29 [INFO] [stdout] | [INFO] [stdout] 1307 | / ... if let Ok(json_args) = [INFO] [stdout] 1308 | | ... serde_json::from_str::(&pending.args) [INFO] [stdout] 1309 | | ... { [INFO] [stdout] 1310 | | ... if let Some(file_path) = [INFO] [stdout] ... | [INFO] [stdout] 1318 | | ... } [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] 1308 ~ serde_json::from_str::(&pending.args) [INFO] [stdout] 1309 ~ && let Some(file_path) = [INFO] [stdout] 1310 | json_args.get("filePath").and_then(|v| v.as_str()) [INFO] [stdout] ... [INFO] [stdout] 1315 | .or_insert((1, 0)); [INFO] [stdout] 1316 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/app.rs:1321:25 [INFO] [stdout] | [INFO] [stdout] 1321 | / if pending.name == "file_manager" { [INFO] [stdout] 1322 | | if let Ok(json_args) = [INFO] [stdout] 1323 | | serde_json::from_str::(&pending.args) [INFO] [stdout] ... | [INFO] [stdout] 1339 | | } [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] 1321 ~ if pending.name == "file_manager" [INFO] [stdout] 1322 ~ && let Ok(json_args) = [INFO] [stdout] 1323 | serde_json::from_str::(&pending.args) [INFO] [stdout] ... [INFO] [stdout] 1337 | } [INFO] [stdout] 1338 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/app.rs:1322:29 [INFO] [stdout] | [INFO] [stdout] 1322 | / ... if let Ok(json_args) = [INFO] [stdout] 1323 | | ... serde_json::from_str::(&pending.args) [INFO] [stdout] 1324 | | ... { [INFO] [stdout] 1325 | | ... if let Some(op) = [INFO] [stdout] ... | [INFO] [stdout] 1338 | | ... } [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] 1323 ~ serde_json::from_str::(&pending.args) [INFO] [stdout] 1324 ~ && let Some(op) = [INFO] [stdout] 1325 | json_args.get("operation").and_then(|v| v.as_str()) [INFO] [stdout] ... [INFO] [stdout] 1335 | } [INFO] [stdout] 1336 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/app.rs:1325:33 [INFO] [stdout] | [INFO] [stdout] 1325 | / ... if let Some(op) = [INFO] [stdout] 1326 | | ... json_args.get("operation").and_then(|v| v.as_str()) [INFO] [stdout] 1327 | | ... { [INFO] [stdout] 1328 | | ... if op == "write" || op == "create" { [INFO] [stdout] ... | [INFO] [stdout] 1337 | | ... } [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] 1326 ~ json_args.get("operation").and_then(|v| v.as_str()) [INFO] [stdout] 1327 ~ && (op == "write" || op == "create") { [INFO] [stdout] 1328 | if let Some(path) = [INFO] [stdout] ... [INFO] [stdout] 1334 | } [INFO] [stdout] 1335 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/app.rs:1328:37 [INFO] [stdout] | [INFO] [stdout] 1328 | / ... if op == "write" || op == "create" { [INFO] [stdout] 1329 | | ... if let Some(path) = [INFO] [stdout] 1330 | | ... json_args.get("path").and_then(|v| v.as_str()) [INFO] [stdout] ... | [INFO] [stdout] 1336 | | ... } [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] 1328 ~ if (op == "write" || op == "create") { [INFO] [stdout] 1329 ~ && let Some(path) = [INFO] [stdout] 1330 | json_args.get("path").and_then(|v| v.as_str()) [INFO] [stdout] ... [INFO] [stdout] 1334 | .or_insert((1, 0)); [INFO] [stdout] 1335 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Punctuation` is never constructed [INFO] [stdout] --> src/bin/cli/syntax.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 31 | pub enum TokenKind { [INFO] [stdout] | --------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 40 | Punctuation, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `TokenKind` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `keyword_set` is never used [INFO] [stdout] --> src/bin/cli/ui.rs:67:4 [INFO] [stdout] | [INFO] [stdout] 67 | fn keyword_set(lang: &str) -> HashSet<&'static str> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `TokenType` is never used [INFO] [stdout] --> src/bin/cli/ui.rs:98:6 [INFO] [stdout] | [INFO] [stdout] 98 | enum TokenType { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `tokenize_line` is never used [INFO] [stdout] --> src/bin/cli/ui.rs:109:4 [INFO] [stdout] | [INFO] [stdout] 109 | fn tokenize_line(line: &str) -> Vec<(TokenType, String)> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_operator` is never used [INFO] [stdout] --> src/bin/cli/ui.rs:239:4 [INFO] [stdout] | [INFO] [stdout] 239 | fn is_operator(ch: char) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_two_char_operator` is never used [INFO] [stdout] --> src/bin/cli/ui.rs:243:4 [INFO] [stdout] | [INFO] [stdout] 243 | fn is_two_char_operator(op: &str) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_punctuation` is never used [INFO] [stdout] --> src/bin/cli/ui.rs:247:4 [INFO] [stdout] | [INFO] [stdout] 247 | fn is_punctuation(ch: char) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `style_token` is never used [INFO] [stdout] --> src/bin/cli/ui.rs:251:4 [INFO] [stdout] | [INFO] [stdout] 251 | fn style_token(token_type: TokenType, token: &str, lang: &str, accent: Color, bg: Color) -> Span<'static> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/bin/cli/editor/mod.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | pub mod editor; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `char_count` is used as a loop counter [INFO] [stdout] --> src/bin/cli/editor/editor.rs:246:13 [INFO] [stdout] | [INFO] [stdout] 246 | for (idx, _) in line.char_indices() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (char_count, (idx, _)) in line.char_indices().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/app.rs:297:17 [INFO] [stdout] | [INFO] [stdout] 297 | / if let Ok(meta) = entry.metadata() { [INFO] [stdout] 298 | | if entry [INFO] [stdout] 299 | | .path() [INFO] [stdout] 300 | | .extension() [INFO] [stdout] ... | [INFO] [stdout] 307 | | } [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] 297 ~ if let Ok(meta) = entry.metadata() [INFO] [stdout] 298 ~ && entry [INFO] [stdout] 299 | .path() [INFO] [stdout] ... [INFO] [stdout] 305 | entries.push((modified, entry.path())); [INFO] [stdout] 306 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/bin/cli/app.rs:312:9 [INFO] [stdout] | [INFO] [stdout] 312 | entries.sort_by(|a, b| b.0.cmp(&a.0)); [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] 312 - entries.sort_by(|a, b| b.0.cmp(&a.0)); [INFO] [stdout] 312 + entries.sort_by_key(|b| std::cmp::Reverse(b.0)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `char_idx` is used as a loop counter [INFO] [stdout] --> src/bin/cli/editor/editor_ui.rs:263:13 [INFO] [stdout] | [INFO] [stdout] 263 | for (byte_idx, ch) in original_line.char_indices() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (char_idx, (byte_idx, ch)) in original_line.char_indices().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/app.rs:338:9 [INFO] [stdout] | [INFO] [stdout] 338 | / if let Some(path) = self.session_paths.get(idx).cloned() { [INFO] [stdout] 339 | | if let Some((title, messages)) = Self::read_session_file(&path) { [INFO] [stdout] 340 | | if let Some(slot) = self.sessions.get_mut(idx) { [INFO] [stdout] 341 | | *slot = title; [INFO] [stdout] ... | [INFO] [stdout] 351 | | } [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] 338 ~ if let Some(path) = self.session_paths.get(idx).cloned() [INFO] [stdout] 339 ~ && let Some((title, messages)) = Self::read_session_file(&path) { [INFO] [stdout] 340 | if let Some(slot) = self.sessions.get_mut(idx) { [INFO] [stdout] ... [INFO] [stdout] 349 | self.session_dirty = false; [INFO] [stdout] 350 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/app.rs:485:9 [INFO] [stdout] | [INFO] [stdout] 485 | / if config_path.exists() { [INFO] [stdout] 486 | | if let Ok(content) = std::fs::read_to_string(&config_path) { [INFO] [stdout] 487 | | if let Ok(config) = serde_json::from_str::(&content) { [INFO] [stdout] 488 | | return config; [INFO] [stdout] ... | [INFO] [stdout] 491 | | } [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] 485 ~ if config_path.exists() [INFO] [stdout] 486 ~ && let Ok(content) = std::fs::read_to_string(&config_path) { [INFO] [stdout] 487 | if let Ok(config) = serde_json::from_str::(&content) { [INFO] [stdout] 488 | return config; [INFO] [stdout] 489 | } [INFO] [stdout] 490 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/app.rs:486:13 [INFO] [stdout] | [INFO] [stdout] 486 | / if let Ok(content) = std::fs::read_to_string(&config_path) { [INFO] [stdout] 487 | | if let Ok(config) = serde_json::from_str::(&content) { [INFO] [stdout] 488 | | return config; [INFO] [stdout] 489 | | } [INFO] [stdout] 490 | | } [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] 486 ~ if let Ok(content) = std::fs::read_to_string(&config_path) [INFO] [stdout] 487 ~ && let Ok(config) = serde_json::from_str::(&content) { [INFO] [stdout] 488 | return config; [INFO] [stdout] 489 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/bin/cli/editor/editor_ui.rs:532:13 [INFO] [stdout] | [INFO] [stdout] 532 | format!("{}", label), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `label.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/bin/cli/app.rs:839:46 [INFO] [stdout] | [INFO] [stdout] 839 | if c.is_ascii_alphanumeric() { [INFO] [stdout] | ______________________________________________^ [INFO] [stdout] 840 | | c [INFO] [stdout] 841 | | } else if c == '-' || c == '_' { [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/bin/cli/app.rs:841:48 [INFO] [stdout] | [INFO] [stdout] 841 | } else if c == '-' || c == '_' { [INFO] [stdout] | ________________________________________________^ [INFO] [stdout] 842 | | c [INFO] [stdout] 843 | | } else { [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:88:13 [INFO] [stdout] | [INFO] [stdout] 88 | / if !editor.recent_files.is_empty() { [INFO] [stdout] 89 | | editor.file_explorer_open = true; [INFO] [stdout] 90 | | editor.mode = EditorMode::FileExplorer; [INFO] [stdout] 91 | | editor.show_welcome = false; [INFO] [stdout] 92 | | editor.refresh_file_explorer(); [INFO] [stdout] 93 | | } [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] 86 ~ KeyCode::Char('r') [INFO] [stdout] 87 | // Recent files - open file explorer at current dir [INFO] [stdout] 88 ~ if !editor.recent_files.is_empty() => { [INFO] [stdout] 89 | editor.file_explorer_open = true; [INFO] [stdout] ... [INFO] [stdout] 92 | editor.refresh_file_explorer(); [INFO] [stdout] 93 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:116:13 [INFO] [stdout] | [INFO] [stdout] 116 | / if editor.welcome_selected > 0 { [INFO] [stdout] 117 | | editor.welcome_selected -= 1; [INFO] [stdout] 118 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 115 ~ KeyCode::Up | KeyCode::Char('k') [INFO] [stdout] 116 ~ if editor.welcome_selected > 0 => { [INFO] [stdout] 117 | editor.welcome_selected -= 1; [INFO] [stdout] 118 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:121:13 [INFO] [stdout] | [INFO] [stdout] 121 | / if editor.welcome_selected < 5 { [INFO] [stdout] 122 | | editor.welcome_selected += 1; [INFO] [stdout] 123 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 120 ~ KeyCode::Down | KeyCode::Char('j') [INFO] [stdout] 121 ~ if editor.welcome_selected < 5 => { [INFO] [stdout] 122 | editor.welcome_selected += 1; [INFO] [stdout] 123 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:151:21 [INFO] [stdout] | [INFO] [stdout] 151 | / if !editor.recent_files.is_empty() { [INFO] [stdout] 152 | | editor.file_explorer_open = true; [INFO] [stdout] 153 | | editor.mode = EditorMode::FileExplorer; [INFO] [stdout] 154 | | editor.show_welcome = false; [INFO] [stdout] 155 | | editor.refresh_file_explorer(); [INFO] [stdout] 156 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 149 ~ 3 [INFO] [stdout] 150 | // Recent Files [INFO] [stdout] 151 ~ if !editor.recent_files.is_empty() => { [INFO] [stdout] 152 | editor.file_explorer_open = true; [INFO] [stdout] ... [INFO] [stdout] 155 | editor.refresh_file_explorer(); [INFO] [stdout] 156 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/app.rs:919:9 [INFO] [stdout] | [INFO] [stdout] 919 | / if self.sandbox_enabled { [INFO] [stdout] 920 | | if let Some(branch) = &self.sandbox_branch { [INFO] [stdout] 921 | | return Ok(format!( [INFO] [stdout] 922 | | "Sandbox already enabled on branch {}. Use /save to merge.", [INFO] [stdout] ... | [INFO] [stdout] 926 | | } [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] 919 ~ if self.sandbox_enabled [INFO] [stdout] 920 ~ && let Some(branch) = &self.sandbox_branch { [INFO] [stdout] 921 | return Ok(format!( [INFO] [stdout] ... [INFO] [stdout] 924 | )); [INFO] [stdout] 925 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:249:13 [INFO] [stdout] | [INFO] [stdout] 249 | / if editor.cursor_row < editor.lines.len() { [INFO] [stdout] 250 | | editor.lines.remove(editor.cursor_row); [INFO] [stdout] 251 | | if editor.lines.is_empty() { [INFO] [stdout] 252 | | editor.lines.push(String::new()); [INFO] [stdout] ... | [INFO] [stdout] 257 | | editor.cursor_col = editor.cursor_col.min(editor.lines[editor.cursor_row].len()); [INFO] [stdout] 258 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 247 ~ KeyCode::Char('d') [INFO] [stdout] 248 | // 'dd' to delete line [INFO] [stdout] 249 ~ if editor.cursor_row < editor.lines.len() => { [INFO] [stdout] 250 | editor.lines.remove(editor.cursor_row); [INFO] [stdout] ... [INFO] [stdout] 257 | editor.cursor_col = editor.cursor_col.min(editor.lines[editor.cursor_row].len()); [INFO] [stdout] 258 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:382:28 [INFO] [stdout] | [INFO] [stdout] 382 | let path = cmd_trimmed[2..].trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:380:20 [INFO] [stdout] | [INFO] [stdout] 380 | } else if cmd_trimmed.starts_with("e ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 380 ~ } else if let Some() = cmd_trimmed.strip_prefix("e ") { [INFO] [stdout] 381 | // Open file: e [INFO] [stdout] 382 ~ let path = .trim(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:397:30 [INFO] [stdout] | [INFO] [stdout] 397 | let symbol = cmd_trimmed[3..].trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:395:20 [INFO] [stdout] | [INFO] [stdout] 395 | } else if cmd_trimmed.starts_with("gd ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 395 ~ } else if let Some() = cmd_trimmed.strip_prefix("gd ") { [INFO] [stdout] 396 | // Go to definition: gd [INFO] [stdout] 397 ~ let symbol = .trim(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:429:13 [INFO] [stdout] | [INFO] [stdout] 429 | / if editor.file_explorer_selected < editor.file_explorer_entries.len().saturating_sub(1) { [INFO] [stdout] 430 | | editor.file_explorer_selected += 1; [INFO] [stdout] 431 | | // Scroll if needed [INFO] [stdout] 432 | | let visible_height = 20; // Approximate [INFO] [stdout] ... | [INFO] [stdout] 436 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 428 ~ KeyCode::Char('j') | KeyCode::Down [INFO] [stdout] 429 ~ if editor.file_explorer_selected < editor.file_explorer_entries.len().saturating_sub(1) => { [INFO] [stdout] 430 | editor.file_explorer_selected += 1; [INFO] [stdout] ... [INFO] [stdout] 435 | } [INFO] [stdout] 436 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:439:13 [INFO] [stdout] | [INFO] [stdout] 439 | / if editor.file_explorer_selected > 0 { [INFO] [stdout] 440 | | editor.file_explorer_selected -= 1; [INFO] [stdout] 441 | | if editor.file_explorer_selected < editor.file_explorer_scroll { [INFO] [stdout] 442 | | editor.file_explorer_scroll = editor.file_explorer_selected; [INFO] [stdout] 443 | | } [INFO] [stdout] 444 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 438 ~ KeyCode::Char('k') | KeyCode::Up [INFO] [stdout] 439 ~ if editor.file_explorer_selected > 0 => { [INFO] [stdout] 440 | editor.file_explorer_selected -= 1; [INFO] [stdout] ... [INFO] [stdout] 443 | } [INFO] [stdout] 444 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/app.rs:1306:25 [INFO] [stdout] | [INFO] [stdout] 1306 | / if pending.name == "edit" || pending.name == "edit_file" { [INFO] [stdout] 1307 | | if let Ok(json_args) = [INFO] [stdout] 1308 | | serde_json::from_str::(&pending.args) [INFO] [stdout] ... | [INFO] [stdout] 1319 | | } [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] 1306 ~ if (pending.name == "edit" || pending.name == "edit_file") { [INFO] [stdout] 1307 ~ && let Ok(json_args) = [INFO] [stdout] 1308 | serde_json::from_str::(&pending.args) [INFO] [stdout] ... [INFO] [stdout] 1317 | } [INFO] [stdout] 1318 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:487:5 [INFO] [stdout] | [INFO] [stdout] 487 | / if let Some((file, line)) = cached_result { [INFO] [stdout] 488 | | if editor.open_file(file.clone()).is_ok() { [INFO] [stdout] 489 | | editor.cursor_row = line.saturating_sub(1); [INFO] [stdout] 490 | | editor.cursor_col = 0; [INFO] [stdout] ... | [INFO] [stdout] 495 | | } [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] 487 ~ if let Some((file, line)) = cached_result [INFO] [stdout] 488 ~ && editor.open_file(file.clone()).is_ok() { [INFO] [stdout] 489 | editor.cursor_row = line.saturating_sub(1); [INFO] [stdout] ... [INFO] [stdout] 493 | return; [INFO] [stdout] 494 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/app.rs:1307:29 [INFO] [stdout] | [INFO] [stdout] 1307 | / ... if let Ok(json_args) = [INFO] [stdout] 1308 | | ... serde_json::from_str::(&pending.args) [INFO] [stdout] 1309 | | ... { [INFO] [stdout] 1310 | | ... if let Some(file_path) = [INFO] [stdout] ... | [INFO] [stdout] 1318 | | ... } [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] 1308 ~ serde_json::from_str::(&pending.args) [INFO] [stdout] 1309 ~ && let Some(file_path) = [INFO] [stdout] 1310 | json_args.get("filePath").and_then(|v| v.as_str()) [INFO] [stdout] ... [INFO] [stdout] 1315 | .or_insert((1, 0)); [INFO] [stdout] 1316 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/app.rs:1321:25 [INFO] [stdout] | [INFO] [stdout] 1321 | / if pending.name == "file_manager" { [INFO] [stdout] 1322 | | if let Ok(json_args) = [INFO] [stdout] 1323 | | serde_json::from_str::(&pending.args) [INFO] [stdout] ... | [INFO] [stdout] 1339 | | } [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] 1321 ~ if pending.name == "file_manager" [INFO] [stdout] 1322 ~ && let Ok(json_args) = [INFO] [stdout] 1323 | serde_json::from_str::(&pending.args) [INFO] [stdout] ... [INFO] [stdout] 1337 | } [INFO] [stdout] 1338 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/app.rs:1322:29 [INFO] [stdout] | [INFO] [stdout] 1322 | / ... if let Ok(json_args) = [INFO] [stdout] 1323 | | ... serde_json::from_str::(&pending.args) [INFO] [stdout] 1324 | | ... { [INFO] [stdout] 1325 | | ... if let Some(op) = [INFO] [stdout] ... | [INFO] [stdout] 1338 | | ... } [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] 1323 ~ serde_json::from_str::(&pending.args) [INFO] [stdout] 1324 ~ && let Some(op) = [INFO] [stdout] 1325 | json_args.get("operation").and_then(|v| v.as_str()) [INFO] [stdout] ... [INFO] [stdout] 1335 | } [INFO] [stdout] 1336 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/app.rs:1325:33 [INFO] [stdout] | [INFO] [stdout] 1325 | / ... if let Some(op) = [INFO] [stdout] 1326 | | ... json_args.get("operation").and_then(|v| v.as_str()) [INFO] [stdout] 1327 | | ... { [INFO] [stdout] 1328 | | ... if op == "write" || op == "create" { [INFO] [stdout] ... | [INFO] [stdout] 1337 | | ... } [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] 1326 ~ json_args.get("operation").and_then(|v| v.as_str()) [INFO] [stdout] 1327 ~ && (op == "write" || op == "create") { [INFO] [stdout] 1328 | if let Some(path) = [INFO] [stdout] ... [INFO] [stdout] 1334 | } [INFO] [stdout] 1335 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/app.rs:1328:37 [INFO] [stdout] | [INFO] [stdout] 1328 | / ... if op == "write" || op == "create" { [INFO] [stdout] 1329 | | ... if let Some(path) = [INFO] [stdout] 1330 | | ... json_args.get("path").and_then(|v| v.as_str()) [INFO] [stdout] ... | [INFO] [stdout] 1336 | | ... } [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] 1328 ~ if (op == "write" || op == "create") { [INFO] [stdout] 1329 ~ && let Some(path) = [INFO] [stdout] 1330 | json_args.get("path").and_then(|v| v.as_str()) [INFO] [stdout] ... [INFO] [stdout] 1334 | .or_insert((1, 0)); [INFO] [stdout] 1335 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:514:9 [INFO] [stdout] | [INFO] [stdout] 514 | / if let Ok(output) = Command::new("rg") [INFO] [stdout] 515 | | .arg("--line-number") [INFO] [stdout] 516 | | .arg("--no-heading") [INFO] [stdout] 517 | | .arg(&pattern) [INFO] [stdout] ... | [INFO] [stdout] 547 | | } [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] 519 ~ .output() [INFO] [stdout] 520 ~ && output.status.success() { [INFO] [stdout] 521 | let stdout = String::from_utf8_lossy(&output.stdout); [INFO] [stdout] ... [INFO] [stdout] 544 | } [INFO] [stdout] 545 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:526:21 [INFO] [stdout] | [INFO] [stdout] 526 | / if parts.len() >= 2 { [INFO] [stdout] 527 | | if let Ok(line_num) = parts[1].parse::() { [INFO] [stdout] 528 | | let file_path = current_dir.join(parts[0]); [INFO] [stdout] 529 | | if let Ok(_) = editor.open_file(file_path.clone()) { [INFO] [stdout] ... | [INFO] [stdout] 544 | | } [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] 526 ~ if parts.len() >= 2 [INFO] [stdout] 527 ~ && let Ok(line_num) = parts[1].parse::() { [INFO] [stdout] 528 | let file_path = current_dir.join(parts[0]); [INFO] [stdout] ... [INFO] [stdout] 542 | } [INFO] [stdout] 543 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:529:36 [INFO] [stdout] | [INFO] [stdout] 529 | ... if let Ok(_) = editor.open_file(file_path.clone()) { [INFO] [stdout] | -------^^^^^-------------------------------------- help: try: `if editor.open_file(file_path.clone()).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:551:5 [INFO] [stdout] | [INFO] [stdout] 551 | / if let Ok(output) = Command::new("rg") [INFO] [stdout] 552 | | .arg("--line-number") [INFO] [stdout] 553 | | .arg("--no-heading") [INFO] [stdout] 554 | | .arg(symbol) [INFO] [stdout] ... | [INFO] [stdout] 576 | | } [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] 556 ~ .output() [INFO] [stdout] 557 ~ && output.status.success() { [INFO] [stdout] 558 | let stdout = String::from_utf8_lossy(&output.stdout); [INFO] [stdout] ... [INFO] [stdout] 573 | } [INFO] [stdout] 574 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:562:17 [INFO] [stdout] | [INFO] [stdout] 562 | / if parts.len() >= 2 { [INFO] [stdout] 563 | | if let Ok(line_num) = parts[1].parse::() { [INFO] [stdout] 564 | | let file_path = current_dir.join(parts[0]); [INFO] [stdout] 565 | | if let Ok(_) = editor.open_file(file_path.clone()) { [INFO] [stdout] ... | [INFO] [stdout] 573 | | } [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 parts.len() >= 2 [INFO] [stdout] 563 ~ && let Ok(line_num) = parts[1].parse::() { [INFO] [stdout] 564 | let file_path = current_dir.join(parts[0]); [INFO] [stdout] ... [INFO] [stdout] 571 | } [INFO] [stdout] 572 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:565:32 [INFO] [stdout] | [INFO] [stdout] 565 | if let Ok(_) = editor.open_file(file_path.clone()) { [INFO] [stdout] | -------^^^^^-------------------------------------- help: try: `if editor.open_file(file_path.clone()).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/handlers.rs:181:13 [INFO] [stdout] | [INFO] [stdout] 181 | / if let Some(idx) = app.session_list_state.selected() { [INFO] [stdout] 182 | | if idx < app.sessions.len() { [INFO] [stdout] 183 | | app.load_session(idx); [INFO] [stdout] 184 | | app.state = app.previous_state.clone().unwrap_or(AppState::Welcome); [INFO] [stdout] 185 | | } [INFO] [stdout] 186 | | } [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] 181 ~ if let Some(idx) = app.session_list_state.selected() [INFO] [stdout] 182 ~ && idx < app.sessions.len() { [INFO] [stdout] 183 | app.load_session(idx); [INFO] [stdout] 184 | app.state = app.previous_state.clone().unwrap_or(AppState::Welcome); [INFO] [stdout] 185 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/bin/cli/editor/mod.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | pub mod editor; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/bin/cli/handlers.rs:363:13 [INFO] [stdout] | [INFO] [stdout] 363 | / if !app.theme_search_focused { [INFO] [stdout] 364 | | let i = app [INFO] [stdout] 365 | | .theme_list_state [INFO] [stdout] 366 | | .selected() [INFO] [stdout] ... | [INFO] [stdout] 378 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 362 ~ KeyCode::Up [INFO] [stdout] 363 ~ if !app.theme_search_focused => { [INFO] [stdout] 364 | let i = app [INFO] [stdout] ... [INFO] [stdout] 377 | } [INFO] [stdout] 378 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/bin/cli/handlers.rs:381:13 [INFO] [stdout] | [INFO] [stdout] 381 | / if !app.theme_search_focused { [INFO] [stdout] 382 | | let i = app.theme_list_state.selected().unwrap_or(0) + 1; [INFO] [stdout] 383 | | let new_sel = if filtered.is_empty() { [INFO] [stdout] 384 | | 0 [INFO] [stdout] ... | [INFO] [stdout] 392 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 380 ~ KeyCode::Down [INFO] [stdout] 381 ~ if !app.theme_search_focused => { [INFO] [stdout] 382 | let i = app.theme_list_state.selected().unwrap_or(0) + 1; [INFO] [stdout] ... [INFO] [stdout] 391 | } [INFO] [stdout] 392 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/handlers.rs:354:20 [INFO] [stdout] | [INFO] [stdout] 354 | } else if let Some(sel) = app.theme_list_state.selected() { [INFO] [stdout] | ____________________^ [INFO] [stdout] 355 | | if let Some((actual_idx, _)) = filtered.get(sel) { [INFO] [stdout] 356 | | app.theme_index = *actual_idx; [INFO] [stdout] 357 | | let _ = app.save_config(); [INFO] [stdout] ... | [INFO] [stdout] 360 | | } [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] 354 ~ } else if let Some(sel) = app.theme_list_state.selected() [INFO] [stdout] 355 ~ && let Some((actual_idx, _)) = filtered.get(sel) { [INFO] [stdout] 356 | app.theme_index = *actual_idx; [INFO] [stdout] 357 | let _ = app.save_config(); [INFO] [stdout] 358 | app.state = app.previous_state.clone().unwrap_or(AppState::Welcome); [INFO] [stdout] 359 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/bin/cli/handlers.rs:476:13 [INFO] [stdout] | [INFO] [stdout] 476 | / if app.settings_field == 2 { [INFO] [stdout] 477 | | let i = app [INFO] [stdout] 478 | | .model_list_state [INFO] [stdout] 479 | | .selected() [INFO] [stdout] ... | [INFO] [stdout] 482 | | app.model_list_state.select(Some(i)); [INFO] [stdout] 483 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 475 ~ KeyCode::Up [INFO] [stdout] 476 ~ if app.settings_field == 2 => { [INFO] [stdout] 477 | let i = app [INFO] [stdout] ... [INFO] [stdout] 482 | app.model_list_state.select(Some(i)); [INFO] [stdout] 483 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/bin/cli/handlers.rs:486:13 [INFO] [stdout] | [INFO] [stdout] 486 | / if app.settings_field == 2 { [INFO] [stdout] 487 | | let i = (app.model_list_state.selected().unwrap_or(0) + 1) [INFO] [stdout] 488 | | .min(App::get_available_models().len() - 1); [INFO] [stdout] 489 | | app.model_list_state.select(Some(i)); [INFO] [stdout] 490 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 485 ~ KeyCode::Down [INFO] [stdout] 486 ~ if app.settings_field == 2 => { [INFO] [stdout] 487 | let i = (app.model_list_state.selected().unwrap_or(0) + 1) [INFO] [stdout] 488 | .min(App::get_available_models().len() - 1); [INFO] [stdout] 489 | app.model_list_state.select(Some(i)); [INFO] [stdout] 490 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `char_count` is used as a loop counter [INFO] [stdout] --> src/bin/cli/editor/editor.rs:246:13 [INFO] [stdout] | [INFO] [stdout] 246 | for (idx, _) in line.char_indices() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (char_count, (idx, _)) in line.char_indices().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/bin/cli/handlers.rs:662:13 [INFO] [stdout] | [INFO] [stdout] 662 | / if !app.custom_model_name.is_empty() { [INFO] [stdout] 663 | | // Preserve the current base URL - don't change it [INFO] [stdout] 664 | | // Use custom_base_url if set, otherwise use settings_base_url, otherwise default [INFO] [stdout] 665 | | let normalized_base_url = { [INFO] [stdout] ... | [INFO] [stdout] 698 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 661 ~ KeyCode::Enter [INFO] [stdout] 662 ~ if !app.custom_model_name.is_empty() => { [INFO] [stdout] 663 | // Preserve the current base URL - don't change it [INFO] [stdout] ... [INFO] [stdout] 697 | } [INFO] [stdout] 698 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/handlers.rs:769:9 [INFO] [stdout] | [INFO] [stdout] 769 | / if let Some(selected) = &app.selected_model { [INFO] [stdout] 770 | | if let Some(idx) = models [INFO] [stdout] 771 | | .iter() [INFO] [stdout] 772 | | .position(|m| m.name == selected.name && m.provider == selected.provider) [INFO] [stdout] ... | [INFO] [stdout] 776 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 769 ~ if let Some(selected) = &app.selected_model [INFO] [stdout] 770 ~ && let Some(idx) = models [INFO] [stdout] 771 | .iter() [INFO] [stdout] ... [INFO] [stdout] 774 | app.model_list_state.select(Some(idx)); [INFO] [stdout] 775 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/cli/syntax.rs:18:48 [INFO] [stdout] | [INFO] [stdout] 18 | "rust" | "rs" => RUST_LANG.get_or_init(|| tree_sitter_rust::language()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `tree_sitter_rust::language` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/cli/syntax.rs:19:52 [INFO] [stdout] | [INFO] [stdout] 19 | "python" | "py" => PYTHON_LANG.get_or_init(|| tree_sitter_python::language()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `tree_sitter_python::language` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/cli/syntax.rs:20:60 [INFO] [stdout] | [INFO] [stdout] 20 | "javascript" | "js" => JAVASCRIPT_LANG.get_or_init(|| tree_sitter_javascript::language()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `tree_sitter_javascript::language` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/cli/syntax.rs:21:68 [INFO] [stdout] | [INFO] [stdout] 21 | "typescript" | "ts" | "tsx" => TYPESCRIPT_LANG.get_or_init(|| tree_sitter_typescript::language_typescript()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `tree_sitter_typescript::language_typescript` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/cli/syntax.rs:22:37 [INFO] [stdout] | [INFO] [stdout] 22 | "go" => GO_LANG.get_or_init(|| tree_sitter_go::language()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `tree_sitter_go::language` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/cli/syntax.rs:23:41 [INFO] [stdout] | [INFO] [stdout] 23 | "java" => JAVA_LANG.get_or_init(|| tree_sitter_java::language()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `tree_sitter_java::language` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/cli/syntax.rs:24:35 [INFO] [stdout] | [INFO] [stdout] 24 | "c" => C_LANG.get_or_init(|| tree_sitter_c::language()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `tree_sitter_c::language` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/cli/syntax.rs:25:62 [INFO] [stdout] | [INFO] [stdout] 25 | "cpp" | "c++" | "cxx" | "cc" => CPP_LANG.get_or_init(|| tree_sitter_cpp::language()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `tree_sitter_cpp::language` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `char_idx` is used as a loop counter [INFO] [stdout] --> src/bin/cli/editor/editor_ui.rs:263:13 [INFO] [stdout] | [INFO] [stdout] 263 | for (byte_idx, ch) in original_line.char_indices() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (char_idx, (byte_idx, ch)) in original_line.char_indices().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/bin/cli/editor/editor_ui.rs:532:13 [INFO] [stdout] | [INFO] [stdout] 532 | format!("{}", label), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `label.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:88:13 [INFO] [stdout] | [INFO] [stdout] 88 | / if !editor.recent_files.is_empty() { [INFO] [stdout] 89 | | editor.file_explorer_open = true; [INFO] [stdout] 90 | | editor.mode = EditorMode::FileExplorer; [INFO] [stdout] 91 | | editor.show_welcome = false; [INFO] [stdout] 92 | | editor.refresh_file_explorer(); [INFO] [stdout] 93 | | } [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] 86 ~ KeyCode::Char('r') [INFO] [stdout] 87 | // Recent files - open file explorer at current dir [INFO] [stdout] 88 ~ if !editor.recent_files.is_empty() => { [INFO] [stdout] 89 | editor.file_explorer_open = true; [INFO] [stdout] ... [INFO] [stdout] 92 | editor.refresh_file_explorer(); [INFO] [stdout] 93 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:116:13 [INFO] [stdout] | [INFO] [stdout] 116 | / if editor.welcome_selected > 0 { [INFO] [stdout] 117 | | editor.welcome_selected -= 1; [INFO] [stdout] 118 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 115 ~ KeyCode::Up | KeyCode::Char('k') [INFO] [stdout] 116 ~ if editor.welcome_selected > 0 => { [INFO] [stdout] 117 | editor.welcome_selected -= 1; [INFO] [stdout] 118 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:121:13 [INFO] [stdout] | [INFO] [stdout] 121 | / if editor.welcome_selected < 5 { [INFO] [stdout] 122 | | editor.welcome_selected += 1; [INFO] [stdout] 123 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 120 ~ KeyCode::Down | KeyCode::Char('j') [INFO] [stdout] 121 ~ if editor.welcome_selected < 5 => { [INFO] [stdout] 122 | editor.welcome_selected += 1; [INFO] [stdout] 123 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:151:21 [INFO] [stdout] | [INFO] [stdout] 151 | / if !editor.recent_files.is_empty() { [INFO] [stdout] 152 | | editor.file_explorer_open = true; [INFO] [stdout] 153 | | editor.mode = EditorMode::FileExplorer; [INFO] [stdout] 154 | | editor.show_welcome = false; [INFO] [stdout] 155 | | editor.refresh_file_explorer(); [INFO] [stdout] 156 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 149 ~ 3 [INFO] [stdout] 150 | // Recent Files [INFO] [stdout] 151 ~ if !editor.recent_files.is_empty() => { [INFO] [stdout] 152 | editor.file_explorer_open = true; [INFO] [stdout] ... [INFO] [stdout] 155 | editor.refresh_file_explorer(); [INFO] [stdout] 156 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:249:13 [INFO] [stdout] | [INFO] [stdout] 249 | / if editor.cursor_row < editor.lines.len() { [INFO] [stdout] 250 | | editor.lines.remove(editor.cursor_row); [INFO] [stdout] 251 | | if editor.lines.is_empty() { [INFO] [stdout] 252 | | editor.lines.push(String::new()); [INFO] [stdout] ... | [INFO] [stdout] 257 | | editor.cursor_col = editor.cursor_col.min(editor.lines[editor.cursor_row].len()); [INFO] [stdout] 258 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 247 ~ KeyCode::Char('d') [INFO] [stdout] 248 | // 'dd' to delete line [INFO] [stdout] 249 ~ if editor.cursor_row < editor.lines.len() => { [INFO] [stdout] 250 | editor.lines.remove(editor.cursor_row); [INFO] [stdout] ... [INFO] [stdout] 257 | editor.cursor_col = editor.cursor_col.min(editor.lines[editor.cursor_row].len()); [INFO] [stdout] 258 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:382:28 [INFO] [stdout] | [INFO] [stdout] 382 | let path = cmd_trimmed[2..].trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:380:20 [INFO] [stdout] | [INFO] [stdout] 380 | } else if cmd_trimmed.starts_with("e ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 380 ~ } else if let Some() = cmd_trimmed.strip_prefix("e ") { [INFO] [stdout] 381 | // Open file: e [INFO] [stdout] 382 ~ let path = .trim(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:397:30 [INFO] [stdout] | [INFO] [stdout] 397 | let symbol = cmd_trimmed[3..].trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:395:20 [INFO] [stdout] | [INFO] [stdout] 395 | } else if cmd_trimmed.starts_with("gd ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 395 ~ } else if let Some() = cmd_trimmed.strip_prefix("gd ") { [INFO] [stdout] 396 | // Go to definition: gd [INFO] [stdout] 397 ~ let symbol = .trim(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:429:13 [INFO] [stdout] | [INFO] [stdout] 429 | / if editor.file_explorer_selected < editor.file_explorer_entries.len().saturating_sub(1) { [INFO] [stdout] 430 | | editor.file_explorer_selected += 1; [INFO] [stdout] 431 | | // Scroll if needed [INFO] [stdout] 432 | | let visible_height = 20; // Approximate [INFO] [stdout] ... | [INFO] [stdout] 436 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 428 ~ KeyCode::Char('j') | KeyCode::Down [INFO] [stdout] 429 ~ if editor.file_explorer_selected < editor.file_explorer_entries.len().saturating_sub(1) => { [INFO] [stdout] 430 | editor.file_explorer_selected += 1; [INFO] [stdout] ... [INFO] [stdout] 435 | } [INFO] [stdout] 436 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:439:13 [INFO] [stdout] | [INFO] [stdout] 439 | / if editor.file_explorer_selected > 0 { [INFO] [stdout] 440 | | editor.file_explorer_selected -= 1; [INFO] [stdout] 441 | | if editor.file_explorer_selected < editor.file_explorer_scroll { [INFO] [stdout] 442 | | editor.file_explorer_scroll = editor.file_explorer_selected; [INFO] [stdout] 443 | | } [INFO] [stdout] 444 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 438 ~ KeyCode::Char('k') | KeyCode::Up [INFO] [stdout] 439 ~ if editor.file_explorer_selected > 0 => { [INFO] [stdout] 440 | editor.file_explorer_selected -= 1; [INFO] [stdout] ... [INFO] [stdout] 443 | } [INFO] [stdout] 444 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:487:5 [INFO] [stdout] | [INFO] [stdout] 487 | / if let Some((file, line)) = cached_result { [INFO] [stdout] 488 | | if editor.open_file(file.clone()).is_ok() { [INFO] [stdout] 489 | | editor.cursor_row = line.saturating_sub(1); [INFO] [stdout] 490 | | editor.cursor_col = 0; [INFO] [stdout] ... | [INFO] [stdout] 495 | | } [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] 487 ~ if let Some((file, line)) = cached_result [INFO] [stdout] 488 ~ && editor.open_file(file.clone()).is_ok() { [INFO] [stdout] 489 | editor.cursor_row = line.saturating_sub(1); [INFO] [stdout] ... [INFO] [stdout] 493 | return; [INFO] [stdout] 494 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:514:9 [INFO] [stdout] | [INFO] [stdout] 514 | / if let Ok(output) = Command::new("rg") [INFO] [stdout] 515 | | .arg("--line-number") [INFO] [stdout] 516 | | .arg("--no-heading") [INFO] [stdout] 517 | | .arg(&pattern) [INFO] [stdout] ... | [INFO] [stdout] 547 | | } [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] 519 ~ .output() [INFO] [stdout] 520 ~ && output.status.success() { [INFO] [stdout] 521 | let stdout = String::from_utf8_lossy(&output.stdout); [INFO] [stdout] ... [INFO] [stdout] 544 | } [INFO] [stdout] 545 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:526:21 [INFO] [stdout] | [INFO] [stdout] 526 | / if parts.len() >= 2 { [INFO] [stdout] 527 | | if let Ok(line_num) = parts[1].parse::() { [INFO] [stdout] 528 | | let file_path = current_dir.join(parts[0]); [INFO] [stdout] 529 | | if let Ok(_) = editor.open_file(file_path.clone()) { [INFO] [stdout] ... | [INFO] [stdout] 544 | | } [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] 526 ~ if parts.len() >= 2 [INFO] [stdout] 527 ~ && let Ok(line_num) = parts[1].parse::() { [INFO] [stdout] 528 | let file_path = current_dir.join(parts[0]); [INFO] [stdout] ... [INFO] [stdout] 542 | } [INFO] [stdout] 543 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:529:36 [INFO] [stdout] | [INFO] [stdout] 529 | ... if let Ok(_) = editor.open_file(file_path.clone()) { [INFO] [stdout] | -------^^^^^-------------------------------------- help: try: `if editor.open_file(file_path.clone()).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:551:5 [INFO] [stdout] | [INFO] [stdout] 551 | / if let Ok(output) = Command::new("rg") [INFO] [stdout] 552 | | .arg("--line-number") [INFO] [stdout] 553 | | .arg("--no-heading") [INFO] [stdout] 554 | | .arg(symbol) [INFO] [stdout] ... | [INFO] [stdout] 576 | | } [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] 556 ~ .output() [INFO] [stdout] 557 ~ && output.status.success() { [INFO] [stdout] 558 | let stdout = String::from_utf8_lossy(&output.stdout); [INFO] [stdout] ... [INFO] [stdout] 573 | } [INFO] [stdout] 574 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:562:17 [INFO] [stdout] | [INFO] [stdout] 562 | / if parts.len() >= 2 { [INFO] [stdout] 563 | | if let Ok(line_num) = parts[1].parse::() { [INFO] [stdout] 564 | | let file_path = current_dir.join(parts[0]); [INFO] [stdout] 565 | | if let Ok(_) = editor.open_file(file_path.clone()) { [INFO] [stdout] ... | [INFO] [stdout] 573 | | } [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 parts.len() >= 2 [INFO] [stdout] 563 ~ && let Ok(line_num) = parts[1].parse::() { [INFO] [stdout] 564 | let file_path = current_dir.join(parts[0]); [INFO] [stdout] ... [INFO] [stdout] 571 | } [INFO] [stdout] 572 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/bin/cli/editor/editor_handlers.rs:565:32 [INFO] [stdout] | [INFO] [stdout] 565 | if let Ok(_) = editor.open_file(file_path.clone()) { [INFO] [stdout] | -------^^^^^-------------------------------------- help: try: `if editor.open_file(file_path.clone()).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/handlers.rs:181:13 [INFO] [stdout] | [INFO] [stdout] 181 | / if let Some(idx) = app.session_list_state.selected() { [INFO] [stdout] 182 | | if idx < app.sessions.len() { [INFO] [stdout] 183 | | app.load_session(idx); [INFO] [stdout] 184 | | app.state = app.previous_state.clone().unwrap_or(AppState::Welcome); [INFO] [stdout] 185 | | } [INFO] [stdout] 186 | | } [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] 181 ~ if let Some(idx) = app.session_list_state.selected() [INFO] [stdout] 182 ~ && idx < app.sessions.len() { [INFO] [stdout] 183 | app.load_session(idx); [INFO] [stdout] 184 | app.state = app.previous_state.clone().unwrap_or(AppState::Welcome); [INFO] [stdout] 185 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/bin/cli/handlers.rs:363:13 [INFO] [stdout] | [INFO] [stdout] 363 | / if !app.theme_search_focused { [INFO] [stdout] 364 | | let i = app [INFO] [stdout] 365 | | .theme_list_state [INFO] [stdout] 366 | | .selected() [INFO] [stdout] ... | [INFO] [stdout] 378 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 362 ~ KeyCode::Up [INFO] [stdout] 363 ~ if !app.theme_search_focused => { [INFO] [stdout] 364 | let i = app [INFO] [stdout] ... [INFO] [stdout] 377 | } [INFO] [stdout] 378 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/bin/cli/handlers.rs:381:13 [INFO] [stdout] | [INFO] [stdout] 381 | / if !app.theme_search_focused { [INFO] [stdout] 382 | | let i = app.theme_list_state.selected().unwrap_or(0) + 1; [INFO] [stdout] 383 | | let new_sel = if filtered.is_empty() { [INFO] [stdout] 384 | | 0 [INFO] [stdout] ... | [INFO] [stdout] 392 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 380 ~ KeyCode::Down [INFO] [stdout] 381 ~ if !app.theme_search_focused => { [INFO] [stdout] 382 | let i = app.theme_list_state.selected().unwrap_or(0) + 1; [INFO] [stdout] ... [INFO] [stdout] 391 | } [INFO] [stdout] 392 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/handlers.rs:354:20 [INFO] [stdout] | [INFO] [stdout] 354 | } else if let Some(sel) = app.theme_list_state.selected() { [INFO] [stdout] | ____________________^ [INFO] [stdout] 355 | | if let Some((actual_idx, _)) = filtered.get(sel) { [INFO] [stdout] 356 | | app.theme_index = *actual_idx; [INFO] [stdout] 357 | | let _ = app.save_config(); [INFO] [stdout] ... | [INFO] [stdout] 360 | | } [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] 354 ~ } else if let Some(sel) = app.theme_list_state.selected() [INFO] [stdout] 355 ~ && let Some((actual_idx, _)) = filtered.get(sel) { [INFO] [stdout] 356 | app.theme_index = *actual_idx; [INFO] [stdout] 357 | let _ = app.save_config(); [INFO] [stdout] 358 | app.state = app.previous_state.clone().unwrap_or(AppState::Welcome); [INFO] [stdout] 359 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/bin/cli/handlers.rs:476:13 [INFO] [stdout] | [INFO] [stdout] 476 | / if app.settings_field == 2 { [INFO] [stdout] 477 | | let i = app [INFO] [stdout] 478 | | .model_list_state [INFO] [stdout] 479 | | .selected() [INFO] [stdout] ... | [INFO] [stdout] 482 | | app.model_list_state.select(Some(i)); [INFO] [stdout] 483 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 475 ~ KeyCode::Up [INFO] [stdout] 476 ~ if app.settings_field == 2 => { [INFO] [stdout] 477 | let i = app [INFO] [stdout] ... [INFO] [stdout] 482 | app.model_list_state.select(Some(i)); [INFO] [stdout] 483 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/bin/cli/handlers.rs:486:13 [INFO] [stdout] | [INFO] [stdout] 486 | / if app.settings_field == 2 { [INFO] [stdout] 487 | | let i = (app.model_list_state.selected().unwrap_or(0) + 1) [INFO] [stdout] 488 | | .min(App::get_available_models().len() - 1); [INFO] [stdout] 489 | | app.model_list_state.select(Some(i)); [INFO] [stdout] 490 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 485 ~ KeyCode::Down [INFO] [stdout] 486 ~ if app.settings_field == 2 => { [INFO] [stdout] 487 | let i = (app.model_list_state.selected().unwrap_or(0) + 1) [INFO] [stdout] 488 | .min(App::get_available_models().len() - 1); [INFO] [stdout] 489 | app.model_list_state.select(Some(i)); [INFO] [stdout] 490 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/bin/cli/handlers.rs:662:13 [INFO] [stdout] | [INFO] [stdout] 662 | / if !app.custom_model_name.is_empty() { [INFO] [stdout] 663 | | // Preserve the current base URL - don't change it [INFO] [stdout] 664 | | // Use custom_base_url if set, otherwise use settings_base_url, otherwise default [INFO] [stdout] 665 | | let normalized_base_url = { [INFO] [stdout] ... | [INFO] [stdout] 698 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 661 ~ KeyCode::Enter [INFO] [stdout] 662 ~ if !app.custom_model_name.is_empty() => { [INFO] [stdout] 663 | // Preserve the current base URL - don't change it [INFO] [stdout] ... [INFO] [stdout] 697 | } [INFO] [stdout] 698 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/bin/cli/ui.rs:438:1 [INFO] [stdout] | [INFO] [stdout] 438 | / fn render_tool_call_card( [INFO] [stdout] 439 | | id: &str, [INFO] [stdout] 440 | | name: &str, [INFO] [stdout] 441 | | args: &str, [INFO] [stdout] ... | [INFO] [stdout] 446 | | accent: Color, [INFO] [stdout] 447 | | ) -> ListItem<'static> { [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/handlers.rs:769:9 [INFO] [stdout] | [INFO] [stdout] 769 | / if let Some(selected) = &app.selected_model { [INFO] [stdout] 770 | | if let Some(idx) = models [INFO] [stdout] 771 | | .iter() [INFO] [stdout] 772 | | .position(|m| m.name == selected.name && m.provider == selected.provider) [INFO] [stdout] ... | [INFO] [stdout] 776 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 769 ~ if let Some(selected) = &app.selected_model [INFO] [stdout] 770 ~ && let Some(idx) = models [INFO] [stdout] 771 | .iter() [INFO] [stdout] ... [INFO] [stdout] 774 | app.model_list_state.select(Some(idx)); [INFO] [stdout] 775 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/ui.rs:590:9 [INFO] [stdout] | [INFO] [stdout] 590 | / if let Some(json) = parsed_args.as_ref() { [INFO] [stdout] 591 | | if let Some(cmd) = json.get("cmd").and_then(|v| v.as_str()) { [INFO] [stdout] 592 | | let max_cmd_len = available_width.saturating_sub(15).max(20); // Account for "Command: " prefix [INFO] [stdout] 593 | | let preview = if cmd.len() > max_cmd_len { [INFO] [stdout] ... | [INFO] [stdout] 607 | | } [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] 590 ~ if let Some(json) = parsed_args.as_ref() [INFO] [stdout] 591 ~ && let Some(cmd) = json.get("cmd").and_then(|v| v.as_str()) { [INFO] [stdout] 592 | let max_cmd_len = available_width.saturating_sub(15).max(20); // Account for "Command: " prefix [INFO] [stdout] ... [INFO] [stdout] 605 | ])); [INFO] [stdout] 606 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/cli/syntax.rs:18:48 [INFO] [stdout] | [INFO] [stdout] 18 | "rust" | "rs" => RUST_LANG.get_or_init(|| tree_sitter_rust::language()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `tree_sitter_rust::language` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/cli/syntax.rs:19:52 [INFO] [stdout] | [INFO] [stdout] 19 | "python" | "py" => PYTHON_LANG.get_or_init(|| tree_sitter_python::language()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `tree_sitter_python::language` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/cli/syntax.rs:20:60 [INFO] [stdout] | [INFO] [stdout] 20 | "javascript" | "js" => JAVASCRIPT_LANG.get_or_init(|| tree_sitter_javascript::language()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `tree_sitter_javascript::language` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/ui.rs:609:9 [INFO] [stdout] | [INFO] [stdout] 609 | / if let Some(json) = parsed_args.as_ref() { [INFO] [stdout] 610 | | if let Some(path) = json [INFO] [stdout] 611 | | .get("target_file") [INFO] [stdout] 612 | | .or_else(|| json.get("path")) [INFO] [stdout] ... | [INFO] [stdout] 633 | | } [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] 609 ~ if let Some(json) = parsed_args.as_ref() [INFO] [stdout] 610 ~ && let Some(path) = json [INFO] [stdout] 611 | .get("target_file") [INFO] [stdout] ... [INFO] [stdout] 631 | ])); [INFO] [stdout] 632 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/cli/syntax.rs:21:68 [INFO] [stdout] | [INFO] [stdout] 21 | "typescript" | "ts" | "tsx" => TYPESCRIPT_LANG.get_or_init(|| tree_sitter_typescript::language_typescript()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `tree_sitter_typescript::language_typescript` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/cli/syntax.rs:22:37 [INFO] [stdout] | [INFO] [stdout] 22 | "go" => GO_LANG.get_or_init(|| tree_sitter_go::language()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `tree_sitter_go::language` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/cli/syntax.rs:23:41 [INFO] [stdout] | [INFO] [stdout] 23 | "java" => JAVA_LANG.get_or_init(|| tree_sitter_java::language()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `tree_sitter_java::language` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/cli/syntax.rs:24:35 [INFO] [stdout] | [INFO] [stdout] 24 | "c" => C_LANG.get_or_init(|| tree_sitter_c::language()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `tree_sitter_c::language` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/ui.rs:635:9 [INFO] [stdout] | [INFO] [stdout] 635 | / if let Some(json) = parsed_args.as_ref() { [INFO] [stdout] 636 | | if let Some(pattern) = json.get("pattern").and_then(|v| v.as_str()) { [INFO] [stdout] 637 | | let max_pattern_len = available_width.saturating_sub(20).max(20); // Account for "Pattern: " prefix and quotes [INFO] [stdout] 638 | | let preview = if pattern.len() > max_pattern_len { [INFO] [stdout] ... | [INFO] [stdout] 655 | | } [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] 635 ~ if let Some(json) = parsed_args.as_ref() [INFO] [stdout] 636 ~ && let Some(pattern) = json.get("pattern").and_then(|v| v.as_str()) { [INFO] [stdout] 637 | let max_pattern_len = available_width.saturating_sub(20).max(20); // Account for "Pattern: " prefix and quotes [INFO] [stdout] ... [INFO] [stdout] 653 | ])); [INFO] [stdout] 654 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/cli/syntax.rs:25:62 [INFO] [stdout] | [INFO] [stdout] 25 | "cpp" | "c++" | "cxx" | "cc" => CPP_LANG.get_or_init(|| tree_sitter_cpp::language()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `tree_sitter_cpp::language` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/ui.rs:657:9 [INFO] [stdout] | [INFO] [stdout] 657 | / if let Some(json) = parsed_args.as_ref() { [INFO] [stdout] 658 | | if let Some(path) = json.get("path").and_then(|v| v.as_str()) { [INFO] [stdout] 659 | | let max_path_len = available_width.saturating_sub(15).max(20); // Account for "Directory: " prefix [INFO] [stdout] 660 | | let display_path = if path.chars().count() > max_path_len { [INFO] [stdout] ... | [INFO] [stdout] 677 | | } [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] 657 ~ if let Some(json) = parsed_args.as_ref() [INFO] [stdout] 658 ~ && let Some(path) = json.get("path").and_then(|v| v.as_str()) { [INFO] [stdout] 659 | let max_path_len = available_width.saturating_sub(15).max(20); // Account for "Directory: " prefix [INFO] [stdout] ... [INFO] [stdout] 675 | ])); [INFO] [stdout] 676 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/ui.rs:678:12 [INFO] [stdout] | [INFO] [stdout] 678 | } else if name == "file_manager" { [INFO] [stdout] | ____________^ [INFO] [stdout] 679 | | if let Some(json) = parsed_args.as_ref() { [INFO] [stdout] 680 | | // Check if it's a batch operation [INFO] [stdout] 681 | | if let Some(files_array) = json.get("files").and_then(|v| v.as_array()) { [INFO] [stdout] ... | [INFO] [stdout] 924 | | } [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] 678 ~ } else if name == "file_manager" [INFO] [stdout] 679 ~ && let Some(json) = parsed_args.as_ref() { [INFO] [stdout] 680 | // Check if it's a batch operation [INFO] [stdout] ... [INFO] [stdout] 922 | } [INFO] [stdout] 923 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/ui.rs:773:17 [INFO] [stdout] | [INFO] [stdout] 773 | / if kind == "file" { [INFO] [stdout] 774 | | if let Some(content) = json.get("content").and_then(|v| { [INFO] [stdout] 775 | | if v.is_string() { [INFO] [stdout] 776 | | v.as_str() [INFO] [stdout] ... | [INFO] [stdout] 921 | | } [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 kind == "file" [INFO] [stdout] 774 ~ && let Some(content) = json.get("content").and_then(|v| { [INFO] [stdout] 775 | if v.is_string() { [INFO] [stdout] ... [INFO] [stdout] 919 | } [INFO] [stdout] 920 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/ui.rs:774:21 [INFO] [stdout] | [INFO] [stdout] 774 | / if let Some(content) = json.get("content").and_then(|v| { [INFO] [stdout] 775 | | if v.is_string() { [INFO] [stdout] 776 | | v.as_str() [INFO] [stdout] 777 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 920 | | } [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] 780 ~ }) [INFO] [stdout] 781 ~ && !content.is_empty() { [INFO] [stdout] 782 | lines.push(Line::from(Span::raw(""))); [INFO] [stdout] ... [INFO] [stdout] 918 | ])); [INFO] [stdout] 919 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `current_char_count` is used as a loop counter [INFO] [stdout] --> src/bin/cli/ui.rs:1114:29 [INFO] [stdout] | [INFO] [stdout] 1114 | ... for (idx, _) in remaining.char_indices() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (current_char_count, (idx, _)) in remaining.char_indices().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/bin/cli/ui.rs:438:1 [INFO] [stdout] | [INFO] [stdout] 438 | / fn render_tool_call_card( [INFO] [stdout] 439 | | id: &str, [INFO] [stdout] 440 | | name: &str, [INFO] [stdout] 441 | | args: &str, [INFO] [stdout] ... | [INFO] [stdout] 446 | | accent: Color, [INFO] [stdout] 447 | | ) -> ListItem<'static> { [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/ui.rs:590:9 [INFO] [stdout] | [INFO] [stdout] 590 | / if let Some(json) = parsed_args.as_ref() { [INFO] [stdout] 591 | | if let Some(cmd) = json.get("cmd").and_then(|v| v.as_str()) { [INFO] [stdout] 592 | | let max_cmd_len = available_width.saturating_sub(15).max(20); // Account for "Command: " prefix [INFO] [stdout] 593 | | let preview = if cmd.len() > max_cmd_len { [INFO] [stdout] ... | [INFO] [stdout] 607 | | } [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] 590 ~ if let Some(json) = parsed_args.as_ref() [INFO] [stdout] 591 ~ && let Some(cmd) = json.get("cmd").and_then(|v| v.as_str()) { [INFO] [stdout] 592 | let max_cmd_len = available_width.saturating_sub(15).max(20); // Account for "Command: " prefix [INFO] [stdout] ... [INFO] [stdout] 605 | ])); [INFO] [stdout] 606 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/ui.rs:609:9 [INFO] [stdout] | [INFO] [stdout] 609 | / if let Some(json) = parsed_args.as_ref() { [INFO] [stdout] 610 | | if let Some(path) = json [INFO] [stdout] 611 | | .get("target_file") [INFO] [stdout] 612 | | .or_else(|| json.get("path")) [INFO] [stdout] ... | [INFO] [stdout] 633 | | } [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] 609 ~ if let Some(json) = parsed_args.as_ref() [INFO] [stdout] 610 ~ && let Some(path) = json [INFO] [stdout] 611 | .get("target_file") [INFO] [stdout] ... [INFO] [stdout] 631 | ])); [INFO] [stdout] 632 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0` is never greater than `filtered_models.len().saturating_sub(1)` and has therefore no effect [INFO] [stdout] --> src/bin/cli/ui.rs:1971:30 [INFO] [stdout] | [INFO] [stdout] 1971 | .select(Some(0.max(filtered_models.len().saturating_sub(1)))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `filtered_models.len().saturating_sub(1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_min_or_max [INFO] [stdout] = note: `#[warn(clippy::unnecessary_min_or_max)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/ui.rs:635:9 [INFO] [stdout] | [INFO] [stdout] 635 | / if let Some(json) = parsed_args.as_ref() { [INFO] [stdout] 636 | | if let Some(pattern) = json.get("pattern").and_then(|v| v.as_str()) { [INFO] [stdout] 637 | | let max_pattern_len = available_width.saturating_sub(20).max(20); // Account for "Pattern: " prefix and quotes [INFO] [stdout] 638 | | let preview = if pattern.len() > max_pattern_len { [INFO] [stdout] ... | [INFO] [stdout] 655 | | } [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] 635 ~ if let Some(json) = parsed_args.as_ref() [INFO] [stdout] 636 ~ && let Some(pattern) = json.get("pattern").and_then(|v| v.as_str()) { [INFO] [stdout] 637 | let max_pattern_len = available_width.saturating_sub(20).max(20); // Account for "Pattern: " prefix and quotes [INFO] [stdout] ... [INFO] [stdout] 653 | ])); [INFO] [stdout] 654 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/ui.rs:657:9 [INFO] [stdout] | [INFO] [stdout] 657 | / if let Some(json) = parsed_args.as_ref() { [INFO] [stdout] 658 | | if let Some(path) = json.get("path").and_then(|v| v.as_str()) { [INFO] [stdout] 659 | | let max_path_len = available_width.saturating_sub(15).max(20); // Account for "Directory: " prefix [INFO] [stdout] 660 | | let display_path = if path.chars().count() > max_path_len { [INFO] [stdout] ... | [INFO] [stdout] 677 | | } [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] 657 ~ if let Some(json) = parsed_args.as_ref() [INFO] [stdout] 658 ~ && let Some(path) = json.get("path").and_then(|v| v.as_str()) { [INFO] [stdout] 659 | let max_path_len = available_width.saturating_sub(15).max(20); // Account for "Directory: " prefix [INFO] [stdout] ... [INFO] [stdout] 675 | ])); [INFO] [stdout] 676 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/ui.rs:678:12 [INFO] [stdout] | [INFO] [stdout] 678 | } else if name == "file_manager" { [INFO] [stdout] | ____________^ [INFO] [stdout] 679 | | if let Some(json) = parsed_args.as_ref() { [INFO] [stdout] 680 | | // Check if it's a batch operation [INFO] [stdout] 681 | | if let Some(files_array) = json.get("files").and_then(|v| v.as_array()) { [INFO] [stdout] ... | [INFO] [stdout] 924 | | } [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] 678 ~ } else if name == "file_manager" [INFO] [stdout] 679 ~ && let Some(json) = parsed_args.as_ref() { [INFO] [stdout] 680 | // Check if it's a batch operation [INFO] [stdout] ... [INFO] [stdout] 922 | } [INFO] [stdout] 923 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/ui.rs:773:17 [INFO] [stdout] | [INFO] [stdout] 773 | / if kind == "file" { [INFO] [stdout] 774 | | if let Some(content) = json.get("content").and_then(|v| { [INFO] [stdout] 775 | | if v.is_string() { [INFO] [stdout] 776 | | v.as_str() [INFO] [stdout] ... | [INFO] [stdout] 921 | | } [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 kind == "file" [INFO] [stdout] 774 ~ && let Some(content) = json.get("content").and_then(|v| { [INFO] [stdout] 775 | if v.is_string() { [INFO] [stdout] ... [INFO] [stdout] 919 | } [INFO] [stdout] 920 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/cli/ui.rs:774:21 [INFO] [stdout] | [INFO] [stdout] 774 | / if let Some(content) = json.get("content").and_then(|v| { [INFO] [stdout] 775 | | if v.is_string() { [INFO] [stdout] 776 | | v.as_str() [INFO] [stdout] 777 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 920 | | } [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] 780 ~ }) [INFO] [stdout] 781 ~ && !content.is_empty() { [INFO] [stdout] 782 | lines.push(Line::from(Span::raw(""))); [INFO] [stdout] ... [INFO] [stdout] 918 | ])); [INFO] [stdout] 919 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0` is never greater than `filtered_providers.len().saturating_sub(1)` and has therefore no effect [INFO] [stdout] --> src/bin/cli/ui.rs:2385:30 [INFO] [stdout] | [INFO] [stdout] 2385 | .select(Some(0.max(filtered_providers.len().saturating_sub(1)))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `filtered_providers.len().saturating_sub(1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_min_or_max [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `current_char_count` is used as a loop counter [INFO] [stdout] --> src/bin/cli/ui.rs:1114:29 [INFO] [stdout] | [INFO] [stdout] 1114 | ... for (idx, _) in remaining.char_indices() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (current_char_count, (idx, _)) in remaining.char_indices().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/bin/cli/editor/editor_ui.rs:511:22 [INFO] [stdout] | [INFO] [stdout] 511 | let menu_items = vec![ [INFO] [stdout] | ______________________^ [INFO] [stdout] 512 | | ("Find File", "f", "Open file explorer to browse and open files"), [INFO] [stdout] 513 | | ("New File", "n", "Create a new file"), [INFO] [stdout] 514 | | ("Find Text", "g", "Search for text in files (grep)"), [INFO] [stdout] ... | [INFO] [stdout] 517 | | ("Quit", "q", "Exit editor mode"), [INFO] [stdout] 518 | | ]; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 511 ~ let menu_items = [("Find File", "f", "Open file explorer to browse and open files"), [INFO] [stdout] 512 + ("New File", "n", "Create a new file"), [INFO] [stdout] 513 + ("Find Text", "g", "Search for text in files (grep)"), [INFO] [stdout] 514 + ("Recent Files", "r", "Open a recently edited file"), [INFO] [stdout] 515 + ("Config", "c", "Open editor configuration"), [INFO] [stdout] 516 ~ ("Quit", "q", "Exit editor mode")]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0` is never greater than `filtered_models.len().saturating_sub(1)` and has therefore no effect [INFO] [stdout] --> src/bin/cli/ui.rs:1971:30 [INFO] [stdout] | [INFO] [stdout] 1971 | .select(Some(0.max(filtered_models.len().saturating_sub(1)))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `filtered_models.len().saturating_sub(1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_min_or_max [INFO] [stdout] = note: `#[warn(clippy::unnecessary_min_or_max)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0` is never greater than `filtered_providers.len().saturating_sub(1)` and has therefore no effect [INFO] [stdout] --> src/bin/cli/ui.rs:2385:30 [INFO] [stdout] | [INFO] [stdout] 2385 | .select(Some(0.max(filtered_providers.len().saturating_sub(1)))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `filtered_providers.len().saturating_sub(1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_min_or_max [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/bin/cli/editor/editor_ui.rs:511:22 [INFO] [stdout] | [INFO] [stdout] 511 | let menu_items = vec![ [INFO] [stdout] | ______________________^ [INFO] [stdout] 512 | | ("Find File", "f", "Open file explorer to browse and open files"), [INFO] [stdout] 513 | | ("New File", "n", "Create a new file"), [INFO] [stdout] 514 | | ("Find Text", "g", "Search for text in files (grep)"), [INFO] [stdout] ... | [INFO] [stdout] 517 | | ("Quit", "q", "Exit editor mode"), [INFO] [stdout] 518 | | ]; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 511 ~ let menu_items = [("Find File", "f", "Open file explorer to browse and open files"), [INFO] [stdout] 512 + ("New File", "n", "Create a new file"), [INFO] [stdout] 513 + ("Find Text", "g", "Search for text in files (grep)"), [INFO] [stdout] 514 + ("Recent Files", "r", "Open a recently edited file"), [INFO] [stdout] 515 + ("Config", "c", "Open editor configuration"), [INFO] [stdout] 516 ~ ("Quit", "q", "Exit editor mode")]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 14s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: screenshots v0.7.3 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1` [INFO] running `Command { std: "docker" "inspect" "272a630ad65ed6bd4ef8681a2d79ef79c41e7585a8e7b9102015c1ca8971cdc1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "272a630ad65ed6bd4ef8681a2d79ef79c41e7585a8e7b9102015c1ca8971cdc1", kill_on_drop: false }` [INFO] [stdout] 272a630ad65ed6bd4ef8681a2d79ef79c41e7585a8e7b9102015c1ca8971cdc1