Use Infallible

This commit is contained in:
Skye Jensen 2020-06-02 22:12:11 -04:00
parent c0de250953
commit 8e93d7e363
2 changed files with 3 additions and 4 deletions

View file

@ -44,7 +44,5 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
}
let num_tiles = tiles.len();
output::launch(num_tiles, receiver).await?;
Ok(())
match output::launch(num_tiles, receiver).await? {}
}

View file

@ -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<TileData>) -> io::Result<()> {
pub async fn launch(num_tiles: usize, mut receiver: Receiver<TileData>) -> io::Result<Infallible> {
let mut stdout = io::stdout();
stdout.write_all(b"{ \"version\": 1 }\n[").await?;