[INFO] fetching crate xtalk 0.0.1-alpha.3... [INFO] linting xtalk-0.0.1-alpha.3 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate xtalk 0.0.1-alpha.3 into /workspace/builds/worker-4-tc1/source [INFO] started tweaking crates.io crate xtalk 0.0.1-alpha.3 [INFO] finished tweaking crates.io crate xtalk 0.0.1-alpha.3 [INFO] tweaked toml for crates.io crate xtalk 0.0.1-alpha.3 written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate xtalk 0.0.1-alpha.3 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 crates.io crate xtalk 0.0.1-alpha.3 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] Downloading crates ... [INFO] [stderr] Downloaded fd-lock v4.0.2 [INFO] [stderr] Downloaded async-trait v0.1.80 [INFO] [stderr] Downloaded zerocopy v0.6.6 [INFO] [stderr] Downloaded icu_properties v1.5.0 [INFO] [stderr] Downloaded ppv-lite86 v0.2.18 [INFO] [stderr] Downloaded nu-ansi-term v0.50.0 [INFO] [stderr] Downloaded vte_generate_state_changes v0.1.2 [INFO] [stderr] Downloaded zerovec-derive v0.10.2 [INFO] [stderr] Downloaded tokio-macros v2.3.0 [INFO] [stderr] Downloaded zerovec v0.10.2 [INFO] [stderr] Downloaded cc v1.0.99 [INFO] [stderr] Downloaded backtrace v0.3.72 [INFO] [stderr] Downloaded toml_edit v0.22.20 [INFO] [stderr] Downloaded hyper-util v0.1.5 [INFO] [stderr] Downloaded reedline v0.32.0 [INFO] [stderr] Downloaded idna v1.0.0 [INFO] [stderr] Downloaded url v2.5.1 [INFO] [stderr] Downloaded object v0.35.0 [INFO] [stderr] Downloaded zerocopy-derive v0.6.6 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 1e59bb42e2c2ff4374f941e4805424d98bd0fb5b4ab4d4ff2e5186911deb5927 [INFO] running `Command { std: "docker" "start" "-a" "1e59bb42e2c2ff4374f941e4805424d98bd0fb5b4ab4d4ff2e5186911deb5927", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "1e59bb42e2c2ff4374f941e4805424d98bd0fb5b4ab4d4ff2e5186911deb5927", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1e59bb42e2c2ff4374f941e4805424d98bd0fb5b4ab4d4ff2e5186911deb5927", kill_on_drop: false }` [INFO] [stdout] 1e59bb42e2c2ff4374f941e4805424d98bd0fb5b4ab4d4ff2e5186911deb5927 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] d9d08aef816b09fffb3ae8ac1466a5b84a079f81a8655ba6fca1ba9e41c884e2 [INFO] running `Command { std: "docker" "start" "-a" "d9d08aef816b09fffb3ae8ac1466a5b84a079f81a8655ba6fca1ba9e41c884e2", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.85 [INFO] [stderr] Compiling libc v0.2.155 [INFO] [stderr] Compiling autocfg v1.3.0 [INFO] [stderr] Compiling serde v1.0.203 [INFO] [stderr] Checking smallvec v1.13.2 [INFO] [stderr] Checking log v0.4.21 [INFO] [stderr] Checking bytes v1.6.0 [INFO] [stderr] Compiling cc v1.0.99 [INFO] [stderr] Compiling pkg-config v0.3.30 [INFO] [stderr] Checking futures-core v0.3.30 [INFO] [stderr] Checking itoa v1.0.11 [INFO] [stderr] Checking equivalent v1.0.1 [INFO] [stderr] Checking tracing-core v0.1.32 [INFO] [stderr] Checking indexmap v2.2.6 [INFO] [stderr] Checking http v1.1.0 [INFO] [stderr] Compiling lock_api v0.4.12 [INFO] [stderr] Compiling slab v0.4.9 [INFO] [stderr] Compiling httparse v1.8.0 [INFO] [stderr] Compiling openssl v0.10.64 [INFO] [stderr] Checking futures-task v0.3.30 [INFO] [stderr] Compiling quote v1.0.36 [INFO] [stderr] Checking futures-sink v0.3.30 [INFO] [stderr] Checking tracing v0.1.40 [INFO] [stderr] Checking signal-hook-registry v1.4.2 [INFO] [stderr] Checking mio v0.8.11 [INFO] [stderr] Checking parking_lot_core v0.9.10 [INFO] [stderr] Compiling openssl-sys v0.9.102 [INFO] [stderr] Checking num_cpus v1.16.0 [INFO] [stderr] Checking socket2 v0.5.7 [INFO] [stderr] Compiling native-tls v0.2.12 [INFO] [stderr] Compiling syn v2.0.66 [INFO] [stderr] Checking parking_lot v0.12.3 [INFO] [stderr] Checking http-body v1.0.0 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking futures-channel v0.3.30 [INFO] [stderr] Checking tower-layer v0.3.2 [INFO] [stderr] Compiling rustix v0.38.34 [INFO] [stderr] Checking tower-service v0.3.2 [INFO] [stderr] Checking byteorder v1.5.0 [INFO] [stderr] Checking signal-hook v0.3.17 [INFO] [stderr] Compiling vte_generate_state_changes v0.1.2 [INFO] [stderr] Checking getrandom v0.2.15 [INFO] [stderr] Checking anstyle-parse v0.2.4 [INFO] [stderr] Compiling thiserror v1.0.63 [INFO] [stderr] Checking colorchoice v1.0.1 [INFO] [stderr] Checking linux-raw-sys v0.4.14 [INFO] [stderr] Compiling serde_json v1.0.117 [INFO] [stderr] Checking is_terminal_polyfill v1.70.0 [INFO] [stderr] Checking anstyle v1.0.7 [INFO] [stderr] Checking ryu v1.0.18 [INFO] [stderr] Checking anstyle-query v1.1.0 [INFO] [stderr] Checking signal-hook-mio v0.2.3 [INFO] [stderr] Checking vte v0.11.1 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking http-body-util v0.1.1 [INFO] [stderr] Checking clap_lex v0.7.1 [INFO] [stderr] Checking anstream v0.6.14 [INFO] [stderr] Checking rustls-pki-types v1.7.0 [INFO] [stderr] Checking either v1.13.0 [INFO] [stderr] Checking winnow v0.6.18 [INFO] [stderr] Checking clap_builder v4.5.9 [INFO] [stderr] Checking rustls-pemfile v2.1.2 [INFO] [stderr] Checking itertools v0.12.1 [INFO] [stderr] Checking encoding_rs v0.8.34 [INFO] [stderr] Checking ipnet v2.9.0 [INFO] [stderr] Checking unicode-width v0.1.13 [INFO] [stderr] Checking nu-ansi-term v0.50.0 [INFO] [stderr] Checking unicode-segmentation v1.11.0 [INFO] [stderr] Checking strip-ansi-escapes v0.2.0 [INFO] [stderr] Compiling synstructure v0.13.1 [INFO] [stderr] Compiling serde_derive v1.0.203 [INFO] [stderr] Compiling zerofrom-derive v0.1.4 [INFO] [stderr] Compiling yoke-derive v0.7.4 [INFO] [stderr] Compiling zerovec-derive v0.10.2 [INFO] [stderr] Compiling displaydoc v0.2.4 [INFO] [stderr] Compiling tokio-macros v2.3.0 [INFO] [stderr] Compiling icu_provider_macros v1.5.0 [INFO] [stderr] Compiling futures-macro v0.3.30 [INFO] [stderr] Compiling pin-project-internal v1.1.5 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Compiling zerocopy-derive v0.6.6 [INFO] [stderr] Checking tokio v1.38.0 [INFO] [stderr] Checking futures-util v0.3.30 [INFO] [stderr] Compiling strum_macros v0.26.4 [INFO] [stderr] Compiling thiserror-impl v1.0.63 [INFO] [stderr] Checking zerocopy v0.6.6 [INFO] [stderr] Checking pin-project v1.1.5 [INFO] [stderr] Compiling clap_derive v4.5.8 [INFO] [stderr] Checking zerofrom v0.1.4 [INFO] [stderr] Checking yoke v0.7.4 [INFO] [stderr] Checking ppv-lite86 v0.2.18 [INFO] [stderr] Checking zerovec v0.10.2 [INFO] [stderr] Compiling async-trait v0.1.80 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking strum v0.26.3 [INFO] [stderr] Checking tinystr v0.7.6 [INFO] [stderr] Checking icu_collections v1.5.0 [INFO] [stderr] Checking icu_locid v1.5.0 [INFO] [stderr] Checking icu_provider v1.5.0 [INFO] [stderr] Checking clap v4.5.9 [INFO] [stderr] Checking icu_locid_transform v1.5.0 [INFO] [stderr] Checking icu_properties v1.5.0 [INFO] [stderr] Checking tokio-util v0.7.11 [INFO] [stderr] Checking tower v0.4.13 [INFO] [stderr] Checking bitflags v2.5.0 [INFO] [stderr] Checking serde_spanned v0.6.7 [INFO] [stderr] Checking toml_datetime v0.6.8 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking chrono v0.4.38 [INFO] [stderr] Checking h2 v0.4.5 [INFO] [stderr] Checking toml_edit v0.22.20 [INFO] [stderr] Checking crossterm v0.27.0 [INFO] [stderr] Checking icu_normalizer v1.5.0 [INFO] [stderr] Checking idna v1.0.0 [INFO] [stderr] Checking url v2.5.1 [INFO] [stderr] Checking fd-lock v4.0.2 [INFO] [stderr] Checking reedline v0.32.0 [INFO] [stderr] Checking toml v0.8.19 [INFO] [stderr] Checking hyper v1.3.1 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking hyper-util v0.1.5 [INFO] [stderr] Checking hyper-tls v0.6.0 [INFO] [stderr] Checking reqwest v0.12.4 [INFO] [stderr] Checking xtalk v0.0.1-alpha.3 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `Color` [INFO] [stdout] --> src/cli/chat/prompt.rs:3:11 [INFO] [stdout] | [INFO] [stdout] 3 | self, Color, PromptEditMode, PromptHistorySearch, PromptHistorySearchStatus, PromptViMode, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/cli/chat/prompt.rs:9:21 [INFO] [stdout] | [INFO] [stdout] 9 | const USER_PROMPT: &'static str = "[#] "; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/cli/chat/prompt.rs:10:31 [INFO] [stdout] | [INFO] [stdout] 10 | const USER_VI_INSERT_PROMPT: &'static str = USER_PROMPT; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/cli/chat/prompt.rs:11:31 [INFO] [stdout] | [INFO] [stdout] 11 | const USER_VI_NORMAL_PROMPT: &'static str = "[=] "; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/cli/chat/prompt.rs:12:27 [INFO] [stdout] | [INFO] [stdout] 12 | const COMPLETION_MARKER: &'static str = "[/] "; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/cli/chat/prompt.rs:13:30 [INFO] [stdout] | [INFO] [stdout] 13 | const USER_MULTLINE_PROMPT: &'static str = "::: "; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Keybindings` [INFO] [stdout] --> src/cli/chat/repl.rs:9:19 [INFO] [stdout] | [INFO] [stdout] 9 | KeyModifiers, Keybindings, ReedlineEvent, ReedlineMenu, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `DefaultPromptSegment` and `DefaultPrompt` [INFO] [stdout] --> src/cli/chat/repl.rs:12:67 [INFO] [stdout] | [INFO] [stdout] 12 | default_vi_insert_keybindings, default_vi_normal_keybindings, DefaultPrompt, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 13 | DefaultPromptSegment, EditCommand, MenuBuilder, Reedline, Signal, Vi, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `warn` [INFO] [stdout] --> src/cli/chat/repl.rs:18:21 [INFO] [stdout] | [INFO] [stdout] 18 | use crate::{config, warn}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `self` [INFO] [stdout] --> src/cli/chat.rs:20:33 [INFO] [stdout] | [INFO] [stdout] 20 | use crate::registry::registry::{self, ModelSpec, Registry}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::default` [INFO] [stdout] --> src/config.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::default; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/config.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | use toml; [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: constants have by default a `'static` lifetime [INFO] [stdout] --> src/providers/ollama/api.rs:11:33 [INFO] [stdout] | [INFO] [stdout] 11 | const OLLAMA_DEFAULT_ENDPOINT: &'static str = "http://localhost:11434"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::*` [INFO] [stdout] --> src/providers/ollama/api.rs:239:9 [INFO] [stdout] | [INFO] [stdout] 239 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/providers/openai/api.rs:248:26 [INFO] [stdout] | [INFO] [stdout] 248 | const DEFAULT_API_BASE: &'static str = "https://api.openai.com"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::*` [INFO] [stdout] --> src/providers/openai/api.rs:313:9 [INFO] [stdout] | [INFO] [stdout] 313 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/providers/openai/api.rs:314:5 [INFO] [stdout] | [INFO] [stdout] 314 | 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 import: `serde_json` [INFO] [stdout] --> src/providers/openai/api.rs:314:9 [INFO] [stdout] | [INFO] [stdout] 314 | use serde_json; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/providers/providers.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | use strum_macros; [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: constants have by default a `'static` lifetime [INFO] [stdout] --> src/registry/populate.rs:27:28 [INFO] [stdout] | [INFO] [stdout] 27 | const OPENAI_ENV_KEY_VAR: &'static str = "OPENAI_API_KEY"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::default` [INFO] [stdout] --> src/registry/registry.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::default; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/registry/registry.rs:240:21 [INFO] [stdout] | [INFO] [stdout] 240 | model: model, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `model` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ModelResolver`, `ModelSpec`, `ProvidedDefaultModel`, `ProvidedModel`, and `Registry` [INFO] [stdout] --> src/registry.rs:33:16 [INFO] [stdout] | [INFO] [stdout] 33 | use registry::{ModelResolver, ModelSpec, ProvidedDefaultModel, ProvidedModel, Registry}; [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/version.rs:1:28 [INFO] [stdout] | [INFO] [stdout] 1 | pub(crate) const VERSION: &'static str = "0.0.1-alpha.3"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/version.rs:2:25 [INFO] [stdout] | [INFO] [stdout] 2 | pub(crate) const NAME: &'static str = "xtalk"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Color` [INFO] [stdout] --> src/cli/chat/prompt.rs:3:11 [INFO] [stdout] | [INFO] [stdout] 3 | self, Color, PromptEditMode, PromptHistorySearch, PromptHistorySearchStatus, PromptViMode, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/cli/chat/prompt.rs:9:21 [INFO] [stdout] | [INFO] [stdout] 9 | const USER_PROMPT: &'static str = "[#] "; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/cli/chat/prompt.rs:10:31 [INFO] [stdout] | [INFO] [stdout] 10 | const USER_VI_INSERT_PROMPT: &'static str = USER_PROMPT; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/cli/chat/prompt.rs:11:31 [INFO] [stdout] | [INFO] [stdout] 11 | const USER_VI_NORMAL_PROMPT: &'static str = "[=] "; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/cli/chat/prompt.rs:12:27 [INFO] [stdout] | [INFO] [stdout] 12 | const COMPLETION_MARKER: &'static str = "[/] "; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/cli/chat/prompt.rs:13:30 [INFO] [stdout] | [INFO] [stdout] 13 | const USER_MULTLINE_PROMPT: &'static str = "::: "; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Keybindings` [INFO] [stdout] --> src/cli/chat/repl.rs:9:19 [INFO] [stdout] | [INFO] [stdout] 9 | KeyModifiers, Keybindings, ReedlineEvent, ReedlineMenu, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `DefaultPromptSegment` and `DefaultPrompt` [INFO] [stdout] --> src/cli/chat/repl.rs:12:67 [INFO] [stdout] | [INFO] [stdout] 12 | default_vi_insert_keybindings, default_vi_normal_keybindings, DefaultPrompt, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 13 | DefaultPromptSegment, EditCommand, MenuBuilder, Reedline, Signal, Vi, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `warn` [INFO] [stdout] --> src/cli/chat/repl.rs:18:21 [INFO] [stdout] | [INFO] [stdout] 18 | use crate::{config, warn}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `self` [INFO] [stdout] --> src/cli/chat.rs:20:33 [INFO] [stdout] | [INFO] [stdout] 20 | use crate::registry::registry::{self, ModelSpec, Registry}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::default` [INFO] [stdout] --> src/config.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::default; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/config.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | use toml; [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: unused import: `std::result` [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:301:9 [INFO] [stdout] | [INFO] [stdout] 301 | use std::result; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:306:27 [INFO] [stdout] | [INFO] [stdout] 306 | const NDJSON_STREAM: &'static str = r#" [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:311:26 [INFO] [stdout] | [INFO] [stdout] 311 | const LSEE_STREAM1: &'static str = r#" [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:318:26 [INFO] [stdout] | [INFO] [stdout] 318 | const LSEE_STREAM2: &'static str = r#" [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:325:26 [INFO] [stdout] | [INFO] [stdout] 325 | const LSEE_STREAM3: &'static str = r#" [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:331:26 [INFO] [stdout] | [INFO] [stdout] 331 | const LSEE_STREAM4: &'static str = r#" [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:338:26 [INFO] [stdout] | [INFO] [stdout] 338 | const LSEE_STREAM5: &'static str = r#" [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:343:26 [INFO] [stdout] | [INFO] [stdout] 343 | const LSSE_STREAM6: &'static str = r#" [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/providers/ollama/api.rs:11:33 [INFO] [stdout] | [INFO] [stdout] 11 | const OLLAMA_DEFAULT_ENDPOINT: &'static str = "http://localhost:11434"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/providers/openai/api.rs:248:26 [INFO] [stdout] | [INFO] [stdout] 248 | const DEFAULT_API_BASE: &'static str = "https://api.openai.com"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/providers/openai/api.rs:314:5 [INFO] [stdout] | [INFO] [stdout] 314 | 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 import: `serde_json` [INFO] [stdout] --> src/providers/openai/api.rs:314:9 [INFO] [stdout] | [INFO] [stdout] 314 | use serde_json; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/providers/providers.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | use strum_macros; [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: constants have by default a `'static` lifetime [INFO] [stdout] --> src/registry/populate.rs:27:28 [INFO] [stdout] | [INFO] [stdout] 27 | const OPENAI_ENV_KEY_VAR: &'static str = "OPENAI_API_KEY"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::default` [INFO] [stdout] --> src/registry/registry.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::default; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/registry/registry.rs:240:21 [INFO] [stdout] | [INFO] [stdout] 240 | model: model, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `model` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ModelResolver`, `ModelSpec`, `ProvidedDefaultModel`, `ProvidedModel`, and `Registry` [INFO] [stdout] --> src/registry.rs:33:16 [INFO] [stdout] | [INFO] [stdout] 33 | use registry::{ModelResolver, ModelSpec, ProvidedDefaultModel, ProvidedModel, Registry}; [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/version.rs:1:28 [INFO] [stdout] | [INFO] [stdout] 1 | pub(crate) const VERSION: &'static str = "0.0.1-alpha.3"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/version.rs:2:25 [INFO] [stdout] | [INFO] [stdout] 2 | pub(crate) const NAME: &'static str = "xtalk"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cursor` [INFO] [stdout] --> src/cli/chat/highlighter.rs:7:37 [INFO] [stdout] | [INFO] [stdout] 7 | fn highlight(&self, line: &str, cursor: usize) -> reedline::StyledText { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_cursor` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cursor` [INFO] [stdout] --> src/cli/chat/highlighter.rs:7:37 [INFO] [stdout] | [INFO] [stdout] 7 | fn highlight(&self, line: &str, cursor: usize) -> reedline::StyledText { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_cursor` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Standard` is never constructed [INFO] [stdout] --> src/cli/chat.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 26 | pub(crate) enum Severity { [INFO] [stdout] | -------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 29 | Standard, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `output`, `model`, and `system` are never used [INFO] [stdout] --> src/cli/chat.rs:47:19 [INFO] [stdout] | [INFO] [stdout] 38 | impl Message { [INFO] [stdout] | ------------ associated functions in this implementation [INFO] [stdout] ... [INFO] [stdout] 47 | pub(crate) fn output(msg: String) -> Message { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 59 | pub(crate) fn model(msg: String, model_id: String) -> Message { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 63 | pub(crate) fn system(msg: String) -> Message { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `with_style` are never used [INFO] [stdout] --> src/cli/list/table.rs:45:19 [INFO] [stdout] | [INFO] [stdout] 44 | impl Cell { [INFO] [stdout] | --------- associated items in this implementation [INFO] [stdout] 45 | pub(crate) fn new(content: String, style: Style) -> Cell { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 65 | pub(crate) fn with_style(mut self, style: Style) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `IntoCell` is never used [INFO] [stdout] --> src/cli/list/table.rs:295:18 [INFO] [stdout] | [INFO] [stdout] 295 | pub(crate) trait IntoCell: Into + Sized { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `ContextExceeded` is never constructed [INFO] [stdout] --> src/providers.rs:77:5 [INFO] [stdout] | [INFO] [stdout] 47 | pub(crate) enum ErrorKind { [INFO] [stdout] | --------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 77 | ContextExceeded, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ErrorKind` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_kind` is never used [INFO] [stdout] --> src/providers.rs:89:19 [INFO] [stdout] | [INFO] [stdout] 88 | impl Error { [INFO] [stdout] | ---------- associated function in this implementation [INFO] [stdout] 89 | pub(crate) fn from_kind(kind: ErrorKind) -> Error { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `role` is never read [INFO] [stdout] --> src/providers.rs:150:9 [INFO] [stdout] | [INFO] [stdout] 148 | pub(crate) struct MessageDelta { [INFO] [stdout] | ------------ field in this struct [INFO] [stdout] 149 | /// The role of the message. [INFO] [stdout] 150 | pub role: Role, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `MessageDelta` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `prompt_tokens` and `completion_tokens` are never read [INFO] [stdout] --> src/providers.rs:159:5 [INFO] [stdout] | [INFO] [stdout] 157 | pub(crate) struct Usage { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] 158 | /// The number of tokens in the prompt. [INFO] [stdout] 159 | prompt_tokens: Option, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 160 | /// The number of tokens in the response. [INFO] [stdout] 161 | completion_tokens: Option, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Usage` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `finish_reason` and `usage` are never used [INFO] [stdout] --> src/providers.rs:172:8 [INFO] [stdout] | [INFO] [stdout] 166 | pub(crate) trait AsyncMessageIterator { [INFO] [stdout] | -------------------- methods in this trait [INFO] [stdout] ... [INFO] [stdout] 172 | fn finish_reason(&self) -> FinishReason; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 176 | fn usage(&self) -> &Usage; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `typ` is never read [INFO] [stdout] --> src/providers/openai/api.rs:225:5 [INFO] [stdout] | [INFO] [stdout] 222 | pub(super) struct ApiErrorPayload { [INFO] [stdout] | --------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 225 | typ: String, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ApiErrorPayload` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `env_api_key` is never used [INFO] [stdout] --> src/providers/openai/api.rs:316:8 [INFO] [stdout] | [INFO] [stdout] 316 | fn env_api_key() -> String { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/providers/openai/provider.rs:50:19 [INFO] [stdout] | [INFO] [stdout] 49 | impl OpenAIProvider { [INFO] [stdout] | ------------------- associated function in this implementation [INFO] [stdout] 50 | pub(crate) fn new(api_key: &str, api_base: U) -> Result { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `provider` and `model` are never used [INFO] [stdout] --> src/registry/registry.rs:112:19 [INFO] [stdout] | [INFO] [stdout] 85 | impl ModelSpec { [INFO] [stdout] | -------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 112 | pub(crate) fn provider(&self) -> Option { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 116 | pub(crate) fn model(&self) -> Option<&str> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Style` which implements the `Copy` trait [INFO] [stdout] --> src/cli/chat/highlighter.rs:9:27 [INFO] [stdout] | [INFO] [stdout] 9 | buffer: vec![(color::USER_TEXT.clone(), line.to_string())], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*color::USER_TEXT` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: matching on `Some` with `ok()` is redundant [INFO] [stdout] --> src/cli/chat/repl.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | if let Some(editor) = env::var("EDITOR").ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_result_ok [INFO] [stdout] = note: `#[warn(clippy::match_result_ok)]` on by default [INFO] [stdout] help: consider matching on `Ok(editor)` and removing the call to `ok` instead [INFO] [stdout] | [INFO] [stdout] 33 - if let Some(editor) = env::var("EDITOR").ok() { [INFO] [stdout] 33 + if let Ok(editor) = env::var("EDITOR") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::path::PathBuf` [INFO] [stdout] --> src/cli/chat/repl.rs:40:33 [INFO] [stdout] | [INFO] [stdout] 40 | let full_path = PathBuf::from(path.join(editor)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `PathBuf::from()`: `path.join(editor)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/cli/chat/repl.rs:54:41 [INFO] [stdout] | [INFO] [stdout] 54 | fn read_from_interactive_editor(editor: &PathBuf, temp_file: &mut Tempfile) -> String { [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] 54 ~ fn read_from_interactive_editor(editor: &Path, temp_file: &mut Tempfile) -> String { [INFO] [stdout] 55 | // Remove the previous contents of the file [INFO] [stdout] ... [INFO] [stdout] 66 | // Launch the editor subprocess [INFO] [stdout] 67 ~ let status = Command::new(editor.to_path_buf()).arg(temp_file.path()).status(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/cli/chat/repl.rs:179:37 [INFO] [stdout] | [INFO] [stdout] 179 | let editor = editor.or_else(|| resolve_fallback_editor()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `resolve_fallback_editor` [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: use of `default` to create a unit struct [INFO] [stdout] --> src/cli/chat/repl.rs:185:40 [INFO] [stdout] | [INFO] [stdout] 185 | .with_highlighter(Box::new(Highlighter::default())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs [INFO] [stdout] = note: `#[warn(clippy::default_constructed_unit_structs)]` on by default [INFO] [stdout] help: remove this call to `default` [INFO] [stdout] | [INFO] [stdout] 185 - .with_highlighter(Box::new(Highlighter::default())); [INFO] [stdout] 185 + .with_highlighter(Box::new(Highlighter)); [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/cli/chat/tempfile.rs:17:15 [INFO] [stdout] | [INFO] [stdout] 17 | temp_dir: &PathBuf, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 17 - temp_dir: &PathBuf, [INFO] [stdout] 17 + temp_dir: &Path, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/cli/chat.rs:188:17 [INFO] [stdout] | [INFO] [stdout] 188 | let model = args.model.clone().or_else(|| default_model); [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 `or` instead [INFO] [stdout] | [INFO] [stdout] 188 - let model = args.model.clone().or_else(|| default_model); [INFO] [stdout] 188 + let model = args.model.clone().or(default_model); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'p [INFO] [stdout] --> src/cli/chat.rs:222:15 [INFO] [stdout] | [INFO] [stdout] 222 | async fn chat<'p>( [INFO] [stdout] | ^^ [INFO] [stdout] ... [INFO] [stdout] 225 | provider: &'p Box, [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/cli/chat.rs:225:15 [INFO] [stdout] | [INFO] [stdout] 225 | provider: &'p Box, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&'p dyn ChatProvider` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] = note: `#[warn(clippy::borrowed_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/cli/chat.rs:288:32 [INFO] [stdout] | [INFO] [stdout] 288 | .stream_completion(&model_id, &msg_buf.chat_messages()) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `model_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/cli/list.rs:88:1 [INFO] [stdout] | [INFO] [stdout] 88 | impl Into for Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From>` [INFO] [stdout] | [INFO] [stdout] 88 ~ impl From> for Table { [INFO] [stdout] 89 ~ fn from(val: Vec) -> Self { [INFO] [stdout] 90 | let mut tab = Table::new(); [INFO] [stdout] ... [INFO] [stdout] 93 | [INFO] [stdout] 94 ~ for provider in val { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/config.rs:138:24 [INFO] [stdout] | [INFO] [stdout] 138 | fn parse_config_or_die<'de, S: serde::de::DeserializeOwned>(config: &str) -> S { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/config.rs:161:13 [INFO] [stdout] | [INFO] [stdout] 161 | / match (user_value, config_value) { [INFO] [stdout] 162 | | (toml::Value::Table(user_value), toml::Value::Table(config_value)) => { [INFO] [stdout] 163 | | warn_on_extra_fields_helper(path, user_value, config_value) [INFO] [stdout] ... | [INFO] [stdout] 166 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 161 ~ if let (toml::Value::Table(user_value), toml::Value::Table(config_value)) = (user_value, config_value) { [INFO] [stdout] 162 + warn_on_extra_fields_helper(path, user_value, config_value) [INFO] [stdout] 163 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `LSSE` contains a capitalized acronym [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | LSSE, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Lsse` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:150:9 [INFO] [stdout] | [INFO] [stdout] 150 | return *i != self.buf.len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 150 - return *i != self.buf.len(); [INFO] [stdout] 150 + *i != self.buf.len() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:154:36 [INFO] [stdout] | [INFO] [stdout] 154 | fn striped_line(i: usize, buf: &Vec) -> &[u8] { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 154 - fn striped_line(i: usize, buf: &Vec) -> &[u8] { [INFO] [stdout] 154 + fn striped_line(i: usize, buf: &[u8]) -> &[u8] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:179:16 [INFO] [stdout] | [INFO] [stdout] 179 | if self.data.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.data.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: length comparison to zero [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:196:35 [INFO] [stdout] | [INFO] [stdout] 196 | let end_of_event = if line_content.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line_content.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:198:20 [INFO] [stdout] | [INFO] [stdout] 198 | Ok(self.data.len() > 0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.data.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:206:20 [INFO] [stdout] | [INFO] [stdout] 206 | if field_name.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `field_name.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:237:16 [INFO] [stdout] | [INFO] [stdout] 237 | if self.data.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.data.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'd [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:245:26 [INFO] [stdout] | [INFO] [stdout] 245 | async fn parse_chunk<'d>(&'d mut self) -> Option> { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:285:9 [INFO] [stdout] | [INFO] [stdout] 285 | / c.and_then(|r| { [INFO] [stdout] 286 | | Some(match r { [INFO] [stdout] 287 | | Ok(bytes) => serde_json::from_slice::(&bytes).map_err(|e| { [INFO] [stdout] 288 | | Error::DeseralizationFailed(DeseralizationFailedError { [INFO] [stdout] ... | [INFO] [stdout] 294 | | }) [INFO] [stdout] 295 | | }) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 285 ~ c.map(|r| match r { [INFO] [stdout] 286 + Ok(bytes) => serde_json::from_slice::(&bytes).map_err(|e| { [INFO] [stdout] 287 + Error::DeseralizationFailed(DeseralizationFailedError { [INFO] [stdout] 288 + blob: String::from_utf8_lossy(bytes).into_owned(), [INFO] [stdout] 289 + error: e, [INFO] [stdout] 290 + }) [INFO] [stdout] 291 + }), [INFO] [stdout] 292 + Err(err) => Err(err), [INFO] [stdout] 293 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:287:58 [INFO] [stdout] | [INFO] [stdout] 287 | Ok(bytes) => serde_json::from_slice::(&bytes).map_err(|e| { [INFO] [stdout] | ^^^^^^ help: change this to: `bytes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/providers/ollama/api.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | InternalError(String), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/providers/ollama/api.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | UnspecifiedError(String), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/providers/ollama/api.rs:79:1 [INFO] [stdout] | [INFO] [stdout] 79 | / impl Default for DoneReason { [INFO] [stdout] 80 | | fn default() -> Self { [INFO] [stdout] 81 | | DoneReason::None [INFO] [stdout] 82 | | } [INFO] [stdout] 83 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 71 + #[derive(Default)] [INFO] [stdout] 72 | pub(super) enum DoneReason { [INFO] [stdout] 73 ~ #[default] [INFO] [stdout] 74 ~ None, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/providers/ollama/api.rs:149:23 [INFO] [stdout] | [INFO] [stdout] 149 | r.map_err(|e| Error::StreamParser(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::StreamParser` [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/providers/ollama/api.rs:165:51 [INFO] [stdout] | [INFO] [stdout] 165 | api_base: api_base.into_url().map_err(|e| Error::InvalidApiBase(e))?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::InvalidApiBase` [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: variant name ends with the enum's name [INFO] [stdout] --> src/providers/openai/api.rs:74:5 [INFO] [stdout] | [INFO] [stdout] 74 | InternalError(ApiErrorPayload), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: some ranges overlap [INFO] [stdout] --> src/providers/openai/api.rs:88:13 [INFO] [stdout] | [INFO] [stdout] 88 | 400 => Error::BadRequest(payload), [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] note: overlaps with this [INFO] [stdout] --> src/providers/openai/api.rs:97:13 [INFO] [stdout] | [INFO] [stdout] 97 | 400..=599 => Error::UnknownStatus(payload), [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_overlapping_arm [INFO] [stdout] = note: `#[warn(clippy::match_overlapping_arm)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/providers/openai/api.rs:159:1 [INFO] [stdout] | [INFO] [stdout] 159 | / impl Default for ChatCompletionOptions { [INFO] [stdout] 160 | | fn default() -> ChatCompletionOptions { [INFO] [stdout] 161 | | ChatCompletionOptions { [INFO] [stdout] 162 | | temperature: None, [INFO] [stdout] ... | [INFO] [stdout] 174 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 121 + #[derive(Default)] [INFO] [stdout] 122 | struct ChatCompletionOptions { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/providers/openai/api.rs:257:52 [INFO] [stdout] | [INFO] [stdout] 257 | let api_base = api_base.into_url().map_err(|e| Error::InvalidApiBase(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::InvalidApiBase` [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: called `unwrap` on `chunk.usage` after checking its variant with `is_some` [INFO] [stdout] --> src/providers/openai/provider.rs:124:37 [INFO] [stdout] | [INFO] [stdout] 121 | if chunk.usage.is_some() { [INFO] [stdout] | ------------------------ help: try: `if let Some() = chunk.usage` [INFO] [stdout] ... [INFO] [stdout] 124 | let usage = chunk.usage.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/providers.rs:34:1 [INFO] [stdout] | [INFO] [stdout] 34 | pub(crate) mod providers; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/registry/populate.rs:109:66 [INFO] [stdout] | [INFO] [stdout] 109 | let provider = Box::new(OpenAIProvider::with_api_key(&api_key)); [INFO] [stdout] | ^^^^^^^^ help: change this to: `api_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'r [INFO] [stdout] --> src/registry/populate.rs:119:34 [INFO] [stdout] | [INFO] [stdout] 119 | pub(crate) async fn resolve_once<'r>( [INFO] [stdout] | ^^ [INFO] [stdout] 120 | registry: &'r Registry, [INFO] [stdout] | ^^ [INFO] [stdout] 121 | raw_spec: Option, [INFO] [stdout] 122 | ) -> Result<(&'r Box, String), Error> { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/registry/populate.rs:126:45 [INFO] [stdout] | [INFO] [stdout] 126 | let resolver = ModelResolver::build(®istry).await?; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `registry` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/registry.rs:31:1 [INFO] [stdout] | [INFO] [stdout] 31 | pub(crate) mod registry; [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: called `.as_ref().map(|s| s.as_str())` on an `Option` value [INFO] [stdout] --> src/registry/registry.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 75 | self.model.as_ref().map(|s| s.as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using as_deref: `self.model.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(|s| s.as_str())` on an `Option` value [INFO] [stdout] --> src/registry/registry.rs:117:9 [INFO] [stdout] | [INFO] [stdout] 117 | self.model.as_ref().map(|s| s.as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using as_deref: `self.model.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: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/registry/registry.rs:201:69 [INFO] [stdout] | [INFO] [stdout] 201 | pub(crate) fn provider(&self, id: ProviderIdentifier) -> Option<&Box> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&dyn ChatProvider` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/registry/registry.rs:210:17 [INFO] [stdout] | [INFO] [stdout] 210 | ) -> Result<&Box, Error> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&dyn ChatProvider` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type parameter `S` goes unused in function definition [INFO] [stdout] --> src/utils/errors.rs:16:23 [INFO] [stdout] | [INFO] [stdout] 16 | pub(crate) fn fmt_warn>(f: &mut std::fmt::Formatter, text: &str) -> std::fmt::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters [INFO] [stdout] = note: `#[warn(clippy::extra_unused_type_parameters)]` on by default [INFO] [stdout] help: consider removing the parameter [INFO] [stdout] | [INFO] [stdout] 16 - pub(crate) fn fmt_warn>(f: &mut std::fmt::Formatter, text: &str) -> std::fmt::Result { [INFO] [stdout] 16 + pub(crate) fn fmt_warn(f: &mut std::fmt::Formatter, text: &str) -> std::fmt::Result { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `as_ref` does nothing [INFO] [stdout] --> src/utils/errors.rs:17:22 [INFO] [stdout] | [INFO] [stdout] 17 | let text: &str = text.as_ref(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `text` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] = note: `#[warn(clippy::useless_asref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `eprintln!` [INFO] [stdout] --> src/main.rs:112:9 [INFO] [stdout] | [INFO] [stdout] 112 | eprintln!(""); [INFO] [stdout] | ^^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `eprintln!` [INFO] [stdout] --> src/main.rs:114:9 [INFO] [stdout] | [INFO] [stdout] 114 | eprintln!(""); [INFO] [stdout] | ^^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/cli/chat/prompt.rs:60:27 [INFO] [stdout] | [INFO] [stdout] 60 | fn render_prompt_left(&self) -> std::borrow::Cow { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 60 | fn render_prompt_left(&self) -> std::borrow::Cow<'_, str> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/cli/chat/prompt.rs:64:28 [INFO] [stdout] | [INFO] [stdout] 64 | fn render_prompt_right(&self) -> std::borrow::Cow { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 64 | fn render_prompt_right(&self) -> std::borrow::Cow<'_, str> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/cli/chat/prompt.rs:68:32 [INFO] [stdout] | [INFO] [stdout] 68 | fn render_prompt_indicator(&self, prompt_mode: reedline::PromptEditMode) -> Cow { [INFO] [stdout] | ^^^^^ the lifetime is elided here ^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 68 | fn render_prompt_indicator(&self, prompt_mode: reedline::PromptEditMode) -> Cow<'_, str> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/cli/chat/prompt.rs:79:42 [INFO] [stdout] | [INFO] [stdout] 79 | fn render_prompt_multiline_indicator(&self) -> Cow { [INFO] [stdout] | ^^^^^ ^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 79 | fn render_prompt_multiline_indicator(&self) -> Cow<'_, str> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/cli/chat/prompt.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | &self, [INFO] [stdout] | ^^^^^ the lifetime is elided here [INFO] [stdout] 85 | history_search: PromptHistorySearch, [INFO] [stdout] 86 | ) -> Cow { [INFO] [stdout] | ^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 86 | ) -> Cow<'_, str> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/color.rs:24:13 [INFO] [stdout] | [INFO] [stdout] 24 | USE_COLOR.store(true, Ordering::Relaxed); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/color.rs:27:13 [INFO] [stdout] | [INFO] [stdout] 27 | USE_COLOR.store(false, Ordering::Relaxed); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/color.rs:33:20 [INFO] [stdout] | [INFO] [stdout] 33 | match unsafe { USE_COLOR.load(Ordering::Relaxed) } { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Standard` is never constructed [INFO] [stdout] --> src/cli/chat.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 26 | pub(crate) enum Severity { [INFO] [stdout] | -------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 29 | Standard, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `output`, `model`, and `system` are never used [INFO] [stdout] --> src/cli/chat.rs:47:19 [INFO] [stdout] | [INFO] [stdout] 38 | impl Message { [INFO] [stdout] | ------------ associated functions in this implementation [INFO] [stdout] ... [INFO] [stdout] 47 | pub(crate) fn output(msg: String) -> Message { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 59 | pub(crate) fn model(msg: String, model_id: String) -> Message { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 63 | pub(crate) fn system(msg: String) -> Message { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `ContextExceeded` is never constructed [INFO] [stdout] --> src/providers.rs:77:5 [INFO] [stdout] | [INFO] [stdout] 47 | pub(crate) enum ErrorKind { [INFO] [stdout] | --------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 77 | ContextExceeded, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ErrorKind` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_kind` is never used [INFO] [stdout] --> src/providers.rs:89:19 [INFO] [stdout] | [INFO] [stdout] 88 | impl Error { [INFO] [stdout] | ---------- associated function in this implementation [INFO] [stdout] 89 | pub(crate) fn from_kind(kind: ErrorKind) -> Error { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `role` is never read [INFO] [stdout] --> src/providers.rs:150:9 [INFO] [stdout] | [INFO] [stdout] 148 | pub(crate) struct MessageDelta { [INFO] [stdout] | ------------ field in this struct [INFO] [stdout] 149 | /// The role of the message. [INFO] [stdout] 150 | pub role: Role, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `MessageDelta` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `prompt_tokens` and `completion_tokens` are never read [INFO] [stdout] --> src/providers.rs:159:5 [INFO] [stdout] | [INFO] [stdout] 157 | pub(crate) struct Usage { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] 158 | /// The number of tokens in the prompt. [INFO] [stdout] 159 | prompt_tokens: Option, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 160 | /// The number of tokens in the response. [INFO] [stdout] 161 | completion_tokens: Option, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Usage` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `finish_reason` and `usage` are never used [INFO] [stdout] --> src/providers.rs:172:8 [INFO] [stdout] | [INFO] [stdout] 166 | pub(crate) trait AsyncMessageIterator { [INFO] [stdout] | -------------------- methods in this trait [INFO] [stdout] ... [INFO] [stdout] 172 | fn finish_reason(&self) -> FinishReason; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 176 | fn usage(&self) -> &Usage; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `done` is never read [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:396:9 [INFO] [stdout] | [INFO] [stdout] 394 | struct ModelJson<'c> { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] 395 | model: &'c str, [INFO] [stdout] 396 | done: bool, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ModelJson` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `typ` is never read [INFO] [stdout] --> src/providers/openai/api.rs:225:5 [INFO] [stdout] | [INFO] [stdout] 222 | pub(super) struct ApiErrorPayload { [INFO] [stdout] | --------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 225 | typ: String, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ApiErrorPayload` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/providers/openai/provider.rs:50:19 [INFO] [stdout] | [INFO] [stdout] 49 | impl OpenAIProvider { [INFO] [stdout] | ------------------- associated function in this implementation [INFO] [stdout] 50 | pub(crate) fn new(api_key: &str, api_base: U) -> Result { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `provider` and `model` are never used [INFO] [stdout] --> src/registry/registry.rs:112:19 [INFO] [stdout] | [INFO] [stdout] 85 | impl ModelSpec { [INFO] [stdout] | -------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 112 | pub(crate) fn provider(&self) -> Option { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 116 | pub(crate) fn model(&self) -> Option<&str> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Style` which implements the `Copy` trait [INFO] [stdout] --> src/cli/chat/highlighter.rs:9:27 [INFO] [stdout] | [INFO] [stdout] 9 | buffer: vec![(color::USER_TEXT.clone(), line.to_string())], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*color::USER_TEXT` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: matching on `Some` with `ok()` is redundant [INFO] [stdout] --> src/cli/chat/repl.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | if let Some(editor) = env::var("EDITOR").ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_result_ok [INFO] [stdout] = note: `#[warn(clippy::match_result_ok)]` on by default [INFO] [stdout] help: consider matching on `Ok(editor)` and removing the call to `ok` instead [INFO] [stdout] | [INFO] [stdout] 33 - if let Some(editor) = env::var("EDITOR").ok() { [INFO] [stdout] 33 + if let Ok(editor) = env::var("EDITOR") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::path::PathBuf` [INFO] [stdout] --> src/cli/chat/repl.rs:40:33 [INFO] [stdout] | [INFO] [stdout] 40 | let full_path = PathBuf::from(path.join(editor)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `PathBuf::from()`: `path.join(editor)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/cli/chat/repl.rs:54:41 [INFO] [stdout] | [INFO] [stdout] 54 | fn read_from_interactive_editor(editor: &PathBuf, temp_file: &mut Tempfile) -> String { [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] 54 ~ fn read_from_interactive_editor(editor: &Path, temp_file: &mut Tempfile) -> String { [INFO] [stdout] 55 | // Remove the previous contents of the file [INFO] [stdout] ... [INFO] [stdout] 66 | // Launch the editor subprocess [INFO] [stdout] 67 ~ let status = Command::new(editor.to_path_buf()).arg(temp_file.path()).status(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/cli/chat/repl.rs:179:37 [INFO] [stdout] | [INFO] [stdout] 179 | let editor = editor.or_else(|| resolve_fallback_editor()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `resolve_fallback_editor` [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: use of `default` to create a unit struct [INFO] [stdout] --> src/cli/chat/repl.rs:185:40 [INFO] [stdout] | [INFO] [stdout] 185 | .with_highlighter(Box::new(Highlighter::default())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs [INFO] [stdout] = note: `#[warn(clippy::default_constructed_unit_structs)]` on by default [INFO] [stdout] help: remove this call to `default` [INFO] [stdout] | [INFO] [stdout] 185 - .with_highlighter(Box::new(Highlighter::default())); [INFO] [stdout] 185 + .with_highlighter(Box::new(Highlighter)); [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/cli/chat/tempfile.rs:17:15 [INFO] [stdout] | [INFO] [stdout] 17 | temp_dir: &PathBuf, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 17 - temp_dir: &PathBuf, [INFO] [stdout] 17 + temp_dir: &Path, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/cli/chat.rs:188:17 [INFO] [stdout] | [INFO] [stdout] 188 | let model = args.model.clone().or_else(|| default_model); [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 `or` instead [INFO] [stdout] | [INFO] [stdout] 188 - let model = args.model.clone().or_else(|| default_model); [INFO] [stdout] 188 + let model = args.model.clone().or(default_model); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'p [INFO] [stdout] --> src/cli/chat.rs:222:15 [INFO] [stdout] | [INFO] [stdout] 222 | async fn chat<'p>( [INFO] [stdout] | ^^ [INFO] [stdout] ... [INFO] [stdout] 225 | provider: &'p Box, [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/cli/chat.rs:225:15 [INFO] [stdout] | [INFO] [stdout] 225 | provider: &'p Box, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&'p dyn ChatProvider` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] = note: `#[warn(clippy::borrowed_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/cli/chat.rs:288:32 [INFO] [stdout] | [INFO] [stdout] 288 | .stream_completion(&model_id, &msg_buf.chat_messages()) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `model_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/cli/list.rs:88:1 [INFO] [stdout] | [INFO] [stdout] 88 | impl Into
for Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From>` [INFO] [stdout] | [INFO] [stdout] 88 ~ impl From> for Table { [INFO] [stdout] 89 ~ fn from(val: Vec) -> Self { [INFO] [stdout] 90 | let mut tab = Table::new(); [INFO] [stdout] ... [INFO] [stdout] 93 | [INFO] [stdout] 94 ~ for provider in val { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/config.rs:138:24 [INFO] [stdout] | [INFO] [stdout] 138 | fn parse_config_or_die<'de, S: serde::de::DeserializeOwned>(config: &str) -> S { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/config.rs:161:13 [INFO] [stdout] | [INFO] [stdout] 161 | / match (user_value, config_value) { [INFO] [stdout] 162 | | (toml::Value::Table(user_value), toml::Value::Table(config_value)) => { [INFO] [stdout] 163 | | warn_on_extra_fields_helper(path, user_value, config_value) [INFO] [stdout] ... | [INFO] [stdout] 166 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 161 ~ if let (toml::Value::Table(user_value), toml::Value::Table(config_value)) = (user_value, config_value) { [INFO] [stdout] 162 + warn_on_extra_fields_helper(path, user_value, config_value) [INFO] [stdout] 163 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `LSSE` contains a capitalized acronym [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | LSSE, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Lsse` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:150:9 [INFO] [stdout] | [INFO] [stdout] 150 | return *i != self.buf.len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 150 - return *i != self.buf.len(); [INFO] [stdout] 150 + *i != self.buf.len() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:154:36 [INFO] [stdout] | [INFO] [stdout] 154 | fn striped_line(i: usize, buf: &Vec) -> &[u8] { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 154 - fn striped_line(i: usize, buf: &Vec) -> &[u8] { [INFO] [stdout] 154 + fn striped_line(i: usize, buf: &[u8]) -> &[u8] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:179:16 [INFO] [stdout] | [INFO] [stdout] 179 | if self.data.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.data.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: length comparison to zero [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:196:35 [INFO] [stdout] | [INFO] [stdout] 196 | let end_of_event = if line_content.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line_content.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:198:20 [INFO] [stdout] | [INFO] [stdout] 198 | Ok(self.data.len() > 0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.data.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:206:20 [INFO] [stdout] | [INFO] [stdout] 206 | if field_name.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `field_name.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:237:16 [INFO] [stdout] | [INFO] [stdout] 237 | if self.data.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.data.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'd [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:245:26 [INFO] [stdout] | [INFO] [stdout] 245 | async fn parse_chunk<'d>(&'d mut self) -> Option> { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:285:9 [INFO] [stdout] | [INFO] [stdout] 285 | / c.and_then(|r| { [INFO] [stdout] 286 | | Some(match r { [INFO] [stdout] 287 | | Ok(bytes) => serde_json::from_slice::(&bytes).map_err(|e| { [INFO] [stdout] 288 | | Error::DeseralizationFailed(DeseralizationFailedError { [INFO] [stdout] ... | [INFO] [stdout] 294 | | }) [INFO] [stdout] 295 | | }) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 285 ~ c.map(|r| match r { [INFO] [stdout] 286 + Ok(bytes) => serde_json::from_slice::(&bytes).map_err(|e| { [INFO] [stdout] 287 + Error::DeseralizationFailed(DeseralizationFailedError { [INFO] [stdout] 288 + blob: String::from_utf8_lossy(bytes).into_owned(), [INFO] [stdout] 289 + error: e, [INFO] [stdout] 290 + }) [INFO] [stdout] 291 + }), [INFO] [stdout] 292 + Err(err) => Err(err), [INFO] [stdout] 293 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:287:58 [INFO] [stdout] | [INFO] [stdout] 287 | Ok(bytes) => serde_json::from_slice::(&bytes).map_err(|e| { [INFO] [stdout] | ^^^^^^ help: change this to: `bytes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/providers/apireq/json_stream_parser.rs:366:9 [INFO] [stdout] | [INFO] [stdout] 366 | return JsonStreamParser::new(stream, typ); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 366 - return JsonStreamParser::new(stream, typ); [INFO] [stdout] 366 + JsonStreamParser::new(stream, typ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/providers/ollama/api.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | InternalError(String), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/providers/ollama/api.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | UnspecifiedError(String), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/providers/ollama/api.rs:79:1 [INFO] [stdout] | [INFO] [stdout] 79 | / impl Default for DoneReason { [INFO] [stdout] 80 | | fn default() -> Self { [INFO] [stdout] 81 | | DoneReason::None [INFO] [stdout] 82 | | } [INFO] [stdout] 83 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 71 + #[derive(Default)] [INFO] [stdout] 72 | pub(super) enum DoneReason { [INFO] [stdout] 73 ~ #[default] [INFO] [stdout] 74 ~ None, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/providers/ollama/api.rs:149:23 [INFO] [stdout] | [INFO] [stdout] 149 | r.map_err(|e| Error::StreamParser(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::StreamParser` [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/providers/ollama/api.rs:165:51 [INFO] [stdout] | [INFO] [stdout] 165 | api_base: api_base.into_url().map_err(|e| Error::InvalidApiBase(e))?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::InvalidApiBase` [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: length comparison to zero [INFO] [stdout] --> src/providers/ollama/api.rs:248:17 [INFO] [stdout] | [INFO] [stdout] 248 | assert!(tags.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!tags.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/providers/ollama/api.rs:309:21 [INFO] [stdout] | [INFO] [stdout] 309 | assert!(!s.is_err()); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `s.is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/providers/openai/api.rs:74:5 [INFO] [stdout] | [INFO] [stdout] 74 | InternalError(ApiErrorPayload), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: some ranges overlap [INFO] [stdout] --> src/providers/openai/api.rs:88:13 [INFO] [stdout] | [INFO] [stdout] 88 | 400 => Error::BadRequest(payload), [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] note: overlaps with this [INFO] [stdout] --> src/providers/openai/api.rs:97:13 [INFO] [stdout] | [INFO] [stdout] 97 | 400..=599 => Error::UnknownStatus(payload), [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_overlapping_arm [INFO] [stdout] = note: `#[warn(clippy::match_overlapping_arm)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/providers/openai/api.rs:159:1 [INFO] [stdout] | [INFO] [stdout] 159 | / impl Default for ChatCompletionOptions { [INFO] [stdout] 160 | | fn default() -> ChatCompletionOptions { [INFO] [stdout] 161 | | ChatCompletionOptions { [INFO] [stdout] 162 | | temperature: None, [INFO] [stdout] ... | [INFO] [stdout] 174 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 121 + #[derive(Default)] [INFO] [stdout] 122 | struct ChatCompletionOptions { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/providers/openai/api.rs:257:52 [INFO] [stdout] | [INFO] [stdout] 257 | let api_base = api_base.into_url().map_err(|e| Error::InvalidApiBase(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::InvalidApiBase` [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: length comparison to zero [INFO] [stdout] --> src/providers/openai/api.rs:343:21 [INFO] [stdout] | [INFO] [stdout] 343 | assert!(chunk.id.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!chunk.id.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/providers/openai/api.rs:364:25 [INFO] [stdout] | [INFO] [stdout] 364 | assert!(matches!(choice.delta.role, None)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `choice.delta.role.is_none()` [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: length comparison to zero [INFO] [stdout] --> src/providers/openai/api.rs:369:26 [INFO] [stdout] | [INFO] [stdout] 369 | assert!((choice.delta.content.len() > 0) != finish_now); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!choice.delta.content.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/providers/openai/api.rs:371:17 [INFO] [stdout] | [INFO] [stdout] 371 | finished = finished | finish_now; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `finished |= finish_now` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/providers/openai/api.rs:375:25 [INFO] [stdout] | [INFO] [stdout] 375 | assert!(chunk.choices.len() == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `chunk.choices.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `chunk.usage` after checking its variant with `is_some` [INFO] [stdout] --> src/providers/openai/provider.rs:124:37 [INFO] [stdout] | [INFO] [stdout] 121 | if chunk.usage.is_some() { [INFO] [stdout] | ------------------------ help: try: `if let Some() = chunk.usage` [INFO] [stdout] ... [INFO] [stdout] 124 | let usage = chunk.usage.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/providers.rs:34:1 [INFO] [stdout] | [INFO] [stdout] 34 | pub(crate) mod providers; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/registry/populate.rs:109:66 [INFO] [stdout] | [INFO] [stdout] 109 | let provider = Box::new(OpenAIProvider::with_api_key(&api_key)); [INFO] [stdout] | ^^^^^^^^ help: change this to: `api_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'r [INFO] [stdout] --> src/registry/populate.rs:119:34 [INFO] [stdout] | [INFO] [stdout] 119 | pub(crate) async fn resolve_once<'r>( [INFO] [stdout] | ^^ [INFO] [stdout] 120 | registry: &'r Registry, [INFO] [stdout] | ^^ [INFO] [stdout] 121 | raw_spec: Option, [INFO] [stdout] 122 | ) -> Result<(&'r Box, String), Error> { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/registry/populate.rs:126:45 [INFO] [stdout] | [INFO] [stdout] 126 | let resolver = ModelResolver::build(®istry).await?; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `registry` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/registry.rs:31:1 [INFO] [stdout] | [INFO] [stdout] 31 | pub(crate) mod registry; [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: called `.as_ref().map(|s| s.as_str())` on an `Option` value [INFO] [stdout] --> src/registry/registry.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 75 | self.model.as_ref().map(|s| s.as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using as_deref: `self.model.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(|s| s.as_str())` on an `Option` value [INFO] [stdout] --> src/registry/registry.rs:117:9 [INFO] [stdout] | [INFO] [stdout] 117 | self.model.as_ref().map(|s| s.as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using as_deref: `self.model.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: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/registry/registry.rs:201:69 [INFO] [stdout] | [INFO] [stdout] 201 | pub(crate) fn provider(&self, id: ProviderIdentifier) -> Option<&Box> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&dyn ChatProvider` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/registry/registry.rs:210:17 [INFO] [stdout] | [INFO] [stdout] 210 | ) -> Result<&Box, Error> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&dyn ChatProvider` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type parameter `S` goes unused in function definition [INFO] [stdout] --> src/utils/errors.rs:16:23 [INFO] [stdout] | [INFO] [stdout] 16 | pub(crate) fn fmt_warn>(f: &mut std::fmt::Formatter, text: &str) -> std::fmt::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters [INFO] [stdout] = note: `#[warn(clippy::extra_unused_type_parameters)]` on by default [INFO] [stdout] help: consider removing the parameter [INFO] [stdout] | [INFO] [stdout] 16 - pub(crate) fn fmt_warn>(f: &mut std::fmt::Formatter, text: &str) -> std::fmt::Result { [INFO] [stdout] 16 + pub(crate) fn fmt_warn(f: &mut std::fmt::Formatter, text: &str) -> std::fmt::Result { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `as_ref` does nothing [INFO] [stdout] --> src/utils/errors.rs:17:22 [INFO] [stdout] | [INFO] [stdout] 17 | let text: &str = text.as_ref(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `text` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] = note: `#[warn(clippy::useless_asref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `eprintln!` [INFO] [stdout] --> src/main.rs:112:9 [INFO] [stdout] | [INFO] [stdout] 112 | eprintln!(""); [INFO] [stdout] | ^^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `eprintln!` [INFO] [stdout] --> src/main.rs:114:9 [INFO] [stdout] | [INFO] [stdout] 114 | eprintln!(""); [INFO] [stdout] | ^^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/cli/chat/prompt.rs:60:27 [INFO] [stdout] | [INFO] [stdout] 60 | fn render_prompt_left(&self) -> std::borrow::Cow { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 60 | fn render_prompt_left(&self) -> std::borrow::Cow<'_, str> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/cli/chat/prompt.rs:64:28 [INFO] [stdout] | [INFO] [stdout] 64 | fn render_prompt_right(&self) -> std::borrow::Cow { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 64 | fn render_prompt_right(&self) -> std::borrow::Cow<'_, str> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/cli/chat/prompt.rs:68:32 [INFO] [stdout] | [INFO] [stdout] 68 | fn render_prompt_indicator(&self, prompt_mode: reedline::PromptEditMode) -> Cow { [INFO] [stdout] | ^^^^^ the lifetime is elided here ^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 68 | fn render_prompt_indicator(&self, prompt_mode: reedline::PromptEditMode) -> Cow<'_, str> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/cli/chat/prompt.rs:79:42 [INFO] [stdout] | [INFO] [stdout] 79 | fn render_prompt_multiline_indicator(&self) -> Cow { [INFO] [stdout] | ^^^^^ ^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 79 | fn render_prompt_multiline_indicator(&self) -> Cow<'_, str> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/cli/chat/prompt.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | &self, [INFO] [stdout] | ^^^^^ the lifetime is elided here [INFO] [stdout] 85 | history_search: PromptHistorySearch, [INFO] [stdout] 86 | ) -> Cow { [INFO] [stdout] | ^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 86 | ) -> Cow<'_, str> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/color.rs:24:13 [INFO] [stdout] | [INFO] [stdout] 24 | USE_COLOR.store(true, Ordering::Relaxed); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/color.rs:27:13 [INFO] [stdout] | [INFO] [stdout] 27 | USE_COLOR.store(false, Ordering::Relaxed); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/color.rs:33:20 [INFO] [stdout] | [INFO] [stdout] 33 | match unsafe { USE_COLOR.load(Ordering::Relaxed) } { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 18s [INFO] running `Command { std: "docker" "inspect" "d9d08aef816b09fffb3ae8ac1466a5b84a079f81a8655ba6fca1ba9e41c884e2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d9d08aef816b09fffb3ae8ac1466a5b84a079f81a8655ba6fca1ba9e41c884e2", kill_on_drop: false }` [INFO] [stdout] d9d08aef816b09fffb3ae8ac1466a5b84a079f81a8655ba6fca1ba9e41c884e2