refactored markdown parsing, added some documentation
All checks were successful
Test the running changes / Test (push) Successful in 40s

This commit is contained in:
2025-11-15 01:41:14 +02:00
parent 05a0b32d9b
commit 8d47704b7e
18 changed files with 428 additions and 290 deletions

View File

@@ -2,13 +2,14 @@ use std::collections::HashSet;
use std::fs;
use std::path::PathBuf;
/// Recursively crawl through the directory given and aggregate all file handles to a HashMap with
/// Recursively crawl through the directory given and aggregate all file handles to a `HashMap` with
/// their respective (relative) paths as keys.
#[must_use]
pub fn crawl_fs(root: &PathBuf) -> HashSet<PathBuf> {
crawl_fs_rec(root, root)
}
/// Helper function: Recursively crawl through the directory given and aggregate all file handles to a HashMap with
/// Helper function: Recursively crawl through the directory given and aggregate all file handles to a `HashMap` with
/// their respective (relative) paths as keys.
fn crawl_fs_rec(root: &PathBuf, path: &PathBuf) -> HashSet<PathBuf> {
let mut subdirs = Vec::with_capacity(100);