File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -649,15 +649,8 @@ fn mk(config: &Config, opts: &MkOptions<'_>) -> CargoResult<()> {
649
649
650
650
// "Name <email>" or "Name" or "<email>" or None if neither name nor email is obtained
651
651
// cfg takes priority over the discovered ones
652
- let author_name = match ( cfg. name , discovered_name) {
653
- ( Some ( name) , _) | ( _, Some ( name) ) => Some ( name) ,
654
- ( None , None ) => None ,
655
- } ;
656
-
657
- let author_email = match ( cfg. email , discovered_email) {
658
- ( Some ( email) , _) | ( _, Some ( email) ) => Some ( email) ,
659
- ( None , None ) => None ,
660
- } ;
652
+ let author_name = cfg. name . or ( discovered_name) ;
653
+ let author_email = cfg. email . or ( discovered_email) ;
661
654
662
655
let author = match ( author_name, author_email) {
663
656
( Some ( name) , Some ( email) ) => {
You can’t perform that action at this time.
0 commit comments