Fix CI by changing where deprecations are added and allowed
This commit is contained in:
		
							parent
							
								
									6a049c93a1
								
							
						
					
					
						commit
						4547da0b7b
					
				| @ -2,6 +2,5 @@ | |||||||
| //!
 | //!
 | ||||||
| //! Send a join event to a resident server.
 | //! Send a join event to a resident server.
 | ||||||
| 
 | 
 | ||||||
| #[deprecated = "Since Matrix Server-Server API r0.1.4. Use the v2 endpoint instead."] |  | ||||||
| pub mod v1; | pub mod v1; | ||||||
| pub mod v2; | pub mod v2; | ||||||
|  | |||||||
| @ -21,6 +21,7 @@ const METADATA: Metadata = metadata! { | |||||||
| 
 | 
 | ||||||
| /// Request type for the `create_join_event` endpoint.
 | /// Request type for the `create_join_event` endpoint.
 | ||||||
| #[request] | #[request] | ||||||
|  | #[deprecated = "Since Matrix Server-Server API r0.1.4. Use the v2 endpoint instead."] | ||||||
| pub struct Request { | pub struct Request { | ||||||
|     /// The room ID that is about to be joined.
 |     /// The room ID that is about to be joined.
 | ||||||
|     ///
 |     ///
 | ||||||
| @ -39,6 +40,7 @@ pub struct Request { | |||||||
| 
 | 
 | ||||||
| /// Response type for the `create_join_event` endpoint.
 | /// Response type for the `create_join_event` endpoint.
 | ||||||
| #[response] | #[response] | ||||||
|  | #[deprecated = "Since Matrix Server-Server API r0.1.4. Use the v2 endpoint instead."] | ||||||
| pub struct Response { | pub struct Response { | ||||||
|     /// Full state and auth chain of the room prior to the join event.
 |     /// Full state and auth chain of the room prior to the join event.
 | ||||||
|     #[ruma_api(body)] |     #[ruma_api(body)] | ||||||
| @ -46,6 +48,7 @@ pub struct Response { | |||||||
|     pub room_state: RoomState, |     pub room_state: RoomState, | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | #[allow(deprecated)] | ||||||
| impl Request { | impl Request { | ||||||
|     /// Creates a new `Request` from the given room ID, event ID and PDU.
 |     /// Creates a new `Request` from the given room ID, event ID and PDU.
 | ||||||
|     pub fn new(room_id: OwnedRoomId, event_id: OwnedEventId, pdu: Box<RawJsonValue>) -> Self { |     pub fn new(room_id: OwnedRoomId, event_id: OwnedEventId, pdu: Box<RawJsonValue>) -> Self { | ||||||
| @ -53,6 +56,7 @@ impl Request { | |||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | #[allow(deprecated)] | ||||||
| impl Response { | impl Response { | ||||||
|     /// Creates a new `Response` with the given room state.
 |     /// Creates a new `Response` with the given room state.
 | ||||||
|     pub fn new(room_state: RoomState) -> Self { |     pub fn new(room_state: RoomState) -> Self { | ||||||
|  | |||||||
| @ -2,6 +2,5 @@ | |||||||
| //!
 | //!
 | ||||||
| //! Submit a signed leave event to the receiving server for it to accept it into the room's graph.
 | //! Submit a signed leave event to the receiving server for it to accept it into the room's graph.
 | ||||||
| 
 | 
 | ||||||
| #[deprecated = "Since Matrix Server-Server API r0.1.4. Use the v2 endpoint instead."] |  | ||||||
| pub mod v1; | pub mod v1; | ||||||
| pub mod v2; | pub mod v2; | ||||||
|  | |||||||
| @ -21,6 +21,7 @@ const METADATA: Metadata = metadata! { | |||||||
| 
 | 
 | ||||||
| /// Request type for the `create_leave_event` endpoint.
 | /// Request type for the `create_leave_event` endpoint.
 | ||||||
| #[request] | #[request] | ||||||
|  | #[deprecated = "Since Matrix Server-Server API r0.1.4. Use the v2 endpoint instead."] | ||||||
| pub struct Request { | pub struct Request { | ||||||
|     /// The room ID that is about to be left.
 |     /// The room ID that is about to be left.
 | ||||||
|     ///
 |     ///
 | ||||||
| @ -40,6 +41,7 @@ pub struct Request { | |||||||
| /// Response type for the `create_leave_event` endpoint.
 | /// Response type for the `create_leave_event` endpoint.
 | ||||||
| #[response] | #[response] | ||||||
| #[derive(Default)] | #[derive(Default)] | ||||||
|  | #[deprecated = "Since Matrix Server-Server API r0.1.4. Use the v2 endpoint instead."] | ||||||
| pub struct Response { | pub struct Response { | ||||||
|     /// An empty object.
 |     /// An empty object.
 | ||||||
|     ///
 |     ///
 | ||||||
| @ -49,6 +51,7 @@ pub struct Response { | |||||||
|     pub empty: Empty, |     pub empty: Empty, | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | #[allow(deprecated)] | ||||||
| impl Request { | impl Request { | ||||||
|     /// Creates a new `Request` from the given room ID, event ID and PDU.
 |     /// Creates a new `Request` from the given room ID, event ID and PDU.
 | ||||||
|     pub fn new(room_id: OwnedRoomId, event_id: OwnedEventId, pdu: Box<RawJsonValue>) -> Self { |     pub fn new(room_id: OwnedRoomId, event_id: OwnedEventId, pdu: Box<RawJsonValue>) -> Self { | ||||||
| @ -56,6 +59,7 @@ impl Request { | |||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | #[allow(deprecated)] | ||||||
| impl Response { | impl Response { | ||||||
|     /// Creates an empty `Response`.
 |     /// Creates an empty `Response`.
 | ||||||
|     pub fn new() -> Self { |     pub fn new() -> Self { | ||||||
|  | |||||||
| @ -272,7 +272,6 @@ impl Request { | |||||||
|         let path_fields = self.path_fields().map(|f| f.ident.as_ref().unwrap().to_string()); |         let path_fields = self.path_fields().map(|f| f.ident.as_ref().unwrap().to_string()); | ||||||
|         let mut tests = quote! { |         let mut tests = quote! { | ||||||
|             #[::std::prelude::v1::test] |             #[::std::prelude::v1::test] | ||||||
|             #[allow(deprecated)] |  | ||||||
|             fn path_parameters() { |             fn path_parameters() { | ||||||
|                 let path_params = super::METADATA._path_parameters(); |                 let path_params = super::METADATA._path_parameters(); | ||||||
|                 let request_path_fields: &[&::std::primitive::str] = &[#(#path_fields),*]; |                 let request_path_fields: &[&::std::primitive::str] = &[#(#path_fields),*]; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user