diff --git a/crates/ruma-common/CHANGELOG.md b/crates/ruma-common/CHANGELOG.md index ee142855..5b016c59 100644 --- a/crates/ruma-common/CHANGELOG.md +++ b/crates/ruma-common/CHANGELOG.md @@ -26,6 +26,7 @@ Breaking changes: * Split `RoomId` matrix URI constructors between methods with and without routing * Allow to add routing servers to `RoomId::matrix_to_event_uri()` * Move `receipt::ReceiptType` to `events::receipt` +* Make `Clone` as supertrait of `api::OutgoingRequest` [spec]: https://github.com/matrix-org/matrix-spec-proposals/pull/3669 diff --git a/crates/ruma-common/src/api.rs b/crates/ruma-common/src/api.rs index cc8103a5..800369f1 100644 --- a/crates/ruma-common/src/api.rs +++ b/crates/ruma-common/src/api.rs @@ -240,7 +240,7 @@ impl<'a> SendAccessToken<'a> { } /// A request type for a Matrix API endpoint, used for sending requests. -pub trait OutgoingRequest: Sized { +pub trait OutgoingRequest: Sized + Clone { /// A type capturing the expected error conditions the server can return. type EndpointError: EndpointError; diff --git a/crates/ruma-common/tests/api/manual_endpoint_impl.rs b/crates/ruma-common/tests/api/manual_endpoint_impl.rs index 888c9a84..6faa13c0 100644 --- a/crates/ruma-common/tests/api/manual_endpoint_impl.rs +++ b/crates/ruma-common/tests/api/manual_endpoint_impl.rs @@ -17,7 +17,7 @@ use ruma_common::{ use serde::{Deserialize, Serialize}; /// A request to create a new room alias. -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct Request { pub room_id: OwnedRoomId, // body pub room_alias: OwnedRoomAliasId, // path