mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-10 22:22:48 +02:00
run cargo fix for rust 2024 changes and rustfmt
Signed-off-by: June Clementine Strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
e97952b7f6
commit
a1e1f40ded
320 changed files with 2212 additions and 2039 deletions
|
@ -2,32 +2,33 @@ use std::{
|
|||
collections::{BTreeMap, HashMap, HashSet},
|
||||
fmt::Debug,
|
||||
sync::{
|
||||
atomic::{AtomicU64, AtomicUsize, Ordering},
|
||||
Arc,
|
||||
atomic::{AtomicU64, AtomicUsize, Ordering},
|
||||
},
|
||||
time::{Duration, Instant},
|
||||
};
|
||||
|
||||
use base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine as _};
|
||||
use base64::{Engine as _, engine::general_purpose::URL_SAFE_NO_PAD};
|
||||
use conduwuit::{
|
||||
debug, err, error,
|
||||
Error, Result, debug, err, error,
|
||||
result::LogErr,
|
||||
trace,
|
||||
utils::{
|
||||
calculate_hash, continue_exponential_backoff_secs,
|
||||
ReadyExt, calculate_hash, continue_exponential_backoff_secs,
|
||||
future::TryExtExt,
|
||||
stream::{BroadbandExt, IterStream, WidebandExt},
|
||||
ReadyExt,
|
||||
},
|
||||
warn, Error, Result,
|
||||
warn,
|
||||
};
|
||||
use futures::{
|
||||
FutureExt, StreamExt,
|
||||
future::{BoxFuture, OptionFuture},
|
||||
join, pin_mut,
|
||||
stream::FuturesUnordered,
|
||||
FutureExt, StreamExt,
|
||||
};
|
||||
use ruma::{
|
||||
CanonicalJsonObject, MilliSecondsSinceUnixEpoch, OwnedRoomId, OwnedServerName, OwnedUserId,
|
||||
RoomId, RoomVersionId, ServerName, UInt,
|
||||
api::{
|
||||
appservice::event::push_events::v1::EphemeralData,
|
||||
federation::transactions::{
|
||||
|
@ -40,18 +41,17 @@ use ruma::{
|
|||
},
|
||||
device_id,
|
||||
events::{
|
||||
push_rules::PushRulesEvent, receipt::ReceiptType, AnySyncEphemeralRoomEvent,
|
||||
GlobalAccountDataEventType,
|
||||
AnySyncEphemeralRoomEvent, GlobalAccountDataEventType, push_rules::PushRulesEvent,
|
||||
receipt::ReceiptType,
|
||||
},
|
||||
push,
|
||||
serde::Raw,
|
||||
uint, CanonicalJsonObject, MilliSecondsSinceUnixEpoch, OwnedRoomId, OwnedServerName,
|
||||
OwnedUserId, RoomId, RoomVersionId, ServerName, UInt,
|
||||
uint,
|
||||
};
|
||||
use serde_json::value::{to_raw_value, RawValue as RawJsonValue};
|
||||
use serde_json::value::{RawValue as RawJsonValue, to_raw_value};
|
||||
|
||||
use super::{
|
||||
appservice, data::QueueItem, Destination, EduBuf, EduVec, Msg, SendingEvent, Service,
|
||||
Destination, EduBuf, EduVec, Msg, SendingEvent, Service, appservice, data::QueueItem,
|
||||
};
|
||||
|
||||
#[derive(Debug)]
|
||||
|
@ -146,7 +146,7 @@ impl Service {
|
|||
statuses.entry(dest).and_modify(|e| {
|
||||
*e = match e {
|
||||
| TransactionStatus::Running => TransactionStatus::Failed(1, Instant::now()),
|
||||
| TransactionStatus::Retrying(ref n) =>
|
||||
| &mut TransactionStatus::Retrying(ref n) =>
|
||||
TransactionStatus::Failed(n.saturating_add(1), Instant::now()),
|
||||
| TransactionStatus::Failed(..) => {
|
||||
panic!("Request that was not even running failed?!")
|
||||
|
@ -211,7 +211,7 @@ impl Service {
|
|||
async fn finish_responses<'a>(&'a self, futures: &mut SendingFutures<'a>) {
|
||||
use tokio::{
|
||||
select,
|
||||
time::{sleep_until, Instant},
|
||||
time::{Instant, sleep_until},
|
||||
};
|
||||
|
||||
let timeout = self.server.config.sender_shutdown_timeout;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue