2015-09-09 16:17:31 -05:00
|
|
|
// rustfmt-chains_overflow_last: false
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
reader.lines()
|
2016-01-31 11:58:38 -06:00
|
|
|
.map(|line| line.expect("Failed getting line"))
|
2015-09-09 16:17:31 -05:00
|
|
|
.take_while(|line| line_regex.is_match(&line))
|
|
|
|
.filter_map(|line| {
|
|
|
|
regex.captures_iter(&line)
|
|
|
|
.next()
|
|
|
|
.map(|capture| {
|
2016-01-31 11:58:38 -06:00
|
|
|
(capture.at(1).expect("Couldn\'t unwrap capture").to_owned(),
|
|
|
|
capture.at(2).expect("Couldn\'t unwrap capture").to_owned())
|
2015-09-09 16:17:31 -05:00
|
|
|
})
|
|
|
|
})
|
|
|
|
.collect();
|
|
|
|
}
|