[INFO] cloning repository https://github.com/winterfell2021/codex-tg-bot [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/winterfell2021/codex-tg-bot" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwinterfell2021%2Fcodex-tg-bot", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwinterfell2021%2Fcodex-tg-bot'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 416720b615f06d3d88ed44435656886b3c5a0233 [INFO] linting winterfell2021/codex-tg-bot against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwinterfell2021%2Fcodex-tg-bot" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/winterfell2021/codex-tg-bot [INFO] finished tweaking git repo https://github.com/winterfell2021/codex-tg-bot [INFO] tweaked toml for git repo https://github.com/winterfell2021/codex-tg-bot written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/winterfell2021/codex-tg-bot 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/winterfell2021/codex-tg-bot 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 ntapi v0.4.2 [INFO] [stderr] Downloaded teloxide v0.13.0 [INFO] [stderr] Downloaded teloxide-core v0.10.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 077e5111876feb74c7353d65eb72a59ca755c1ac7df8a975e3dddab735de0fc1 [INFO] running `Command { std: "docker" "start" "-a" "077e5111876feb74c7353d65eb72a59ca755c1ac7df8a975e3dddab735de0fc1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "077e5111876feb74c7353d65eb72a59ca755c1ac7df8a975e3dddab735de0fc1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "077e5111876feb74c7353d65eb72a59ca755c1ac7df8a975e3dddab735de0fc1", kill_on_drop: false }` [INFO] [stdout] 077e5111876feb74c7353d65eb72a59ca755c1ac7df8a975e3dddab735de0fc1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] d2e4189233c0c52b90183510323ac1c22d4a3436c5d1c9db3c6d8fc116b02aad [INFO] running `Command { std: "docker" "start" "-a" "d2e4189233c0c52b90183510323ac1c22d4a3436c5d1c9db3c6d8fc116b02aad", kill_on_drop: false }` [INFO] [stderr] Checking either v1.15.0 [INFO] [stderr] Compiling zerocopy v0.8.31 [INFO] [stderr] Compiling ring v0.17.14 [INFO] [stderr] Checking itoa v1.0.16 [INFO] [stderr] Checking getrandom v0.2.16 [INFO] [stderr] Checking errno v0.3.14 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling zerovec-derive v0.11.2 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Compiling zerocopy-derive v0.8.31 [INFO] [stderr] Compiling tokio-macros v2.6.0 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Compiling equator-macro v0.4.2 [INFO] [stderr] Compiling tracing-attributes v0.1.31 [INFO] [stderr] Checking signal-hook-registry v1.4.8 [INFO] [stderr] Checking http v0.2.12 [INFO] [stderr] Checking rayon v1.11.0 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Checking bytemuck v1.24.0 [INFO] [stderr] Checking num-bigint v0.4.6 [INFO] [stderr] Compiling thiserror-impl v2.0.17 [INFO] [stderr] Checking as-slice v0.2.1 [INFO] [stderr] Compiling av-scenechange v0.14.1 [INFO] [stderr] Compiling built v0.8.0 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.1 [INFO] [stderr] Checking tokio v1.48.0 [INFO] [stderr] Compiling mime_guess v2.0.5 [INFO] [stderr] Checking equator v0.4.2 [INFO] [stderr] Checking aligned-vec v0.6.4 [INFO] [stderr] Checking http-body v0.4.6 [INFO] [stderr] Checking aligned v0.4.3 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Compiling profiling-procmacros v1.0.17 [INFO] [stderr] Checking v_frame v0.3.9 [INFO] [stderr] Compiling rav1e v0.8.1 [INFO] [stderr] Checking tracing v0.1.44 [INFO] [stderr] Compiling arg_enum_proc_macro v0.3.4 [INFO] [stderr] Checking socket2 v0.5.10 [INFO] [stderr] Checking core2 v0.4.0 [INFO] [stderr] Checking nom v8.0.0 [INFO] [stderr] Compiling erasable v1.3.0 [INFO] [stderr] Compiling serde_json v1.0.147 [INFO] [stderr] Checking y4m v0.8.0 [INFO] [stderr] Compiling pastey v0.1.1 [INFO] [stderr] Checking bitstream-io v4.9.0 [INFO] [stderr] Checking thiserror v2.0.17 [INFO] [stderr] Checking profiling v1.0.17 [INFO] [stderr] Checking flate2 v1.1.5 [INFO] [stderr] Checking num-rational v0.4.2 [INFO] [stderr] Checking safe_arch v0.7.4 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking itertools v0.14.0 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Compiling num-derive v0.4.2 [INFO] [stderr] Checking yoke v0.8.1 [INFO] [stderr] Compiling fax_derive v0.2.0 [INFO] [stderr] Checking num-complex v0.4.6 [INFO] [stderr] Compiling simd_helpers v0.1.0 [INFO] [stderr] Checking zerovec v0.11.5 [INFO] [stderr] Checking zerotrie v0.2.3 [INFO] [stderr] Compiling matrixmultiply v0.3.10 [INFO] [stderr] Checking ryu v1.0.21 [INFO] [stderr] Checking imgref v1.12.0 [INFO] [stderr] Checking tinystr v0.8.2 [INFO] [stderr] Checking potential_utf v0.1.4 [INFO] [stderr] Checking zmij v0.1.9 [INFO] [stderr] Checking weezl v0.1.12 [INFO] [stderr] Checking icu_collections v2.1.1 [INFO] [stderr] Compiling rustls v0.21.12 [INFO] [stderr] Checking loop9 v0.1.5 [INFO] [stderr] Checking fax v0.2.6 [INFO] [stderr] Checking icu_locale_core v2.1.1 [INFO] [stderr] Checking zune-jpeg v0.4.21 [INFO] [stderr] Checking wide v0.7.33 [INFO] [stderr] Checking getrandom v0.3.4 [INFO] [stderr] Checking avif-serialize v0.8.6 [INFO] [stderr] Checking zune-inflate v0.2.54 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Checking approx v0.5.1 [INFO] [stderr] Compiling pin-project-internal v1.1.10 [INFO] [stderr] Checking pxfm v0.1.27 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking icu_provider v2.1.1 [INFO] [stderr] Checking maybe-rayon v0.1.1 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking half v2.7.1 [INFO] [stderr] Compiling include_dir_macros v0.7.4 [INFO] [stderr] Checking lebe v0.5.3 [INFO] [stderr] Checking icu_properties v2.1.2 [INFO] [stderr] Checking icu_normalizer v2.1.1 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking ttf-parser v0.25.1 [INFO] [stderr] Checking av1-grain v0.2.5 [INFO] [stderr] Checking zune-core v0.5.0 [INFO] [stderr] Checking rgb v0.8.52 [INFO] [stderr] Checking bit_field v0.10.3 [INFO] [stderr] Checking rawpointer v0.2.1 [INFO] [stderr] Compiling darling_core v0.13.4 [INFO] [stderr] Checking regex-syntax v0.8.8 [INFO] [stderr] Checking gif v0.14.1 [INFO] [stderr] Checking zune-jpeg v0.5.8 [INFO] [stderr] Checking futures-executor v0.3.31 [INFO] [stderr] Checking rustls-webpki v0.101.7 [INFO] [stderr] Checking sct v0.7.1 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking exr v1.74.0 [INFO] [stderr] Compiling derive_more v0.99.20 [INFO] [stderr] Checking image-webp v0.2.4 [INFO] [stderr] Checking futures v0.3.31 [INFO] [stderr] Checking pin-project v1.1.10 [INFO] [stderr] Compiling proc-macro-error v1.0.4 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Compiling itertools v0.10.5 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking tiff v0.10.3 [INFO] [stderr] Compiling include_dir v0.7.4 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking simba v0.8.1 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking tokio-util v0.7.17 [INFO] [stderr] Checking png v0.18.0 [INFO] [stderr] Checking regex-automata v0.4.13 [INFO] [stderr] Checking url v2.5.7 [INFO] [stderr] Checking h2 v0.3.27 [INFO] [stderr] Checking moxcms v0.7.11 [INFO] [stderr] Checking uuid v1.19.0 [INFO] [stderr] Checking owned_ttf_parser v0.25.1 [INFO] [stderr] Checking rc-box v1.3.0 [INFO] [stderr] Checking qoi v0.4.1 [INFO] [stderr] Checking num-iter v0.1.45 [INFO] [stderr] Checking chrono v0.4.42 [INFO] [stderr] Checking ab_glyph_rasterizer v0.1.10 [INFO] [stderr] Checking num v0.4.3 [INFO] [stderr] Checking rand_distr v0.4.3 [INFO] [stderr] Checking tokio-stream v0.1.17 [INFO] [stderr] Checking ab_glyph v0.2.32 [INFO] [stderr] Checking dptree v0.3.0 [INFO] [stderr] Checking itertools v0.12.1 [INFO] [stderr] Compiling teloxide-macros v0.8.0 [INFO] [stderr] Checking tracing-log v0.2.0 [INFO] [stderr] Checking thread_local v1.1.9 [INFO] [stderr] Checking tokio-rustls v0.24.1 [INFO] [stderr] Checking nu-ansi-term v0.50.3 [INFO] [stderr] Checking sysinfo v0.30.13 [INFO] [stderr] Compiling aquamarine v0.5.0 [INFO] [stderr] Checking matchers v0.2.0 [INFO] [stderr] Compiling darling_macro v0.13.4 [INFO] [stderr] Checking tracing-subscriber v0.3.22 [INFO] [stderr] Compiling darling v0.13.4 [INFO] [stderr] Compiling serde_with_macros v1.5.2 [INFO] [stderr] Checking serde_with v1.14.0 [INFO] [stderr] Checking hyper v0.14.32 [INFO] [stderr] Checking nalgebra v0.32.6 [INFO] [stderr] Checking ravif v0.12.0 [INFO] [stderr] Checking hyper-rustls v0.24.2 [INFO] [stderr] Checking image v0.25.9 [INFO] [stderr] Checking reqwest v0.11.27 [INFO] [stderr] Checking teloxide-core v0.10.1 [INFO] [stderr] Checking imageproc v0.25.0 [INFO] [stderr] Checking teloxide v0.13.0 [INFO] [stderr] Checking codex-bot v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/handlers/ui.rs:92:23 [INFO] [stdout] | [INFO] [stdout] 92 | let total_pages = (total + PAGE_SIZE - 1) / PAGE_SIZE; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `total.div_ceil(PAGE_SIZE)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/handlers/ui.rs:92:23 [INFO] [stdout] | [INFO] [stdout] 92 | let total_pages = (total + PAGE_SIZE - 1) / PAGE_SIZE; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `total.div_ceil(PAGE_SIZE)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/services/codex.rs:27:1 [INFO] [stdout] | [INFO] [stdout] 27 | / pub(crate) async fn run_codex_and_stream( [INFO] [stdout] 28 | | bot: &Bot, [INFO] [stdout] 29 | | chat_id: ChatId, [INFO] [stdout] 30 | | trigger_msg_id: MessageId, [INFO] [stdout] ... | [INFO] [stdout] 36 | | prompt: &str, [INFO] [stdout] 37 | | ) -> anyhow::Result<()> { [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/codex.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | / if !initial_session_mapped { [INFO] [stdout] 99 | | if let Some(sid) = session_id.as_deref() { [INFO] [stdout] 100 | | remember_recent_session(recent_sessions, sid).await; [INFO] [stdout] 101 | | map_session(sessions, sid, trigger_msg_id).await; [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] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 98 ~ if !initial_session_mapped [INFO] [stdout] 99 ~ && let Some(sid) = session_id.as_deref() { [INFO] [stdout] 100 | remember_recent_session(recent_sessions, sid).await; [INFO] [stdout] ... [INFO] [stdout] 103 | initial_session_mapped = true; [INFO] [stdout] 104 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/services/codex.rs:27:1 [INFO] [stdout] | [INFO] [stdout] 27 | / pub(crate) async fn run_codex_and_stream( [INFO] [stdout] 28 | | bot: &Bot, [INFO] [stdout] 29 | | chat_id: ChatId, [INFO] [stdout] 30 | | trigger_msg_id: MessageId, [INFO] [stdout] ... | [INFO] [stdout] 36 | | prompt: &str, [INFO] [stdout] 37 | | ) -> anyhow::Result<()> { [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/codex.rs:146:17 [INFO] [stdout] | [INFO] [stdout] 146 | / if session_id.is_none() { [INFO] [stdout] 147 | | if let Some(tid) = event.get("thread_id").and_then(Value::as_str) { [INFO] [stdout] 148 | | session_id = Some(tid.to_string()); [INFO] [stdout] 149 | | } [INFO] [stdout] 150 | | } [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] 146 ~ if session_id.is_none() [INFO] [stdout] 147 ~ && let Some(tid) = event.get("thread_id").and_then(Value::as_str) { [INFO] [stdout] 148 | session_id = Some(tid.to_string()); [INFO] [stdout] 149 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/codex.rs:151:17 [INFO] [stdout] | [INFO] [stdout] 151 | / if !initial_session_mapped { [INFO] [stdout] 152 | | if let Some(sid) = session_id.as_deref() { [INFO] [stdout] 153 | | remember_recent_session(recent_sessions, sid).await; [INFO] [stdout] 154 | | map_session(sessions, sid, trigger_msg_id).await; [INFO] [stdout] ... | [INFO] [stdout] 158 | | } [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] 151 ~ if !initial_session_mapped [INFO] [stdout] 152 ~ && let Some(sid) = session_id.as_deref() { [INFO] [stdout] 153 | remember_recent_session(recent_sessions, sid).await; [INFO] [stdout] ... [INFO] [stdout] 156 | initial_session_mapped = true; [INFO] [stdout] 157 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/codex.rs:173:17 [INFO] [stdout] | [INFO] [stdout] 173 | / if let Some(item) = event.get("item") { [INFO] [stdout] 174 | | if item.get("type").and_then(Value::as_str) == Some("command_execution") { [INFO] [stdout] 175 | | if let Some(command) = item.get("command").and_then(Value::as_str) { [INFO] [stdout] 176 | | explored_commands.push(command.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 203 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 173 ~ if let Some(item) = event.get("item") [INFO] [stdout] 174 ~ && item.get("type").and_then(Value::as_str) == Some("command_execution") { [INFO] [stdout] 175 | if let Some(command) = item.get("command").and_then(Value::as_str) { [INFO] [stdout] ... [INFO] [stdout] 201 | } [INFO] [stdout] 202 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/codex.rs:174:21 [INFO] [stdout] | [INFO] [stdout] 174 | / if item.get("type").and_then(Value::as_str) == Some("command_execution") { [INFO] [stdout] 175 | | if let Some(command) = item.get("command").and_then(Value::as_str) { [INFO] [stdout] 176 | | explored_commands.push(command.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 202 | | } [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] 174 ~ if item.get("type").and_then(Value::as_str) == Some("command_execution") [INFO] [stdout] 175 ~ && let Some(command) = item.get("command").and_then(Value::as_str) { [INFO] [stdout] 176 | explored_commands.push(command.to_string()); [INFO] [stdout] ... [INFO] [stdout] 200 | } [INFO] [stdout] 201 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/codex.rs:188:36 [INFO] [stdout] | [INFO] [stdout] 188 | ... } else if last_explored_edit.elapsed() > Duration::from_millis(400) { [INFO] [stdout] | ______________________________^ [INFO] [stdout] 189 | | ... if let Some(mid) = explored_msg_id { [INFO] [stdout] 190 | | ... let _ = bot [INFO] [stdout] 191 | | ... .edit_message_text( [INFO] [stdout] ... | [INFO] [stdout] 200 | | ... } [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] 188 ~ } else if last_explored_edit.elapsed() > Duration::from_millis(400) [INFO] [stdout] 189 ~ && let Some(mid) = explored_msg_id { [INFO] [stdout] 190 | let _ = bot [INFO] [stdout] ... [INFO] [stdout] 198 | last_explored_edit = Instant::now(); [INFO] [stdout] 199 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/codex.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | / if !initial_session_mapped { [INFO] [stdout] 99 | | if let Some(sid) = session_id.as_deref() { [INFO] [stdout] 100 | | remember_recent_session(recent_sessions, sid).await; [INFO] [stdout] 101 | | map_session(sessions, sid, trigger_msg_id).await; [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] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 98 ~ if !initial_session_mapped [INFO] [stdout] 99 ~ && let Some(sid) = session_id.as_deref() { [INFO] [stdout] 100 | remember_recent_session(recent_sessions, sid).await; [INFO] [stdout] ... [INFO] [stdout] 103 | initial_session_mapped = true; [INFO] [stdout] 104 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/codex.rs:265:29 [INFO] [stdout] | [INFO] [stdout] 265 | / ... if let Ok(m) = bot.send_message(chat_id, warn_text).await { [INFO] [stdout] 266 | | ... if let Some(sid) = session_id.as_deref() { [INFO] [stdout] 267 | | ... map_session(sessions, sid, m.id).await; [INFO] [stdout] 268 | | ... } [INFO] [stdout] 269 | | ... } [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] 265 ~ if let Ok(m) = bot.send_message(chat_id, warn_text).await [INFO] [stdout] 266 ~ && let Some(sid) = session_id.as_deref() { [INFO] [stdout] 267 | map_session(sessions, sid, m.id).await; [INFO] [stdout] 268 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/codex.rs:146:17 [INFO] [stdout] | [INFO] [stdout] 146 | / if session_id.is_none() { [INFO] [stdout] 147 | | if let Some(tid) = event.get("thread_id").and_then(Value::as_str) { [INFO] [stdout] 148 | | session_id = Some(tid.to_string()); [INFO] [stdout] 149 | | } [INFO] [stdout] 150 | | } [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] 146 ~ if session_id.is_none() [INFO] [stdout] 147 ~ && let Some(tid) = event.get("thread_id").and_then(Value::as_str) { [INFO] [stdout] 148 | session_id = Some(tid.to_string()); [INFO] [stdout] 149 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/codex.rs:151:17 [INFO] [stdout] | [INFO] [stdout] 151 | / if !initial_session_mapped { [INFO] [stdout] 152 | | if let Some(sid) = session_id.as_deref() { [INFO] [stdout] 153 | | remember_recent_session(recent_sessions, sid).await; [INFO] [stdout] 154 | | map_session(sessions, sid, trigger_msg_id).await; [INFO] [stdout] ... | [INFO] [stdout] 158 | | } [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] 151 ~ if !initial_session_mapped [INFO] [stdout] 152 ~ && let Some(sid) = session_id.as_deref() { [INFO] [stdout] 153 | remember_recent_session(recent_sessions, sid).await; [INFO] [stdout] ... [INFO] [stdout] 156 | initial_session_mapped = true; [INFO] [stdout] 157 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/codex.rs:173:17 [INFO] [stdout] | [INFO] [stdout] 173 | / if let Some(item) = event.get("item") { [INFO] [stdout] 174 | | if item.get("type").and_then(Value::as_str) == Some("command_execution") { [INFO] [stdout] 175 | | if let Some(command) = item.get("command").and_then(Value::as_str) { [INFO] [stdout] 176 | | explored_commands.push(command.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 203 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 173 ~ if let Some(item) = event.get("item") [INFO] [stdout] 174 ~ && item.get("type").and_then(Value::as_str) == Some("command_execution") { [INFO] [stdout] 175 | if let Some(command) = item.get("command").and_then(Value::as_str) { [INFO] [stdout] ... [INFO] [stdout] 201 | } [INFO] [stdout] 202 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/codex.rs:174:21 [INFO] [stdout] | [INFO] [stdout] 174 | / if item.get("type").and_then(Value::as_str) == Some("command_execution") { [INFO] [stdout] 175 | | if let Some(command) = item.get("command").and_then(Value::as_str) { [INFO] [stdout] 176 | | explored_commands.push(command.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 202 | | } [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] 174 ~ if item.get("type").and_then(Value::as_str) == Some("command_execution") [INFO] [stdout] 175 ~ && let Some(command) = item.get("command").and_then(Value::as_str) { [INFO] [stdout] 176 | explored_commands.push(command.to_string()); [INFO] [stdout] ... [INFO] [stdout] 200 | } [INFO] [stdout] 201 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/codex.rs:188:36 [INFO] [stdout] | [INFO] [stdout] 188 | ... } else if last_explored_edit.elapsed() > Duration::from_millis(400) { [INFO] [stdout] | ______________________________^ [INFO] [stdout] 189 | | ... if let Some(mid) = explored_msg_id { [INFO] [stdout] 190 | | ... let _ = bot [INFO] [stdout] 191 | | ... .edit_message_text( [INFO] [stdout] ... | [INFO] [stdout] 200 | | ... } [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] 188 ~ } else if last_explored_edit.elapsed() > Duration::from_millis(400) [INFO] [stdout] 189 ~ && let Some(mid) = explored_msg_id { [INFO] [stdout] 190 | let _ = bot [INFO] [stdout] ... [INFO] [stdout] 198 | last_explored_edit = Instant::now(); [INFO] [stdout] 199 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/codex.rs:265:29 [INFO] [stdout] | [INFO] [stdout] 265 | / ... if let Ok(m) = bot.send_message(chat_id, warn_text).await { [INFO] [stdout] 266 | | ... if let Some(sid) = session_id.as_deref() { [INFO] [stdout] 267 | | ... map_session(sessions, sid, m.id).await; [INFO] [stdout] 268 | | ... } [INFO] [stdout] 269 | | ... } [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] 265 ~ if let Ok(m) = bot.send_message(chat_id, warn_text).await [INFO] [stdout] 266 ~ && let Some(sid) = session_id.as_deref() { [INFO] [stdout] 267 | map_session(sessions, sid, m.id).await; [INFO] [stdout] 268 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/services/rollout.rs:250:32 [INFO] [stdout] | [INFO] [stdout] 250 | for line in reader.lines().flatten() { [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/services/rollout.rs:250:17 [INFO] [stdout] | [INFO] [stdout] 250 | for line in reader.lines().flatten() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] = note: `#[warn(clippy::lines_filter_map_ok)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/services/rollout.rs:301:29 [INFO] [stdout] | [INFO] [stdout] 301 | / ... if payload.get("role").and_then(Value::as_str) == Some("assistant") { [INFO] [stdout] 302 | | ... if let Some(text) = extract_message_text(payload) { [INFO] [stdout] 303 | | ... last_reply = Some(text); [INFO] [stdout] 304 | | ... } [INFO] [stdout] 305 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 300 ~ Some("message") [INFO] [stdout] 301 ~ if payload.get("role").and_then(Value::as_str) == Some("assistant") => { [INFO] [stdout] 302 | if let Some(text) = extract_message_text(payload) { [INFO] [stdout] 303 | last_reply = Some(text); [INFO] [stdout] 304 | } [INFO] [stdout] 305 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/rollout.rs:286:29 [INFO] [stdout] | [INFO] [stdout] 286 | / ... if let (Some(name), Some(args)) = ( [INFO] [stdout] 287 | | ... payload.get("name").and_then(Value::as_str), [INFO] [stdout] 288 | | ... payload.get("arguments").and_then(Value::as_str), [INFO] [stdout] 289 | | ... ) { [INFO] [stdout] ... | [INFO] [stdout] 293 | | ... } [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] 289 ~ ) [INFO] [stdout] 290 ~ && let Some(cmd) = extract_command_from_function_call(name, args) { [INFO] [stdout] 291 | last_command = Some(cmd); [INFO] [stdout] 292 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/rollout.rs:301:29 [INFO] [stdout] | [INFO] [stdout] 301 | / ... if payload.get("role").and_then(Value::as_str) == Some("assistant") { [INFO] [stdout] 302 | | ... if let Some(text) = extract_message_text(payload) { [INFO] [stdout] 303 | | ... last_reply = Some(text); [INFO] [stdout] 304 | | ... } [INFO] [stdout] 305 | | ... } [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] 301 ~ if payload.get("role").and_then(Value::as_str) == Some("assistant") [INFO] [stdout] 302 ~ && let Some(text) = extract_message_text(payload) { [INFO] [stdout] 303 | last_reply = Some(text); [INFO] [stdout] 304 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/rollout.rs:312:17 [INFO] [stdout] | [INFO] [stdout] 312 | / if let Some(item) = value.get("item") { [INFO] [stdout] 313 | | if item.get("type").and_then(Value::as_str) == Some("command_execution") { [INFO] [stdout] 314 | | if let Some(cmd) = item.get("command").and_then(Value::as_str) { [INFO] [stdout] 315 | | last_command = Some(cmd.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 318 | | } [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] 312 ~ if let Some(item) = value.get("item") [INFO] [stdout] 313 ~ && item.get("type").and_then(Value::as_str) == Some("command_execution") { [INFO] [stdout] 314 | if let Some(cmd) = item.get("command").and_then(Value::as_str) { [INFO] [stdout] 315 | last_command = Some(cmd.to_string()); [INFO] [stdout] 316 | } [INFO] [stdout] 317 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/rollout.rs:313:21 [INFO] [stdout] | [INFO] [stdout] 313 | / if item.get("type").and_then(Value::as_str) == Some("command_execution") { [INFO] [stdout] 314 | | if let Some(cmd) = item.get("command").and_then(Value::as_str) { [INFO] [stdout] 315 | | last_command = Some(cmd.to_string()); [INFO] [stdout] 316 | | } [INFO] [stdout] 317 | | } [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] 313 ~ if item.get("type").and_then(Value::as_str) == Some("command_execution") [INFO] [stdout] 314 ~ && let Some(cmd) = item.get("command").and_then(Value::as_str) { [INFO] [stdout] 315 | last_command = Some(cmd.to_string()); [INFO] [stdout] 316 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/rollout.rs:321:17 [INFO] [stdout] | [INFO] [stdout] 321 | / if let Some(item) = value.get("item") { [INFO] [stdout] 322 | | if item.get("type").and_then(Value::as_str) == Some("agent_message") { [INFO] [stdout] 323 | | if let Some(text) = item.get("text").and_then(Value::as_str) { [INFO] [stdout] 324 | | last_reply = Some(text.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 327 | | } [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] 321 ~ if let Some(item) = value.get("item") [INFO] [stdout] 322 ~ && item.get("type").and_then(Value::as_str) == Some("agent_message") { [INFO] [stdout] 323 | if let Some(text) = item.get("text").and_then(Value::as_str) { [INFO] [stdout] 324 | last_reply = Some(text.to_string()); [INFO] [stdout] 325 | } [INFO] [stdout] 326 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/rollout.rs:322:21 [INFO] [stdout] | [INFO] [stdout] 322 | / if item.get("type").and_then(Value::as_str) == Some("agent_message") { [INFO] [stdout] 323 | | if let Some(text) = item.get("text").and_then(Value::as_str) { [INFO] [stdout] 324 | | last_reply = Some(text.to_string()); [INFO] [stdout] 325 | | } [INFO] [stdout] 326 | | } [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] 322 ~ if item.get("type").and_then(Value::as_str) == Some("agent_message") [INFO] [stdout] 323 ~ && let Some(text) = item.get("text").and_then(Value::as_str) { [INFO] [stdout] 324 | last_reply = Some(text.to_string()); [INFO] [stdout] 325 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/services/rollout.rs:250:32 [INFO] [stdout] | [INFO] [stdout] 250 | for line in reader.lines().flatten() { [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/services/rollout.rs:250:17 [INFO] [stdout] | [INFO] [stdout] 250 | for line in reader.lines().flatten() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] = note: `#[warn(clippy::lines_filter_map_ok)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/services/rollout.rs:301:29 [INFO] [stdout] | [INFO] [stdout] 301 | / ... if payload.get("role").and_then(Value::as_str) == Some("assistant") { [INFO] [stdout] 302 | | ... if let Some(text) = extract_message_text(payload) { [INFO] [stdout] 303 | | ... last_reply = Some(text); [INFO] [stdout] 304 | | ... } [INFO] [stdout] 305 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 300 ~ Some("message") [INFO] [stdout] 301 ~ if payload.get("role").and_then(Value::as_str) == Some("assistant") => { [INFO] [stdout] 302 | if let Some(text) = extract_message_text(payload) { [INFO] [stdout] 303 | last_reply = Some(text); [INFO] [stdout] 304 | } [INFO] [stdout] 305 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/rollout.rs:286:29 [INFO] [stdout] | [INFO] [stdout] 286 | / ... if let (Some(name), Some(args)) = ( [INFO] [stdout] 287 | | ... payload.get("name").and_then(Value::as_str), [INFO] [stdout] 288 | | ... payload.get("arguments").and_then(Value::as_str), [INFO] [stdout] 289 | | ... ) { [INFO] [stdout] ... | [INFO] [stdout] 293 | | ... } [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] 289 ~ ) [INFO] [stdout] 290 ~ && let Some(cmd) = extract_command_from_function_call(name, args) { [INFO] [stdout] 291 | last_command = Some(cmd); [INFO] [stdout] 292 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/rollout.rs:301:29 [INFO] [stdout] | [INFO] [stdout] 301 | / ... if payload.get("role").and_then(Value::as_str) == Some("assistant") { [INFO] [stdout] 302 | | ... if let Some(text) = extract_message_text(payload) { [INFO] [stdout] 303 | | ... last_reply = Some(text); [INFO] [stdout] 304 | | ... } [INFO] [stdout] 305 | | ... } [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] 301 ~ if payload.get("role").and_then(Value::as_str) == Some("assistant") [INFO] [stdout] 302 ~ && let Some(text) = extract_message_text(payload) { [INFO] [stdout] 303 | last_reply = Some(text); [INFO] [stdout] 304 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/rollout.rs:312:17 [INFO] [stdout] | [INFO] [stdout] 312 | / if let Some(item) = value.get("item") { [INFO] [stdout] 313 | | if item.get("type").and_then(Value::as_str) == Some("command_execution") { [INFO] [stdout] 314 | | if let Some(cmd) = item.get("command").and_then(Value::as_str) { [INFO] [stdout] 315 | | last_command = Some(cmd.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 318 | | } [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] 312 ~ if let Some(item) = value.get("item") [INFO] [stdout] 313 ~ && item.get("type").and_then(Value::as_str) == Some("command_execution") { [INFO] [stdout] 314 | if let Some(cmd) = item.get("command").and_then(Value::as_str) { [INFO] [stdout] 315 | last_command = Some(cmd.to_string()); [INFO] [stdout] 316 | } [INFO] [stdout] 317 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/rollout.rs:313:21 [INFO] [stdout] | [INFO] [stdout] 313 | / if item.get("type").and_then(Value::as_str) == Some("command_execution") { [INFO] [stdout] 314 | | if let Some(cmd) = item.get("command").and_then(Value::as_str) { [INFO] [stdout] 315 | | last_command = Some(cmd.to_string()); [INFO] [stdout] 316 | | } [INFO] [stdout] 317 | | } [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] 313 ~ if item.get("type").and_then(Value::as_str) == Some("command_execution") [INFO] [stdout] 314 ~ && let Some(cmd) = item.get("command").and_then(Value::as_str) { [INFO] [stdout] 315 | last_command = Some(cmd.to_string()); [INFO] [stdout] 316 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/rollout.rs:321:17 [INFO] [stdout] | [INFO] [stdout] 321 | / if let Some(item) = value.get("item") { [INFO] [stdout] 322 | | if item.get("type").and_then(Value::as_str) == Some("agent_message") { [INFO] [stdout] 323 | | if let Some(text) = item.get("text").and_then(Value::as_str) { [INFO] [stdout] 324 | | last_reply = Some(text.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 327 | | } [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] 321 ~ if let Some(item) = value.get("item") [INFO] [stdout] 322 ~ && item.get("type").and_then(Value::as_str) == Some("agent_message") { [INFO] [stdout] 323 | if let Some(text) = item.get("text").and_then(Value::as_str) { [INFO] [stdout] 324 | last_reply = Some(text.to_string()); [INFO] [stdout] 325 | } [INFO] [stdout] 326 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/services/rollout.rs:322:21 [INFO] [stdout] | [INFO] [stdout] 322 | / if item.get("type").and_then(Value::as_str) == Some("agent_message") { [INFO] [stdout] 323 | | if let Some(text) = item.get("text").and_then(Value::as_str) { [INFO] [stdout] 324 | | last_reply = Some(text.to_string()); [INFO] [stdout] 325 | | } [INFO] [stdout] 326 | | } [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] 322 ~ if item.get("type").and_then(Value::as_str) == Some("agent_message") [INFO] [stdout] 323 ~ && let Some(text) = item.get("text").and_then(Value::as_str) { [INFO] [stdout] 324 | last_reply = Some(text.to_string()); [INFO] [stdout] 325 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (15/7) [INFO] [stdout] --> src/services/status.rs:322:1 [INFO] [stdout] | [INFO] [stdout] 322 | / fn render_grafana_panel( [INFO] [stdout] 323 | | img: &mut RgbaImage, [INFO] [stdout] 324 | | font: Option<&FontArc>, [INFO] [stdout] 325 | | x: i32, [INFO] [stdout] ... | [INFO] [stdout] 337 | | border_color: Rgba, [INFO] [stdout] 338 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/services/status.rs:405:1 [INFO] [stdout] | [INFO] [stdout] 405 | / fn draw_timeseries_chart( [INFO] [stdout] 406 | | img: &mut RgbaImage, [INFO] [stdout] 407 | | x: i32, [INFO] [stdout] 408 | | y: i32, [INFO] [stdout] ... | [INFO] [stdout] 414 | | border_color: Rgba, [INFO] [stdout] 415 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (15/7) [INFO] [stdout] --> src/services/status.rs:322:1 [INFO] [stdout] | [INFO] [stdout] 322 | / fn render_grafana_panel( [INFO] [stdout] 323 | | img: &mut RgbaImage, [INFO] [stdout] 324 | | font: Option<&FontArc>, [INFO] [stdout] 325 | | x: i32, [INFO] [stdout] ... | [INFO] [stdout] 337 | | border_color: Rgba, [INFO] [stdout] 338 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `seen` is used as a loop counter [INFO] [stdout] --> src/utils/text.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | for (idx, _) in text.char_indices() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (seen, (idx, _)) in text.char_indices().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/services/status.rs:405:1 [INFO] [stdout] | [INFO] [stdout] 405 | / fn draw_timeseries_chart( [INFO] [stdout] 406 | | img: &mut RgbaImage, [INFO] [stdout] 407 | | x: i32, [INFO] [stdout] 408 | | y: i32, [INFO] [stdout] ... | [INFO] [stdout] 414 | | border_color: Rgba, [INFO] [stdout] 415 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `seen` is used as a loop counter [INFO] [stdout] --> src/utils/text.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | for (idx, _) in text.char_indices() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (seen, (idx, _)) in text.char_indices().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 10s [INFO] running `Command { std: "docker" "inspect" "d2e4189233c0c52b90183510323ac1c22d4a3436c5d1c9db3c6d8fc116b02aad", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d2e4189233c0c52b90183510323ac1c22d4a3436c5d1c9db3c6d8fc116b02aad", kill_on_drop: false }` [INFO] [stdout] d2e4189233c0c52b90183510323ac1c22d4a3436c5d1c9db3c6d8fc116b02aad