Truncate-create the file at `path`, write the comment header (`# env`, `# seeds`), and return a handle ready to record per-failure entries.
(path: &str, env_path: &str, seeds: usize)
| 137 | /// Truncate-create the file at `path`, write the comment header (`# env`, |
| 138 | /// `# seeds`), and return a handle ready to record per-failure entries. |
| 139 | fn open(path: &str, env_path: &str, seeds: usize) -> std::io::Result<Self> { |
| 140 | let mut file = File::create(path)?; |
| 141 | writeln!(file, "# ix check failures")?; |
| 142 | writeln!(file, "# env: {env_path}")?; |
| 143 | writeln!(file, "# seeds: {seeds}")?; |
| 144 | writeln!(file)?; |
| 145 | file.flush()?; |
| 146 | Ok(Self { writer: Mutex::new(file), count: AtomicUsize::new(0) }) |
| 147 | } |
| 148 | |
| 149 | /// Append a single failure record. `name_pretty` is the dot-separated form |
| 150 | /// of the constant; `msg` is the raw error string (newlines collapsed to |