use more, qualify less

Doing this will allow `rustfmt` to collapse lines more efficiently.
Specifically, a lot of these lines fail to wrap to 80 columns without
these changes.
This commit is contained in:
Charles Hall 2024-05-16 17:10:49 -07:00
parent dc096d7ad7
commit ac53948450
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
4 changed files with 49 additions and 43 deletions

View file

@ -11,6 +11,7 @@ use regex::Regex;
use ruma::{
api::appservice::Registration,
events::{
push_rules::{PushRulesEvent, PushRulesEventContent},
room::{
canonical_alias::RoomCanonicalAliasEventContent,
create::RoomCreateEventContent,
@ -644,8 +645,8 @@ impl Service {
ruma::events::GlobalAccountDataEventType::PushRules
.to_string()
.into(),
&serde_json::to_value(ruma::events::push_rules::PushRulesEvent {
content: ruma::events::push_rules::PushRulesEventContent {
&serde_json::to_value(PushRulesEvent {
content: PushRulesEventContent {
global: ruma::push::Ruleset::server_default(&user_id),
},
})

View file

@ -1,4 +1,7 @@
use ruma::{events::SyncEphemeralRoomEvent, OwnedRoomId, OwnedUserId, RoomId, UserId};
use ruma::{
events::{typing::TypingEventContent, SyncEphemeralRoomEvent},
OwnedRoomId, OwnedUserId, RoomId, UserId,
};
use std::collections::BTreeMap;
use tokio::sync::{broadcast, RwLock};
use tracing::trace;
@ -116,9 +119,9 @@ impl Service {
pub(crate) async fn typings_all(
&self,
room_id: &RoomId,
) -> Result<SyncEphemeralRoomEvent<ruma::events::typing::TypingEventContent>> {
) -> Result<SyncEphemeralRoomEvent<TypingEventContent>> {
Ok(SyncEphemeralRoomEvent {
content: ruma::events::typing::TypingEventContent {
content: TypingEventContent {
user_ids: self
.typing
.read()