diff --git a/src/build/mod.rs b/src/build/mod.rs index d941635..309542f 100644 --- a/src/build/mod.rs +++ b/src/build/mod.rs @@ -398,7 +398,10 @@ impl<'a> FileBuilder<'a> { Some(v) => v.clone(), None => { let mut b = self.clone_builder(); - b.eval_string(self.std.get(&def.path.fragment).unwrap())?; + b.eval_input( + OffsetStrIter::new(self.std.get(&def.path.fragment).unwrap()) + .with_src_file(&def.path.fragment), + )?; b.get_outputs_as_val() } }; diff --git a/src/iter.rs b/src/iter.rs index 199c8d6..d8762f8 100644 --- a/src/iter.rs +++ b/src/iter.rs @@ -30,8 +30,8 @@ impl<'a> OffsetStrIter<'a> { } } - pub fn with_src_file(mut self, file: PathBuf) -> Self { - self.source_file = Some(file); + pub fn with_src_file>(mut self, file: P) -> Self { + self.source_file = Some(file.into()); self } }