aboutsummaryrefslogtreecommitdiff
path: root/src/render.rs
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2022-11-28 22:07:08 +0100
committerDaniel Schadt <kingdread@gmx.de>2022-11-28 22:07:08 +0100
commit40e6c6b25fc2c7da89be6fe8c55b13dc95e4f85a (patch)
treea6463e316ea1e062130bdcc83d8ae8aa4eec67a3 /src/render.rs
parentb9b890b24146fde7d3aa2a8fd1998b27caded462 (diff)
downloadkondou-master.tar.gz
kondou-master.tar.bz2
kondou-master.zip
add workaround for Alliance not being in the APIHEADmaster
Diffstat (limited to 'src/render.rs')
-rw-r--r--src/render.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/render.rs b/src/render.rs
index 0a10eab..67e8619 100644
--- a/src/render.rs
+++ b/src/render.rs
@@ -156,13 +156,13 @@ impl<'r> Renderer<'r> {
.iter()
.filter_map(|l| l.api_id())
.collect::<Vec<_>>();
- let api_legends = self.api.get_legends(&legend_ids)?;
let mut buffer = ImageBuffer::from_pixel(
- api_legends.len() as u32 * self.options.legend_size,
+ legend_ids.len() as u32 * self.options.legend_size,
self.options.legend_size,
self.options.background_color,
);
- for (i, legend) in api_legends.iter().enumerate() {
+ for (i, legend) in legend_ids.into_iter().enumerate() {
+ let legend = self.api.get_legends(&[legend])?.into_iter().next().unwrap();
let swapper = self
.api
.get_skills(&[legend.swap])?