(
file_tree: &Arc<FileTree>,
file: &str,
mark_str: &str,
)
| 192 | } |
| 193 | |
| 194 | pub fn mark_file( |
| 195 | file_tree: &Arc<FileTree>, |
| 196 | file: &str, |
| 197 | mark_str: &str, |
| 198 | ) -> Result<(), String> { |
| 199 | let mark = FileMark::from_str(mark_str) |
| 200 | .ok_or_else(|| format!("Unknown mark type: '{}'. Valid: documentation, ignore, test, config, generated, custom", mark_str))?; |
| 201 | |
| 202 | if let Some(mut entry) = file_tree.files.get_mut(file) { |
| 203 | if !entry.marks.contains(&mark) { |
| 204 | entry.marks.push(mark); |
| 205 | } |
| 206 | Ok(()) |
| 207 | } else { |
| 208 | Err(format!("File '{}' not found in index", file)) |
| 209 | } |
| 210 | } |
nothing calls this directly
no outgoing calls
no test coverage detected