(root: &Path, files: &[(&str, Vec<u8>)])
| 182 | ]; |
| 183 | |
| 184 | fn write_tree(root: &Path, files: &[(&str, Vec<u8>)]) { |
| 185 | for (path, bytes) in files { |
| 186 | let dest = root.join(path); |
| 187 | fs::create_dir_all(dest.parent().unwrap()).unwrap(); |
| 188 | fs::write(dest, bytes).unwrap(); |
| 189 | } |
| 190 | } |
| 191 | |
| 192 | fn file_bytes(path: &str, base: &str) -> Vec<u8> { |
| 193 | format!("// {path}\n{base}\n").into_bytes() |
no test coverage detected