Merge remote-tracking branch 'Johni0702/cloneable'

This commit is contained in:
Jimmy Cuadra 2018-12-03 18:10:52 -08:00
commit d90dfdee24
3 changed files with 3 additions and 3 deletions

View File

@ -217,7 +217,7 @@ impl ToTokens for Request {
fn to_tokens(&self, tokens: &mut TokenStream) {
let request_struct_header = quote! {
/// Data for a request to this API endpoint.
#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct Request
};

View File

@ -205,7 +205,7 @@ impl ToTokens for Response {
fn to_tokens(&self, tokens: &mut TokenStream) {
let response_struct_header = quote! {
/// Data in the response from this API endpoint.
#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct Response
};

View File

@ -173,7 +173,7 @@ mod api;
/// pub mod newtype_body_endpoint {
/// use ruma_api_macros::ruma_api;
///
/// #[derive(Debug, Deserialize, Serialize)]
/// #[derive(Clone, Debug, Deserialize, Serialize)]
/// pub struct MyCustomType {
/// pub foo: String,
/// }