{"$message_type":"diagnostic","message":"unused imports: `Incident` and `TerminalEvent`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"crates/cli/src/main.rs","byte_start":49,"byte_end":57,"line_start":2,"line_end":2,"column_start":30,"column_end":38,"is_primary":true,"text":[{"text":"use cheat_detector::models::{Incident, ScreenEvent, TerminalEvent};","highlight_start":30,"highlight_end":38}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/cli/src/main.rs","byte_start":72,"byte_end":85,"line_start":2,"line_end":2,"column_start":53,"column_end":66,"is_primary":true,"text":[{"text":"use cheat_detector::models::{Incident, ScreenEvent, TerminalEvent};","highlight_start":53,"highlight_end":66}],"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 unused imports","code":null,"level":"help","spans":[{"file_name":"crates/cli/src/main.rs","byte_start":49,"byte_end":59,"line_start":2,"line_end":2,"column_start":30,"column_end":40,"is_primary":true,"text":[{"text":"use cheat_detector::models::{Incident, ScreenEvent, TerminalEvent};","highlight_start":30,"highlight_end":40}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"crates/cli/src/main.rs","byte_start":70,"byte_end":85,"line_start":2,"line_end":2,"column_start":51,"column_end":66,"is_primary":true,"text":[{"text":"use cheat_detector::models::{Incident, ScreenEvent, TerminalEvent};","highlight_start":51,"highlight_end":66}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"crates/cli/src/main.rs","byte_start":48,"byte_end":49,"line_start":2,"line_end":2,"column_start":29,"column_end":30,"is_primary":true,"text":[{"text":"use cheat_detector::models::{Incident, ScreenEvent, TerminalEvent};","highlight_start":29,"highlight_end":30}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"crates/cli/src/main.rs","byte_start":85,"byte_end":86,"line_start":2,"line_end":2,"column_start":66,"column_end":67,"is_primary":true,"text":[{"text":"use cheat_detector::models::{Incident, ScreenEvent, TerminalEvent};","highlight_start":66,"highlight_end":67}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: unused imports: `Incident` and `TerminalEvent`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0mcrates/cli/src/main.rs:2:30\n  \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m2\u001b[0m \u001b[1m\u001b[94m|\u001b[0m use cheat_detector::models::{Incident, ScreenEvent, TerminalEvent};\n  \u001b[1m\u001b[94m|\u001b[0m                              \u001b[1m\u001b[33m^^^^^^^^\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":"cannot find module or crate `image` in this scope","code":{"code":"E0433","explanation":"An undeclared crate, module, or type was used.\n\nErroneous code example:\n\n```compile_fail,E0433\nlet map = HashMap::new();\n// error: failed to resolve: use of undeclared type `HashMap`\n```\n\nPlease verify you didn't misspell the type/module's name or that you didn't\nforget to import it:\n\n```\nuse std::collections::HashMap; // HashMap has been imported.\nlet map: HashMap<u32, u32> = HashMap::new(); // So it can be used!\n```\n\nIf you've expected to use a crate name:\n\n```compile_fail\nuse ferris_wheel::BigO;\n// error: failed to resolve: use of undeclared module or unlinked crate\n```\n\nMake sure the crate has been added as a dependency in `Cargo.toml`.\n\nTo use a module from your current crate, add the `crate::` prefix to the path.\n"},"level":"error","spans":[{"file_name":"crates/cli/src/main.rs","byte_start":13150,"byte_end":13155,"line_start":342,"line_end":342,"column_start":16,"column_end":21,"is_primary":true,"text":[{"text":"    let img1 = image::open(&files[0])?.to_rgb8();","highlight_start":16,"highlight_end":21}],"label":"use of unresolved module or unlinked crate `image`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"if you wanted to use a crate named `image`, use `cargo add image` to add it to your `Cargo.toml`","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0433]\u001b[0m\u001b[1m: cannot find module or crate `image` in this scope\u001b[0m\n   \u001b[1m\u001b[94m--> \u001b[0mcrates/cli/src/main.rs:342:16\n    \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m342\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     let img1 = image::open(&files[0])?.to_rgb8();\n    \u001b[1m\u001b[94m|\u001b[0m                \u001b[1m\u001b[91m^^^^^\u001b[0m \u001b[1m\u001b[91muse of unresolved module or unlinked crate `image`\u001b[0m\n    \u001b[1m\u001b[94m|\u001b[0m\n    \u001b[1m\u001b[94m= \u001b[0m\u001b[1mhelp\u001b[0m: if you wanted to use a crate named `image`, use `cargo add image` to add it to your `Cargo.toml`\n\n"}
{"$message_type":"diagnostic","message":"cannot find module or crate `image` in this scope","code":{"code":"E0433","explanation":"An undeclared crate, module, or type was used.\n\nErroneous code example:\n\n```compile_fail,E0433\nlet map = HashMap::new();\n// error: failed to resolve: use of undeclared type `HashMap`\n```\n\nPlease verify you didn't misspell the type/module's name or that you didn't\nforget to import it:\n\n```\nuse std::collections::HashMap; // HashMap has been imported.\nlet map: HashMap<u32, u32> = HashMap::new(); // So it can be used!\n```\n\nIf you've expected to use a crate name:\n\n```compile_fail\nuse ferris_wheel::BigO;\n// error: failed to resolve: use of undeclared module or unlinked crate\n```\n\nMake sure the crate has been added as a dependency in `Cargo.toml`.\n\nTo use a module from your current crate, add the `crate::` prefix to the path.\n"},"level":"error","spans":[{"file_name":"crates/cli/src/main.rs","byte_start":13200,"byte_end":13205,"line_start":343,"line_end":343,"column_start":16,"column_end":21,"is_primary":true,"text":[{"text":"    let img2 = image::open(&files[1])?.to_rgb8();","highlight_start":16,"highlight_end":21}],"label":"use of unresolved module or unlinked crate `image`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"if you wanted to use a crate named `image`, use `cargo add image` to add it to your `Cargo.toml`","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0433]\u001b[0m\u001b[1m: cannot find module or crate `image` in this scope\u001b[0m\n   \u001b[1m\u001b[94m--> \u001b[0mcrates/cli/src/main.rs:343:16\n    \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m343\u001b[0m \u001b[1m\u001b[94m|\u001b[0m     let img2 = image::open(&files[1])?.to_rgb8();\n    \u001b[1m\u001b[94m|\u001b[0m                \u001b[1m\u001b[91m^^^^^\u001b[0m \u001b[1m\u001b[91muse of unresolved module or unlinked crate `image`\u001b[0m\n    \u001b[1m\u001b[94m|\u001b[0m\n    \u001b[1m\u001b[94m= \u001b[0m\u001b[1mhelp\u001b[0m: if you wanted to use a crate named `image`, use `cargo add image` to add it to your `Cargo.toml`\n\n"}
{"$message_type":"diagnostic","message":"`?` couldn't convert the error: `std::string::String: std::error::Error` is not satisfied","code":{"code":"E0277","explanation":"You tried to use a type which doesn't implement some trait in a place which\nexpected that trait.\n\nErroneous code example:\n\n```compile_fail,E0277\n// here we declare the Foo trait with a bar method\ntrait Foo {\n    fn bar(&self);\n}\n\n// we now declare a function which takes an object implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n    println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n                           //        implemented for the type `T`\n}\n\nfn main() {\n    // We now call the method with the i32 type,\n    // which *does* implement the Debug trait.\n    some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function. Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function. It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n    println!(\"{:?}\", foo);\n}\n\nfn main() {\n    // Calling the method is still fine, as i32 implements Debug.\n    some_func(5i32);\n\n    // This would fail to compile now:\n    // struct WithoutDebug;\n    // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"crates/cli/src/main.rs","byte_start":14281,"byte_end":14343,"line_start":372,"line_end":372,"column_start":28,"column_end":90,"is_primary":false,"text":[{"text":"        let res = pipeline.stage1_encode_vit_pass(&test_images[..batch_size], batch_size)?;","highlight_start":28,"highlight_end":90}],"label":"this has type `Result<_, std::string::String>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"crates/cli/src/main.rs","byte_start":14343,"byte_end":14344,"line_start":372,"line_end":372,"column_start":90,"column_end":91,"is_primary":true,"text":[{"text":"        let res = pipeline.stage1_encode_vit_pass(&test_images[..batch_size], batch_size)?;","highlight_start":90,"highlight_end":91}],"label":"the trait `std::error::Error` is not implemented for `std::string::String`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"crates/cli/src/main.rs","byte_start":14343,"byte_end":14344,"line_start":372,"line_end":372,"column_start":90,"column_end":91,"is_primary":false,"text":[{"text":"        let res = pipeline.stage1_encode_vit_pass(&test_images[..batch_size], batch_size)?;","highlight_start":90,"highlight_end":91}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"desugaring of operator `?`","def_site_span":{"file_name":"crates/cli/src/main.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required for `anyhow::Error` to implement `From<std::string::String>`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0277]\u001b[0m\u001b[1m: `?` couldn't convert the error: `std::string::String: std::error::Error` is not satisfied\u001b[0m\n   \u001b[1m\u001b[94m--> \u001b[0mcrates/cli/src/main.rs:372:90\n    \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m372\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m...\u001b[0mne.stage1_encode_vit_pass(&test_images[..batch_size], batch_size)?;\n    \u001b[1m\u001b[94m|\u001b[0m       \u001b[1m\u001b[94m--------------------------------------------------------------\u001b[0m\u001b[1m\u001b[91m^\u001b[0m \u001b[1m\u001b[91mthe trait `std::error::Error` is not implemented for `std::string::String`\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[94mthis has type `Result<_, std::string::String>`\u001b[0m\n    \u001b[1m\u001b[94m|\u001b[0m\n    \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait\n    \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: required for `anyhow::Error` to implement `From<std::string::String>`\n\n"}
{"$message_type":"diagnostic","message":"cannot find module or crate `image` in this scope","code":{"code":"E0433","explanation":"An undeclared crate, module, or type was used.\n\nErroneous code example:\n\n```compile_fail,E0433\nlet map = HashMap::new();\n// error: failed to resolve: use of undeclared type `HashMap`\n```\n\nPlease verify you didn't misspell the type/module's name or that you didn't\nforget to import it:\n\n```\nuse std::collections::HashMap; // HashMap has been imported.\nlet map: HashMap<u32, u32> = HashMap::new(); // So it can be used!\n```\n\nIf you've expected to use a crate name:\n\n```compile_fail\nuse ferris_wheel::BigO;\n// error: failed to resolve: use of undeclared module or unlinked crate\n```\n\nMake sure the crate has been added as a dependency in `Cargo.toml`.\n\nTo use a module from your current crate, add the `crate::` prefix to the path.\n"},"level":"error","spans":[{"file_name":"crates/cli/src/main.rs","byte_start":4712,"byte_end":4717,"line_start":128,"line_end":128,"column_start":34,"column_end":39,"is_primary":true,"text":[{"text":"            if let Ok(dyn_img) = image::open(p) {","highlight_start":34,"highlight_end":39}],"label":"use of unresolved module or unlinked crate `image`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"if you wanted to use a crate named `image`, use `cargo add image` to add it to your `Cargo.toml`","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0433]\u001b[0m\u001b[1m: cannot find module or crate `image` in this scope\u001b[0m\n   \u001b[1m\u001b[94m--> \u001b[0mcrates/cli/src/main.rs:128:34\n    \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m128\u001b[0m \u001b[1m\u001b[94m|\u001b[0m             if let Ok(dyn_img) = image::open(p) {\n    \u001b[1m\u001b[94m|\u001b[0m                                  \u001b[1m\u001b[91m^^^^^\u001b[0m \u001b[1m\u001b[91muse of unresolved module or unlinked crate `image`\u001b[0m\n    \u001b[1m\u001b[94m|\u001b[0m\n    \u001b[1m\u001b[94m= \u001b[0m\u001b[1mhelp\u001b[0m: if you wanted to use a crate named `image`, use `cargo add image` to add it to your `Cargo.toml`\n\n"}
{"$message_type":"diagnostic","message":"aborting due to 4 previous errors; 1 warning emitted","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[1m\u001b[91merror\u001b[0m\u001b[1m: aborting due to 4 previous errors; 1 warning emitted\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"Some errors have detailed explanations: E0277, E0433.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[1mSome errors have detailed explanations: E0277, E0433.\u001b[0m\n"}
{"$message_type":"diagnostic","message":"For more information about an error, try `rustc --explain E0277`.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[1mFor more information about an error, try `rustc --explain E0277`.\u001b[0m\n"}
