diff --git a/src/main.rs b/src/main.rs index be04065..106dab4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -44,7 +44,5 @@ async fn main() -> Result<(), Box> { } let num_tiles = tiles.len(); - output::launch(num_tiles, receiver).await?; - - Ok(()) + match output::launch(num_tiles, receiver).await? {} } diff --git a/src/output.rs b/src/output.rs index 35bb1bb..b079fd8 100644 --- a/src/output.rs +++ b/src/output.rs @@ -1,8 +1,9 @@ use crate::tile::TileData; use tokio::io::{self, AsyncWriteExt}; use tokio::sync::mpsc::Receiver; +use std::convert::Infallible; -pub async fn launch(num_tiles: usize, mut receiver: Receiver) -> io::Result<()> { +pub async fn launch(num_tiles: usize, mut receiver: Receiver) -> io::Result { let mut stdout = io::stdout(); stdout.write_all(b"{ \"version\": 1 }\n[").await?;