[INFO] cloning repository https://github.com/kpanuragh/ollama-chat [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/kpanuragh/ollama-chat" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkpanuragh%2Follama-chat", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkpanuragh%2Follama-chat'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 3e934cea4892b9f4d31b28ba8cc047acfb69d6b9 [INFO] linting kpanuragh/ollama-chat against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkpanuragh%2Follama-chat" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/kpanuragh/ollama-chat [INFO] finished tweaking git repo https://github.com/kpanuragh/ollama-chat [INFO] tweaked toml for git repo https://github.com/kpanuragh/ollama-chat written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/kpanuragh/ollama-chat on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/kpanuragh/ollama-chat 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 tokio v1.46.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 599113c84ecd65cedfc63fdb637f7b9ac92394db7a036cf06af729cbf06100ca [INFO] running `Command { std: "docker" "start" "-a" "599113c84ecd65cedfc63fdb637f7b9ac92394db7a036cf06af729cbf06100ca", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "599113c84ecd65cedfc63fdb637f7b9ac92394db7a036cf06af729cbf06100ca", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "599113c84ecd65cedfc63fdb637f7b9ac92394db7a036cf06af729cbf06100ca", kill_on_drop: false }` [INFO] [stdout] 599113c84ecd65cedfc63fdb637f7b9ac92394db7a036cf06af729cbf06100ca [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 09b32b34c164fe2441c67619e7f2b7ac84bba58551aab16f033a0824c578d582 [INFO] running `Command { std: "docker" "start" "-a" "09b32b34c164fe2441c67619e7f2b7ac84bba58551aab16f033a0824c578d582", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.174 [INFO] [stderr] Checking log v0.4.27 [INFO] [stderr] Compiling lock_api v0.4.13 [INFO] [stderr] Compiling cc v1.2.27 [INFO] [stderr] Compiling syn v2.0.104 [INFO] [stderr] Checking bitflags v2.9.1 [INFO] [stderr] Checking hashbrown v0.15.4 [INFO] [stderr] Checking http v1.3.1 [INFO] [stderr] Checking tracing v0.1.41 [INFO] [stderr] Compiling unicode-segmentation v1.12.0 [INFO] [stderr] Compiling rustix v1.0.7 [INFO] [stderr] Checking rustix v0.38.44 [INFO] [stderr] Checking indexmap v2.10.0 [INFO] [stderr] Checking castaway v0.2.3 [INFO] [stderr] Checking iri-string v0.7.8 [INFO] [stderr] Checking http-body v1.0.1 [INFO] [stderr] Compiling convert_case v0.7.1 [INFO] [stderr] Checking http-body-util v0.1.3 [INFO] [stderr] Checking linux-raw-sys v0.9.4 [INFO] [stderr] Checking signal-hook-registry v1.4.5 [INFO] [stderr] Checking mio v1.0.4 [INFO] [stderr] Checking parking_lot_core v0.9.11 [INFO] [stderr] Checking socket2 v0.5.10 [INFO] [stderr] Checking signal-hook v0.3.18 [INFO] [stderr] Checking parking_lot v0.12.4 [INFO] [stderr] Checking dirs-sys v0.5.0 [INFO] [stderr] Checking rustls-pki-types v1.12.0 [INFO] [stderr] Compiling openssl-sys v0.9.109 [INFO] [stderr] Compiling libsqlite3-sys v0.34.0 [INFO] [stderr] Checking compact_str v0.8.1 [INFO] [stderr] Checking signal-hook-mio v0.2.4 [INFO] [stderr] Checking crossterm v0.28.1 [INFO] [stderr] Compiling document-features v0.2.11 [INFO] [stderr] Checking hashlink v0.10.0 [INFO] [stderr] Checking lru v0.12.5 [INFO] [stderr] Checking smawk v0.3.2 [INFO] [stderr] Compiling openssl v0.10.73 [INFO] [stderr] Compiling native-tls v0.2.14 [INFO] [stderr] Checking directories v6.0.0 [INFO] [stderr] Checking textwrap v0.16.2 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling darling_core v0.20.11 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.0 [INFO] [stderr] Compiling zerovec-derive v0.11.1 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling tokio-macros v2.5.0 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Checking tokio v1.46.0 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling derive_more-impl v2.0.1 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking yoke v0.8.0 [INFO] [stderr] Checking zerovec v0.11.2 [INFO] [stderr] Checking zerotrie v0.2.2 [INFO] [stderr] Compiling strum_macros v0.26.4 [INFO] [stderr] Compiling darling_macro v0.20.11 [INFO] [stderr] Compiling darling v0.20.11 [INFO] [stderr] Compiling instability v0.3.7 [INFO] [stderr] Checking tinystr v0.8.1 [INFO] [stderr] Checking potential_utf v0.1.2 [INFO] [stderr] Checking icu_locale_core v2.0.0 [INFO] [stderr] Checking derive_more v2.0.1 [INFO] [stderr] Checking icu_collections v2.0.0 [INFO] [stderr] Checking crossterm v0.29.0 [INFO] [stderr] Checking icu_provider v2.0.0 [INFO] [stderr] Checking icu_normalizer v2.0.0 [INFO] [stderr] Checking icu_properties v2.0.1 [INFO] [stderr] Checking strum v0.26.3 [INFO] [stderr] Checking ratatui v0.29.0 [INFO] [stderr] Checking serde v1.0.219 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking idna v1.0.3 [INFO] [stderr] Checking url v2.5.4 [INFO] [stderr] Checking tokio-util v0.7.15 [INFO] [stderr] Checking tower v0.5.2 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking tower-http v0.6.6 [INFO] [stderr] Checking h2 v0.4.11 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking serde_json v1.0.140 [INFO] [stderr] Checking chrono v0.4.41 [INFO] [stderr] Checking rusqlite v0.36.0 [INFO] [stderr] Checking hyper v1.6.0 [INFO] [stderr] Checking hyper-util v0.1.14 [INFO] [stderr] Checking hyper-tls v0.6.0 [INFO] [stderr] Checking reqwest v0.12.22 [INFO] [stderr] Checking ollama-tui v1.2.7 (/opt/rustwide/workdir) [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:87:9 [INFO] [stdout] | [INFO] [stdout] 87 | / if config.auth_enabled { [INFO] [stdout] 88 | | if let Some(auth_method) = &config.auth_method { [INFO] [stdout] 89 | | match auth_method { [INFO] [stdout] 90 | | models::AuthMethod::Bearer { token } => { [INFO] [stdout] ... | [INFO] [stdout] 99 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 87 ~ if config.auth_enabled [INFO] [stdout] 88 ~ && let Some(auth_method) = &config.auth_method { [INFO] [stdout] 89 | match auth_method { [INFO] [stdout] ... [INFO] [stdout] 97 | } [INFO] [stdout] 98 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `if let` [INFO] [stdout] --> src/app.rs:89:17 [INFO] [stdout] | [INFO] [stdout] 89 | / match auth_method { [INFO] [stdout] 90 | | models::AuthMethod::Bearer { token } => { [INFO] [stdout] 91 | | headers.insert( [INFO] [stdout] 92 | | AUTHORIZATION, [INFO] [stdout] ... | [INFO] [stdout] 96 | | _ => {} [INFO] [stdout] 97 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/app.rs:88:25 [INFO] [stdout] | [INFO] [stdout] 88 | if let Some(auth_method) = &config.auth_method { [INFO] [stdout] | ^^^^^^^^^^^ replace this binding [INFO] [stdout] 89 | match auth_method { [INFO] [stdout] 90 | models::AuthMethod::Bearer { token } => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [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/app.rs:89:17 [INFO] [stdout] | [INFO] [stdout] 89 | / match auth_method { [INFO] [stdout] 90 | | models::AuthMethod::Bearer { token } => { [INFO] [stdout] 91 | | headers.insert( [INFO] [stdout] 92 | | AUTHORIZATION, [INFO] [stdout] ... | [INFO] [stdout] 96 | | _ => {} [INFO] [stdout] 97 | | } [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] 89 ~ if let models::AuthMethod::Bearer { token } = auth_method { [INFO] [stdout] 90 + headers.insert( [INFO] [stdout] 91 + AUTHORIZATION, [INFO] [stdout] 92 + HeaderValue::from_str(&format!("Bearer {}", token))?, [INFO] [stdout] 93 + ); [INFO] [stdout] 94 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:260:9 [INFO] [stdout] | [INFO] [stdout] 260 | / if let Some(selected) = self.model_list_state.selected() { [INFO] [stdout] 261 | | if let Some(model_name) = self.available_models.get(selected) { [INFO] [stdout] 262 | | self.current_model = model_name.clone(); [INFO] [stdout] 263 | | db::save_config(&self.db_conn, "current_model", &self.current_model)?; [INFO] [stdout] 264 | | } [INFO] [stdout] 265 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 260 ~ if let Some(selected) = self.model_list_state.selected() [INFO] [stdout] 261 ~ && let Some(model_name) = self.available_models.get(selected) { [INFO] [stdout] 262 | self.current_model = model_name.clone(); [INFO] [stdout] 263 | db::save_config(&self.db_conn, "current_model", &self.current_model)?; [INFO] [stdout] 264 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:374:24 [INFO] [stdout] | [INFO] [stdout] 374 | } else if let Some(session_num) = cmd.strip_prefix("d") { [INFO] [stdout] | ________________________^ [INFO] [stdout] 375 | | if let Ok(index) = session_num.parse::() { [INFO] [stdout] 376 | | if index > 0 && index <= self.sessions.len() { [INFO] [stdout] 377 | | self.current_session_index = index - 1; [INFO] [stdout] ... | [INFO] [stdout] 381 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 374 ~ } else if let Some(session_num) = cmd.strip_prefix("d") [INFO] [stdout] 375 ~ && let Ok(index) = session_num.parse::() { [INFO] [stdout] 376 | if index > 0 && index <= self.sessions.len() { [INFO] [stdout] ... [INFO] [stdout] 379 | } [INFO] [stdout] 380 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:375:21 [INFO] [stdout] | [INFO] [stdout] 375 | / if let Ok(index) = session_num.parse::() { [INFO] [stdout] 376 | | if index > 0 && index <= self.sessions.len() { [INFO] [stdout] 377 | | self.current_session_index = index - 1; [INFO] [stdout] 378 | | self.delete_current_session()?; [INFO] [stdout] 379 | | } [INFO] [stdout] 380 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 375 ~ if let Ok(index) = session_num.parse::() [INFO] [stdout] 376 ~ && index > 0 && index <= self.sessions.len() { [INFO] [stdout] 377 | self.current_session_index = index - 1; [INFO] [stdout] 378 | self.delete_current_session()?; [INFO] [stdout] 379 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:385:17 [INFO] [stdout] | [INFO] [stdout] 385 | / if let Some(session_num) = cmd.strip_prefix("b") { [INFO] [stdout] 386 | | if let Ok(index) = session_num.parse::() { [INFO] [stdout] 387 | | if index > 0 && index <= self.sessions.len() { [INFO] [stdout] 388 | | self.current_session_index = index - 1; [INFO] [stdout] ... | [INFO] [stdout] 398 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 385 ~ if let Some(session_num) = cmd.strip_prefix("b") [INFO] [stdout] 386 ~ && let Ok(index) = session_num.parse::() { [INFO] [stdout] 387 | if index > 0 && index <= self.sessions.len() { [INFO] [stdout] ... [INFO] [stdout] 396 | } [INFO] [stdout] 397 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:386:21 [INFO] [stdout] | [INFO] [stdout] 386 | / if let Ok(index) = session_num.parse::() { [INFO] [stdout] 387 | | if index > 0 && index <= self.sessions.len() { [INFO] [stdout] 388 | | self.current_session_index = index - 1; [INFO] [stdout] 389 | | self.session_list_state.select(Some(self.current_session_index)); [INFO] [stdout] ... | [INFO] [stdout] 397 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 386 ~ if let Ok(index) = session_num.parse::() [INFO] [stdout] 387 ~ && index > 0 && index <= self.sessions.len() { [INFO] [stdout] 388 | self.current_session_index = index - 1; [INFO] [stdout] ... [INFO] [stdout] 395 | )?; [INFO] [stdout] 396 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/app.rs:409:76 [INFO] [stdout] | [INFO] [stdout] 409 | self.mode == AppMode::ModelSelection && self.is_fetching_models && !self.available_models.is_empty() == false [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.available_models.is_empty() != false` [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: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/app.rs:409:76 [INFO] [stdout] | [INFO] [stdout] 409 | self.mode == AppMode::ModelSelection && self.is_fetching_models && !self.available_models.is_empty() == false [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.available_models.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/app.rs:531:13 [INFO] [stdout] | [INFO] [stdout] 531 | return Err(anyhow!("No clipboard utility found (tried xclip, xsel, wl-copy)")); [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] 531 - return Err(anyhow!("No clipboard utility found (tried xclip, xsel, wl-copy)")); [INFO] [stdout] 531 + Err(anyhow!("No clipboard utility found (tried xclip, xsel, wl-copy)")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/events.rs:144:13 [INFO] [stdout] | [INFO] [stdout] 144 | / if !app.input.is_empty() && !app.is_loading { [INFO] [stdout] 145 | | let user_input: String = app.input.drain(..).collect(); [INFO] [stdout] 146 | | app.current_messages_mut().push(models::Message { [INFO] [stdout] 147 | | role: models::Role::User, [INFO] [stdout] ... | [INFO] [stdout] 177 | | }); [INFO] [stdout] 178 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 143 ~ KeyCode::Enter [INFO] [stdout] 144 ~ if !app.input.is_empty() && !app.is_loading => { [INFO] [stdout] 145 | let user_input: String = app.input.drain(..).collect(); [INFO] [stdout] ... [INFO] [stdout] 177 | }); [INFO] [stdout] 178 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/events.rs:263:13 [INFO] [stdout] | [INFO] [stdout] 263 | / if !app.input.trim().is_empty() && !app.is_loading { [INFO] [stdout] 264 | | let input_content = app.input.clone(); [INFO] [stdout] 265 | | [INFO] [stdout] 266 | | let _user_message = if app.agent_mode { [INFO] [stdout] ... | [INFO] [stdout] 309 | | }); [INFO] [stdout] 310 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 262 ~ KeyCode::Enter [INFO] [stdout] 263 ~ if !app.input.trim().is_empty() && !app.is_loading => { [INFO] [stdout] 264 | let input_content = app.input.clone(); [INFO] [stdout] ... [INFO] [stdout] 309 | }); [INFO] [stdout] 310 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/events.rs:353:13 [INFO] [stdout] | [INFO] [stdout] 353 | / if let Some(i) = selected { [INFO] [stdout] 354 | | if i < total_lines.saturating_sub(1) { [INFO] [stdout] 355 | | let new_pos = i + 1; [INFO] [stdout] 356 | | app.chat_list_state.select(Some(new_pos)); [INFO] [stdout] ... | [INFO] [stdout] 359 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 353 ~ if let Some(i) = selected [INFO] [stdout] 354 ~ && i < total_lines.saturating_sub(1) { [INFO] [stdout] 355 | let new_pos = i + 1; [INFO] [stdout] 356 | app.chat_list_state.select(Some(new_pos)); [INFO] [stdout] 357 | app.update_visual_selection(new_pos); [INFO] [stdout] 358 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/events.rs:363:13 [INFO] [stdout] | [INFO] [stdout] 363 | / if let Some(i) = selected { [INFO] [stdout] 364 | | if i > 0 { [INFO] [stdout] 365 | | let new_pos = i - 1; [INFO] [stdout] 366 | | app.chat_list_state.select(Some(new_pos)); [INFO] [stdout] ... | [INFO] [stdout] 369 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 363 ~ if let Some(i) = selected [INFO] [stdout] 364 ~ && i > 0 { [INFO] [stdout] 365 | let new_pos = i - 1; [INFO] [stdout] 366 | app.chat_list_state.select(Some(new_pos)); [INFO] [stdout] 367 | app.update_visual_selection(new_pos); [INFO] [stdout] 368 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/models.rs:99:17 [INFO] [stdout] | [INFO] [stdout] 99 | / if let Ok(r) = u8::from_str_radix(&hex[1..3], 16) { [INFO] [stdout] 100 | | if let Ok(g) = u8::from_str_radix(&hex[3..5], 16) { [INFO] [stdout] 101 | | if let Ok(b) = u8::from_str_radix(&hex[5..7], 16) { [INFO] [stdout] 102 | | return Color::Rgb(r, g, b); [INFO] [stdout] ... | [INFO] [stdout] 105 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 99 ~ if let Ok(r) = u8::from_str_radix(&hex[1..3], 16) [INFO] [stdout] 100 ~ && let Ok(g) = u8::from_str_radix(&hex[3..5], 16) { [INFO] [stdout] 101 | if let Ok(b) = u8::from_str_radix(&hex[5..7], 16) { [INFO] [stdout] 102 | return Color::Rgb(r, g, b); [INFO] [stdout] 103 | } [INFO] [stdout] 104 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/models.rs:100:21 [INFO] [stdout] | [INFO] [stdout] 100 | / if let Ok(g) = u8::from_str_radix(&hex[3..5], 16) { [INFO] [stdout] 101 | | if let Ok(b) = u8::from_str_radix(&hex[5..7], 16) { [INFO] [stdout] 102 | | return Color::Rgb(r, g, b); [INFO] [stdout] 103 | | } [INFO] [stdout] 104 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 100 ~ if let Ok(g) = u8::from_str_radix(&hex[3..5], 16) [INFO] [stdout] 101 ~ && let Ok(b) = u8::from_str_radix(&hex[5..7], 16) { [INFO] [stdout] 102 | return Color::Rgb(r, g, b); [INFO] [stdout] 103 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:87:9 [INFO] [stdout] | [INFO] [stdout] 87 | / if config.auth_enabled { [INFO] [stdout] 88 | | if let Some(auth_method) = &config.auth_method { [INFO] [stdout] 89 | | match auth_method { [INFO] [stdout] 90 | | models::AuthMethod::Bearer { token } => { [INFO] [stdout] ... | [INFO] [stdout] 99 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 87 ~ if config.auth_enabled [INFO] [stdout] 88 ~ && let Some(auth_method) = &config.auth_method { [INFO] [stdout] 89 | match auth_method { [INFO] [stdout] ... [INFO] [stdout] 97 | } [INFO] [stdout] 98 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `if let` [INFO] [stdout] --> src/app.rs:89:17 [INFO] [stdout] | [INFO] [stdout] 89 | / match auth_method { [INFO] [stdout] 90 | | models::AuthMethod::Bearer { token } => { [INFO] [stdout] 91 | | headers.insert( [INFO] [stdout] 92 | | AUTHORIZATION, [INFO] [stdout] ... | [INFO] [stdout] 96 | | _ => {} [INFO] [stdout] 97 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/app.rs:88:25 [INFO] [stdout] | [INFO] [stdout] 88 | if let Some(auth_method) = &config.auth_method { [INFO] [stdout] | ^^^^^^^^^^^ replace this binding [INFO] [stdout] 89 | match auth_method { [INFO] [stdout] 90 | models::AuthMethod::Bearer { token } => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [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/app.rs:89:17 [INFO] [stdout] | [INFO] [stdout] 89 | / match auth_method { [INFO] [stdout] 90 | | models::AuthMethod::Bearer { token } => { [INFO] [stdout] 91 | | headers.insert( [INFO] [stdout] 92 | | AUTHORIZATION, [INFO] [stdout] ... | [INFO] [stdout] 96 | | _ => {} [INFO] [stdout] 97 | | } [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] 89 ~ if let models::AuthMethod::Bearer { token } = auth_method { [INFO] [stdout] 90 + headers.insert( [INFO] [stdout] 91 + AUTHORIZATION, [INFO] [stdout] 92 + HeaderValue::from_str(&format!("Bearer {}", token))?, [INFO] [stdout] 93 + ); [INFO] [stdout] 94 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:260:9 [INFO] [stdout] | [INFO] [stdout] 260 | / if let Some(selected) = self.model_list_state.selected() { [INFO] [stdout] 261 | | if let Some(model_name) = self.available_models.get(selected) { [INFO] [stdout] 262 | | self.current_model = model_name.clone(); [INFO] [stdout] 263 | | db::save_config(&self.db_conn, "current_model", &self.current_model)?; [INFO] [stdout] 264 | | } [INFO] [stdout] 265 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 260 ~ if let Some(selected) = self.model_list_state.selected() [INFO] [stdout] 261 ~ && let Some(model_name) = self.available_models.get(selected) { [INFO] [stdout] 262 | self.current_model = model_name.clone(); [INFO] [stdout] 263 | db::save_config(&self.db_conn, "current_model", &self.current_model)?; [INFO] [stdout] 264 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:374:24 [INFO] [stdout] | [INFO] [stdout] 374 | } else if let Some(session_num) = cmd.strip_prefix("d") { [INFO] [stdout] | ________________________^ [INFO] [stdout] 375 | | if let Ok(index) = session_num.parse::() { [INFO] [stdout] 376 | | if index > 0 && index <= self.sessions.len() { [INFO] [stdout] 377 | | self.current_session_index = index - 1; [INFO] [stdout] ... | [INFO] [stdout] 381 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 374 ~ } else if let Some(session_num) = cmd.strip_prefix("d") [INFO] [stdout] 375 ~ && let Ok(index) = session_num.parse::() { [INFO] [stdout] 376 | if index > 0 && index <= self.sessions.len() { [INFO] [stdout] ... [INFO] [stdout] 379 | } [INFO] [stdout] 380 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:375:21 [INFO] [stdout] | [INFO] [stdout] 375 | / if let Ok(index) = session_num.parse::() { [INFO] [stdout] 376 | | if index > 0 && index <= self.sessions.len() { [INFO] [stdout] 377 | | self.current_session_index = index - 1; [INFO] [stdout] 378 | | self.delete_current_session()?; [INFO] [stdout] 379 | | } [INFO] [stdout] 380 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 375 ~ if let Ok(index) = session_num.parse::() [INFO] [stdout] 376 ~ && index > 0 && index <= self.sessions.len() { [INFO] [stdout] 377 | self.current_session_index = index - 1; [INFO] [stdout] 378 | self.delete_current_session()?; [INFO] [stdout] 379 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:385:17 [INFO] [stdout] | [INFO] [stdout] 385 | / if let Some(session_num) = cmd.strip_prefix("b") { [INFO] [stdout] 386 | | if let Ok(index) = session_num.parse::() { [INFO] [stdout] 387 | | if index > 0 && index <= self.sessions.len() { [INFO] [stdout] 388 | | self.current_session_index = index - 1; [INFO] [stdout] ... | [INFO] [stdout] 398 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 385 ~ if let Some(session_num) = cmd.strip_prefix("b") [INFO] [stdout] 386 ~ && let Ok(index) = session_num.parse::() { [INFO] [stdout] 387 | if index > 0 && index <= self.sessions.len() { [INFO] [stdout] ... [INFO] [stdout] 396 | } [INFO] [stdout] 397 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:386:21 [INFO] [stdout] | [INFO] [stdout] 386 | / if let Ok(index) = session_num.parse::() { [INFO] [stdout] 387 | | if index > 0 && index <= self.sessions.len() { [INFO] [stdout] 388 | | self.current_session_index = index - 1; [INFO] [stdout] 389 | | self.session_list_state.select(Some(self.current_session_index)); [INFO] [stdout] ... | [INFO] [stdout] 397 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 386 ~ if let Ok(index) = session_num.parse::() [INFO] [stdout] 387 ~ && index > 0 && index <= self.sessions.len() { [INFO] [stdout] 388 | self.current_session_index = index - 1; [INFO] [stdout] ... [INFO] [stdout] 395 | )?; [INFO] [stdout] 396 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ollama.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | / if auth_enabled { [INFO] [stdout] 17 | | if let Some(models::AuthMethod::Basic { username, password }) = auth_method { [INFO] [stdout] 18 | | request_builder = request_builder.basic_auth(username, Some(password)); [INFO] [stdout] 19 | | } [INFO] [stdout] 20 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 16 ~ if auth_enabled [INFO] [stdout] 17 ~ && let Some(models::AuthMethod::Basic { username, password }) = auth_method { [INFO] [stdout] 18 | request_builder = request_builder.basic_auth(username, Some(password)); [INFO] [stdout] 19 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/app.rs:409:76 [INFO] [stdout] | [INFO] [stdout] 409 | self.mode == AppMode::ModelSelection && self.is_fetching_models && !self.available_models.is_empty() == false [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.available_models.is_empty() != false` [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: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/app.rs:409:76 [INFO] [stdout] | [INFO] [stdout] 409 | self.mode == AppMode::ModelSelection && self.is_fetching_models && !self.available_models.is_empty() == false [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.available_models.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ollama.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 57 | / if auth_enabled { [INFO] [stdout] 58 | | if let Some(models::AuthMethod::Basic { username, password }) = auth_method { [INFO] [stdout] 59 | | request_builder = request_builder.basic_auth(username, Some(password)); [INFO] [stdout] 60 | | } [INFO] [stdout] 61 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 57 ~ if auth_enabled [INFO] [stdout] 58 ~ && let Some(models::AuthMethod::Basic { username, password }) = auth_method { [INFO] [stdout] 59 | request_builder = request_builder.basic_auth(username, Some(password)); [INFO] [stdout] 60 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/app.rs:531:13 [INFO] [stdout] | [INFO] [stdout] 531 | return Err(anyhow!("No clipboard utility found (tried xclip, xsel, wl-copy)")); [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] 531 - return Err(anyhow!("No clipboard utility found (tried xclip, xsel, wl-copy)")); [INFO] [stdout] 531 + Err(anyhow!("No clipboard utility found (tried xclip, xsel, wl-copy)")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/ui.rs:127:13 [INFO] [stdout] | [INFO] [stdout] 127 | / if !app.is_loading { [INFO] [stdout] 128 | | f.set_cursor_position(( [INFO] [stdout] 129 | | left_chunks[1].x + app.input.width() as u16 + 1, [INFO] [stdout] 130 | | left_chunks[1].y + 1, [INFO] [stdout] 131 | | )); [INFO] [stdout] 132 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 126 ~ AppMode::Insert [INFO] [stdout] 127 ~ if !app.is_loading => { [INFO] [stdout] 128 | f.set_cursor_position(( [INFO] [stdout] ... [INFO] [stdout] 131 | )); [INFO] [stdout] 132 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/events.rs:144:13 [INFO] [stdout] | [INFO] [stdout] 144 | / if !app.input.is_empty() && !app.is_loading { [INFO] [stdout] 145 | | let user_input: String = app.input.drain(..).collect(); [INFO] [stdout] 146 | | app.current_messages_mut().push(models::Message { [INFO] [stdout] 147 | | role: models::Role::User, [INFO] [stdout] ... | [INFO] [stdout] 177 | | }); [INFO] [stdout] 178 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 143 ~ KeyCode::Enter [INFO] [stdout] 144 ~ if !app.input.is_empty() && !app.is_loading => { [INFO] [stdout] 145 | let user_input: String = app.input.drain(..).collect(); [INFO] [stdout] ... [INFO] [stdout] 177 | }); [INFO] [stdout] 178 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/events.rs:263:13 [INFO] [stdout] | [INFO] [stdout] 263 | / if !app.input.trim().is_empty() && !app.is_loading { [INFO] [stdout] 264 | | let input_content = app.input.clone(); [INFO] [stdout] 265 | | [INFO] [stdout] 266 | | let _user_message = if app.agent_mode { [INFO] [stdout] ... | [INFO] [stdout] 309 | | }); [INFO] [stdout] 310 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 262 ~ KeyCode::Enter [INFO] [stdout] 263 ~ if !app.input.trim().is_empty() && !app.is_loading => { [INFO] [stdout] 264 | let input_content = app.input.clone(); [INFO] [stdout] ... [INFO] [stdout] 309 | }); [INFO] [stdout] 310 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:48:17 [INFO] [stdout] | [INFO] [stdout] 48 | / if let crossterm::event::Event::Key(key) = crossterm::event::read().unwrap() { [INFO] [stdout] 49 | | if event_tx.send(events::AppEvent::Terminal(key)).await.is_err() { [INFO] [stdout] 50 | | break; [INFO] [stdout] 51 | | } [INFO] [stdout] 52 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 48 ~ if let crossterm::event::Event::Key(key) = crossterm::event::read().unwrap() [INFO] [stdout] 49 ~ && event_tx.send(events::AppEvent::Terminal(key)).await.is_err() { [INFO] [stdout] 50 | break; [INFO] [stdout] 51 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/events.rs:353:13 [INFO] [stdout] | [INFO] [stdout] 353 | / if let Some(i) = selected { [INFO] [stdout] 354 | | if i < total_lines.saturating_sub(1) { [INFO] [stdout] 355 | | let new_pos = i + 1; [INFO] [stdout] 356 | | app.chat_list_state.select(Some(new_pos)); [INFO] [stdout] ... | [INFO] [stdout] 359 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 353 ~ if let Some(i) = selected [INFO] [stdout] 354 ~ && i < total_lines.saturating_sub(1) { [INFO] [stdout] 355 | let new_pos = i + 1; [INFO] [stdout] 356 | app.chat_list_state.select(Some(new_pos)); [INFO] [stdout] 357 | app.update_visual_selection(new_pos); [INFO] [stdout] 358 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/events.rs:363:13 [INFO] [stdout] | [INFO] [stdout] 363 | / if let Some(i) = selected { [INFO] [stdout] 364 | | if i > 0 { [INFO] [stdout] 365 | | let new_pos = i - 1; [INFO] [stdout] 366 | | app.chat_list_state.select(Some(new_pos)); [INFO] [stdout] ... | [INFO] [stdout] 369 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 363 ~ if let Some(i) = selected [INFO] [stdout] 364 ~ && i > 0 { [INFO] [stdout] 365 | let new_pos = i - 1; [INFO] [stdout] 366 | app.chat_list_state.select(Some(new_pos)); [INFO] [stdout] 367 | app.update_visual_selection(new_pos); [INFO] [stdout] 368 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:134:17 [INFO] [stdout] | [INFO] [stdout] 134 | / if let Some(last_message) = app_state.current_messages_mut().last_mut() { [INFO] [stdout] 135 | | if last_message.role == models::Role::Assistant { [INFO] [stdout] 136 | | last_message.content.push_str(&chunk); [INFO] [stdout] ... | [INFO] [stdout] 140 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 134 ~ if let Some(last_message) = app_state.current_messages_mut().last_mut() [INFO] [stdout] 135 ~ && last_message.role == models::Role::Assistant { [INFO] [stdout] 136 | last_message.content.push_str(&chunk); [INFO] [stdout] 137 | // Enable auto-scroll but don't trigger it on every chunk [INFO] [stdout] 138 | app_state.auto_scroll = true; [INFO] [stdout] 139 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:143:17 [INFO] [stdout] | [INFO] [stdout] 143 | / if let Some(last_message) = app_state.current_messages_mut().last_mut() { [INFO] [stdout] 144 | | if last_message.role == models::Role::Assistant { [INFO] [stdout] 145 | | let err_msg = format!("\n[STREAM ERROR: {}]", e); [INFO] [stdout] 146 | | last_message.content.push_str(&err_msg); [INFO] [stdout] ... | [INFO] [stdout] 151 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 143 ~ if let Some(last_message) = app_state.current_messages_mut().last_mut() [INFO] [stdout] 144 ~ && last_message.role == models::Role::Assistant { [INFO] [stdout] 145 | let err_msg = format!("\n[STREAM ERROR: {}]", e); [INFO] [stdout] ... [INFO] [stdout] 149 | app_state.trigger_auto_scroll(); [INFO] [stdout] 150 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:163:17 [INFO] [stdout] | [INFO] [stdout] 163 | / if app_state.agent_mode { [INFO] [stdout] 164 | | if let Some(last_message) = app_state.current_messages().last() { [INFO] [stdout] 165 | | if last_message.role == models::Role::Assistant { [INFO] [stdout] ... | [INFO] [stdout] 173 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 163 ~ if app_state.agent_mode [INFO] [stdout] 164 ~ && let Some(last_message) = app_state.current_messages().last() { [INFO] [stdout] 165 | if last_message.role == models::Role::Assistant { [INFO] [stdout] ... [INFO] [stdout] 171 | } [INFO] [stdout] 172 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:164:21 [INFO] [stdout] | [INFO] [stdout] 164 | / if let Some(last_message) = app_state.current_messages().last() { [INFO] [stdout] 165 | | if last_message.role == models::Role::Assistant { [INFO] [stdout] ... | [INFO] [stdout] 172 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 164 ~ if let Some(last_message) = app_state.current_messages().last() [INFO] [stdout] 165 ~ && last_message.role == models::Role::Assistant { [INFO] [stdout] 166 | // TODO: Parse commands from response when agent module is implemented [INFO] [stdout] ... [INFO] [stdout] 170 | // } [INFO] [stdout] 171 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/models.rs:99:17 [INFO] [stdout] | [INFO] [stdout] 99 | / if let Ok(r) = u8::from_str_radix(&hex[1..3], 16) { [INFO] [stdout] 100 | | if let Ok(g) = u8::from_str_radix(&hex[3..5], 16) { [INFO] [stdout] 101 | | if let Ok(b) = u8::from_str_radix(&hex[5..7], 16) { [INFO] [stdout] 102 | | return Color::Rgb(r, g, b); [INFO] [stdout] ... | [INFO] [stdout] 105 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 99 ~ if let Ok(r) = u8::from_str_radix(&hex[1..3], 16) [INFO] [stdout] 100 ~ && let Ok(g) = u8::from_str_radix(&hex[3..5], 16) { [INFO] [stdout] 101 | if let Ok(b) = u8::from_str_radix(&hex[5..7], 16) { [INFO] [stdout] 102 | return Color::Rgb(r, g, b); [INFO] [stdout] 103 | } [INFO] [stdout] 104 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/models.rs:100:21 [INFO] [stdout] | [INFO] [stdout] 100 | / if let Ok(g) = u8::from_str_radix(&hex[3..5], 16) { [INFO] [stdout] 101 | | if let Ok(b) = u8::from_str_radix(&hex[5..7], 16) { [INFO] [stdout] 102 | | return Color::Rgb(r, g, b); [INFO] [stdout] 103 | | } [INFO] [stdout] 104 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 100 ~ if let Ok(g) = u8::from_str_radix(&hex[3..5], 16) [INFO] [stdout] 101 ~ && let Ok(b) = u8::from_str_radix(&hex[5..7], 16) { [INFO] [stdout] 102 | return Color::Rgb(r, g, b); [INFO] [stdout] 103 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ollama.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | / if auth_enabled { [INFO] [stdout] 17 | | if let Some(models::AuthMethod::Basic { username, password }) = auth_method { [INFO] [stdout] 18 | | request_builder = request_builder.basic_auth(username, Some(password)); [INFO] [stdout] 19 | | } [INFO] [stdout] 20 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 16 ~ if auth_enabled [INFO] [stdout] 17 ~ && let Some(models::AuthMethod::Basic { username, password }) = auth_method { [INFO] [stdout] 18 | request_builder = request_builder.basic_auth(username, Some(password)); [INFO] [stdout] 19 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ollama.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 57 | / if auth_enabled { [INFO] [stdout] 58 | | if let Some(models::AuthMethod::Basic { username, password }) = auth_method { [INFO] [stdout] 59 | | request_builder = request_builder.basic_auth(username, Some(password)); [INFO] [stdout] 60 | | } [INFO] [stdout] 61 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 57 ~ if auth_enabled [INFO] [stdout] 58 ~ && let Some(models::AuthMethod::Basic { username, password }) = auth_method { [INFO] [stdout] 59 | request_builder = request_builder.basic_auth(username, Some(password)); [INFO] [stdout] 60 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/ui.rs:127:13 [INFO] [stdout] | [INFO] [stdout] 127 | / if !app.is_loading { [INFO] [stdout] 128 | | f.set_cursor_position(( [INFO] [stdout] 129 | | left_chunks[1].x + app.input.width() as u16 + 1, [INFO] [stdout] 130 | | left_chunks[1].y + 1, [INFO] [stdout] 131 | | )); [INFO] [stdout] 132 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 126 ~ AppMode::Insert [INFO] [stdout] 127 ~ if !app.is_loading => { [INFO] [stdout] 128 | f.set_cursor_position(( [INFO] [stdout] ... [INFO] [stdout] 131 | )); [INFO] [stdout] 132 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:48:17 [INFO] [stdout] | [INFO] [stdout] 48 | / if let crossterm::event::Event::Key(key) = crossterm::event::read().unwrap() { [INFO] [stdout] 49 | | if event_tx.send(events::AppEvent::Terminal(key)).await.is_err() { [INFO] [stdout] 50 | | break; [INFO] [stdout] 51 | | } [INFO] [stdout] 52 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 48 ~ if let crossterm::event::Event::Key(key) = crossterm::event::read().unwrap() [INFO] [stdout] 49 ~ && event_tx.send(events::AppEvent::Terminal(key)).await.is_err() { [INFO] [stdout] 50 | break; [INFO] [stdout] 51 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:134:17 [INFO] [stdout] | [INFO] [stdout] 134 | / if let Some(last_message) = app_state.current_messages_mut().last_mut() { [INFO] [stdout] 135 | | if last_message.role == models::Role::Assistant { [INFO] [stdout] 136 | | last_message.content.push_str(&chunk); [INFO] [stdout] ... | [INFO] [stdout] 140 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 134 ~ if let Some(last_message) = app_state.current_messages_mut().last_mut() [INFO] [stdout] 135 ~ && last_message.role == models::Role::Assistant { [INFO] [stdout] 136 | last_message.content.push_str(&chunk); [INFO] [stdout] 137 | // Enable auto-scroll but don't trigger it on every chunk [INFO] [stdout] 138 | app_state.auto_scroll = true; [INFO] [stdout] 139 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:143:17 [INFO] [stdout] | [INFO] [stdout] 143 | / if let Some(last_message) = app_state.current_messages_mut().last_mut() { [INFO] [stdout] 144 | | if last_message.role == models::Role::Assistant { [INFO] [stdout] 145 | | let err_msg = format!("\n[STREAM ERROR: {}]", e); [INFO] [stdout] 146 | | last_message.content.push_str(&err_msg); [INFO] [stdout] ... | [INFO] [stdout] 151 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 143 ~ if let Some(last_message) = app_state.current_messages_mut().last_mut() [INFO] [stdout] 144 ~ && last_message.role == models::Role::Assistant { [INFO] [stdout] 145 | let err_msg = format!("\n[STREAM ERROR: {}]", e); [INFO] [stdout] ... [INFO] [stdout] 149 | app_state.trigger_auto_scroll(); [INFO] [stdout] 150 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:163:17 [INFO] [stdout] | [INFO] [stdout] 163 | / if app_state.agent_mode { [INFO] [stdout] 164 | | if let Some(last_message) = app_state.current_messages().last() { [INFO] [stdout] 165 | | if last_message.role == models::Role::Assistant { [INFO] [stdout] ... | [INFO] [stdout] 173 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 163 ~ if app_state.agent_mode [INFO] [stdout] 164 ~ && let Some(last_message) = app_state.current_messages().last() { [INFO] [stdout] 165 | if last_message.role == models::Role::Assistant { [INFO] [stdout] ... [INFO] [stdout] 171 | } [INFO] [stdout] 172 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:164:21 [INFO] [stdout] | [INFO] [stdout] 164 | / if let Some(last_message) = app_state.current_messages().last() { [INFO] [stdout] 165 | | if last_message.role == models::Role::Assistant { [INFO] [stdout] ... | [INFO] [stdout] 172 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 164 ~ if let Some(last_message) = app_state.current_messages().last() [INFO] [stdout] 165 ~ && last_message.role == models::Role::Assistant { [INFO] [stdout] 166 | // TODO: Parse commands from response when agent module is implemented [INFO] [stdout] ... [INFO] [stdout] 170 | // } [INFO] [stdout] 171 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 14s [INFO] running `Command { std: "docker" "inspect" "09b32b34c164fe2441c67619e7f2b7ac84bba58551aab16f033a0824c578d582", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "09b32b34c164fe2441c67619e7f2b7ac84bba58551aab16f033a0824c578d582", kill_on_drop: false }` [INFO] [stdout] 09b32b34c164fe2441c67619e7f2b7ac84bba58551aab16f033a0824c578d582