[INFO] cloning repository https://github.com/AchanYao/copilot-cli [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/AchanYao/copilot-cli" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAchanYao%2Fcopilot-cli", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAchanYao%2Fcopilot-cli'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 93ba95e3bee41fb84d772f262a7e65521c717ca5 [INFO] linting AchanYao/copilot-cli against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAchanYao%2Fcopilot-cli" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/AchanYao/copilot-cli [INFO] finished tweaking git repo https://github.com/AchanYao/copilot-cli [INFO] tweaked toml for git repo https://github.com/AchanYao/copilot-cli written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/AchanYao/copilot-cli 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/AchanYao/copilot-cli already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded windows-targets v0.52.0 [INFO] [stderr] Downloaded libredox v0.0.1 [INFO] [stderr] Downloaded redox_users v0.4.4 [INFO] [stderr] Downloaded simplelog v0.11.2 [INFO] [stderr] Downloaded unicode-bidi v0.3.14 [INFO] [stderr] Downloaded console v0.15.7 [INFO] [stderr] Downloaded indicatif v0.16.2 [INFO] [stderr] Downloaded textwrap v0.16.0 [INFO] [stderr] Downloaded openssl-sys v0.9.97 [INFO] [stderr] Downloaded mio v0.8.10 [INFO] [stderr] Downloaded http v0.2.11 [INFO] [stderr] Downloaded h2 v0.3.22 [INFO] [stderr] Downloaded openssl v0.10.61 [INFO] [stderr] Downloaded rustix v0.38.26 [INFO] [stderr] Downloaded windows_aarch64_gnullvm v0.52.0 [INFO] [stderr] Downloaded windows_x86_64_gnullvm v0.52.0 [INFO] [stderr] Downloaded tokio v1.34.0 [INFO] [stderr] Downloaded windows_aarch64_msvc v0.52.0 [INFO] [stderr] Downloaded windows_x86_64_msvc v0.52.0 [INFO] [stderr] Downloaded windows_i686_gnu v0.52.0 [INFO] [stderr] Downloaded windows_x86_64_gnu v0.52.0 [INFO] [stderr] Downloaded windows_i686_msvc v0.52.0 [INFO] [stderr] Downloaded linux-raw-sys v0.4.12 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 0530a3674fe9bafa8755248e5e07c235d462c55d6669627f225eb218564be8fe [INFO] running `Command { std: "docker" "start" "-a" "0530a3674fe9bafa8755248e5e07c235d462c55d6669627f225eb218564be8fe", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "0530a3674fe9bafa8755248e5e07c235d462c55d6669627f225eb218564be8fe", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0530a3674fe9bafa8755248e5e07c235d462c55d6669627f225eb218564be8fe", kill_on_drop: false }` [INFO] [stdout] 0530a3674fe9bafa8755248e5e07c235d462c55d6669627f225eb218564be8fe [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 6ab6396cf8cdbbab32383c8755318f266ff6ed718f85e7e15f70c8b59ba98b35 [INFO] running `Command { std: "docker" "start" "-a" "6ab6396cf8cdbbab32383c8755318f266ff6ed718f85e7e15f70c8b59ba98b35", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.150 [INFO] [stderr] Compiling proc-macro2 v1.0.70 [INFO] [stderr] Checking pin-project-lite v0.2.13 [INFO] [stderr] Compiling vcpkg v0.2.15 [INFO] [stderr] Checking bytes v1.5.0 [INFO] [stderr] Compiling futures-core v0.3.29 [INFO] [stderr] Compiling futures-task v0.3.29 [INFO] [stderr] Compiling futures-util v0.3.29 [INFO] [stderr] Compiling slab v0.4.9 [INFO] [stderr] Checking tracing-core v0.1.32 [INFO] [stderr] Compiling openssl v0.10.61 [INFO] [stderr] Checking foreign-types-shared v0.1.1 [INFO] [stderr] Compiling native-tls v0.2.11 [INFO] [stderr] Checking equivalent v1.0.1 [INFO] [stderr] Checking futures-sink v0.3.29 [INFO] [stderr] Checking futures-io v0.3.29 [INFO] [stderr] Checking foreign-types v0.3.2 [INFO] [stderr] Checking bitflags v2.4.1 [INFO] [stderr] Checking log v0.4.20 [INFO] [stderr] Checking memchr v2.6.4 [INFO] [stderr] Compiling httparse v1.8.0 [INFO] [stderr] Checking hashbrown v0.14.3 [INFO] [stderr] Compiling serde v1.0.193 [INFO] [stderr] Compiling futures-channel v0.3.29 [INFO] [stderr] Checking tinyvec v1.6.0 [INFO] [stderr] Compiling num-traits v0.2.17 [INFO] [stderr] Checking openssl-probe v0.1.5 [INFO] [stderr] Checking try-lock v0.2.4 [INFO] [stderr] Compiling indexmap v1.9.3 [INFO] [stderr] Checking want v0.3.1 [INFO] [stderr] Compiling serde_json v1.0.108 [INFO] [stderr] Checking unicode-bidi v0.3.14 [INFO] [stderr] Checking tower-service v0.3.2 [INFO] [stderr] Checking regex-syntax v0.8.2 [INFO] [stderr] Checking hashbrown v0.12.3 [INFO] [stderr] Checking termcolor v1.1.3 [INFO] [stderr] Checking os_str_bytes v6.6.1 [INFO] [stderr] Checking tracing v0.1.40 [INFO] [stderr] Checking iana-time-zone v0.1.58 [INFO] [stderr] Checking clap_lex v0.2.4 [INFO] [stderr] Checking http v0.2.11 [INFO] [stderr] Checking encoding_rs v0.8.33 [INFO] [stderr] Compiling quote v1.0.33 [INFO] [stderr] Compiling cc v1.0.83 [INFO] [stderr] Checking indexmap v2.1.0 [INFO] [stderr] Checking ipnet v2.9.0 [INFO] [stderr] Checking textwrap v0.16.0 [INFO] [stderr] Checking socket2 v0.5.5 [INFO] [stderr] Checking mio v0.8.10 [INFO] [stderr] Checking num_cpus v1.16.0 [INFO] [stderr] Compiling syn v2.0.39 [INFO] [stderr] Checking socket2 v0.4.10 [INFO] [stderr] Checking unicode-normalization v0.1.22 [INFO] [stderr] Checking console v0.15.7 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking dirs-sys v0.3.7 [INFO] [stderr] Checking strsim v0.10.0 [INFO] [stderr] Checking number_prefix v0.4.0 [INFO] [stderr] Checking base64 v0.21.5 [INFO] [stderr] Checking dirs v4.0.0 [INFO] [stderr] Checking clap v3.2.25 [INFO] [stderr] Checking idna v0.5.0 [INFO] [stderr] Checking chrono v0.4.31 [INFO] [stderr] Checking http-body v0.4.5 [INFO] [stderr] Compiling openssl-sys v0.9.97 [INFO] [stderr] Compiling sys-info v0.9.1 [INFO] [stderr] Checking url v2.5.0 [INFO] [stderr] Checking regex-automata v0.4.3 [INFO] [stderr] Checking simplelog v0.11.2 [INFO] [stderr] Checking regex v1.10.2 [INFO] [stderr] Checking indicatif v0.16.2 [INFO] [stderr] Compiling tokio-macros v2.2.0 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Compiling serde_derive v1.0.193 [INFO] [stderr] Checking tokio v1.34.0 [INFO] [stderr] Checking tokio-util v0.7.10 [INFO] [stderr] Checking h2 v0.3.22 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking hyper v0.14.27 [INFO] [stderr] Checking hyper-tls v0.5.0 [INFO] [stderr] Checking reqwest v0.11.22 [INFO] [stderr] Checking copilot-cli v0.2.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | use reqwest; [INFO] [stdout] | ^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:12:1 [INFO] [stdout] | [INFO] [stdout] 12 | use dirs; [INFO] [stdout] | ^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:16:1 [INFO] [stdout] | [INFO] [stdout] 16 | use sys_info; [INFO] [stdout] | ^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | use reqwest; [INFO] [stdout] | ^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:12:1 [INFO] [stdout] | [INFO] [stdout] 12 | use dirs; [INFO] [stdout] | ^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:16:1 [INFO] [stdout] | [INFO] [stdout] 16 | use sys_info; [INFO] [stdout] | ^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `get_messages` is never used [INFO] [stdout] --> src/request_body.rs:35:8 [INFO] [stdout] | [INFO] [stdout] 32 | pub trait AiRequestBody { [INFO] [stdout] | ------------- method in this trait [INFO] [stdout] ... [INFO] [stdout] 35 | fn get_messages(&self) -> &LinkedList; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/runtime_config.rs:80:12 [INFO] [stdout] | [INFO] [stdout] 80 | if !config.request_path.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `config.request_path.is_some()` [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: this boolean expression can be simplified [INFO] [stdout] --> src/runtime_config.rs:92:12 [INFO] [stdout] | [INFO] [stdout] 92 | if !config.default_shell.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `config.default_shell.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/runtime_config.rs:104:12 [INFO] [stdout] | [INFO] [stdout] 104 | if !config.ai_type.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `config.ai_type.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/runtime_config.rs:122:25 [INFO] [stdout] | [INFO] [stdout] 115 | / let request_body = AiApiBody::DashScope( [INFO] [stdout] 116 | | DashScopeRequestBody::new( [INFO] [stdout] 117 | | self.model.clone(), [INFO] [stdout] 118 | | self.max_tokens, [INFO] [stdout] ... | [INFO] [stdout] 121 | | ); [INFO] [stdout] | |__________________________- unnecessary `let` binding [INFO] [stdout] 122 | request_body [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 115 ~ [INFO] [stdout] 116 ~ AiApiBody::DashScope( [INFO] [stdout] 117 + DashScopeRequestBody::new( [INFO] [stdout] 118 + self.model.clone(), [INFO] [stdout] 119 + self.max_tokens, [INFO] [stdout] 120 + messages, [INFO] [stdout] 121 + ) [INFO] [stdout] 122 + ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/runtime_config.rs:132:25 [INFO] [stdout] | [INFO] [stdout] 125 | / let request_body = AiApiBody::OpenAI( [INFO] [stdout] 126 | | OpenAiRequestBody { [INFO] [stdout] 127 | | model: self.model.clone(), [INFO] [stdout] 128 | | max_tokens: self.max_tokens, [INFO] [stdout] ... | [INFO] [stdout] 131 | | ); [INFO] [stdout] | |__________________________- unnecessary `let` binding [INFO] [stdout] 132 | request_body [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 125 ~ [INFO] [stdout] 126 ~ AiApiBody::OpenAI( [INFO] [stdout] 127 + OpenAiRequestBody { [INFO] [stdout] 128 + model: self.model.clone(), [INFO] [stdout] 129 + max_tokens: self.max_tokens, [INFO] [stdout] 130 + messages, [INFO] [stdout] 131 + } [INFO] [stdout] 132 + ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/runtime_config.rs:144:17 [INFO] [stdout] | [INFO] [stdout] 137 | / let request_body = AiApiBody::OpenAI( [INFO] [stdout] 138 | | OpenAiRequestBody { [INFO] [stdout] 139 | | model: self.model.clone(), [INFO] [stdout] 140 | | max_tokens: self.max_tokens, [INFO] [stdout] ... | [INFO] [stdout] 143 | | ); [INFO] [stdout] | |__________________- unnecessary `let` binding [INFO] [stdout] 144 | request_body [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 137 ~ [INFO] [stdout] 138 ~ AiApiBody::OpenAI( [INFO] [stdout] 139 + OpenAiRequestBody { [INFO] [stdout] 140 + model: self.model.clone(), [INFO] [stdout] 141 + max_tokens: self.max_tokens, [INFO] [stdout] 142 + messages, [INFO] [stdout] 143 + } [INFO] [stdout] 144 + ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:152:5 [INFO] [stdout] | [INFO] [stdout] 152 | return shell.map(|s| s.to_string()); [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] 152 - return shell.map(|s| s.to_string()); [INFO] [stdout] 152 + shell.map(|s| s.to_string()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `MutexGuard` is held across an await point [INFO] [stdout] --> src/main.rs:156:19 [INFO] [stdout] | [INFO] [stdout] 156 | let config = &GLOBAL_CONFIG.read().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling `await` [INFO] [stdout] note: these are all the await points this lock is held through [INFO] [stdout] --> src/main.rs:187:10 [INFO] [stdout] | [INFO] [stdout] 187 | .await?; [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 191 | let response_json = response.json::().await?; [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock [INFO] [stdout] = note: `#[warn(clippy::await_holding_lock)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:163:35 [INFO] [stdout] | [INFO] [stdout] 163 | ... = format!("Operating System with version obtained via the sys_info l... default to English."); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Operating System with version obtained via the sys_info library is reliable and should be used as the default. Terminal Environment is determined by the program and may not match user expectations. If the user specifies a different terminal within their request, prioritize the user's choice. For OS-specific queries, ignore user preferences for an OS different from [OS], except when the question pertains to different distributions of the same OS, in which case use discretion. Goal: To provide users with executable command line instructions for the current environment and terminal, and offer explanations that are easily readable, using line breaks or tabs to enhance readability. If the user's language is clear, respond in kind; otherwise, default to English.".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `get_messages` is never used [INFO] [stdout] --> src/request_body.rs:35:8 [INFO] [stdout] | [INFO] [stdout] 32 | pub trait AiRequestBody { [INFO] [stdout] | ------------- method in this trait [INFO] [stdout] ... [INFO] [stdout] 35 | fn get_messages(&self) -> &LinkedList; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/runtime_config.rs:80:12 [INFO] [stdout] | [INFO] [stdout] 80 | if !config.request_path.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `config.request_path.is_some()` [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: this boolean expression can be simplified [INFO] [stdout] --> src/runtime_config.rs:92:12 [INFO] [stdout] | [INFO] [stdout] 92 | if !config.default_shell.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `config.default_shell.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/runtime_config.rs:104:12 [INFO] [stdout] | [INFO] [stdout] 104 | if !config.ai_type.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `config.ai_type.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/runtime_config.rs:122:25 [INFO] [stdout] | [INFO] [stdout] 115 | / let request_body = AiApiBody::DashScope( [INFO] [stdout] 116 | | DashScopeRequestBody::new( [INFO] [stdout] 117 | | self.model.clone(), [INFO] [stdout] 118 | | self.max_tokens, [INFO] [stdout] ... | [INFO] [stdout] 121 | | ); [INFO] [stdout] | |__________________________- unnecessary `let` binding [INFO] [stdout] 122 | request_body [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 115 ~ [INFO] [stdout] 116 ~ AiApiBody::DashScope( [INFO] [stdout] 117 + DashScopeRequestBody::new( [INFO] [stdout] 118 + self.model.clone(), [INFO] [stdout] 119 + self.max_tokens, [INFO] [stdout] 120 + messages, [INFO] [stdout] 121 + ) [INFO] [stdout] 122 + ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/runtime_config.rs:132:25 [INFO] [stdout] | [INFO] [stdout] 125 | / let request_body = AiApiBody::OpenAI( [INFO] [stdout] 126 | | OpenAiRequestBody { [INFO] [stdout] 127 | | model: self.model.clone(), [INFO] [stdout] 128 | | max_tokens: self.max_tokens, [INFO] [stdout] ... | [INFO] [stdout] 131 | | ); [INFO] [stdout] | |__________________________- unnecessary `let` binding [INFO] [stdout] 132 | request_body [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 125 ~ [INFO] [stdout] 126 ~ AiApiBody::OpenAI( [INFO] [stdout] 127 + OpenAiRequestBody { [INFO] [stdout] 128 + model: self.model.clone(), [INFO] [stdout] 129 + max_tokens: self.max_tokens, [INFO] [stdout] 130 + messages, [INFO] [stdout] 131 + } [INFO] [stdout] 132 + ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/runtime_config.rs:144:17 [INFO] [stdout] | [INFO] [stdout] 137 | / let request_body = AiApiBody::OpenAI( [INFO] [stdout] 138 | | OpenAiRequestBody { [INFO] [stdout] 139 | | model: self.model.clone(), [INFO] [stdout] 140 | | max_tokens: self.max_tokens, [INFO] [stdout] ... | [INFO] [stdout] 143 | | ); [INFO] [stdout] | |__________________- unnecessary `let` binding [INFO] [stdout] 144 | request_body [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 137 ~ [INFO] [stdout] 138 ~ AiApiBody::OpenAI( [INFO] [stdout] 139 + OpenAiRequestBody { [INFO] [stdout] 140 + model: self.model.clone(), [INFO] [stdout] 141 + max_tokens: self.max_tokens, [INFO] [stdout] 142 + messages, [INFO] [stdout] 143 + } [INFO] [stdout] 144 + ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:152:5 [INFO] [stdout] | [INFO] [stdout] 152 | return shell.map(|s| s.to_string()); [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] 152 - return shell.map(|s| s.to_string()); [INFO] [stdout] 152 + shell.map(|s| s.to_string()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `MutexGuard` is held across an await point [INFO] [stdout] --> src/main.rs:156:19 [INFO] [stdout] | [INFO] [stdout] 156 | let config = &GLOBAL_CONFIG.read().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling `await` [INFO] [stdout] note: these are all the await points this lock is held through [INFO] [stdout] --> src/main.rs:187:10 [INFO] [stdout] | [INFO] [stdout] 187 | .await?; [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 191 | let response_json = response.json::().await?; [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock [INFO] [stdout] = note: `#[warn(clippy::await_holding_lock)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:163:35 [INFO] [stdout] | [INFO] [stdout] 163 | ... = format!("Operating System with version obtained via the sys_info l... default to English."); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Operating System with version obtained via the sys_info library is reliable and should be used as the default. Terminal Environment is determined by the program and may not match user expectations. If the user specifies a different terminal within their request, prioritize the user's choice. For OS-specific queries, ignore user preferences for an OS different from [OS], except when the question pertains to different distributions of the same OS, in which case use discretion. Goal: To provide users with executable command line instructions for the current environment and terminal, and offer explanations that are easily readable, using line breaks or tabs to enhance readability. If the user's language is clear, respond in kind; otherwise, default to English.".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 29.47s [INFO] running `Command { std: "docker" "inspect" "6ab6396cf8cdbbab32383c8755318f266ff6ed718f85e7e15f70c8b59ba98b35", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6ab6396cf8cdbbab32383c8755318f266ff6ed718f85e7e15f70c8b59ba98b35", kill_on_drop: false }` [INFO] [stdout] 6ab6396cf8cdbbab32383c8755318f266ff6ed718f85e7e15f70c8b59ba98b35