remove usages of &String and &Owned[..]
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
@@ -111,9 +111,9 @@ impl Service {
|
||||
.await;
|
||||
}
|
||||
|
||||
async fn receive(&self, event: AdminRoomEvent, room: &OwnedRoomId, user: &UserId) -> Result<(), Error> {
|
||||
async fn receive(&self, event: AdminRoomEvent, room: &RoomId, user: &UserId) -> Result<(), Error> {
|
||||
if let Some(handle) = self.handle.lock().await.as_ref() {
|
||||
handle(event, room.clone(), user.into()).await
|
||||
handle(event, room.into(), user.into()).await
|
||||
} else {
|
||||
Err(Error::Err("Admin module is not loaded.".into()))
|
||||
}
|
||||
|
||||
@@ -406,7 +406,7 @@ async fn send_events(dest: Destination, events: Vec<SendingEvent>) -> SendingRes
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(dest, events))]
|
||||
async fn send_events_dest_appservice(dest: &Destination, id: &String, events: Vec<SendingEvent>) -> SendingResult {
|
||||
async fn send_events_dest_appservice(dest: &Destination, id: &str, events: Vec<SendingEvent>) -> SendingResult {
|
||||
let mut pdu_jsons = Vec::new();
|
||||
|
||||
for event in &events {
|
||||
@@ -469,7 +469,7 @@ async fn send_events_dest_appservice(dest: &Destination, id: &String, events: Ve
|
||||
|
||||
#[tracing::instrument(skip(dest, events))]
|
||||
async fn send_events_dest_push(
|
||||
dest: &Destination, userid: &OwnedUserId, pushkey: &String, events: Vec<SendingEvent>,
|
||||
dest: &Destination, userid: &OwnedUserId, pushkey: &str, events: Vec<SendingEvent>,
|
||||
) -> SendingResult {
|
||||
let mut pdus = Vec::new();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user