mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Replace uses of for foo in bar.iter()
and for foo in bar.iter_mut()
closes #7197
This commit is contained in:
parent
13e7de482c
commit
0038580abf
55 changed files with 141 additions and 154 deletions
|
@ -41,7 +41,7 @@ pub fn parse_hostsfile(hostsfile_content: &str) -> Box<HashMap<String, String>>
|
|||
let mut host_table = HashMap::new();
|
||||
let lines: Vec<&str> = hostsfile_content.split('\n').collect();
|
||||
|
||||
for line in lines.iter() {
|
||||
for line in &lines {
|
||||
let ip_host: Vec<&str> = line.trim().split(|c: char| c == ' ' || c == '\t').collect();
|
||||
if ip_host.len() > 1 {
|
||||
if !IPV4_REGEX.is_match(ip_host[0]) && !IPV6_REGEX.is_match(ip_host[0]) { continue; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue