(path: &path::Path, data: &[u8])
| 307 | } |
| 308 | |
| 309 | fn write_binary(path: &path::Path, data: &[u8]) -> Result<(), FixtureError> { |
| 310 | ensure_parent_dir(path)?; |
| 311 | let mut file = fs::File::create(path).chain(FixtureError::new(FixtureKind::WriteFile))?; |
| 312 | file.write_all(data) |
| 313 | .chain(FixtureError::new(FixtureKind::WriteFile))?; |
| 314 | Ok(()) |
| 315 | } |
| 316 | |
| 317 | fn write_str(path: &path::Path, data: &str) -> Result<(), FixtureError> { |
| 318 | ensure_parent_dir(path)?; |
no test coverage detected