Merge pull request #24 from ruma/serde-derive-feature
Replace serde_derive by re-exports in serde
This commit is contained in:
		
						commit
						df63ab3df9
					
				| @ -14,6 +14,8 @@ edition = "2018" | ||||
| [dependencies] | ||||
| ruma-identifiers = "0.11.0" | ||||
| ruma-signatures = "0.4.1" | ||||
| serde = "1.0.80" | ||||
| serde_derive = "1.0.80" | ||||
| serde_json = "1.0.33" | ||||
| serde_json = "1.0.38" | ||||
| 
 | ||||
| [dependencies.serde] | ||||
| version = "1.0.87" | ||||
| features = ["derive"] | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| //! Types for the *m.call.answer* event.
 | ||||
| 
 | ||||
| use serde_derive::{Deserialize, Serialize}; | ||||
| use serde::{Deserialize, Serialize}; | ||||
| 
 | ||||
| use super::SessionDescription; | ||||
| 
 | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| //! Types for the *m.call.candidates* event.
 | ||||
| 
 | ||||
| use serde_derive::{Deserialize, Serialize}; | ||||
| use serde::{Deserialize, Serialize}; | ||||
| 
 | ||||
| room_event! { | ||||
|     /// 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.
 | ||||
| 
 | ||||
| use serde_derive::{Deserialize, Serialize}; | ||||
| use serde::{Deserialize, Serialize}; | ||||
| 
 | ||||
| room_event! { | ||||
|     /// 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.
 | ||||
| 
 | ||||
| use serde_derive::{Deserialize, Serialize}; | ||||
| use serde::{Deserialize, Serialize}; | ||||
| 
 | ||||
| use super::SessionDescription; | ||||
| 
 | ||||
|  | ||||
| @ -2,7 +2,7 @@ | ||||
| //!
 | ||||
| //! 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 candidates; | ||||
|  | ||||
| @ -3,7 +3,7 @@ | ||||
| use std::collections::HashMap; | ||||
| 
 | ||||
| use ruma_identifiers::{RoomId, UserId}; | ||||
| use serde_derive::{Deserialize, Serialize}; | ||||
| use serde::{Deserialize, Serialize}; | ||||
| 
 | ||||
| event! { | ||||
|     /// Informs the client about the rooms that are considered direct by a user.
 | ||||
|  | ||||
| @ -107,7 +107,6 @@ use serde::{ | ||||
|     de::{Error as SerdeError, Visitor}, | ||||
|     Deserialize, Deserializer, Serialize, Serializer, | ||||
| }; | ||||
| use serde_derive::{Deserialize, Serialize}; | ||||
| use serde_json::Value; | ||||
| 
 | ||||
| #[macro_use] | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| //! Types for the *m.presence* event.
 | ||||
| 
 | ||||
| use serde_derive::{Deserialize, Serialize}; | ||||
| use serde::{Deserialize, Serialize}; | ||||
| 
 | ||||
| use ruma_identifiers::UserId; | ||||
| 
 | ||||
|  | ||||
| @ -3,7 +3,7 @@ | ||||
| use std::collections::HashMap; | ||||
| 
 | ||||
| use ruma_identifiers::{EventId, RoomId, UserId}; | ||||
| use serde_derive::{Deserialize, Serialize}; | ||||
| use serde::{Deserialize, Serialize}; | ||||
| 
 | ||||
| event! { | ||||
|     /// Informs the client of new receipts.
 | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| //! Types for the *m.room.aliases* event.
 | ||||
| 
 | ||||
| use ruma_identifiers::RoomAliasId; | ||||
| use serde_derive::{Deserialize, Serialize}; | ||||
| use serde::{Deserialize, Serialize}; | ||||
| 
 | ||||
| state_event! { | ||||
|     /// Informs the room about what room aliases it has been given.
 | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| //! Types for the *m.room.avatar* event.
 | ||||
| 
 | ||||
| use serde_derive::{Deserialize, Serialize}; | ||||
| use serde::{Deserialize, Serialize}; | ||||
| 
 | ||||
| use super::ImageInfo; | ||||
| 
 | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| //! Types for the *m.room.canonical_alias* event.
 | ||||
| 
 | ||||
| use ruma_identifiers::RoomAliasId; | ||||
| use serde_derive::{Deserialize, Serialize}; | ||||
| use serde::{Deserialize, Serialize}; | ||||
| 
 | ||||
| state_event! { | ||||
|     /// Informs the room as to which alias is the canonical one.
 | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| //! Types for the *m.room.create* event.
 | ||||
| 
 | ||||
| use ruma_identifiers::UserId; | ||||
| use serde_derive::{Deserialize, Serialize}; | ||||
| use serde::{Deserialize, Serialize}; | ||||
| 
 | ||||
| state_event! { | ||||
|     /// 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.
 | ||||
| 
 | ||||
| use serde_derive::{Deserialize, Serialize}; | ||||
| use serde::{Deserialize, Serialize}; | ||||
| 
 | ||||
| state_event! { | ||||
|     /// Controls whether guest users are allowed to join rooms.
 | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| //! Types for the *m.room.history_visibility* event.
 | ||||
| 
 | ||||
| use serde_derive::{Deserialize, Serialize}; | ||||
| use serde::{Deserialize, Serialize}; | ||||
| 
 | ||||
| state_event! { | ||||
|     /// 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.
 | ||||
| 
 | ||||
| use serde_derive::{Deserialize, Serialize}; | ||||
| use serde::{Deserialize, Serialize}; | ||||
| 
 | ||||
| state_event! { | ||||
|     /// Describes how users are allowed to join the room.
 | ||||
|  | ||||
| @ -2,7 +2,7 @@ | ||||
| 
 | ||||
| use ruma_identifiers::UserId; | ||||
| use ruma_signatures::Signatures; | ||||
| use serde_derive::{Deserialize, Serialize}; | ||||
| use serde::{Deserialize, Serialize}; | ||||
| 
 | ||||
| use crate::stripped::StrippedState; | ||||
| 
 | ||||
|  | ||||
| @ -1,7 +1,6 @@ | ||||
| //! Types for the *m.room.message* event.
 | ||||
| 
 | ||||
| use serde::{de::Error, Deserialize, Deserializer, Serialize, Serializer}; | ||||
| use serde_derive::{Deserialize, Serialize}; | ||||
| use serde_json::{from_value, Value}; | ||||
| 
 | ||||
| use super::{ImageInfo, ThumbnailInfo}; | ||||
|  | ||||
| @ -2,7 +2,7 @@ | ||||
| //!
 | ||||
| //! 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 avatar; | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| //! Types for the *m.room.name* event.
 | ||||
| 
 | ||||
| use serde_derive::{Deserialize, Serialize}; | ||||
| use serde::{Deserialize, Serialize}; | ||||
| 
 | ||||
| state_event! { | ||||
|     /// 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.
 | ||||
| 
 | ||||
| use ruma_identifiers::EventId; | ||||
| use serde_derive::{Deserialize, Serialize}; | ||||
| use serde::{Deserialize, Serialize}; | ||||
| 
 | ||||
| state_event! { | ||||
|     /// Used to "pin" particular events in a room for other participants to review later.
 | ||||
|  | ||||
| @ -3,7 +3,7 @@ | ||||
| use std::collections::HashMap; | ||||
| 
 | ||||
| use ruma_identifiers::UserId; | ||||
| use serde_derive::{Deserialize, Serialize}; | ||||
| use serde::{Deserialize, Serialize}; | ||||
| 
 | ||||
| use crate::EventType; | ||||
| 
 | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| //! Types for the *m.room.redaction* event.
 | ||||
| 
 | ||||
| use ruma_identifiers::EventId; | ||||
| use serde_derive::{Deserialize, Serialize}; | ||||
| use serde::{Deserialize, Serialize}; | ||||
| 
 | ||||
| room_event! { | ||||
|     /// A redaction of an event.
 | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| //! Types for the *m.room.third_party_invite* event.
 | ||||
| 
 | ||||
| use serde_derive::{Deserialize, Serialize}; | ||||
| use serde::{Deserialize, Serialize}; | ||||
| 
 | ||||
| state_event! { | ||||
|     /// 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.
 | ||||
| 
 | ||||
| use serde_derive::{Deserialize, Serialize}; | ||||
| use serde::{Deserialize, Serialize}; | ||||
| 
 | ||||
| state_event! { | ||||
|     /// A topic is a short message detailing what is currently being discussed in the room.
 | ||||
|  | ||||
| @ -7,7 +7,6 @@ | ||||
| 
 | ||||
| use ruma_identifiers::UserId; | ||||
| use serde::{de::Error, Deserialize, Deserializer, Serialize, Serializer}; | ||||
| use serde_derive::{Deserialize, Serialize}; | ||||
| use serde_json::{from_value, Value}; | ||||
| 
 | ||||
| use crate::{ | ||||
|  | ||||
| @ -2,7 +2,7 @@ | ||||
| 
 | ||||
| use std::collections::HashMap; | ||||
| 
 | ||||
| use serde_derive::{Deserialize, Serialize}; | ||||
| use serde::{Deserialize, Serialize}; | ||||
| 
 | ||||
| event! { | ||||
|     /// Informs the client of tags on a room.
 | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| //! Types for the *m.typing* event.
 | ||||
| 
 | ||||
| use ruma_identifiers::{RoomId, UserId}; | ||||
| use serde_derive::{Deserialize, Serialize}; | ||||
| use serde::{Deserialize, Serialize}; | ||||
| 
 | ||||
| event! { | ||||
|     /// Informs the client of the list of users currently typing.
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user