From 61bdd1ba9672622552aca952ae77b3b72842f8bb Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Tue, 31 Dec 2019 17:11:48 +0100 Subject: [PATCH] Reduce usage of ruma_events::collections::only in the case of get_message_events this intentionally changes a type --- src/r0/message/get_message_events.rs | 6 +++--- src/r0/state/get_state_events.rs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/r0/message/get_message_events.rs b/src/r0/message/get_message_events.rs index 385478ce..c7851020 100644 --- a/src/r0/message/get_message_events.rs +++ b/src/r0/message/get_message_events.rs @@ -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, + #[wrap_incoming(RoomEvent with EventResult)] + pub chunk: Vec, /// The token the pagination ends at. pub end: String, } diff --git a/src/r0/state/get_state_events.rs b/src/r0/state/get_state_events.rs index 8e3d8a73..3b81e3d4 100644 --- a/src/r0/state/get_state_events.rs +++ b/src/r0/state/get_state_events.rs @@ -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, + #[wrap_incoming(StateEvent with EventResult)] + pub room_state: Vec, } }