From 349027f87d5380f9b437b0292a51a58212a98fad Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Sat, 8 Aug 2020 14:36:31 +0200 Subject: [PATCH] Borrow strings and identifiers in send_state_event_* --- .../src/r0/state/send_state_event_for_empty_key.rs | 4 ++-- ruma-client-api/src/r0/state/send_state_event_for_key.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ruma-client-api/src/r0/state/send_state_event_for_empty_key.rs b/ruma-client-api/src/r0/state/send_state_event_for_empty_key.rs index 5ec6ce9e..363af922 100644 --- a/ruma-client-api/src/r0/state/send_state_event_for_empty_key.rs +++ b/ruma-client-api/src/r0/state/send_state_event_for_empty_key.rs @@ -18,7 +18,7 @@ ruma_api! { request: { /// The room to set the state in. #[ruma_api(path)] - pub room_id: RoomId, + pub room_id: &'a RoomId, /// The type of event to send. #[ruma_api(path)] @@ -33,7 +33,7 @@ ruma_api! { response: { /// A unique identifier for the event. - pub event_id: EventId, + pub event_id: &'a EventId, } error: crate::Error diff --git a/ruma-client-api/src/r0/state/send_state_event_for_key.rs b/ruma-client-api/src/r0/state/send_state_event_for_key.rs index b3fad18b..fcf14ce8 100644 --- a/ruma-client-api/src/r0/state/send_state_event_for_key.rs +++ b/ruma-client-api/src/r0/state/send_state_event_for_key.rs @@ -18,7 +18,7 @@ ruma_api! { request: { /// The room to set the state in. #[ruma_api(path)] - pub room_id: RoomId, + pub room_id: &'a RoomId, /// The type of event to send. #[ruma_api(path)] @@ -26,7 +26,7 @@ ruma_api! { /// The state_key for the state to send. Defaults to the empty string. #[ruma_api(path)] - pub state_key: String, + pub state_key: &'a str, /// The event's content. The type for this field will be updated in a /// future release, until then you can create a value using @@ -37,7 +37,7 @@ ruma_api! { response: { /// A unique identifier for the event. - pub event_id: EventId, + pub event_id: &'a EventId, } error: crate::Error