mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-18 08:11:24 +01:00
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:
parent
dc096d7ad7
commit
ac53948450
4 changed files with 49 additions and 43 deletions
|
|
@ -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),
|
||||
},
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue