()
| 293 | } |
| 294 | |
| 295 | fn prepare_example_data() -> Result<TempDir> { |
| 296 | let dir = tempfile::tempdir()?; |
| 297 | let path = dir.path(); |
| 298 | |
| 299 | let content = r#"key,value |
| 300 | 1,foo |
| 301 | 2,bar |
| 302 | 3,baz"#; |
| 303 | |
| 304 | for i in 0..5 { |
| 305 | let mut file = File::create(path.join(format!("{i}.csv")))?; |
| 306 | file.write_all(content.as_bytes())?; |
| 307 | } |
| 308 | |
| 309 | Ok(dir) |
| 310 | } |