From f2b1184805d839ec660b43f99d6c5e291404239f Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Thu, 22 Sep 2022 23:11:38 +0800 Subject: [PATCH] Remove need for smartstring/std. --- CHANGELOG.md | 2 +- src/api/files.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) }) }