Skip to content

Commit 4763cf3

Browse files
committed
Fix dependency_on_unit_never_type_fallback (rust-lang/rust#123748)
1 parent 55fc6c1 commit 4763cf3

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/exec.rs

+2-10
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,6 @@ impl std::fmt::Display for FindMethodError {
5555

5656
impl std::error::Error for FindMethodError {}
5757

58-
/*
59-
TODO: deal with the following warning:
60-
this function depends on never type fallback being `()`
61-
this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
62-
for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
63-
specify the types explicitly
64-
`#[warn(dependency_on_unit_never_type_fallback)]` on by defaultrustcClick for full compiler diagnostic
65-
exec.rs(84, 37): in edition 2024, the requirement `!: Serialize` will fail
66-
*/
6758
pub async fn main(args: &ExecArgs) -> Result<(), Box<dyn Error>> {
6859
debug!("{:?}", args);
6960

@@ -90,7 +81,8 @@ pub async fn main(args: &ExecArgs) -> Result<(), Box<dyn Error>> {
9081
debug!("Raw result:\n{:#?}", &res);
9182

9283
// Print the result to stdout in pretty JSON format
93-
println!("{}", to_string_pretty(&from_str(&res)?)?);
84+
let json: Value = from_str(&res)?;
85+
println!("{}", to_string_pretty(&json)?);
9486

9587
Ok(())
9688
}

0 commit comments

Comments
 (0)