@@ -136,7 +136,7 @@ pub async fn find_crate(
136
136
) ,
137
137
load_keywords( & mut conn, & krate, include. keywords) ,
138
138
load_categories( & mut conn, & krate, include. categories) ,
139
- load_recent_downloads( & mut conn, & krate, include. downloads) ,
139
+ load_recent_downloads( & mut conn, krate. id , include. downloads) ,
140
140
) ?;
141
141
142
142
let ids = versions_and_publishers
@@ -285,17 +285,17 @@ fn load_categories<'a>(
285
285
async move { Ok ( Some ( fut. await ?) ) } . boxed ( )
286
286
}
287
287
288
- fn load_recent_downloads < ' a > (
288
+ fn load_recent_downloads (
289
289
conn : & mut AsyncPgConnection ,
290
- krate : & ' a Crate ,
290
+ crate_id : i32 ,
291
291
includes : bool ,
292
- ) -> BoxFuture < ' a , AppResult < Option < i64 > > > {
292
+ ) -> BoxFuture < ' _ , AppResult < Option < i64 > > > {
293
293
if !includes {
294
294
return always_ready ( || Ok ( None ) ) . boxed ( ) ;
295
295
}
296
296
297
297
let fut = recent_crate_downloads:: table
298
- . filter ( recent_crate_downloads:: crate_id. eq ( krate . id ) )
298
+ . filter ( recent_crate_downloads:: crate_id. eq ( crate_id ) )
299
299
. select ( recent_crate_downloads:: downloads)
300
300
. get_result ( conn) ;
301
301
async move { Ok ( fut. await . optional ( ) ?) } . boxed ( )
0 commit comments