diff --git a/src/tools/tidy/src/extdeps.rs b/src/tools/tidy/src/extdeps.rs index bb375c17682..831eb47858a 100644 --- a/src/tools/tidy/src/extdeps.rs +++ b/src/tools/tidy/src/extdeps.rs @@ -37,8 +37,7 @@ pub fn check(path: &Path, bad: &mut bool) { } // extract source value - let parts: Vec<&str> = line.splitn(2, '=').collect(); - let source = parts[1].trim(); + let source = line.splitn(2, '=').nth(1).unwrap().trim(); // ensure source is whitelisted if !WHITELISTED_SOURCES.contains(&&*source) {