stigmerge_peer 0.6.2

stigmerge p2p protocol and agent components
1
2
3
4
5
6
7
8
9
10
use std::io::Write;

use tempfile::NamedTempFile;

pub fn temp_file(pattern: u8, count: usize) -> NamedTempFile {
    let mut tempf = NamedTempFile::new().expect("temp file");
    let contents = vec![pattern; count];
    tempf.write(contents.as_slice()).expect("write temp file");
    tempf
}