Skip to content

Commit

Permalink
don't rely on rustc bug (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
aliemjay authored Aug 1, 2022
1 parent 6cbf16a commit e5b535d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ async fn get_frames(
}
}

async fn get_images<'a>(
async fn get_images(
frames: &Option<Frames>,
client: &Client,
file_id: &str,
Expand Down Expand Up @@ -304,7 +304,11 @@ async fn get_images<'a>(

let mut futures = vec![];

let mut add_future_images = |image_ids: &'a str, format, scale| {
let mut add_future_images = |image_ids, format, scale| {
// hack: annotate type inside the closure to avoid rustc bug
// https://github.com/rust-lang/rust/issues/100002
let image_ids: &str = image_ids;

if !image_ids.is_empty() {
futures.push(
get_images_url_collection(image_ids, client, file_id, scale, format)
Expand Down

0 comments on commit e5b535d

Please sign in to comment.