mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-12 16:53:57 +02:00
apply new rustfmt.toml changes, fix some clippy lints
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
0317cc8cc5
commit
77e0b76408
296 changed files with 7147 additions and 4300 deletions
|
@ -18,8 +18,8 @@ use ruma::{
|
|||
api::federation::discovery::{ServerSigningKeys, VerifyKey},
|
||||
serde::Raw,
|
||||
signatures::{Ed25519KeyPair, PublicKeyMap, PublicKeySet},
|
||||
CanonicalJsonObject, MilliSecondsSinceUnixEpoch, OwnedServerSigningKeyId, RoomVersionId, ServerName,
|
||||
ServerSigningKeyId,
|
||||
CanonicalJsonObject, MilliSecondsSinceUnixEpoch, OwnedServerSigningKeyId, RoomVersionId,
|
||||
ServerName, ServerSigningKeyId,
|
||||
};
|
||||
use serde_json::value::RawValue as RawJsonValue;
|
||||
|
||||
|
@ -113,7 +113,11 @@ async fn add_signing_keys(&self, new_keys: ServerSigningKeys) {
|
|||
}
|
||||
|
||||
#[implement(Service)]
|
||||
pub async fn required_keys_exist(&self, object: &CanonicalJsonObject, version: &RoomVersionId) -> bool {
|
||||
pub async fn required_keys_exist(
|
||||
&self,
|
||||
object: &CanonicalJsonObject,
|
||||
version: &RoomVersionId,
|
||||
) -> bool {
|
||||
use ruma::signatures::required_keys;
|
||||
|
||||
let Ok(required_keys) = required_keys(object, version) else {
|
||||
|
@ -179,7 +183,8 @@ pub async fn signing_keys_for(&self, origin: &ServerName) -> Result<ServerSignin
|
|||
|
||||
#[implement(Service)]
|
||||
fn minimum_valid_ts(&self) -> MilliSecondsSinceUnixEpoch {
|
||||
let timepoint = timepoint_from_now(self.minimum_valid).expect("SystemTime should not overflow");
|
||||
let timepoint =
|
||||
timepoint_from_now(self.minimum_valid).expect("SystemTime should not overflow");
|
||||
MilliSecondsSinceUnixEpoch::from_system_time(timepoint).expect("UInt should not overflow")
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue