Files
GopherGate/target/debug/.fingerprint/llm-proxy-9d52c5fa4418c7d9/output-test-integration-test-integration_tests
2026-02-26 12:47:43 -05:00

21 lines
50 KiB
Plaintext

{"$message_type":"diagnostic","message":"unresolved import `llm_proxy::database::Database`","code":{"code":"E0432","explanation":"An import was unresolved.\n\nErroneous code example:\n\n```compile_fail,E0432\nuse something::Foo; // error: unresolved import `something::Foo`.\n```\n\nIn Rust 2015, paths in `use` statements are relative to the crate root. To\nimport items relative to the current and parent modules, use the `self::` and\n`super::` prefixes, respectively.\n\nIn Rust 2018 or later, paths in `use` statements are relative to the current\nmodule unless they begin with the name of a crate or a literal `crate::`, in\nwhich case they start from the crate root. As in Rust 2015 code, the `self::`\nand `super::` prefixes refer to the current and parent modules respectively.\n\nAlso verify that you didn't misspell the import name and that the import exists\nin the module from where you tried to import it. Example:\n\n```\nuse self::something::Foo; // Ok.\n\nmod something {\n pub struct Foo;\n}\n# fn main() {}\n```\n\nIf you tried to use a module from an external crate and are using Rust 2015,\nyou may have missed the `extern crate` declaration (which is usually placed in\nthe crate root):\n\n```edition2015\nextern crate core; // Required to use the `core` crate in Rust 2015.\n\nuse core::any;\n# fn main() {}\n```\n\nSince Rust 2018 the `extern crate` declaration is not required and\nyou can instead just `use` it:\n\n```edition2018\nuse core::any; // No extern crate required in Rust 2018.\n# fn main() {}\n```\n"},"level":"error","spans":[{"file_name":"tests/integration_tests.rs","byte_start":79,"byte_end":108,"line_start":4,"line_end":4,"column_start":5,"column_end":34,"is_primary":true,"text":[{"text":"use llm_proxy::database::Database;","highlight_start":5,"highlight_end":34}],"label":"no `Database` in `database`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider importing one of these items instead","code":null,"level":"help","spans":[{"file_name":"tests/integration_tests.rs","byte_start":79,"byte_end":108,"line_start":4,"line_end":4,"column_start":5,"column_end":34,"is_primary":true,"text":[{"text":"use llm_proxy::database::Database;","highlight_start":5,"highlight_end":34}],"label":null,"suggested_replacement":"sqlx::Database","suggestion_applicability":"MaybeIncorrect","expansion":null},{"file_name":"tests/integration_tests.rs","byte_start":79,"byte_end":108,"line_start":4,"line_end":4,"column_start":5,"column_end":34,"is_primary":true,"text":[{"text":"use llm_proxy::database::Database;","highlight_start":5,"highlight_end":34}],"label":null,"suggested_replacement":"sqlx::Error::Database","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0432]\u001b[0m\u001b[1m: unresolved import `llm_proxy::database::Database`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0mtests/integration_tests.rs:4:5\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m4\u001b[0m \u001b[1m\u001b[94m|\u001b[0m use llm_proxy::database::Database;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m \u001b[1m\u001b[91mno `Database` in `database`\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[96mhelp\u001b[0m: consider importing one of these items instead\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m4\u001b[0m \u001b[91m- \u001b[0muse \u001b[91mllm_proxy::database::Database\u001b[0m;\n\u001b[1m\u001b[94m4\u001b[0m \u001b[92m+ \u001b[0muse \u001b[92msqlx::Database\u001b[0m;\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m4\u001b[0m \u001b[91m- \u001b[0muse \u001b[91mllm_proxy::database::Database\u001b[0m;\n\u001b[1m\u001b[94m4\u001b[0m \u001b[92m+ \u001b[0muse \u001b[92msqlx::Error::Database\u001b[0m;\n \u001b[1m\u001b[94m|\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"unresolved import `llm_proxy::test_utils`","code":{"code":"E0432","explanation":"An import was unresolved.\n\nErroneous code example:\n\n```compile_fail,E0432\nuse something::Foo; // error: unresolved import `something::Foo`.\n```\n\nIn Rust 2015, paths in `use` statements are relative to the crate root. To\nimport items relative to the current and parent modules, use the `self::` and\n`super::` prefixes, respectively.\n\nIn Rust 2018 or later, paths in `use` statements are relative to the current\nmodule unless they begin with the name of a crate or a literal `crate::`, in\nwhich case they start from the crate root. As in Rust 2015 code, the `self::`\nand `super::` prefixes refer to the current and parent modules respectively.\n\nAlso verify that you didn't misspell the import name and that the import exists\nin the module from where you tried to import it. Example:\n\n```\nuse self::something::Foo; // Ok.\n\nmod something {\n pub struct Foo;\n}\n# fn main() {}\n```\n\nIf you tried to use a module from an external crate and are using Rust 2015,\nyou may have missed the `extern crate` declaration (which is usually placed in\nthe crate root):\n\n```edition2015\nextern crate core; // Required to use the `core` crate in Rust 2015.\n\nuse core::any;\n# fn main() {}\n```\n\nSince Rust 2018 the `extern crate` declaration is not required and\nyou can instead just `use` it:\n\n```edition2018\nuse core::any; // No extern crate required in Rust 2018.\n# fn main() {}\n```\n"},"level":"error","spans":[{"file_name":"tests/integration_tests.rs","byte_start":4118,"byte_end":4128,"line_start":140,"line_end":140,"column_start":20,"column_end":30,"is_primary":true,"text":[{"text":" use llm_proxy::test_utils::create_test_state;","highlight_start":20,"highlight_end":30}],"label":"could not find `test_utils` in `llm_proxy`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"found an item that was configured out","code":null,"level":"note","spans":[{"file_name":"/home/newkirk/Documents/projects/web_projects/llm-proxy/src/lib.rs","byte_start":617,"byte_end":621,"line_start":30,"line_end":30,"column_start":7,"column_end":11,"is_primary":false,"text":[{"text":"#[cfg(test)]","highlight_start":7,"highlight_end":11}],"label":"the item is gated here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/home/newkirk/Documents/projects/web_projects/llm-proxy/src/lib.rs","byte_start":632,"byte_end":642,"line_start":31,"line_end":31,"column_start":9,"column_end":19,"is_primary":true,"text":[{"text":"pub mod test_utils {","highlight_start":9,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0432]\u001b[0m\u001b[1m: unresolved import `llm_proxy::test_utils`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0mtests/integration_tests.rs:140:20\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m140\u001b[0m \u001b[1m\u001b[94m|\u001b[0m use llm_proxy::test_utils::create_test_state;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^^^^^^^^^^\u001b[0m \u001b[1m\u001b[91mcould not find `test_utils` in `llm_proxy`\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[92mnote\u001b[0m: found an item that was configured out\n \u001b[1m\u001b[94m--> \u001b[0m/home/newkirk/Documents/projects/web_projects/llm-proxy/src/lib.rs:31:9\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m30\u001b[0m \u001b[1m\u001b[94m|\u001b[0m #[cfg(test)]\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m----\u001b[0m \u001b[1m\u001b[94mthe item is gated here\u001b[0m\n \u001b[1m\u001b[94m31\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub mod test_utils {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m^^^^^^^^^^\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"struct `Config` is private","code":{"code":"E0603","explanation":"A private item was used outside its scope.\n\nErroneous code example:\n\n```compile_fail,E0603\nmod foo {\n const PRIVATE: u32 = 0x_a_bad_1dea_u32; // This const is private, so we\n // can't use it outside of the\n // `foo` module.\n}\n\nprintln!(\"const value: {}\", foo::PRIVATE); // error: constant `PRIVATE`\n // is private\n```\n\nIn order to fix this error, you need to make the item public by using the `pub`\nkeyword. Example:\n\n```\nmod foo {\n pub const PRIVATE: u32 = 0x_a_bad_1dea_u32; // We set it public by using the\n // `pub` keyword.\n}\n\nprintln!(\"const value: {}\", foo::PRIVATE); // ok!\n```\n"},"level":"error","spans":[{"file_name":"tests/integration_tests.rs","byte_start":67,"byte_end":73,"line_start":3,"line_end":3,"column_start":24,"column_end":30,"is_primary":true,"text":[{"text":"use llm_proxy::config::Config;","highlight_start":24,"highlight_end":30}],"label":"private struct","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the struct `Config` is defined here","code":null,"level":"note","spans":[{"file_name":"/home/newkirk/Documents/projects/web_projects/llm-proxy/src/config/mod.rs","byte_start":33,"byte_end":39,"line_start":2,"line_end":2,"column_start":14,"column_end":20,"is_primary":true,"text":[{"text":"use config::{Config, File, FileFormat};","highlight_start":14,"highlight_end":20}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"import `Config` directly","code":null,"level":"help","spans":[{"file_name":"tests/integration_tests.rs","byte_start":48,"byte_end":73,"line_start":3,"line_end":3,"column_start":5,"column_end":30,"is_primary":true,"text":[{"text":"use llm_proxy::config::Config;","highlight_start":5,"highlight_end":30}],"label":null,"suggested_replacement":"config::config::Config","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0603]\u001b[0m\u001b[1m: struct `Config` is private\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0mtests/integration_tests.rs:3:24\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m3\u001b[0m \u001b[1m\u001b[94m|\u001b[0m use llm_proxy::config::Config;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^^^^^^\u001b[0m \u001b[1m\u001b[91mprivate struct\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[92mnote\u001b[0m: the struct `Config` is defined here\n \u001b[1m\u001b[94m--> \u001b[0m/home/newkirk/Documents/projects/web_projects/llm-proxy/src/config/mod.rs:2:14\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m2\u001b[0m \u001b[1m\u001b[94m|\u001b[0m use config::{Config, File, FileFormat};\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m^^^^^^\u001b[0m\n\u001b[1m\u001b[96mhelp\u001b[0m: import `Config` directly\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m3\u001b[0m \u001b[91m- \u001b[0muse \u001b[91mllm_proxy::config::Config\u001b[0m;\n\u001b[1m\u001b[94m3\u001b[0m \u001b[92m+ \u001b[0muse \u001b[92mconfig::config::Config\u001b[0m;\n \u001b[1m\u001b[94m|\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"unused import: `llm_proxy::state::AppState`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"tests/integration_tests.rs","byte_start":114,"byte_end":140,"line_start":5,"line_end":5,"column_start":5,"column_end":31,"is_primary":true,"text":[{"text":"use llm_proxy::state::AppState;","highlight_start":5,"highlight_end":31}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the whole `use` item","code":null,"level":"help","spans":[{"file_name":"tests/integration_tests.rs","byte_start":110,"byte_end":142,"line_start":5,"line_end":6,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"use llm_proxy::state::AppState;","highlight_start":1,"highlight_end":32},{"text":"use llm_proxy::rate_limiting::RateLimitManager;","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: unused import: `llm_proxy::state::AppState`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0mtests/integration_tests.rs:5:5\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m5\u001b[0m \u001b[1m\u001b[94m|\u001b[0m use llm_proxy::state::AppState;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default\n\n"}
{"$message_type":"diagnostic","message":"unused import: `Provider`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"tests/integration_tests.rs","byte_start":2108,"byte_end":2116,"line_start":86,"line_end":86,"column_start":49,"column_end":57,"is_primary":true,"text":[{"text":" use llm_proxy::providers::{ProviderManager, Provider};","highlight_start":49,"highlight_end":57}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove the unused import","code":null,"level":"help","spans":[{"file_name":"tests/integration_tests.rs","byte_start":2106,"byte_end":2116,"line_start":86,"line_end":86,"column_start":47,"column_end":57,"is_primary":true,"text":[{"text":" use llm_proxy::providers::{ProviderManager, Provider};","highlight_start":47,"highlight_end":57}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"tests/integration_tests.rs","byte_start":2090,"byte_end":2091,"line_start":86,"line_end":86,"column_start":31,"column_end":32,"is_primary":true,"text":[{"text":" use llm_proxy::providers::{ProviderManager, Provider};","highlight_start":31,"highlight_end":32}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"tests/integration_tests.rs","byte_start":2116,"byte_end":2117,"line_start":86,"line_end":86,"column_start":57,"column_end":58,"is_primary":true,"text":[{"text":" use llm_proxy::providers::{ProviderManager, Provider};","highlight_start":57,"highlight_end":58}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: unused import: `Provider`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0mtests/integration_tests.rs:86:49\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m86\u001b[0m \u001b[1m\u001b[94m|\u001b[0m use llm_proxy::providers::{ProviderManager, Provider};\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^^^\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"unused import: `llm_proxy::config::OpenAIConfig`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"tests/integration_tests.rs","byte_start":2127,"byte_end":2158,"line_start":87,"line_end":87,"column_start":9,"column_end":40,"is_primary":true,"text":[{"text":" use llm_proxy::config::OpenAIConfig;","highlight_start":9,"highlight_end":40}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove the whole `use` item","code":null,"level":"help","spans":[{"file_name":"tests/integration_tests.rs","byte_start":2123,"byte_end":2159,"line_start":87,"line_end":87,"column_start":5,"column_end":41,"is_primary":true,"text":[{"text":" use llm_proxy::config::OpenAIConfig;","highlight_start":5,"highlight_end":41}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: unused import: `llm_proxy::config::OpenAIConfig`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0mtests/integration_tests.rs:87:9\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m87\u001b[0m \u001b[1m\u001b[94m|\u001b[0m use llm_proxy::config::OpenAIConfig;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"unused import: `ImageInput`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"tests/integration_tests.rs","byte_start":4416,"byte_end":4426,"line_start":149,"line_end":149,"column_start":49,"column_end":59,"is_primary":true,"text":[{"text":" use llm_proxy::multimodal::{ImageConverter, ImageInput};","highlight_start":49,"highlight_end":59}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove the unused import","code":null,"level":"help","spans":[{"file_name":"tests/integration_tests.rs","byte_start":4414,"byte_end":4426,"line_start":149,"line_end":149,"column_start":47,"column_end":59,"is_primary":true,"text":[{"text":" use llm_proxy::multimodal::{ImageConverter, ImageInput};","highlight_start":47,"highlight_end":59}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"tests/integration_tests.rs","byte_start":4399,"byte_end":4400,"line_start":149,"line_end":149,"column_start":32,"column_end":33,"is_primary":true,"text":[{"text":" use llm_proxy::multimodal::{ImageConverter, ImageInput};","highlight_start":32,"highlight_end":33}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"tests/integration_tests.rs","byte_start":4426,"byte_end":4427,"line_start":149,"line_end":149,"column_start":59,"column_end":60,"is_primary":true,"text":[{"text":" use llm_proxy::multimodal::{ImageConverter, ImageInput};","highlight_start":59,"highlight_end":60}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: unused import: `ImageInput`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0mtests/integration_tests.rs:149:49\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m149\u001b[0m \u001b[1m\u001b[94m|\u001b[0m use llm_proxy::multimodal::{ImageConverter, ImageInput};\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^^^^^\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"type annotations needed","code":{"code":"E0282","explanation":"The compiler could not infer a type and asked for a type annotation.\n\nErroneous code example:\n\n```compile_fail,E0282\nlet x = Vec::new();\n```\n\nThis error indicates that type inference did not result in one unique possible\ntype, and extra information is required. In most cases this can be provided\nby adding a type annotation. Sometimes you need to specify a generic type\nparameter manually.\n\nIn the example above, type `Vec` has a type parameter `T`. When calling\n`Vec::new`, barring any other later usage of the variable `x` that allows the\ncompiler to infer what type `T` is, the compiler needs to be told what it is.\n\nThe type can be specified on the variable:\n\n```\nlet x: Vec<i32> = Vec::new();\n```\n\nThe type can also be specified in the path of the expression:\n\n```\nlet x = Vec::<i32>::new();\n```\n\nIn cases with more complex types, it is not necessary to annotate the full\ntype. Once the ambiguity is resolved, the compiler can infer the rest:\n\n```\nlet x: Vec<_> = \"hello\".chars().rev().collect();\n```\n\nAnother way to provide the compiler with enough information, is to specify the\ngeneric type parameter:\n\n```\nlet x = \"hello\".chars().rev().collect::<Vec<char>>();\n```\n\nAgain, you need not specify the full type if the compiler can infer it:\n\n```\nlet x = \"hello\".chars().rev().collect::<Vec<_>>();\n```\n\nApart from a method or function with a generic type parameter, this error can\noccur when a type parameter of a struct or trait cannot be inferred. In that\ncase it is not always possible to use a type annotation, because all candidates\nhave the same return type. For instance:\n\n```compile_fail,E0282\nstruct Foo<T> {\n num: T,\n}\n\nimpl<T> Foo<T> {\n fn bar() -> i32 {\n 0\n }\n\n fn baz() {\n let number = Foo::bar();\n }\n}\n```\n\nThis will fail because the compiler does not know which instance of `Foo` to\ncall `bar` on. Change `Foo::bar()` to `Foo::<T>::bar()` to resolve the error.\n"},"level":"error","spans":[{"file_name":"tests/integration_tests.rs","byte_start":1794,"byte_end":1802,"line_start":74,"line_end":74,"column_start":13,"column_end":21,"is_primary":false,"text":[{"text":" assert!(database.is_ok());","highlight_start":13,"highlight_end":21}],"label":"type must be known at this point","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"tests/integration_tests.rs","byte_start":1740,"byte_end":1748,"line_start":73,"line_end":73,"column_start":9,"column_end":17,"is_primary":true,"text":[{"text":" let database = Database::new(&db_path).await;","highlight_start":9,"highlight_end":17}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider giving `database` an explicit type","code":null,"level":"help","spans":[{"file_name":"tests/integration_tests.rs","byte_start":1748,"byte_end":1748,"line_start":73,"line_end":73,"column_start":17,"column_end":17,"is_primary":true,"text":[{"text":" let database = Database::new(&db_path).await;","highlight_start":17,"highlight_end":17}],"label":null,"suggested_replacement":": /* Type */","suggestion_applicability":"HasPlaceholders","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0282]\u001b[0m\u001b[1m: type annotations needed\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0mtests/integration_tests.rs:73:9\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m73\u001b[0m \u001b[1m\u001b[94m|\u001b[0m let database = Database::new(&db_path).await;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^^^^^^^^\u001b[0m\n\u001b[1m\u001b[94m74\u001b[0m \u001b[1m\u001b[94m|\u001b[0m assert!(database.is_ok());\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m--------\u001b[0m \u001b[1m\u001b[94mtype must be known at this point\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[96mhelp\u001b[0m: consider giving `database` an explicit type\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m73\u001b[0m \u001b[1m\u001b[94m| \u001b[0m let database\u001b[92m: /* Type */\u001b[0m = Database::new(&db_path).await;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[92m++++++++++++\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"type annotations needed","code":{"code":"E0282","explanation":"The compiler could not infer a type and asked for a type annotation.\n\nErroneous code example:\n\n```compile_fail,E0282\nlet x = Vec::new();\n```\n\nThis error indicates that type inference did not result in one unique possible\ntype, and extra information is required. In most cases this can be provided\nby adding a type annotation. Sometimes you need to specify a generic type\nparameter manually.\n\nIn the example above, type `Vec` has a type parameter `T`. When calling\n`Vec::new`, barring any other later usage of the variable `x` that allows the\ncompiler to infer what type `T` is, the compiler needs to be told what it is.\n\nThe type can be specified on the variable:\n\n```\nlet x: Vec<i32> = Vec::new();\n```\n\nThe type can also be specified in the path of the expression:\n\n```\nlet x = Vec::<i32>::new();\n```\n\nIn cases with more complex types, it is not necessary to annotate the full\ntype. Once the ambiguity is resolved, the compiler can infer the rest:\n\n```\nlet x: Vec<_> = \"hello\".chars().rev().collect();\n```\n\nAnother way to provide the compiler with enough information, is to specify the\ngeneric type parameter:\n\n```\nlet x = \"hello\".chars().rev().collect::<Vec<char>>();\n```\n\nAgain, you need not specify the full type if the compiler can infer it:\n\n```\nlet x = \"hello\".chars().rev().collect::<Vec<_>>();\n```\n\nApart from a method or function with a generic type parameter, this error can\noccur when a type parameter of a struct or trait cannot be inferred. In that\ncase it is not always possible to use a type annotation, because all candidates\nhave the same return type. For instance:\n\n```compile_fail,E0282\nstruct Foo<T> {\n num: T,\n}\n\nimpl<T> Foo<T> {\n fn bar() -> i32 {\n 0\n }\n\n fn baz() {\n let number = Foo::bar();\n }\n}\n```\n\nThis will fail because the compiler does not know which instance of `Foo` to\ncall `bar` on. Change `Foo::bar()` to `Foo::<T>::bar()` to resolve the error.\n"},"level":"error","spans":[{"file_name":"tests/integration_tests.rs","byte_start":1952,"byte_end":1963,"line_start":80,"line_end":80,"column_start":13,"column_end":24,"is_primary":false,"text":[{"text":" assert!(test_result.is_ok());","highlight_start":13,"highlight_end":24}],"label":"type must be known at this point","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"tests/integration_tests.rs","byte_start":1892,"byte_end":1903,"line_start":79,"line_end":79,"column_start":9,"column_end":20,"is_primary":true,"text":[{"text":" let test_result = database.test_connection().await;","highlight_start":9,"highlight_end":20}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider giving `test_result` an explicit type","code":null,"level":"help","spans":[{"file_name":"tests/integration_tests.rs","byte_start":1903,"byte_end":1903,"line_start":79,"line_end":79,"column_start":20,"column_end":20,"is_primary":true,"text":[{"text":" let test_result = database.test_connection().await;","highlight_start":20,"highlight_end":20}],"label":null,"suggested_replacement":": /* Type */","suggestion_applicability":"HasPlaceholders","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0282]\u001b[0m\u001b[1m: type annotations needed\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0mtests/integration_tests.rs:79:9\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m79\u001b[0m \u001b[1m\u001b[94m|\u001b[0m let test_result = database.test_connection().await;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^^^^^^^^^^^\u001b[0m\n\u001b[1m\u001b[94m80\u001b[0m \u001b[1m\u001b[94m|\u001b[0m assert!(test_result.is_ok());\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m-----------\u001b[0m \u001b[1m\u001b[94mtype must be known at this point\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[96mhelp\u001b[0m: consider giving `test_result` an explicit type\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m79\u001b[0m \u001b[1m\u001b[94m| \u001b[0m let test_result\u001b[92m: /* Type */\u001b[0m = database.test_connection().await;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[92m++++++++++++\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"field `providers` of struct `ProviderManager` is private","code":{"code":"E0616","explanation":"Attempted to access a private field on a struct.\n\nErroneous code example:\n\n```compile_fail,E0616\nmod some_module {\n pub struct Foo {\n x: u32, // So `x` is private in here.\n }\n\n impl Foo {\n pub fn new() -> Foo { Foo { x: 0 } }\n }\n}\n\nlet f = some_module::Foo::new();\nprintln!(\"{}\", f.x); // error: field `x` of struct `some_module::Foo` is private\n```\n\nIf you want to access this field, you have two options:\n\n1) Set the field public:\n\n```\nmod some_module {\n pub struct Foo {\n pub x: u32, // `x` is now public.\n }\n\n impl Foo {\n pub fn new() -> Foo { Foo { x: 0 } }\n }\n}\n\nlet f = some_module::Foo::new();\nprintln!(\"{}\", f.x); // ok!\n```\n\n2) Add a getter function:\n\n```\nmod some_module {\n pub struct Foo {\n x: u32, // So `x` is still private in here.\n }\n\n impl Foo {\n pub fn new() -> Foo { Foo { x: 0 } }\n\n // We create the getter function here:\n pub fn get_x(&self) -> &u32 { &self.x }\n }\n}\n\nlet f = some_module::Foo::new();\nprintln!(\"{}\", f.get_x()); // ok!\n```\n"},"level":"error","spans":[{"file_name":"tests/integration_tests.rs","byte_start":2234,"byte_end":2243,"line_start":90,"line_end":90,"column_start":24,"column_end":33,"is_primary":true,"text":[{"text":" assert_eq!(manager.providers.len(), 0);","highlight_start":24,"highlight_end":33}],"label":"private field","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[91merror[E0616]\u001b[0m\u001b[1m: field `providers` of struct `ProviderManager` is private\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0mtests/integration_tests.rs:90:24\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m90\u001b[0m \u001b[1m\u001b[94m|\u001b[0m assert_eq!(manager.providers.len(), 0);\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^^^^^^^^^\u001b[0m \u001b[1m\u001b[91mprivate field\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"arguments to this function are incorrect","code":{"code":"E0308","explanation":"Expected type did not match the received type.\n\nErroneous code examples:\n\n```compile_fail,E0308\nfn plus_one(x: i32) -> i32 {\n x + 1\n}\n\nplus_one(\"Not a number\");\n// ^^^^^^^^^^^^^^ expected `i32`, found `&str`\n\nif \"Not a bool\" {\n// ^^^^^^^^^^^^ expected `bool`, found `&str`\n}\n\nlet x: f32 = \"Not a float\";\n// --- ^^^^^^^^^^^^^ expected `f32`, found `&str`\n// |\n// expected due to this\n```\n\nThis error occurs when an expression was used in a place where the compiler\nexpected an expression of a different type. It can occur in several cases, the\nmost common being when calling a function and passing an argument which has a\ndifferent type than the matching type in the function declaration.\n"},"level":"error","spans":[{"file_name":"tests/integration_tests.rs","byte_start":2618,"byte_end":2620,"line_start":100,"line_end":100,"column_start":41,"column_end":43,"is_primary":false,"text":[{"text":" let manager = RateLimitManager::new(60, 10);","highlight_start":41,"highlight_end":43}],"label":"expected `RateLimiterConfig`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"tests/integration_tests.rs","byte_start":2622,"byte_end":2624,"line_start":100,"line_end":100,"column_start":45,"column_end":47,"is_primary":false,"text":[{"text":" let manager = RateLimitManager::new(60, 10);","highlight_start":45,"highlight_end":47}],"label":"expected `CircuitBreakerConfig`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"tests/integration_tests.rs","byte_start":2596,"byte_end":2617,"line_start":100,"line_end":100,"column_start":19,"column_end":40,"is_primary":true,"text":[{"text":" let manager = RateLimitManager::new(60, 10);","highlight_start":19,"highlight_end":40}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"associated function defined here","code":null,"level":"note","spans":[{"file_name":"/home/newkirk/Documents/projects/web_projects/llm-proxy/src/rate_limiting/mod.rs","byte_start":6949,"byte_end":6952,"line_start":220,"line_end":220,"column_start":12,"column_end":15,"is_primary":true,"text":[{"text":" pub fn new(config: RateLimiterConfig, circuit_config: CircuitBreakerConfig) -> Self {","highlight_start":12,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0308]\u001b[0m\u001b[1m: arguments to this function are incorrect\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0mtests/integration_tests.rs:100:19\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m100\u001b[0m \u001b[1m\u001b[94m|\u001b[0m let manager = RateLimitManager::new(60, 10);\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^^^^^^^^^^^^^^^^^^^^^\u001b[0m \u001b[1m\u001b[94m--\u001b[0m \u001b[1m\u001b[94m--\u001b[0m \u001b[1m\u001b[94mexpected `CircuitBreakerConfig`, found integer\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94mexpected `RateLimiterConfig`, found integer\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[92mnote\u001b[0m: associated function defined here\n \u001b[1m\u001b[94m--> \u001b[0m/home/newkirk/Documents/projects/web_projects/llm-proxy/src/rate_limiting/mod.rs:220:12\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m220\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub fn new(config: RateLimiterConfig, circuit_config: CircuitBreakerConfig) -> Self {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m^^^\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"no method named `check_request` found for struct `RateLimitManager` in the current scope","code":{"code":"E0599","explanation":"This error occurs when a method is used on a type which doesn't implement it:\n\nErroneous code example:\n\n```compile_fail,E0599\nstruct Mouth;\n\nlet x = Mouth;\nx.chocolate(); // error: no method named `chocolate` found for type `Mouth`\n // in the current scope\n```\n\nIn this case, you need to implement the `chocolate` method to fix the error:\n\n```\nstruct Mouth;\n\nimpl Mouth {\n fn chocolate(&self) { // We implement the `chocolate` method here.\n println!(\"Hmmm! I love chocolate!\");\n }\n}\n\nlet x = Mouth;\nx.chocolate(); // ok!\n```\n"},"level":"error","spans":[{"file_name":"tests/integration_tests.rs","byte_start":2691,"byte_end":2704,"line_start":103,"line_end":103,"column_start":27,"column_end":40,"is_primary":true,"text":[{"text":" let allowed = manager.check_request(\"test-client\").await;","highlight_start":27,"highlight_end":40}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"there is a method `check_client_request` with a similar name","code":null,"level":"help","spans":[{"file_name":"tests/integration_tests.rs","byte_start":2691,"byte_end":2704,"line_start":103,"line_end":103,"column_start":27,"column_end":40,"is_primary":true,"text":[{"text":" let allowed = manager.check_request(\"test-client\").await;","highlight_start":27,"highlight_end":40}],"label":null,"suggested_replacement":"check_client_request","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0599]\u001b[0m\u001b[1m: no method named `check_request` found for struct `RateLimitManager` in the current scope\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0mtests/integration_tests.rs:103:27\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m103\u001b[0m \u001b[1m\u001b[94m|\u001b[0m let allowed = manager.check_request(\"test-client\").await;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^^^^^^^^^^^^^\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[96mhelp\u001b[0m: there is a method `check_client_request` with a similar name\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m103\u001b[0m \u001b[1m\u001b[94m| \u001b[0m let allowed = manager.check_\u001b[92mclient_\u001b[0mrequest(\"test-client\").await;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[92m+++++++\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"no method named `check_provider` found for struct `RateLimitManager` in the current scope","code":{"code":"E0599","explanation":"This error occurs when a method is used on a type which doesn't implement it:\n\nErroneous code example:\n\n```compile_fail,E0599\nstruct Mouth;\n\nlet x = Mouth;\nx.chocolate(); // error: no method named `chocolate` found for type `Mouth`\n // in the current scope\n```\n\nIn this case, you need to implement the `chocolate` method to fix the error:\n\n```\nstruct Mouth;\n\nimpl Mouth {\n fn chocolate(&self) { // We implement the `chocolate` method here.\n println!(\"Hmmm! I love chocolate!\");\n }\n}\n\nlet x = Mouth;\nx.chocolate(); // ok!\n```\n"},"level":"error","spans":[{"file_name":"tests/integration_tests.rs","byte_start":2852,"byte_end":2866,"line_start":107,"line_end":107,"column_start":27,"column_end":41,"is_primary":true,"text":[{"text":" let allowed = manager.check_provider(\"openai\").await;","highlight_start":27,"highlight_end":41}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"there is a method `check_provider_request` with a similar name","code":null,"level":"help","spans":[{"file_name":"tests/integration_tests.rs","byte_start":2852,"byte_end":2866,"line_start":107,"line_end":107,"column_start":27,"column_end":41,"is_primary":true,"text":[{"text":" let allowed = manager.check_provider(\"openai\").await;","highlight_start":27,"highlight_end":41}],"label":null,"suggested_replacement":"check_provider_request","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0599]\u001b[0m\u001b[1m: no method named `check_provider` found for struct `RateLimitManager` in the current scope\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0mtests/integration_tests.rs:107:27\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m107\u001b[0m \u001b[1m\u001b[94m|\u001b[0m let allowed = manager.check_provider(\"openai\").await;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^^^^^^^^^^^^^^\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[96mhelp\u001b[0m: there is a method `check_provider_request` with a similar name\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m107\u001b[0m \u001b[1m\u001b[94m| \u001b[0m let allowed = manager.check_provider\u001b[92m_request\u001b[0m(\"openai\").await;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[92m++++++++\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"no method named `check_provider` found for struct `RateLimitManager` in the current scope","code":{"code":"E0599","explanation":"This error occurs when a method is used on a type which doesn't implement it:\n\nErroneous code example:\n\n```compile_fail,E0599\nstruct Mouth;\n\nlet x = Mouth;\nx.chocolate(); // error: no method named `chocolate` found for type `Mouth`\n // in the current scope\n```\n\nIn this case, you need to implement the `chocolate` method to fix the error:\n\n```\nstruct Mouth;\n\nimpl Mouth {\n fn chocolate(&self) { // We implement the `chocolate` method here.\n println!(\"Hmmm! I love chocolate!\");\n }\n}\n\nlet x = Mouth;\nx.chocolate(); // ok!\n```\n"},"level":"error","spans":[{"file_name":"tests/integration_tests.rs","byte_start":3321,"byte_end":3335,"line_start":118,"line_end":118,"column_start":27,"column_end":41,"is_primary":true,"text":[{"text":" let allowed = manager.check_provider(\"openai\").await;","highlight_start":27,"highlight_end":41}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"there is a method `check_provider_request` with a similar name","code":null,"level":"help","spans":[{"file_name":"tests/integration_tests.rs","byte_start":3321,"byte_end":3335,"line_start":118,"line_end":118,"column_start":27,"column_end":41,"is_primary":true,"text":[{"text":" let allowed = manager.check_provider(\"openai\").await;","highlight_start":27,"highlight_end":41}],"label":null,"suggested_replacement":"check_provider_request","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0599]\u001b[0m\u001b[1m: no method named `check_provider` found for struct `RateLimitManager` in the current scope\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0mtests/integration_tests.rs:118:27\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m118\u001b[0m \u001b[1m\u001b[94m|\u001b[0m let allowed = manager.check_provider(\"openai\").await;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^^^^^^^^^^^^^^\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[96mhelp\u001b[0m: there is a method `check_provider_request` with a similar name\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m118\u001b[0m \u001b[1m\u001b[94m| \u001b[0m let allowed = manager.check_provider\u001b[92m_request\u001b[0m(\"openai\").await;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[92m++++++++\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"no method named `check_provider` found for struct `RateLimitManager` in the current scope","code":{"code":"E0599","explanation":"This error occurs when a method is used on a type which doesn't implement it:\n\nErroneous code example:\n\n```compile_fail,E0599\nstruct Mouth;\n\nlet x = Mouth;\nx.chocolate(); // error: no method named `chocolate` found for type `Mouth`\n // in the current scope\n```\n\nIn this case, you need to implement the `chocolate` method to fix the error:\n\n```\nstruct Mouth;\n\nimpl Mouth {\n fn chocolate(&self) { // We implement the `chocolate` method here.\n println!(\"Hmmm! I love chocolate!\");\n }\n}\n\nlet x = Mouth;\nx.chocolate(); // ok!\n```\n"},"level":"error","spans":[{"file_name":"tests/integration_tests.rs","byte_start":3706,"byte_end":3720,"line_start":127,"line_end":127,"column_start":27,"column_end":41,"is_primary":true,"text":[{"text":" let allowed = manager.check_provider(\"openai\").await;","highlight_start":27,"highlight_end":41}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"there is a method `check_provider_request` with a similar name","code":null,"level":"help","spans":[{"file_name":"tests/integration_tests.rs","byte_start":3706,"byte_end":3720,"line_start":127,"line_end":127,"column_start":27,"column_end":41,"is_primary":true,"text":[{"text":" let allowed = manager.check_provider(\"openai\").await;","highlight_start":27,"highlight_end":41}],"label":null,"suggested_replacement":"check_provider_request","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0599]\u001b[0m\u001b[1m: no method named `check_provider` found for struct `RateLimitManager` in the current scope\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0mtests/integration_tests.rs:127:27\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m127\u001b[0m \u001b[1m\u001b[94m|\u001b[0m let allowed = manager.check_provider(\"openai\").await;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^^^^^^^^^^^^^^\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[96mhelp\u001b[0m: there is a method `check_provider_request` with a similar name\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m127\u001b[0m \u001b[1m\u001b[94m| \u001b[0m let allowed = manager.check_provider\u001b[92m_request\u001b[0m(\"openai\").await;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[92m++++++++\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"type annotations needed","code":{"code":"E0282","explanation":"The compiler could not infer a type and asked for a type annotation.\n\nErroneous code example:\n\n```compile_fail,E0282\nlet x = Vec::new();\n```\n\nThis error indicates that type inference did not result in one unique possible\ntype, and extra information is required. In most cases this can be provided\nby adding a type annotation. Sometimes you need to specify a generic type\nparameter manually.\n\nIn the example above, type `Vec` has a type parameter `T`. When calling\n`Vec::new`, barring any other later usage of the variable `x` that allows the\ncompiler to infer what type `T` is, the compiler needs to be told what it is.\n\nThe type can be specified on the variable:\n\n```\nlet x: Vec<i32> = Vec::new();\n```\n\nThe type can also be specified in the path of the expression:\n\n```\nlet x = Vec::<i32>::new();\n```\n\nIn cases with more complex types, it is not necessary to annotate the full\ntype. Once the ambiguity is resolved, the compiler can infer the rest:\n\n```\nlet x: Vec<_> = \"hello\".chars().rev().collect();\n```\n\nAnother way to provide the compiler with enough information, is to specify the\ngeneric type parameter:\n\n```\nlet x = \"hello\".chars().rev().collect::<Vec<char>>();\n```\n\nAgain, you need not specify the full type if the compiler can infer it:\n\n```\nlet x = \"hello\".chars().rev().collect::<Vec<_>>();\n```\n\nApart from a method or function with a generic type parameter, this error can\noccur when a type parameter of a struct or trait cannot be inferred. In that\ncase it is not always possible to use a type annotation, because all candidates\nhave the same return type. For instance:\n\n```compile_fail,E0282\nstruct Foo<T> {\n num: T,\n}\n\nimpl<T> Foo<T> {\n fn bar() -> i32 {\n 0\n }\n\n fn baz() {\n let number = Foo::bar();\n }\n}\n```\n\nThis will fail because the compiler does not know which instance of `Foo` to\ncall `bar` on. Change `Foo::bar()` to `Foo::<T>::bar()` to resolve the error.\n"},"level":"error","spans":[{"file_name":"tests/integration_tests.rs","byte_start":4003,"byte_end":4032,"line_start":137,"line_end":137,"column_start":20,"column_end":49,"is_primary":true,"text":[{"text":" let database = Database::new(&db_path).await.unwrap();","highlight_start":20,"highlight_end":49}],"label":"cannot infer type","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[91merror[E0282]\u001b[0m\u001b[1m: type annotations needed\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0mtests/integration_tests.rs:137:20\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m137\u001b[0m \u001b[1m\u001b[94m|\u001b[0m let database = Database::new(&db_path).await.unwrap();\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m \u001b[1m\u001b[91mcannot infer type\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"type annotations needed","code":{"code":"E0282","explanation":"The compiler could not infer a type and asked for a type annotation.\n\nErroneous code example:\n\n```compile_fail,E0282\nlet x = Vec::new();\n```\n\nThis error indicates that type inference did not result in one unique possible\ntype, and extra information is required. In most cases this can be provided\nby adding a type annotation. Sometimes you need to specify a generic type\nparameter manually.\n\nIn the example above, type `Vec` has a type parameter `T`. When calling\n`Vec::new`, barring any other later usage of the variable `x` that allows the\ncompiler to infer what type `T` is, the compiler needs to be told what it is.\n\nThe type can be specified on the variable:\n\n```\nlet x: Vec<i32> = Vec::new();\n```\n\nThe type can also be specified in the path of the expression:\n\n```\nlet x = Vec::<i32>::new();\n```\n\nIn cases with more complex types, it is not necessary to annotate the full\ntype. Once the ambiguity is resolved, the compiler can infer the rest:\n\n```\nlet x: Vec<_> = \"hello\".chars().rev().collect();\n```\n\nAnother way to provide the compiler with enough information, is to specify the\ngeneric type parameter:\n\n```\nlet x = \"hello\".chars().rev().collect::<Vec<char>>();\n```\n\nAgain, you need not specify the full type if the compiler can infer it:\n\n```\nlet x = \"hello\".chars().rev().collect::<Vec<_>>();\n```\n\nApart from a method or function with a generic type parameter, this error can\noccur when a type parameter of a struct or trait cannot be inferred. In that\ncase it is not always possible to use a type annotation, because all candidates\nhave the same return type. For instance:\n\n```compile_fail,E0282\nstruct Foo<T> {\n num: T,\n}\n\nimpl<T> Foo<T> {\n fn bar() -> i32 {\n 0\n }\n\n fn baz() {\n let number = Foo::bar();\n }\n}\n```\n\nThis will fail because the compiler does not know which instance of `Foo` to\ncall `bar` on. Change `Foo::bar()` to `Foo::<T>::bar()` to resolve the error.\n"},"level":"error","spans":[{"file_name":"tests/integration_tests.rs","byte_start":4256,"byte_end":4294,"line_start":144,"line_end":144,"column_start":13,"column_end":51,"is_primary":true,"text":[{"text":" assert!(state.database.test_connection().await.is_ok());","highlight_start":13,"highlight_end":51}],"label":"cannot infer type","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[91merror[E0282]\u001b[0m\u001b[1m: type annotations needed\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0mtests/integration_tests.rs:144:13\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m144\u001b[0m \u001b[1m\u001b[94m|\u001b[0m assert!(state.database.test_connection().await.is_ok());\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m \u001b[1m\u001b[91mcannot infer type\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"aborting due to 13 previous errors; 4 warnings emitted","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[1m\u001b[91merror\u001b[0m\u001b[1m: aborting due to 13 previous errors; 4 warnings emitted\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"Some errors have detailed explanations: E0282, E0308, E0432, E0599, E0603, E0616.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[1mSome errors have detailed explanations: E0282, E0308, E0432, E0599, E0603, E0616.\u001b[0m\n"}
{"$message_type":"diagnostic","message":"For more information about an error, try `rustc --explain E0282`.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[1mFor more information about an error, try `rustc --explain E0282`.\u001b[0m\n"}