summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKornel <kornel@geekhood.net>2020-03-03 21:07:52 +0000
committerKornel <kornel@geekhood.net>2020-03-03 21:07:52 +0000
commit9886d9cf8a8dbea32a84f16c9bca659b0f3d24f4 (patch)
treea507f3019af9c21f37cb8dd618a8cae3952b7643
parent305bb2d92a3ee73c3d34c5bc142039b6416c6417 (diff)
Trim trending length
-rw-r--r--front_end/src/front_end.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/front_end/src/front_end.rs b/front_end/src/front_end.rs
index 4148d48..31c32c8 100644
--- a/front_end/src/front_end.rs
+++ b/front_end/src/front_end.rs
@@ -174,7 +174,7 @@ pub struct CompatRange {
}
pub async fn render_trending_crates(out: &mut impl Write, kitchen_sink: &KitchenSink, renderer: &Renderer) -> Result<(), failure::Error> {
- let (top, upd) = futures::join!(kitchen_sink.trending_crates(50), kitchen_sink.notable_recently_updated_crates(70));
+ let (top, upd) = futures::join!(kitchen_sink.trending_crates(55), Box::pin(kitchen_sink.notable_recently_updated_crates(70)));
let upd = upd?;
let mut seen = HashSet::new();
@@ -186,7 +186,7 @@ pub async fn render_trending_crates(out: &mut impl Write, kitchen_sink: &Kitchen
tmp1.push(async move { futures::try_join!(f1, f2) });
}
}
- tmp1.truncate(50);
+ tmp1.truncate(40);
let mut tmp2 = Vec::with_capacity(top.len());
for (k, _) in top.iter() {
@@ -196,7 +196,7 @@ pub async fn render_trending_crates(out: &mut impl Write, kitchen_sink: &Kitchen
tmp2.push(async move { futures::try_join!(f1, f2) });
}
}
- tmp2.truncate(50);
+ tmp2.truncate(40);
let (mut updated, trending) = futures::try_join!(try_join_all(tmp1), try_join_all(tmp2))?;