tidy: extdeps.rs: Avoid an unnecessary collect()

This commit is contained in:
Josh Triplett 2018-09-01 16:46:40 -07:00
parent 896c3ce2f1
commit decc3b0eba

View File

@ -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) {