Fix compile errors

This commit is contained in:
Martin Frost 2023-04-01 21:14:41 +02:00
parent b91afd5553
commit e819bf73a3
1 changed files with 2 additions and 7 deletions

View File

@ -9,13 +9,8 @@ fn main() {
if let Some(author) = authors.get(&opt.initials) {
let mut updated_author: Author = author.clone();
if let Some(name) = opt.name {
updated_author.name = name;
};
if let Some(email) = opt.email {
updated_author.email = email;
};
updated_author.name = opt.name;
updated_author.email = opt.email;
authors.insert(opt.initials, updated_author);