Replace serde_derive by re-exports in serde
This commit is contained in:
		
							parent
							
								
									9d5449b219
								
							
						
					
					
						commit
						7f18e1c32e
					
				| @ -14,6 +14,8 @@ edition = "2018" | |||||||
| [dependencies] | [dependencies] | ||||||
| ruma-identifiers = "0.11.0" | ruma-identifiers = "0.11.0" | ||||||
| ruma-signatures = "0.4.1" | ruma-signatures = "0.4.1" | ||||||
| serde = "1.0.80" | serde_json = "1.0.38" | ||||||
| serde_derive = "1.0.80" | 
 | ||||||
| serde_json = "1.0.33" | [dependencies.serde] | ||||||
|  | version = "1.0.87" | ||||||
|  | features = ["derive"] | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| //! Types for the *m.call.answer* event.
 | //! Types for the *m.call.answer* event.
 | ||||||
| 
 | 
 | ||||||
| use serde_derive::{Deserialize, Serialize}; | use serde::{Deserialize, Serialize}; | ||||||
| 
 | 
 | ||||||
| use super::SessionDescription; | use super::SessionDescription; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| //! Types for the *m.call.candidates* event.
 | //! Types for the *m.call.candidates* event.
 | ||||||
| 
 | 
 | ||||||
| use serde_derive::{Deserialize, Serialize}; | use serde::{Deserialize, Serialize}; | ||||||
| 
 | 
 | ||||||
| room_event! { | room_event! { | ||||||
|     /// This event is sent by callers after sending an invite and by the callee after answering.
 |     /// This event is sent by callers after sending an invite and by the callee after answering.
 | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| //! Types for the *m.call.hangup* event.
 | //! Types for the *m.call.hangup* event.
 | ||||||
| 
 | 
 | ||||||
| use serde_derive::{Deserialize, Serialize}; | use serde::{Deserialize, Serialize}; | ||||||
| 
 | 
 | ||||||
| room_event! { | room_event! { | ||||||
|     /// Sent by either party to signal their termination of the call. This can be sent either once
 |     /// Sent by either party to signal their termination of the call. This can be sent either once
 | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| //! Types for the *m.call.invite* event.
 | //! Types for the *m.call.invite* event.
 | ||||||
| 
 | 
 | ||||||
| use serde_derive::{Deserialize, Serialize}; | use serde::{Deserialize, Serialize}; | ||||||
| 
 | 
 | ||||||
| use super::SessionDescription; | use super::SessionDescription; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -2,7 +2,7 @@ | |||||||
| //!
 | //!
 | ||||||
| //! This module also contains types shared by events in its child namespaces.
 | //! This module also contains types shared by events in its child namespaces.
 | ||||||
| 
 | 
 | ||||||
| use serde_derive::{Deserialize, Serialize}; | use serde::{Deserialize, Serialize}; | ||||||
| 
 | 
 | ||||||
| pub mod answer; | pub mod answer; | ||||||
| pub mod candidates; | pub mod candidates; | ||||||
|  | |||||||
| @ -3,7 +3,7 @@ | |||||||
| use std::collections::HashMap; | use std::collections::HashMap; | ||||||
| 
 | 
 | ||||||
| use ruma_identifiers::{RoomId, UserId}; | use ruma_identifiers::{RoomId, UserId}; | ||||||
| use serde_derive::{Deserialize, Serialize}; | use serde::{Deserialize, Serialize}; | ||||||
| 
 | 
 | ||||||
| event! { | event! { | ||||||
|     /// Informs the client about the rooms that are considered direct by a user.
 |     /// Informs the client about the rooms that are considered direct by a user.
 | ||||||
|  | |||||||
| @ -107,7 +107,6 @@ use serde::{ | |||||||
|     de::{Error as SerdeError, Visitor}, |     de::{Error as SerdeError, Visitor}, | ||||||
|     Deserialize, Deserializer, Serialize, Serializer, |     Deserialize, Deserializer, Serialize, Serializer, | ||||||
| }; | }; | ||||||
| use serde_derive::{Deserialize, Serialize}; |  | ||||||
| use serde_json::Value; | use serde_json::Value; | ||||||
| 
 | 
 | ||||||
| #[macro_use] | #[macro_use] | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| //! Types for the *m.presence* event.
 | //! Types for the *m.presence* event.
 | ||||||
| 
 | 
 | ||||||
| use serde_derive::{Deserialize, Serialize}; | use serde::{Deserialize, Serialize}; | ||||||
| 
 | 
 | ||||||
| use ruma_identifiers::UserId; | use ruma_identifiers::UserId; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -3,7 +3,7 @@ | |||||||
| use std::collections::HashMap; | use std::collections::HashMap; | ||||||
| 
 | 
 | ||||||
| use ruma_identifiers::{EventId, RoomId, UserId}; | use ruma_identifiers::{EventId, RoomId, UserId}; | ||||||
| use serde_derive::{Deserialize, Serialize}; | use serde::{Deserialize, Serialize}; | ||||||
| 
 | 
 | ||||||
| event! { | event! { | ||||||
|     /// Informs the client of new receipts.
 |     /// Informs the client of new receipts.
 | ||||||
|  | |||||||
| @ -1,7 +1,7 @@ | |||||||
| //! Types for the *m.room.aliases* event.
 | //! Types for the *m.room.aliases* event.
 | ||||||
| 
 | 
 | ||||||
| use ruma_identifiers::RoomAliasId; | use ruma_identifiers::RoomAliasId; | ||||||
| use serde_derive::{Deserialize, Serialize}; | use serde::{Deserialize, Serialize}; | ||||||
| 
 | 
 | ||||||
| state_event! { | state_event! { | ||||||
|     /// Informs the room about what room aliases it has been given.
 |     /// Informs the room about what room aliases it has been given.
 | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| //! Types for the *m.room.avatar* event.
 | //! Types for the *m.room.avatar* event.
 | ||||||
| 
 | 
 | ||||||
| use serde_derive::{Deserialize, Serialize}; | use serde::{Deserialize, Serialize}; | ||||||
| 
 | 
 | ||||||
| use super::ImageInfo; | use super::ImageInfo; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,7 +1,7 @@ | |||||||
| //! Types for the *m.room.canonical_alias* event.
 | //! Types for the *m.room.canonical_alias* event.
 | ||||||
| 
 | 
 | ||||||
| use ruma_identifiers::RoomAliasId; | use ruma_identifiers::RoomAliasId; | ||||||
| use serde_derive::{Deserialize, Serialize}; | use serde::{Deserialize, Serialize}; | ||||||
| 
 | 
 | ||||||
| state_event! { | state_event! { | ||||||
|     /// Informs the room as to which alias is the canonical one.
 |     /// Informs the room as to which alias is the canonical one.
 | ||||||
|  | |||||||
| @ -1,7 +1,7 @@ | |||||||
| //! Types for the *m.room.create* event.
 | //! Types for the *m.room.create* event.
 | ||||||
| 
 | 
 | ||||||
| use ruma_identifiers::UserId; | use ruma_identifiers::UserId; | ||||||
| use serde_derive::{Deserialize, Serialize}; | use serde::{Deserialize, Serialize}; | ||||||
| 
 | 
 | ||||||
| state_event! { | state_event! { | ||||||
|     /// This is the first event in a room and cannot be changed. It acts as the root of all other
 |     /// This is the first event in a room and cannot be changed. It acts as the root of all other
 | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| //! Types for the *m.room.guest_access* event.
 | //! Types for the *m.room.guest_access* event.
 | ||||||
| 
 | 
 | ||||||
| use serde_derive::{Deserialize, Serialize}; | use serde::{Deserialize, Serialize}; | ||||||
| 
 | 
 | ||||||
| state_event! { | state_event! { | ||||||
|     /// Controls whether guest users are allowed to join rooms.
 |     /// Controls whether guest users are allowed to join rooms.
 | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| //! Types for the *m.room.history_visibility* event.
 | //! Types for the *m.room.history_visibility* event.
 | ||||||
| 
 | 
 | ||||||
| use serde_derive::{Deserialize, Serialize}; | use serde::{Deserialize, Serialize}; | ||||||
| 
 | 
 | ||||||
| state_event! { | state_event! { | ||||||
|     /// This event controls whether a member of a room can see the events that happened in a room
 |     /// This event controls whether a member of a room can see the events that happened in a room
 | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| //! Types for the *m.room.join_rules* event.
 | //! Types for the *m.room.join_rules* event.
 | ||||||
| 
 | 
 | ||||||
| use serde_derive::{Deserialize, Serialize}; | use serde::{Deserialize, Serialize}; | ||||||
| 
 | 
 | ||||||
| state_event! { | state_event! { | ||||||
|     /// Describes how users are allowed to join the room.
 |     /// Describes how users are allowed to join the room.
 | ||||||
|  | |||||||
| @ -2,7 +2,7 @@ | |||||||
| 
 | 
 | ||||||
| use ruma_identifiers::UserId; | use ruma_identifiers::UserId; | ||||||
| use ruma_signatures::Signatures; | use ruma_signatures::Signatures; | ||||||
| use serde_derive::{Deserialize, Serialize}; | use serde::{Deserialize, Serialize}; | ||||||
| 
 | 
 | ||||||
| use crate::stripped::StrippedState; | use crate::stripped::StrippedState; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,7 +1,6 @@ | |||||||
| //! Types for the *m.room.message* event.
 | //! Types for the *m.room.message* event.
 | ||||||
| 
 | 
 | ||||||
| use serde::{de::Error, Deserialize, Deserializer, Serialize, Serializer}; | use serde::{de::Error, Deserialize, Deserializer, Serialize, Serializer}; | ||||||
| use serde_derive::{Deserialize, Serialize}; |  | ||||||
| use serde_json::{from_value, Value}; | use serde_json::{from_value, Value}; | ||||||
| 
 | 
 | ||||||
| use super::{ImageInfo, ThumbnailInfo}; | use super::{ImageInfo, ThumbnailInfo}; | ||||||
|  | |||||||
| @ -2,7 +2,7 @@ | |||||||
| //!
 | //!
 | ||||||
| //! This module also contains types shared by events in its child namespaces.
 | //! This module also contains types shared by events in its child namespaces.
 | ||||||
| 
 | 
 | ||||||
| use serde_derive::{Deserialize, Serialize}; | use serde::{Deserialize, Serialize}; | ||||||
| 
 | 
 | ||||||
| pub mod aliases; | pub mod aliases; | ||||||
| pub mod avatar; | pub mod avatar; | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| //! Types for the *m.room.name* event.
 | //! Types for the *m.room.name* event.
 | ||||||
| 
 | 
 | ||||||
| use serde_derive::{Deserialize, Serialize}; | use serde::{Deserialize, Serialize}; | ||||||
| 
 | 
 | ||||||
| state_event! { | state_event! { | ||||||
|     /// A human-friendly room name designed to be displayed to the end-user.
 |     /// A human-friendly room name designed to be displayed to the end-user.
 | ||||||
|  | |||||||
| @ -1,7 +1,7 @@ | |||||||
| //! Types for the *m.room.pinned_events* event.
 | //! Types for the *m.room.pinned_events* event.
 | ||||||
| 
 | 
 | ||||||
| use ruma_identifiers::EventId; | use ruma_identifiers::EventId; | ||||||
| use serde_derive::{Deserialize, Serialize}; | use serde::{Deserialize, Serialize}; | ||||||
| 
 | 
 | ||||||
| state_event! { | state_event! { | ||||||
|     /// Used to "pin" particular events in a room for other participants to review later.
 |     /// Used to "pin" particular events in a room for other participants to review later.
 | ||||||
|  | |||||||
| @ -3,7 +3,7 @@ | |||||||
| use std::collections::HashMap; | use std::collections::HashMap; | ||||||
| 
 | 
 | ||||||
| use ruma_identifiers::UserId; | use ruma_identifiers::UserId; | ||||||
| use serde_derive::{Deserialize, Serialize}; | use serde::{Deserialize, Serialize}; | ||||||
| 
 | 
 | ||||||
| use crate::EventType; | use crate::EventType; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,7 +1,7 @@ | |||||||
| //! Types for the *m.room.redaction* event.
 | //! Types for the *m.room.redaction* event.
 | ||||||
| 
 | 
 | ||||||
| use ruma_identifiers::EventId; | use ruma_identifiers::EventId; | ||||||
| use serde_derive::{Deserialize, Serialize}; | use serde::{Deserialize, Serialize}; | ||||||
| 
 | 
 | ||||||
| room_event! { | room_event! { | ||||||
|     /// A redaction of an event.
 |     /// A redaction of an event.
 | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| //! Types for the *m.room.third_party_invite* event.
 | //! Types for the *m.room.third_party_invite* event.
 | ||||||
| 
 | 
 | ||||||
| use serde_derive::{Deserialize, Serialize}; | use serde::{Deserialize, Serialize}; | ||||||
| 
 | 
 | ||||||
| state_event! { | state_event! { | ||||||
|     /// An invitation to a room issued to a third party identifier, rather than a matrix user ID.
 |     /// An invitation to a room issued to a third party identifier, rather than a matrix user ID.
 | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| //! Types for the *m.room.topic* event.
 | //! Types for the *m.room.topic* event.
 | ||||||
| 
 | 
 | ||||||
| use serde_derive::{Deserialize, Serialize}; | use serde::{Deserialize, Serialize}; | ||||||
| 
 | 
 | ||||||
| state_event! { | state_event! { | ||||||
|     /// A topic is a short message detailing what is currently being discussed in the room.
 |     /// A topic is a short message detailing what is currently being discussed in the room.
 | ||||||
|  | |||||||
| @ -7,7 +7,6 @@ | |||||||
| 
 | 
 | ||||||
| use ruma_identifiers::UserId; | use ruma_identifiers::UserId; | ||||||
| use serde::{de::Error, Deserialize, Deserializer, Serialize, Serializer}; | use serde::{de::Error, Deserialize, Deserializer, Serialize, Serializer}; | ||||||
| use serde_derive::{Deserialize, Serialize}; |  | ||||||
| use serde_json::{from_value, Value}; | use serde_json::{from_value, Value}; | ||||||
| 
 | 
 | ||||||
| use crate::{ | use crate::{ | ||||||
|  | |||||||
| @ -2,7 +2,7 @@ | |||||||
| 
 | 
 | ||||||
| use std::collections::HashMap; | use std::collections::HashMap; | ||||||
| 
 | 
 | ||||||
| use serde_derive::{Deserialize, Serialize}; | use serde::{Deserialize, Serialize}; | ||||||
| 
 | 
 | ||||||
| event! { | event! { | ||||||
|     /// Informs the client of tags on a room.
 |     /// Informs the client of tags on a room.
 | ||||||
|  | |||||||
| @ -1,7 +1,7 @@ | |||||||
| //! Types for the *m.typing* event.
 | //! Types for the *m.typing* event.
 | ||||||
| 
 | 
 | ||||||
| use ruma_identifiers::{RoomId, UserId}; | use ruma_identifiers::{RoomId, UserId}; | ||||||
| use serde_derive::{Deserialize, Serialize}; | use serde::{Deserialize, Serialize}; | ||||||
| 
 | 
 | ||||||
| event! { | event! { | ||||||
|     /// Informs the client of the list of users currently typing.
 |     /// Informs the client of the list of users currently typing.
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user