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,11 +2,11 @@ use std::cmp;
|
|||
|
||||
use axum::extract::State;
|
||||
use conduwuit::{
|
||||
utils::{stream::TryTools, IterStream, ReadyExt},
|
||||
PduCount, Result,
|
||||
utils::{IterStream, ReadyExt, stream::TryTools},
|
||||
};
|
||||
use futures::{FutureExt, StreamExt, TryStreamExt};
|
||||
use ruma::{api::federation::backfill::get_backfill, uint, MilliSecondsSinceUnixEpoch};
|
||||
use ruma::{MilliSecondsSinceUnixEpoch, api::federation::backfill::get_backfill, uint};
|
||||
|
||||
use super::AccessCheck;
|
||||
use crate::Ruma;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use axum::extract::State;
|
||||
use conduwuit::{err, Result};
|
||||
use ruma::{api::federation::event::get_event, MilliSecondsSinceUnixEpoch, RoomId};
|
||||
use conduwuit::{Result, err};
|
||||
use ruma::{MilliSecondsSinceUnixEpoch, RoomId, api::federation::event::get_event};
|
||||
|
||||
use super::AccessCheck;
|
||||
use crate::Ruma;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
use std::{borrow::Borrow, iter::once};
|
||||
|
||||
use axum::extract::State;
|
||||
use conduwuit::{utils::stream::ReadyExt, Error, Result};
|
||||
use conduwuit::{Error, Result, utils::stream::ReadyExt};
|
||||
use futures::StreamExt;
|
||||
use ruma::{
|
||||
api::{client::error::ErrorKind, federation::authorization::get_event_authorization},
|
||||
RoomId,
|
||||
api::{client::error::ErrorKind, federation::authorization::get_event_authorization},
|
||||
};
|
||||
|
||||
use super::AccessCheck;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use axum::extract::State;
|
||||
use conduwuit::{Error, Result};
|
||||
use ruma::{
|
||||
api::{client::error::ErrorKind, federation::event::get_missing_events},
|
||||
CanonicalJsonValue, EventId, RoomId,
|
||||
api::{client::error::ErrorKind, federation::event::get_missing_events},
|
||||
};
|
||||
|
||||
use super::AccessCheck;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
use axum::extract::State;
|
||||
use conduwuit::{
|
||||
utils::stream::{BroadbandExt, IterStream},
|
||||
Err, Result,
|
||||
utils::stream::{BroadbandExt, IterStream},
|
||||
};
|
||||
use futures::{FutureExt, StreamExt};
|
||||
use ruma::api::federation::space::get_hierarchy;
|
||||
use service::rooms::spaces::{get_parent_children_via, Identifier, SummaryAccessibility};
|
||||
use service::rooms::spaces::{Identifier, SummaryAccessibility, get_parent_children_via};
|
||||
|
||||
use crate::Ruma;
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
use axum::extract::State;
|
||||
use axum_client_ip::InsecureClientIp;
|
||||
use base64::{engine::general_purpose, Engine as _};
|
||||
use conduwuit::{err, utils, utils::hash::sha256, warn, Err, Error, PduEvent, Result};
|
||||
use base64::{Engine as _, engine::general_purpose};
|
||||
use conduwuit::{Err, Error, PduEvent, Result, err, utils, utils::hash::sha256, warn};
|
||||
use ruma::{
|
||||
CanonicalJsonValue, OwnedUserId, UserId,
|
||||
api::{client::error::ErrorKind, federation::membership::create_invite},
|
||||
events::room::member::{MembershipState, RoomMemberEventContent},
|
||||
serde::JsonObject,
|
||||
CanonicalJsonValue, OwnedUserId, UserId,
|
||||
};
|
||||
use service::pdu::gen_event_id;
|
||||
|
||||
|
|
|
@ -3,15 +3,15 @@ use std::{
|
|||
time::{Duration, SystemTime},
|
||||
};
|
||||
|
||||
use axum::{extract::State, response::IntoResponse, Json};
|
||||
use conduwuit::{utils::timepoint_from_now, Result};
|
||||
use axum::{Json, extract::State, response::IntoResponse};
|
||||
use conduwuit::{Result, utils::timepoint_from_now};
|
||||
use ruma::{
|
||||
MilliSecondsSinceUnixEpoch, Signatures,
|
||||
api::{
|
||||
federation::discovery::{get_server_keys, OldVerifyKey, ServerSigningKeys},
|
||||
OutgoingResponse,
|
||||
federation::discovery::{OldVerifyKey, ServerSigningKeys, get_server_keys},
|
||||
},
|
||||
serde::Raw,
|
||||
MilliSecondsSinceUnixEpoch, Signatures,
|
||||
};
|
||||
|
||||
/// # `GET /_matrix/key/v2/server`
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
use axum::extract::State;
|
||||
use conduwuit::{debug_info, utils::IterStream, warn, Err};
|
||||
use conduwuit::{Err, debug_info, utils::IterStream, warn};
|
||||
use futures::StreamExt;
|
||||
use ruma::{
|
||||
CanonicalJsonObject, OwnedUserId, RoomId, RoomVersionId, UserId,
|
||||
api::{client::error::ErrorKind, federation::membership::prepare_join_event},
|
||||
events::{
|
||||
StateEventType,
|
||||
room::{
|
||||
join_rules::{AllowRule, JoinRule, RoomJoinRulesEventContent},
|
||||
member::{MembershipState, RoomMemberEventContent},
|
||||
},
|
||||
StateEventType,
|
||||
},
|
||||
CanonicalJsonObject, OwnedUserId, RoomId, RoomVersionId, UserId,
|
||||
};
|
||||
use serde_json::value::to_raw_value;
|
||||
|
||||
use crate::{
|
||||
service::{pdu::PduBuilder, Services},
|
||||
Error, Result, Ruma,
|
||||
service::{Services, pdu::PduBuilder},
|
||||
};
|
||||
|
||||
/// # `GET /_matrix/federation/v1/make_join/{roomId}/{userId}`
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
use RoomVersionId::*;
|
||||
use axum::extract::State;
|
||||
use conduwuit::{debug_warn, Err};
|
||||
use conduwuit::{Err, debug_warn};
|
||||
use ruma::{
|
||||
RoomVersionId,
|
||||
api::{client::error::ErrorKind, federation::knock::create_knock_event_template},
|
||||
events::room::member::{MembershipState, RoomMemberEventContent},
|
||||
RoomVersionId,
|
||||
};
|
||||
use serde_json::value::to_raw_value;
|
||||
use tracing::warn;
|
||||
use RoomVersionId::*;
|
||||
|
||||
use crate::{service::pdu::PduBuilder, Error, Result, Ruma};
|
||||
use crate::{Error, Result, Ruma, service::pdu::PduBuilder};
|
||||
|
||||
/// # `GET /_matrix/federation/v1/make_knock/{roomId}/{userId}`
|
||||
///
|
||||
|
|
|
@ -7,7 +7,7 @@ use ruma::{
|
|||
use serde_json::value::to_raw_value;
|
||||
|
||||
use super::make_join::maybe_strip_event_id;
|
||||
use crate::{service::pdu::PduBuilder, Ruma};
|
||||
use crate::{Ruma, service::pdu::PduBuilder};
|
||||
|
||||
/// # `GET /_matrix/federation/v1/make_leave/{roomId}/{eventId}`
|
||||
///
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
use axum::extract::State;
|
||||
use axum_client_ip::InsecureClientIp;
|
||||
use conduwuit::{utils::content_disposition::make_content_disposition, Err, Result};
|
||||
use conduwuit::{Err, Result, utils::content_disposition::make_content_disposition};
|
||||
use conduwuit_service::media::{Dim, FileMeta};
|
||||
use ruma::{
|
||||
api::federation::authenticated_media::{
|
||||
get_content, get_content_thumbnail, Content, ContentMetadata, FileOrLocation,
|
||||
},
|
||||
Mxc,
|
||||
api::federation::authenticated_media::{
|
||||
Content, ContentMetadata, FileOrLocation, get_content, get_content_thumbnail,
|
||||
},
|
||||
};
|
||||
|
||||
use crate::Ruma;
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
use std::collections::BTreeMap;
|
||||
|
||||
use axum::extract::State;
|
||||
use conduwuit::{err, Error, Result};
|
||||
use conduwuit::{Error, Result, err};
|
||||
use futures::StreamExt;
|
||||
use get_profile_information::v1::ProfileField;
|
||||
use rand::seq::SliceRandom;
|
||||
use ruma::{
|
||||
OwnedServerName,
|
||||
api::{
|
||||
client::error::ErrorKind,
|
||||
federation::query::{get_profile_information, get_room_information},
|
||||
},
|
||||
OwnedServerName,
|
||||
};
|
||||
|
||||
use crate::Ruma;
|
||||
|
|
|
@ -3,20 +3,21 @@ use std::{collections::BTreeMap, net::IpAddr, time::Instant};
|
|||
use axum::extract::State;
|
||||
use axum_client_ip::InsecureClientIp;
|
||||
use conduwuit::{
|
||||
debug,
|
||||
Err, Error, Result, debug,
|
||||
debug::INFO_SPAN_LEVEL,
|
||||
debug_warn, err, error,
|
||||
result::LogErr,
|
||||
trace,
|
||||
utils::{
|
||||
stream::{automatic_width, BroadbandExt, TryBroadbandExt},
|
||||
IterStream, ReadyExt,
|
||||
stream::{BroadbandExt, TryBroadbandExt, automatic_width},
|
||||
},
|
||||
warn, Err, Error, Result,
|
||||
warn,
|
||||
};
|
||||
use futures::{FutureExt, Stream, StreamExt, TryFutureExt, TryStreamExt};
|
||||
use itertools::Itertools;
|
||||
use ruma::{
|
||||
CanonicalJsonObject, OwnedEventId, OwnedRoomId, OwnedUserId, RoomId, ServerName, UserId,
|
||||
api::{
|
||||
client::error::ErrorKind,
|
||||
federation::transactions::{
|
||||
|
@ -31,17 +32,16 @@ use ruma::{
|
|||
events::receipt::{ReceiptEvent, ReceiptEventContent, ReceiptType},
|
||||
serde::Raw,
|
||||
to_device::DeviceIdOrAllDevices,
|
||||
CanonicalJsonObject, OwnedEventId, OwnedRoomId, OwnedUserId, RoomId, ServerName, UserId,
|
||||
};
|
||||
use service::{
|
||||
sending::{EDU_LIMIT, PDU_LIMIT},
|
||||
Services,
|
||||
sending::{EDU_LIMIT, PDU_LIMIT},
|
||||
};
|
||||
use utils::millis_since_unix_epoch;
|
||||
|
||||
use crate::{
|
||||
utils::{self},
|
||||
Ruma,
|
||||
utils::{self},
|
||||
};
|
||||
|
||||
type ResolvedMap = BTreeMap<OwnedEventId, Result>;
|
||||
|
|
|
@ -4,22 +4,22 @@ use std::borrow::Borrow;
|
|||
|
||||
use axum::extract::State;
|
||||
use conduwuit::{
|
||||
at, err,
|
||||
Err, Result, at, err,
|
||||
pdu::gen_event_id_canonical_json,
|
||||
utils::stream::{IterStream, TryBroadbandExt},
|
||||
warn, Err, Result,
|
||||
warn,
|
||||
};
|
||||
use futures::{FutureExt, StreamExt, TryStreamExt};
|
||||
use ruma::{
|
||||
api::federation::membership::create_join_event,
|
||||
events::{
|
||||
room::member::{MembershipState, RoomMemberEventContent},
|
||||
StateEventType,
|
||||
},
|
||||
CanonicalJsonValue, OwnedEventId, OwnedRoomId, OwnedServerName, OwnedUserId, RoomId,
|
||||
ServerName,
|
||||
api::federation::membership::create_join_event,
|
||||
events::{
|
||||
StateEventType,
|
||||
room::member::{MembershipState, RoomMemberEventContent},
|
||||
},
|
||||
};
|
||||
use serde_json::value::{to_raw_value, RawValue as RawJsonValue};
|
||||
use serde_json::value::{RawValue as RawJsonValue, to_raw_value};
|
||||
use service::Services;
|
||||
|
||||
use crate::Ruma;
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
use axum::extract::State;
|
||||
use conduwuit::{err, pdu::gen_event_id_canonical_json, warn, Err, PduEvent, Result};
|
||||
use conduwuit::{Err, PduEvent, Result, err, pdu::gen_event_id_canonical_json, warn};
|
||||
use futures::FutureExt;
|
||||
use ruma::{
|
||||
api::federation::knock::send_knock,
|
||||
events::{
|
||||
room::member::{MembershipState, RoomMemberEventContent},
|
||||
StateEventType,
|
||||
},
|
||||
serde::JsonObject,
|
||||
OwnedServerName, OwnedUserId,
|
||||
RoomVersionId::*,
|
||||
api::federation::knock::send_knock,
|
||||
events::{
|
||||
StateEventType,
|
||||
room::member::{MembershipState, RoomMemberEventContent},
|
||||
},
|
||||
serde::JsonObject,
|
||||
};
|
||||
|
||||
use crate::Ruma;
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
#![allow(deprecated)]
|
||||
|
||||
use axum::extract::State;
|
||||
use conduwuit::{err, Err, Result};
|
||||
use conduwuit::{Err, Result, err};
|
||||
use futures::FutureExt;
|
||||
use ruma::{
|
||||
OwnedRoomId, OwnedUserId, RoomId, ServerName,
|
||||
api::federation::membership::create_leave_event,
|
||||
events::{
|
||||
room::member::{MembershipState, RoomMemberEventContent},
|
||||
StateEventType,
|
||||
room::member::{MembershipState, RoomMemberEventContent},
|
||||
},
|
||||
OwnedRoomId, OwnedUserId, RoomId, ServerName,
|
||||
};
|
||||
use serde_json::value::RawValue as RawJsonValue;
|
||||
|
||||
use crate::{
|
||||
service::{pdu::gen_event_id_canonical_json, Services},
|
||||
Ruma,
|
||||
service::{Services, pdu::gen_event_id_canonical_json},
|
||||
};
|
||||
|
||||
/// # `PUT /_matrix/federation/v1/send_leave/{roomId}/{eventId}`
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use std::{borrow::Borrow, iter::once};
|
||||
|
||||
use axum::extract::State;
|
||||
use conduwuit::{at, err, utils::IterStream, Result};
|
||||
use conduwuit::{Result, at, err, utils::IterStream};
|
||||
use futures::{FutureExt, StreamExt, TryStreamExt};
|
||||
use ruma::{api::federation::event::get_room_state, OwnedEventId};
|
||||
use ruma::{OwnedEventId, api::federation::event::get_room_state};
|
||||
|
||||
use super::AccessCheck;
|
||||
use crate::Ruma;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use std::{borrow::Borrow, iter::once};
|
||||
|
||||
use axum::extract::State;
|
||||
use conduwuit::{at, err, Result};
|
||||
use conduwuit::{Result, at, err};
|
||||
use futures::{StreamExt, TryStreamExt};
|
||||
use ruma::{api::federation::event::get_room_state_ids, OwnedEventId};
|
||||
use ruma::{OwnedEventId, api::federation::event::get_room_state_ids};
|
||||
|
||||
use super::AccessCheck;
|
||||
use crate::Ruma;
|
||||
|
|
|
@ -10,8 +10,8 @@ use ruma::api::{
|
|||
};
|
||||
|
||||
use crate::{
|
||||
client::{claim_keys_helper, get_keys_helper},
|
||||
Ruma,
|
||||
client::{claim_keys_helper, get_keys_helper},
|
||||
};
|
||||
|
||||
/// # `GET /_matrix/federation/v1/user/devices/{userId}`
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use conduwuit::{implement, is_false, Err, Result};
|
||||
use conduwuit::{Err, Result, implement, is_false};
|
||||
use conduwuit_service::Services;
|
||||
use futures::{future::OptionFuture, join, FutureExt, StreamExt};
|
||||
use futures::{FutureExt, StreamExt, future::OptionFuture, join};
|
||||
use ruma::{EventId, RoomId, ServerName};
|
||||
|
||||
pub(super) struct AccessCheck<'a> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue