mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-15 21:26:50 +00:00
Unbox and pin database streams.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
1 parent
98affbdeaf
commit
71f3ccf140
26 files changed
+217
-166
No files matched your search
@@ -34,7 +34,7 @@ pub(crate) async fn search_users_route(
|
||||
.min(LIMIT_MAX);
|
||||
|
||||
let search_term = body.search_term.to_lowercase();
|
||||
let mut users = services
|
||||
let users = services
|
||||
.users
|
||||
.stream()
|
||||
.ready_filter(|&user_id| user_id != sender_user)
|
||||
@@ -83,6 +83,7 @@ pub(crate) async fn search_users_route(
|
||||
})
|
||||
});
|
||||
|
||||
pin_mut!(users);
|
||||
let results = users.by_ref().take(limit).collect().await;
|
||||
let limited = users.next().await.is_some();
|
||||
|
||||
|
||||
Reference in new issue
Block a user