Fix issues with big sizes, really I should be using a different storage mechanism for large sizes I think

This commit is contained in:
2023-03-08 16:32:53 +00:00
parent 0bdca635ff
commit b94d001ab2
5 changed files with 90 additions and 99 deletions
+1 -6
View File
@@ -39,11 +39,6 @@ fn write_csv_positions<R: Rng, P: Position, S: Storage<P>, W: Walker<P>, Sp: Spa
fn write_json_full_data<R: Rng, P: Position, S: Storage<P>, W: Walker<P>, Sp: Spawner<P>, St: Sticker<P, S>>(sys: &DLASystem<R, P, S, W, Sp, St>, output_path: &Path) {
let file = File::create(output_path).expect("Failed to open file");
let vec: Vec<P> = sys.history
.iter()
.map(|l| l.position.clone())
.collect();
serde_json::to_writer(file, &vec)
serde_json::to_writer(file, &sys.history)
.expect("Failed to write json");
}