remove usages of &String
and &Owned[..]
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
2e83e56a07
commit
919735b4ce
7 changed files with 15 additions and 15 deletions
|
@ -8,7 +8,7 @@ use ruma::{
|
|||
room::message::{Relation::Reply, RoomMessageEventContent},
|
||||
TimelineEventType,
|
||||
},
|
||||
OwnedRoomId, OwnedUserId, ServerName, UserId,
|
||||
OwnedRoomId, OwnedUserId, RoomId, ServerName, UserId,
|
||||
};
|
||||
use serde_json::value::to_raw_value;
|
||||
use tokio::sync::MutexGuard;
|
||||
|
@ -125,7 +125,7 @@ async fn handle_event(event: AdminRoomEvent, admin_room: OwnedRoomId, server_use
|
|||
}
|
||||
|
||||
async fn handle_response_error(
|
||||
e: &Error, admin_room: &OwnedRoomId, server_user: &UserId, state_lock: &MutexGuard<'_, ()>,
|
||||
e: &Error, admin_room: &RoomId, server_user: &UserId, state_lock: &MutexGuard<'_, ()>,
|
||||
) -> Result<()> {
|
||||
error!("Failed to build and append admin room response PDU: \"{e}\"");
|
||||
let error_room_message = RoomMessageEventContent::text_plain(format!(
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
pub(crate) use conduit::utils::HtmlEscape;
|
||||
use ruma::OwnedRoomId;
|
||||
use ruma::{OwnedRoomId, RoomId};
|
||||
|
||||
use crate::services;
|
||||
|
||||
|
@ -9,9 +9,9 @@ pub(crate) fn escape_html(s: &str) -> String {
|
|||
.replace('>', ">")
|
||||
}
|
||||
|
||||
pub(crate) fn get_room_info(id: &OwnedRoomId) -> (OwnedRoomId, u64, String) {
|
||||
pub(crate) fn get_room_info(id: &RoomId) -> (OwnedRoomId, u64, String) {
|
||||
(
|
||||
id.clone(),
|
||||
id.into(),
|
||||
services()
|
||||
.rooms
|
||||
.state_cache
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue