diff --git a/src/exec.rs b/src/exec.rs index db05374..5df2ecd 100644 --- a/src/exec.rs +++ b/src/exec.rs @@ -55,15 +55,6 @@ impl std::fmt::Display for FindMethodError { impl std::error::Error for FindMethodError {} -/* -TODO: deal with the following warning: - this function depends on never type fallback being `()` - this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - for more information, see issue #123748 - specify the types explicitly - `#[warn(dependency_on_unit_never_type_fallback)]` on by defaultrustcClick for full compiler diagnostic - exec.rs(84, 37): in edition 2024, the requirement `!: Serialize` will fail - */ pub async fn main(args: &ExecArgs) -> Result<(), Box> { debug!("{:?}", args); @@ -90,7 +81,8 @@ pub async fn main(args: &ExecArgs) -> Result<(), Box> { debug!("Raw result:\n{:#?}", &res); // Print the result to stdout in pretty JSON format - println!("{}", to_string_pretty(&from_str(&res)?)?); + let json: Value = from_str(&res)?; + println!("{}", to_string_pretty(&json)?); Ok(()) }