aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/main.rs b/src/main.rs
index 36d7a21..c8afd0f 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -154,18 +154,16 @@ fn run_searching(api: &mut Api, matches: &ArgMatches) -> MainResult<BuildTemplat
.into_iter()
.map(|s| resolve_skill(api, &profession, s))
.collect::<Result<Vec<_>, _>>()?
- } else {
- if let Some(l) = legends.first() {
- let l = api.get_legends(&[l.get_api_id().unwrap()])?.remove(0);
- let mut result = Vec::new();
- for skill_id in (&[l.heal]).iter().chain(&l.utilities).chain(&[l.elite]) {
- let skill = api.get_skills(&[*skill_id])?.remove(0);
- result.push(skill);
- }
- result
- } else {
- Vec::new()
+ } else if let Some(l) = legends.first() {
+ let l = api.get_legends(&[l.get_api_id().unwrap()])?.remove(0);
+ let mut result = Vec::new();
+ for skill_id in (&[l.heal]).iter().chain(&l.utilities).chain(&[l.elite]) {
+ let skill = api.get_skills(&[*skill_id])?.remove(0);
+ result.push(skill);
}
+ result
+ } else {
+ Vec::new()
};
let traitlines = matches