diff --git a/CHANGELOG.md b/CHANGELOG.md index adab88b9..98281abf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ Bug fixes --------- * Compiling on 32-bit architectures no longer cause a compilation error. -* Fix type-size test fo 32-bit architectures without the `decimal` feature. +* Fix type-size test for 32-bit architectures without the `decimal` feature. Custom syntax with state ------------------------ diff --git a/src/api/files.rs b/src/api/files.rs index ad2bbeae..b2a2ffd1 100644 --- a/src/api/files.rs +++ b/src/api/files.rs @@ -108,7 +108,7 @@ impl Engine { pub fn compile_file_with_scope(&self, scope: &Scope, path: PathBuf) -> RhaiResultOf { Self::read_file(&path).and_then(|contents| { let mut ast = self.compile_with_scope(scope, &contents)?; - ast.set_source(path.to_string_lossy()); + ast.set_source(path.to_string_lossy().as_ref()); Ok(ast) }) }