conspire 0.7.1

The Rust interface to conspire.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::geometry::grid::Grid;
use std::{
    fmt::Display,
    fs::File,
    io::{BufWriter, Result, Write},
    path::Path,
};

pub(super) fn write<const D: usize, T, P>(grid: &Grid<D, T>, path: P) -> Result<()>
where
    T: Copy + Display,
    P: AsRef<Path>,
{
    let mut file = BufWriter::new(File::create(path)?);
    grid.data_col_major()
        .iter()
        .try_for_each(|value| writeln!(file, "{value}"))
}