Rule execution now runs, no tests tho

This commit is contained in:
2022-08-19 12:55:02 +02:00
parent 329dea72b7
commit 891d78c112
30 changed files with 925 additions and 560 deletions

View File

@@ -3,6 +3,8 @@ use std::rc::Rc;
use std::fs::read_to_string;
use std::path::PathBuf;
use mappable_rc::Mrc;
use super::loaded::Loaded;
#[derive(Clone, Debug)]
@@ -18,7 +20,7 @@ impl From<io::Error> for LoadingError {
}
}
pub fn file_loader(proj: PathBuf) -> impl FnMut(Vec<String>) -> Result<Loaded, LoadingError> + 'static {
pub fn file_loader(proj: PathBuf) -> impl FnMut(Mrc<[String]>) -> Result<Loaded, LoadingError> + 'static {
move |path| {
let dirpath = proj.join(path.join("/"));
if dirpath.is_dir() || dirpath.is_symlink() {
@@ -46,4 +48,4 @@ pub fn file_loader(proj: PathBuf) -> impl FnMut(Vec<String>) -> Result<Loaded, L
else { LoadingError::Missing(pathstr) })
}
}
}
}