(root: &Path, dir: &Path, out: &mut Vec<(std::path::PathBuf, Vec<u8>)>)
| 180 | } |
| 181 | |
| 182 | fn collect_files_recursive(root: &Path, dir: &Path, out: &mut Vec<(std::path::PathBuf, Vec<u8>)>) { |
| 183 | for entry in std::fs::read_dir(dir).unwrap() { |
| 184 | let path = entry.unwrap().path(); |
| 185 | if path.is_dir() { |
| 186 | collect_files_recursive(root, &path, out); |
| 187 | } else { |
| 188 | let relative = path.strip_prefix(root).unwrap().to_path_buf(); |
| 189 | out.push((relative, std::fs::read(&path).unwrap())); |
| 190 | } |
| 191 | } |
| 192 | } |
| 193 | |
| 194 | fn managed_skill_draft(id: &str, title: &str) -> ManagedSkillDraft { |
| 195 | ManagedSkillDraft { |
no test coverage detected