Reduce usage of ruma_events::collections::only

in the case of get_message_events this intentionally changes a type
This commit is contained in:
Jonas Platte 2019-12-31 17:11:48 +01:00
parent 26d7e2f04d
commit 61bdd1ba96
No known key found for this signature in database
GPG Key ID: 7D261D771D915378
2 changed files with 6 additions and 6 deletions

View File

@ -2,7 +2,7 @@
use js_int::UInt;
use ruma_api::ruma_api;
use ruma_events::{collections::only, EventResult};
use ruma_events::{collections::all::RoomEvent, EventResult};
use ruma_identifiers::RoomId;
use serde::{Deserialize, Serialize};
@ -56,8 +56,8 @@ ruma_api! {
/// The token the pagination starts from.
pub start: String,
/// A list of room events.
#[wrap_incoming(only::RoomEvent with EventResult)]
pub chunk: Vec<only::RoomEvent>,
#[wrap_incoming(RoomEvent with EventResult)]
pub chunk: Vec<RoomEvent>,
/// The token the pagination ends at.
pub end: String,
}

View File

@ -1,7 +1,7 @@
//! [GET /_matrix/client/r0/rooms/{roomId}/state](https://matrix.org/docs/spec/client_server/r0.4.0.html#get-matrix-client-r0-rooms-roomid-state)
use ruma_api::ruma_api;
use ruma_events::{collections::only, EventResult};
use ruma_events::{collections::all::StateEvent, EventResult};
use ruma_identifiers::RoomId;
ruma_api! {
@ -25,7 +25,7 @@ ruma_api! {
/// list of events. If the user has left the room then this will be the state of the
/// room when they left as a list of events.
#[ruma_api(body)]
#[wrap_incoming(only::StateEvent with EventResult)]
pub room_state: Vec<only::StateEvent>,
#[wrap_incoming(StateEvent with EventResult)]
pub room_state: Vec<StateEvent>,
}
}