Configure rustfmt for nested imports, re-run 'cargo fmt'
This commit is contained in:
		
							parent
							
								
									033c04fd12
								
							
						
					
					
						commit
						9d1e8180b8
					
				
							
								
								
									
										1
									
								
								.rustfmt.toml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								.rustfmt.toml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | |||||||
|  | merge_imports = true | ||||||
							
								
								
									
										13
									
								
								src/lib.rs
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								src/lib.rs
									
									
									
									
									
								
							| @ -26,8 +26,7 @@ extern crate serde_urlencoded; | |||||||
| #[cfg(test)] | #[cfg(test)] | ||||||
| extern crate url; | extern crate url; | ||||||
| 
 | 
 | ||||||
| use std::convert::TryInto; | use std::{convert::TryInto, io}; | ||||||
| use std::io; |  | ||||||
| 
 | 
 | ||||||
| use futures::future::FutureFrom; | use futures::future::FutureFrom; | ||||||
| use http::{Method, Request, Response, StatusCode}; | use http::{Method, Request, Response, StatusCode}; | ||||||
| @ -137,9 +136,9 @@ mod tests { | |||||||
|         use std::convert::TryFrom; |         use std::convert::TryFrom; | ||||||
| 
 | 
 | ||||||
|         use futures::future::{err, ok, FutureFrom, FutureResult}; |         use futures::future::{err, ok, FutureFrom, FutureResult}; | ||||||
|         use http::header::CONTENT_TYPE; |         use http::{ | ||||||
|         use http::method::Method; |             header::CONTENT_TYPE, method::Method, Request as HttpRequest, Response as HttpResponse, | ||||||
|         use http::{Request as HttpRequest, Response as HttpResponse}; |         }; | ||||||
|         use ruma_identifiers::{RoomAliasId, RoomId}; |         use ruma_identifiers::{RoomAliasId, RoomId}; | ||||||
|         use serde::de::{Deserialize, IntoDeserializer}; |         use serde::de::{Deserialize, IntoDeserializer}; | ||||||
|         use serde_json; |         use serde_json; | ||||||
| @ -220,9 +219,7 @@ mod tests { | |||||||
|                     room_id: request_body.room_id, |                     room_id: request_body.room_id, | ||||||
|                     room_alias: { |                     room_alias: { | ||||||
|                         let segment = path_segments.get(5).unwrap().as_bytes(); |                         let segment = path_segments.get(5).unwrap().as_bytes(); | ||||||
|                         let decoded = |                         let decoded = percent_encoding::percent_decode(segment).decode_utf8_lossy(); | ||||||
|                             percent_encoding::percent_decode(segment) |  | ||||||
|                             .decode_utf8_lossy(); |  | ||||||
|                         RoomAliasId::deserialize(decoded.into_deserializer()) |                         RoomAliasId::deserialize(decoded.into_deserializer()) | ||||||
|                             .map_err(|e: serde_json::error::Error| e)? |                             .map_err(|e: serde_json::error::Error| e)? | ||||||
|                     }, |                     }, | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user