Actually do skipping Nones in output
This commit is contained in:
parent
ad1d0bde35
commit
9c210468fe
|
@ -1,6 +1,6 @@
|
|||
use crate::tile::{Block, TileData};
|
||||
use eyre::OptionExt;
|
||||
use serde::{Serialize, ser::SerializeSeq};
|
||||
use serde::{ser::SerializeSeq, Serialize};
|
||||
use std::sync::Arc;
|
||||
use tokio::{
|
||||
io::{self, AsyncWriteExt},
|
||||
|
@ -51,7 +51,7 @@ pub async fn run(num_tiles: usize, mut receiver: mpsc::Receiver<TileData>) -> ey
|
|||
continue;
|
||||
};
|
||||
*block = Some(message.block);
|
||||
let mut serialized = serde_json::to_vec(&blocks).unwrap();
|
||||
let mut serialized = serde_json::to_vec(&NoneSkipper(&blocks)).unwrap();
|
||||
serialized.extend_from_slice(b",\n");
|
||||
stdout.write_all(&serialized).await?;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue