reorder if and else to make more sense

master
rasul 5 years ago
parent 4255dbaca7
commit 6a1df72b2a

@ -54,10 +54,10 @@ pub fn player_name<S: Into<String>>(name: S) -> PlayerCheck {
}
}
if !err_vec.is_empty() {
PlayerCheck::Err(err_vec)
} else {
if err_vec.is_empty() {
PlayerCheck::Ok(name.into())
} else {
PlayerCheck::Err(err_vec)
}
}

Loading…
Cancel
Save