It's now time to consider how each Individual competes. Earlier, we discussed calling out to pmars on-system, which requires on-disk representations of the two competing Individual warriors. True to that, competition first serializes both warriors to temporary locations on the disk:
pub fn compete(&self, other: &Individual) -> Winner { let dir = TempDir::new("simulate") .expect("could not make tempdir"); let l_path = dir.path().join("left.red"); let mut lfp = BufWriter::new(File::create(&l_path) .expect("could not write lfp")); self.serialize(&mut lfp).expect("could not serialize"); drop(lfp); let r_path = dir.path().join("right.red"); let mut rfp = BufWriter::new(File::create(&r_path) .expect("could not ...