Use Infallible
This commit is contained in:
parent
c0de250953
commit
8e93d7e363
|
@ -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? {}
|
||||
}
|
||||
|
|
|
@ -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?;
|
||||
|
||||
|
|
Loading…
Reference in a new issue