mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-19 00:31:24 +01:00
fix lints for upcoming 1.88.0 toolchain
This commit is contained in:
parent
fa6fb37a2c
commit
595f35b673
19 changed files with 41 additions and 42 deletions
|
|
@ -246,7 +246,7 @@ impl TracingFilterCommand {
|
|||
#[derive(Debug)]
|
||||
pub(crate) enum AdminRoomEvent {
|
||||
ProcessMessage(String),
|
||||
SendMessage(RoomMessageEventContent),
|
||||
SendMessage(Box<RoomMessageEventContent>),
|
||||
}
|
||||
|
||||
pub(crate) struct Service {
|
||||
|
|
@ -297,7 +297,7 @@ impl Service {
|
|||
grapevine_room: &OwnedRoomId,
|
||||
) {
|
||||
let message_content = match event {
|
||||
AdminRoomEvent::SendMessage(content) => content,
|
||||
AdminRoomEvent::SendMessage(content) => *content,
|
||||
AdminRoomEvent::ProcessMessage(room_message) => {
|
||||
self.process_admin_message(room_message).await
|
||||
}
|
||||
|
|
@ -343,7 +343,9 @@ impl Service {
|
|||
&self,
|
||||
message_content: RoomMessageEventContent,
|
||||
) {
|
||||
self.sender.send(AdminRoomEvent::SendMessage(message_content)).unwrap();
|
||||
self.sender
|
||||
.send(AdminRoomEvent::SendMessage(Box::new(message_content)))
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
// Parse and process a message from the admin room
|
||||
|
|
@ -701,7 +703,7 @@ impl Service {
|
|||
return Ok(RoomMessageEventContent::text_plain(
|
||||
"The specified user is not from this server!",
|
||||
));
|
||||
};
|
||||
}
|
||||
|
||||
// Check if the specified user is valid
|
||||
if !services().users.exists(&user_id)?
|
||||
|
|
@ -1234,7 +1236,7 @@ impl Service {
|
|||
return Ok(RoomMessageEventContent::text_plain(format!(
|
||||
"Failed to reload filter: {e}"
|
||||
)));
|
||||
};
|
||||
}
|
||||
|
||||
return Ok(RoomMessageEventContent::text_plain(
|
||||
"Filter reloaded",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue