Re-run 'cargo fmt'
This commit is contained in:
		
							parent
							
								
									7a7697e9e2
								
							
						
					
					
						commit
						586bca680d
					
				| @ -15,7 +15,8 @@ extern crate ruma_identifiers; | ||||
| extern crate ruma_signatures; | ||||
| extern crate serde; | ||||
| extern crate serde_json; | ||||
| #[macro_use] extern crate serde_derive; | ||||
| #[macro_use] | ||||
| extern crate serde_derive; | ||||
| extern crate serde_urlencoded; | ||||
| extern crate url; | ||||
| 
 | ||||
|  | ||||
| @ -81,7 +81,7 @@ pub mod register { | ||||
|         #[serde(rename = "type")] | ||||
|         kind: String, | ||||
|         /// The value of the session key given by the homeserver.
 | ||||
|         session: Option<String> | ||||
|         session: Option<String>, | ||||
|     } | ||||
| 
 | ||||
|     /// The kind of account being registered.
 | ||||
| @ -90,10 +90,10 @@ pub mod register { | ||||
|         /// A guest account
 | ||||
|         ///
 | ||||
|         /// These accounts may have limited permissions and may not be supported by all servers.
 | ||||
|         #[serde(rename="guest")] | ||||
|         #[serde(rename = "guest")] | ||||
|         Guest, | ||||
|         /// A regular user account
 | ||||
|         #[serde(rename="user")] | ||||
|         #[serde(rename = "user")] | ||||
|         User, | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -40,7 +40,7 @@ pub mod set_room_account_data { | ||||
| } | ||||
| 
 | ||||
| /// [PUT /_matrix/client/r0/user/{userId}/account_data/{type}](https://matrix.org/docs/spec/client_server/r0.2.0.html#put-matrix-client-r0-user-userid-account-data-type)
 | ||||
| pub mod set_global_account_data  { | ||||
| pub mod set_global_account_data { | ||||
|     use ruma_api_macros::ruma_api; | ||||
|     use ruma_identifiers::UserId; | ||||
|     use serde_json::Value; | ||||
|  | ||||
| @ -67,7 +67,7 @@ pub mod get_contacts { | ||||
|     #[derive(Clone, Copy, Debug, Deserialize, Serialize)] | ||||
|     pub enum Medium { | ||||
|         /// An email address.
 | ||||
|         #[serde(rename="email")] | ||||
|         #[serde(rename = "email")] | ||||
|         Email, | ||||
|     } | ||||
| 
 | ||||
|  | ||||
| @ -2,9 +2,9 @@ | ||||
| 
 | ||||
| /// [GET /_matrix/client/r0/rooms/{roomId}/context/{eventId}](https://matrix.org/docs/spec/client_server/r0.2.0.html#get-matrix-client-r0-rooms-roomid-context-eventid)
 | ||||
| pub mod get_context { | ||||
|     use ruma_identifiers::{EventId, RoomId}; | ||||
|     use ruma_events::collections::only; | ||||
|     use ruma_api_macros::ruma_api; | ||||
|     use ruma_events::collections::only; | ||||
|     use ruma_identifiers::{EventId, RoomId}; | ||||
| 
 | ||||
|     ruma_api! { | ||||
|         metadata { | ||||
|  | ||||
| @ -2,8 +2,8 @@ | ||||
| 
 | ||||
| /// [GET /_matrix/client/r0/publicRooms](https://matrix.org/docs/spec/client_server/r0.2.0.html#get-matrix-client-r0-publicrooms)
 | ||||
| pub mod get_public_rooms { | ||||
|     use ruma_identifiers::{RoomId, RoomAliasId}; | ||||
|     use ruma_api_macros::ruma_api; | ||||
|     use ruma_identifiers::{RoomAliasId, RoomId}; | ||||
| 
 | ||||
|     ruma_api! { | ||||
|         metadata { | ||||
|  | ||||
| @ -22,7 +22,7 @@ pub struct ThirdPartySigned { | ||||
| /// [POST /_matrix/client/r0/rooms/{roomId}/invite](https://matrix.org/docs/spec/client_server/r0.2.0.html#post-matrix-client-r0-rooms-roomid-invite)
 | ||||
| pub mod invite_user { | ||||
|     use ruma_api_macros::ruma_api; | ||||
|     use ruma_identifiers::{UserId, RoomId}; | ||||
|     use ruma_identifiers::{RoomId, UserId}; | ||||
| 
 | ||||
|     ruma_api! { | ||||
|         metadata { | ||||
|  | ||||
| @ -3,8 +3,8 @@ | ||||
| /// [PUT /_matrix/client/r0/presence/{userId}/status](https://matrix.org/docs/spec/client_server/r0.2.0.html#put-matrix-client-r0-presence-userid-status)
 | ||||
| pub mod set_presence { | ||||
|     use ruma_api_macros::ruma_api; | ||||
|     use ruma_identifiers::UserId; | ||||
|     use ruma_events::presence::PresenceState; | ||||
|     use ruma_identifiers::UserId; | ||||
| 
 | ||||
|     ruma_api! { | ||||
|         metadata { | ||||
|  | ||||
| @ -3,7 +3,7 @@ | ||||
| /// [PUT /_matrix/client/r0/rooms/{roomId}/redact/{eventId}/{txnId}](https://matrix.org/docs/spec/client_server/r0.2.0.html#put-matrix-client-r0-rooms-roomid-redact-eventid-txnid)
 | ||||
| pub mod redact_event { | ||||
|     use ruma_api_macros::ruma_api; | ||||
|     use ruma_identifiers::{RoomId, EventId}; | ||||
|     use ruma_identifiers::{EventId, RoomId}; | ||||
| 
 | ||||
|     ruma_api! { | ||||
|         metadata { | ||||
|  | ||||
| @ -2,8 +2,8 @@ | ||||
| 
 | ||||
| /// [POST /_matrix/client/r0/createRoom](https://matrix.org/docs/spec/client_server/r0.2.0.html#post-matrix-client-r0-createroom)
 | ||||
| pub mod create_room { | ||||
|     use ruma_identifiers::{RoomId, UserId}; | ||||
|     use ruma_api_macros::ruma_api; | ||||
|     use ruma_identifiers::{RoomId, UserId}; | ||||
| 
 | ||||
|     ruma_api! { | ||||
|         metadata { | ||||
| @ -59,7 +59,7 @@ pub mod create_room { | ||||
|         /// Whether users on other servers can join this room.
 | ||||
|         ///
 | ||||
|         /// Defaults to `true` if key does not exist.
 | ||||
|         #[serde(rename="m.federate")] | ||||
|         #[serde(rename = "m.federate")] | ||||
|         #[serde(skip_serializing_if = "Option::is_none")] | ||||
|         pub federate: Option<bool>, | ||||
|     } | ||||
| @ -68,13 +68,13 @@ pub mod create_room { | ||||
|     #[derive(Clone, Copy, Debug, Deserialize, Serialize)] | ||||
|     pub enum RoomPreset { | ||||
|         /// `join_rules` is set to `invite` and `history_visibility` is set to `shared`.
 | ||||
|         #[serde(rename="private_chat")] | ||||
|         #[serde(rename = "private_chat")] | ||||
|         PrivateChat, | ||||
|         /// `join_rules` is set to `public` and `history_visibility` is set to `shared`.
 | ||||
|         #[serde(rename="public_chat")] | ||||
|         #[serde(rename = "public_chat")] | ||||
|         PublicChat, | ||||
|         /// Same as `PrivateChat`, but all initial invitees get the same power level as the creator.
 | ||||
|         #[serde(rename="trusted_private_chat")] | ||||
|         #[serde(rename = "trusted_private_chat")] | ||||
|         TrustedPrivateChat, | ||||
|     } | ||||
| 
 | ||||
|  | ||||
| @ -41,7 +41,7 @@ pub mod search_events { | ||||
|     pub struct Categories { | ||||
|         /// Criteria for searching a category of events.
 | ||||
|         #[serde(skip_serializing_if = "Option::is_none")] | ||||
|         pub room_events: Option<Criteria> | ||||
|         pub room_events: Option<Criteria>, | ||||
|     } | ||||
| 
 | ||||
|     /// Criteria for searching a category of events.
 | ||||
| @ -107,17 +107,17 @@ pub mod search_events { | ||||
|     #[derive(Clone, Debug, Deserialize, Serialize)] | ||||
|     pub struct Grouping { | ||||
|         /// The key within events to use for this grouping.
 | ||||
|         pub key: GroupingKey | ||||
|         pub key: GroupingKey, | ||||
|     } | ||||
| 
 | ||||
|     /// The key within events to use for this grouping.
 | ||||
|     #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)] | ||||
|     pub enum GroupingKey { | ||||
|         /// `room_id`
 | ||||
|         #[serde(rename="room_id")] | ||||
|         #[serde(rename = "room_id")] | ||||
|         RoomId, | ||||
|         /// `sender`
 | ||||
|         #[serde(rename="sender")] | ||||
|         #[serde(rename = "sender")] | ||||
|         Sender, | ||||
|     } | ||||
| 
 | ||||
| @ -132,13 +132,13 @@ pub mod search_events { | ||||
|     #[derive(Clone, Copy, Debug, Deserialize, Serialize)] | ||||
|     pub enum SearchKeys { | ||||
|         /// content.body
 | ||||
|         #[serde(rename="content.body")] | ||||
|         #[serde(rename = "content.body")] | ||||
|         ContentBody, | ||||
|         /// content.name
 | ||||
|         #[serde(rename="content.name")] | ||||
|         #[serde(rename = "content.name")] | ||||
|         ContentName, | ||||
|         /// content.topic
 | ||||
|         #[serde(rename="content.topic")] | ||||
|         #[serde(rename = "content.topic")] | ||||
|         ContentTopic, | ||||
|     } | ||||
| 
 | ||||
| @ -147,10 +147,10 @@ pub mod search_events { | ||||
|     pub enum OrderBy { | ||||
|         /// Prioritize events by a numerical ranking of how closely they matched the search
 | ||||
|         /// criteria.
 | ||||
|         #[serde(rename="rank")] | ||||
|         #[serde(rename = "rank")] | ||||
|         Rank, | ||||
|         /// Prioritize recent events.
 | ||||
|         #[serde(rename="recent")] | ||||
|         #[serde(rename = "recent")] | ||||
|         Recent, | ||||
|     } | ||||
| 
 | ||||
|  | ||||
| @ -3,8 +3,8 @@ | ||||
| /// [PUT /_matrix/client/r0/rooms/{roomId}/state/{eventType}](https://matrix.org/docs/spec/client_server/r0.2.0.html#put-matrix-client-r0-rooms-roomid-state-eventtype)
 | ||||
| pub mod send_state_event_for_empty_key { | ||||
|     use ruma_api_macros::ruma_api; | ||||
|     use ruma_identifiers::{RoomId, EventId}; | ||||
|     use ruma_events::EventType; | ||||
|     use ruma_identifiers::{EventId, RoomId}; | ||||
|     use serde_json::Value; | ||||
| 
 | ||||
|     ruma_api! { | ||||
| @ -39,8 +39,8 @@ pub mod send_state_event_for_empty_key { | ||||
| /// [PUT /_matrix/client/r0/rooms/{roomId}/state/{eventType}/{stateKey}](https://matrix.org/docs/spec/client_server/r0.2.0.html#put-matrix-client-r0-rooms-roomid-state-eventtype-statekey)
 | ||||
| pub mod send_state_event_for_key { | ||||
|     use ruma_api_macros::ruma_api; | ||||
|     use ruma_identifiers::{RoomId, EventId}; | ||||
|     use ruma_events::EventType; | ||||
|     use ruma_identifiers::{EventId, RoomId}; | ||||
|     use serde_json::Value; | ||||
| 
 | ||||
|     ruma_api! { | ||||
| @ -78,9 +78,9 @@ pub mod send_state_event_for_key { | ||||
| /// [PUT /_matrix/client/r0/rooms/{roomId}/send/{eventType}/{txnId}](https://matrix.org/docs/spec/client_server/r0.2.0.html#put-matrix-client-r0-rooms-roomid-send-eventtype-txnid)
 | ||||
| pub mod send_message_event { | ||||
|     use ruma_api_macros::ruma_api; | ||||
|     use ruma_identifiers::{RoomId, EventId}; | ||||
|     use ruma_events::EventType; | ||||
|     use ruma_events::room::message::MessageEventContent; | ||||
|     use ruma_events::EventType; | ||||
|     use ruma_identifiers::{EventId, RoomId}; | ||||
| 
 | ||||
|     ruma_api! { | ||||
|         metadata { | ||||
|  | ||||
| @ -186,10 +186,10 @@ pub mod get_message_events { | ||||
|     #[derive(Clone, Debug, Deserialize, Serialize)] | ||||
|     pub enum Direction { | ||||
|         /// Return events backwards in time from the requested `from` token.
 | ||||
|         #[serde(rename="b")] | ||||
|         #[serde(rename = "b")] | ||||
|         Backward, | ||||
|         /// Return events forwards in time from the requested `from` token.
 | ||||
|         #[serde(rename="f")] | ||||
|         #[serde(rename = "f")] | ||||
|         Forward, | ||||
|     } | ||||
| } | ||||
| @ -199,7 +199,10 @@ pub mod sync_events { | ||||
|     use std::collections::HashMap; | ||||
| 
 | ||||
|     use ruma_api_macros::ruma_api; | ||||
|     use ruma_events::{collections::{all, only}, stripped}; | ||||
|     use ruma_events::{ | ||||
|         collections::{all, only}, | ||||
|         stripped, | ||||
|     }; | ||||
|     use ruma_identifiers::RoomId; | ||||
| 
 | ||||
|     use r0::filter::FilterDefinition; | ||||
| @ -252,7 +255,7 @@ pub mod sync_events { | ||||
|     #[derive(Clone, Debug, Deserialize, Serialize)] | ||||
|     pub enum SetPresence { | ||||
|         /// Do not set the presence of the user calling this API.
 | ||||
|         #[serde(rename="offline")] | ||||
|         #[serde(rename = "offline")] | ||||
|         Offline, | ||||
|     } | ||||
| 
 | ||||
|  | ||||
| @ -4,7 +4,7 @@ | ||||
| pub mod create_tag { | ||||
|     use ruma_api_macros::ruma_api; | ||||
|     use ruma_events::tag::TagInfo; | ||||
|     use ruma_identifiers::{UserId, RoomId}; | ||||
|     use ruma_identifiers::{RoomId, UserId}; | ||||
| 
 | ||||
|     ruma_api! { | ||||
|         metadata { | ||||
| @ -39,7 +39,7 @@ pub mod create_tag { | ||||
| pub mod get_tags { | ||||
|     use ruma_api_macros::ruma_api; | ||||
|     use ruma_events::tag::TagEventContent; | ||||
|     use ruma_identifiers::{UserId, RoomId}; | ||||
|     use ruma_identifiers::{RoomId, UserId}; | ||||
| 
 | ||||
|     ruma_api! { | ||||
|         metadata { | ||||
| @ -70,7 +70,7 @@ pub mod get_tags { | ||||
| /// [DELETE /_matrix/client/r0/user/{userId}/rooms/{roomId}/tags/{tag}](https://matrix.org/docs/spec/client_server/r0.2.0.html#delete-matrix-client-r0-user-userid-rooms-roomid-tags-tag)
 | ||||
| pub mod delete_tag { | ||||
|     use ruma_api_macros::ruma_api; | ||||
|     use ruma_identifiers::{UserId, RoomId}; | ||||
|     use ruma_identifiers::{RoomId, UserId}; | ||||
| 
 | ||||
|     ruma_api! { | ||||
|         metadata { | ||||
|  | ||||
| @ -3,7 +3,7 @@ | ||||
| /// [PUT /_matrix/client/r0/rooms/{roomId}/typing/{userId}](https://matrix.org/docs/spec/client_server/r0.2.0.html#put-matrix-client-r0-rooms-roomid-typing-userid)
 | ||||
| pub mod create_typing_event { | ||||
|     use ruma_api_macros::ruma_api; | ||||
|     use ruma_identifiers::{UserId, RoomId}; | ||||
|     use ruma_identifiers::{RoomId, UserId}; | ||||
| 
 | ||||
|     ruma_api! { | ||||
|         metadata { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user