mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-16 05:36:50 +00:00
Services refactor
Replace structs of Dep<Service> with OnceServices, so each service has a Services reference Remove service name => Service map Flatten Services.rooms Make reqwest Clients lazy initialized (client service)
This commit is contained in:
1 parent
26b3a84b88
commit
b5890b9664
118 files changed
+457
-1923
No files matched your search
@@ -90,7 +90,6 @@ where
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let summary = services
|
||||
.rooms
|
||||
.spaces
|
||||
.get_summary_and_children_client(room_id, suggested_only, sender_user, &via)
|
||||
.await;
|
||||
@@ -139,7 +138,6 @@ where
|
||||
.stream()
|
||||
.skip_while(|(room, _)| {
|
||||
services
|
||||
.rooms
|
||||
.short
|
||||
.get_shortroomid(room)
|
||||
.map_ok(|short| {
|
||||
@@ -172,7 +170,6 @@ where
|
||||
.into_iter()
|
||||
.map(|(room_id, via)| async move {
|
||||
let summary = services
|
||||
.rooms
|
||||
.spaces
|
||||
.get_summary_and_children_client(
|
||||
&room_id,
|
||||
@@ -199,7 +196,7 @@ where
|
||||
let next_short_room_ids: Vec<_> = parents
|
||||
.iter()
|
||||
.stream()
|
||||
.filter_map(|room_id| services.rooms.short.get_shortroomid(room_id).ok())
|
||||
.filter_map(|room_id| services.short.get_shortroomid(room_id).ok())
|
||||
.collect()
|
||||
.await;
|
||||
|
||||
|
||||
Reference in new issue
Block a user