aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2019-12-07 03:18:36 +0100
committerDaniel Schadt <kingdread@gmx.de>2019-12-07 03:18:36 +0100
commit9bd3c2da26b48d1ae2fc84b39bc5ef6844bd4e45 (patch)
tree0d48fb7a214419d7586eb5e40efa4ac370e82d68 /src
parentc09d449902f529db6fe390b22307a237124410de (diff)
downloadkondou-9bd3c2da26b48d1ae2fc84b39bc5ef6844bd4e45.tar.gz
kondou-9bd3c2da26b48d1ae2fc84b39bc5ef6844bd4e45.tar.bz2
kondou-9bd3c2da26b48d1ae2fc84b39bc5ef6844bd4e45.zip
lint fixes
Diffstat (limited to 'src')
-rw-r--r--src/bt.rs2
-rw-r--r--src/main.rs20
2 files changed, 10 insertions, 12 deletions
diff --git a/src/bt.rs b/src/bt.rs
index 8bfd70a..3d8d996 100644
--- a/src/bt.rs
+++ b/src/bt.rs
@@ -276,7 +276,7 @@ impl BuildTemplate {
}
}
-static JSON_PALETTE: &'static str = include_str!("skill_palette.json");
+static JSON_PALETTE: &str = include_str!("skill_palette.json");
fn skill_id_to_palette_id(input: u32) -> u32 {
let lookup_table: Vec<(u32, u32)> = serde_json::from_str(JSON_PALETTE).unwrap();
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