diff --git a/src/tools.rs b/src/tools.rs index 022117b43..e1e1cc2f5 100644 --- a/src/tools.rs +++ b/src/tools.rs @@ -283,8 +283,8 @@ pub(crate) fn guess_file( all_files: &HashMap, S>, ) -> Vec { //let rpath = include_path.clone(); - let include_path = if include_path.starts_with("mozilla/") { - &include_path[8..] + let include_path = if let Some(end) = include_path.strip_prefix("mozilla/") { + end } else { include_path };