mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
fix: FIx code that was causing rustc to panic somehow
This commit is contained in:
@@ -3,7 +3,6 @@ use std::cmp::Ordering;
|
|||||||
use axum::extract::State;
|
use axum::extract::State;
|
||||||
use conduwuit::{Err, Result, err};
|
use conduwuit::{Err, Result, err};
|
||||||
use conduwuit_service::Services;
|
use conduwuit_service::Services;
|
||||||
use futures::FutureExt;
|
|
||||||
use ruma::{
|
use ruma::{
|
||||||
UInt, UserId,
|
UInt, UserId,
|
||||||
api::client::backup::{
|
api::client::backup::{
|
||||||
@@ -379,12 +378,14 @@ async fn get_count_etag(
|
|||||||
sender_user: &UserId,
|
sender_user: &UserId,
|
||||||
version: &str,
|
version: &str,
|
||||||
) -> (UInt, String) {
|
) -> (UInt, String) {
|
||||||
let count = services
|
let count: UInt = services
|
||||||
.key_backups
|
.key_backups
|
||||||
.count_keys(sender_user, version)
|
.count_keys(sender_user, version)
|
||||||
.then(async |keys| UInt::try_from(keys).expect("number of keys should fit into a UInt"));
|
.await
|
||||||
|
.try_into()
|
||||||
|
.expect("number of keys should fit into a UInt");
|
||||||
|
|
||||||
let etag = services.key_backups.get_etag(sender_user, version);
|
let etag = services.key_backups.get_etag(sender_user, version).await;
|
||||||
|
|
||||||
futures::join!(count, etag)
|
(count, etag)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user