diff --git a/crates/compiler/src/compiler/run_compilation.rs b/crates/compiler/src/compiler/run_compilation.rs index 6babc0e5..66cc08fb 100644 --- a/crates/compiler/src/compiler/run_compilation.rs +++ b/crates/compiler/src/compiler/run_compilation.rs @@ -32,7 +32,7 @@ pub(crate) fn compile(compiler: &Compiler) -> Result { // Strip the BOM from the source string if it is present before compiling. // Rust does not do this by default // https://github.com/rust-lang/rfcs/issues/2428 - let source = match file.source.strip_prefix("\u{feff}") { + let source = match file.source.strip_prefix('\u{feff}') { None => file.source.as_str(), Some(sanitized_string) => sanitized_string, };