mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-19 08:41:24 +01:00
change rustfmt configuration
This change is fully automated, except the `rustfmt.toml` changes and a few clippy directives to allow specific functions with too many lines because they are longer now.
This commit is contained in:
parent
40d6ce230d
commit
0afc1d2f50
123 changed files with 7881 additions and 4687 deletions
|
|
@ -1,21 +1,29 @@
|
|||
use ruma::ServerName;
|
||||
|
||||
use crate::Result;
|
||||
|
||||
use super::{OutgoingKind, SendingEventType};
|
||||
use crate::Result;
|
||||
|
||||
pub(crate) trait Data: Send + Sync {
|
||||
#[allow(clippy::type_complexity)]
|
||||
fn active_requests<'a>(
|
||||
&'a self,
|
||||
) -> Box<dyn Iterator<Item = Result<(Vec<u8>, OutgoingKind, SendingEventType)>> + 'a>;
|
||||
) -> Box<
|
||||
dyn Iterator<Item = Result<(Vec<u8>, OutgoingKind, SendingEventType)>>
|
||||
+ 'a,
|
||||
>;
|
||||
fn active_requests_for<'a>(
|
||||
&'a self,
|
||||
outgoing_kind: &OutgoingKind,
|
||||
) -> Box<dyn Iterator<Item = Result<(Vec<u8>, SendingEventType)>> + 'a>;
|
||||
fn delete_active_request(&self, key: Vec<u8>) -> Result<()>;
|
||||
fn delete_all_active_requests_for(&self, outgoing_kind: &OutgoingKind) -> Result<()>;
|
||||
fn delete_all_requests_for(&self, outgoing_kind: &OutgoingKind) -> Result<()>;
|
||||
fn delete_all_active_requests_for(
|
||||
&self,
|
||||
outgoing_kind: &OutgoingKind,
|
||||
) -> Result<()>;
|
||||
fn delete_all_requests_for(
|
||||
&self,
|
||||
outgoing_kind: &OutgoingKind,
|
||||
) -> Result<()>;
|
||||
fn queue_requests(
|
||||
&self,
|
||||
requests: &[(&OutgoingKind, SendingEventType)],
|
||||
|
|
@ -24,7 +32,14 @@ pub(crate) trait Data: Send + Sync {
|
|||
&'a self,
|
||||
outgoing_kind: &OutgoingKind,
|
||||
) -> Box<dyn Iterator<Item = Result<(SendingEventType, Vec<u8>)>> + 'a>;
|
||||
fn mark_as_active(&self, events: &[(SendingEventType, Vec<u8>)]) -> Result<()>;
|
||||
fn set_latest_educount(&self, server_name: &ServerName, educount: u64) -> Result<()>;
|
||||
fn mark_as_active(
|
||||
&self,
|
||||
events: &[(SendingEventType, Vec<u8>)],
|
||||
) -> Result<()>;
|
||||
fn set_latest_educount(
|
||||
&self,
|
||||
server_name: &ServerName,
|
||||
educount: u64,
|
||||
) -> Result<()>;
|
||||
fn get_latest_educount(&self, server_name: &ServerName) -> Result<u64>;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue