Skip to content

Commit

Permalink
small code style refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpclark committed Feb 6, 2018
1 parent d5067b1 commit f63263e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/resume.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ impl ResumeKeyDB {
buf_reader.read_to_string(&mut contents).ok();

let mut db: Vec<ResumeKey> = vec![];
for item in contents.
split("\n\n").
map(|s| s.to_string()).
filter(|s| !s.is_empty()).
collect::<Vec<String>>() {
let rk = ResumeKey::try_from(item);
if let Ok(key) = rk {
db.push(key);
}
}
contents.
split("\n\n").
map(|s| s.to_string()).
filter(|s| !s.is_empty()).
for_each(|item| {
let rk = ResumeKey::try_from(item);
if let Ok(key) = rk {
db.push(key);
}
});
ResumeKeyDB { rkeys: db }
}

Expand Down

0 comments on commit f63263e

Please sign in to comment.