From 06abc1b7206add3c914ca99fb0b4e869218a2cb9 Mon Sep 17 00:00:00 2001 From: Luni-4 Date: Fri, 20 Nov 2020 09:43:04 +0100 Subject: [PATCH] Fix clippy warnings --- src/tools.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 };