Make clippy happy with Rust 1.60
This commit is contained in:
parent
a5e35b546f
commit
0859cf6b11
|
|
@ -20,24 +20,22 @@ fn main() {
|
|||
let opt = Opt::parse();
|
||||
|
||||
let mut authors = get_available_coauthors();
|
||||
let mut updated_author: Author;
|
||||
|
||||
if let Some(author) = authors.get(&opt.initials) {
|
||||
updated_author = author.clone();
|
||||
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;
|
||||
};
|
||||
|
||||
authors.insert(opt.initials, updated_author);
|
||||
|
||||
write_coauthors_file(authors);
|
||||
} else {
|
||||
eprintln!("No author found with initials {}", &opt.initials);
|
||||
process::exit(1);
|
||||
}
|
||||
|
||||
if let Some(name) = opt.name {
|
||||
updated_author.name = name;
|
||||
}
|
||||
|
||||
if let Some(email) = opt.email {
|
||||
updated_author.email = email;
|
||||
}
|
||||
|
||||
authors.insert(opt.initials, updated_author);
|
||||
|
||||
write_coauthors_file(authors);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue