Remove various Box<>
wrappers
This commit is contained in:
parent
d71fa97346
commit
91a7325bc4
@ -19,7 +19,7 @@ ruma_api! {
|
|||||||
///
|
///
|
||||||
/// To create a `RawJsonValue`, use `serde_json::value::to_raw_value`.
|
/// To create a `RawJsonValue`, use `serde_json::value::to_raw_value`.
|
||||||
#[ruma_api(body)]
|
#[ruma_api(body)]
|
||||||
pub data: Box<RawJsonValue>,
|
pub data: &'a RawJsonValue,
|
||||||
|
|
||||||
/// The event type of the account_data to set.
|
/// The event type of the account_data to set.
|
||||||
///
|
///
|
||||||
@ -47,7 +47,7 @@ ruma_api! {
|
|||||||
impl<'a> Request<'a> {
|
impl<'a> Request<'a> {
|
||||||
/// Creates a new `Request` with the given data, event type, room ID and user ID.
|
/// Creates a new `Request` with the given data, event type, room ID and user ID.
|
||||||
pub fn new(
|
pub fn new(
|
||||||
data: Box<RawJsonValue>,
|
data: &'a RawJsonValue,
|
||||||
event_type: &'a str,
|
event_type: &'a str,
|
||||||
room_id: &'a RoomId,
|
room_id: &'a RoomId,
|
||||||
user_id: &'a UserId,
|
user_id: &'a UserId,
|
||||||
|
@ -34,7 +34,7 @@ ruma_api! {
|
|||||||
/// The content's type for this field will be updated in a future
|
/// The content's type for this field will be updated in a future
|
||||||
/// release, until then you can create a value using
|
/// release, until then you can create a value using
|
||||||
/// `serde_json::value::to_raw_value`.
|
/// `serde_json::value::to_raw_value`.
|
||||||
pub messages: BTreeMap<UserId, BTreeMap<DeviceIdOrAllDevices, Box<RawJsonValue>>>
|
pub messages: BTreeMap<UserId, BTreeMap<DeviceIdOrAllDevices, Box<RawJsonValue>>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
|
@ -112,7 +112,7 @@ pub struct Notification<'a> {
|
|||||||
/// The `content` field from the event, if present. The pusher may omit this
|
/// The `content` field from the event, if present. The pusher may omit this
|
||||||
/// if the event had no content or for any other reason.
|
/// if the event had no content or for any other reason.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub content: Option<Box<RawJsonValue>>,
|
pub content: Option<&'a RawJsonValue>,
|
||||||
|
|
||||||
/// This is a dictionary of the current number of unacknowledged
|
/// This is a dictionary of the current number of unacknowledged
|
||||||
/// communications for the recipient user. Counts whose value is zero should
|
/// communications for the recipient user. Counts whose value is zero should
|
||||||
|
Loading…
x
Reference in New Issue
Block a user