bors[bot] 
							
						 
					 
					
						
						
						
						
							
						
						
							199ed02274 
							
						 
					 
					
						
						
							
							Merge  #30  
						
						... 
						
						
						
						30: Support deserializing a (keyword) string into a unit-only enum r=nox a=smangelsdorf
This adds support for deserializing a structure such as:
```rust
#[derive(Serialize, Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
enum SortOrder {
    Asc,
    Desc,
}
#[derive(Serialize, Deserialize, Debug)]
struct SearchOptions {
    sort: SortOrder,
}
```
This is already supported for serialization (and I've added a test case for the existing support as part of this PR), but attempting to deserialize the string `"sort=asc"` would result in the error:
```
invalid type: string "asc", expected enum SortOrder
```
I've made a sample in the playground of the way this is handled in `serde_urlencoded` vs `serde_json`: https://play.rust-lang.org/?gist=75fc1e5bbbc1eec29a472373d47488a0&version=stable 
This brings the behaviour in line with the way `serde_json` currently handles this case, which I hope is appropriate. Happy to tweak the behaviour if there's a better way to handle it.
Co-authored-by: Shaun Mangelsdorf <s.mangelsdorf@gmail.com> 
						
						
					 
					
						2018-08-14 10:53:15 +00:00 
						 
				 
			
				
					
						
							
							
								Shaun Mangelsdorf 
							
						 
					 
					
						
						
						
						
							
						
						
							4d220818f7 
							
						 
					 
					
						
						
							
							Implement deserialization into unit enums  
						
						
						
						
					 
					
						2018-08-14 12:52:36 +02:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							78b0d1e054 
							
						 
					 
					
						
						
							
							Update Diesel integration to Diesel 1.0.  
						
						
						
						
					 
					
						2018-06-10 01:05:32 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							7ba979a411 
							
						 
					 
					
						
						
							
							Derive more traits for Error.  
						
						
						
						
					 
					
						2018-05-24 04:04:19 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							c31794f581 
							
						 
					 
					
						
						
							
							Use new rand 0.5 API.  
						
						
						
						
					 
					
						2018-05-24 04:04:08 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							b994d16203 
							
						 
					 
					
						
						
							
							Bump dependencies.  
						
						
						
						
					 
					
						2018-05-24 03:43:15 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							d042f63146 
							
						 
					 
					
						
						
							
							Update dependencies and convert to ruma-api-macros 0.2.  
						
						
						
						
					 
					
						2018-05-19 02:28:43 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							adf785ffc9 
							
						 
					 
					
						
						
							
							Bump version to 0.2.2.  
						
						
						
						
					 
					
						2018-05-19 02:16:10 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							f744e0813d 
							
						 
					 
					
						
						
							
							Upgrade dependencies.  
						
						
						
						
					 
					
						2018-05-19 02:15:51 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							527562c760 
							
						 
					 
					
						
						
							
							Bump version to 0.2.1.  
						
						
						
						
					 
					
						2018-05-19 02:08:44 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							1bedd5af4e 
							
						 
					 
					
						
						
							
							Request body must always be a Vec<u8>.  
						
						
						
						
					 
					
						2018-05-19 02:08:44 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							ff30a4381a 
							
						 
					 
					
						
						
							
							Use fields stripped of serde attributes.  
						
						
						
						
					 
					
						2018-05-19 02:08:44 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							621b73bd6f 
							
						 
					 
					
						
						
							
							Add missing commas after each query field.  
						
						
						
						
					 
					
						2018-05-19 02:08:44 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							1678ee2cea 
							
						 
					 
					
						
						
							
							Ignore attributes that aren't Meta::Lists.  
						
						
						
						
					 
					
						2018-05-19 02:08:44 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							eb46147942 
							
						 
					 
					
						
						
							
							Bump version to 0.10.0.  
						
						
						
						
					 
					
						2018-05-19 00:12:28 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							799d8e8d77 
							
						 
					 
					
						
						
							
							Merge pull request  #10  from florianjacob/update_feature_flags  
						
						... 
						
						
						
						remove conservative_impl_trait feature flag 
						
						
					 
					
						2018-05-19 00:11:05 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							4bc916556f 
							
						 
					 
					
						
						
							
							Merge pull request  #6  from florianjacob/update_proc_macros2  
						
						... 
						
						
						
						update proc_macro2 to fix build with current nightly 
						
						
					 
					
						2018-05-19 00:09:49 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							3acc5c3a93 
							
						 
					 
					
						
						
							
							Run rustfmt.  
						
						
						
						
					 
					
						2018-05-18 23:54:13 -07:00 
						 
				 
			
				
					
						
							
							
								Florian Jacob 
							
						 
					 
					
						
						
						
						
							
						
						
							dcd259c1ca 
							
						 
					 
					
						
						
							
							update proc_macro2 to fix build with current nightly  
						
						
						
						
					 
					
						2018-05-18 13:01:16 +02:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							f9c30c7052 
							
						 
					 
					
						
						
							
							Merge pull request  #2  from florianjacob/fix-statuscode-error  
						
						... 
						
						
						
						Throw StatusCode error if http request was not successful 
						
						
					 
					
						2018-05-18 01:30:58 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							601f00e820 
							
						 
					 
					
						
						
							
							Merge pull request  #9  from mujx/matrix-events-update  
						
						... 
						
						
						
						Update matrix events to their latest version 
						
						
					 
					
						2018-05-18 01:29:16 -07:00 
						 
				 
			
				
					
						
							
							
								Florian Jacob 
							
						 
					 
					
						
						
						
						
							
						
						
							c59b43d027 
							
						 
					 
					
						
						
							
							Throw StatusCode error if http response is non-success  
						
						... 
						
						
						
						to prevent a misleading deserialization error on error responses. 
						
						
					 
					
						2018-05-18 09:08:33 +02:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							745d493e01 
							
						 
					 
					
						
						
							
							Merge pull request  #24  from musoke/master  
						
						... 
						
						
						
						r0.3.0/login: Add device_id to request & response 
						
						
					 
					
						2018-05-17 21:42:57 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							e314e51d00 
							
						 
					 
					
						
						
							
							Merge pull request  #26  from florianjacob/room_members_require_authentication  
						
						... 
						
						
						
						/rooms/{room_id}/members requires authentication 
						
						
					 
					
						2018-05-17 21:25:46 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							d384c1175e 
							
						 
					 
					
						
						
							
							Merge pull request  #25  from florianjacob/room-filter-typo  
						
						... 
						
						
						
						RoomFilter: fix typo 
						
						
					 
					
						2018-05-17 21:25:11 -07:00 
						 
				 
			
				
					
						
							
							
								Florian Jacob 
							
						 
					 
					
						
						
						
						
							
						
						
							ca99939ca6 
							
						 
					 
					
						
						
							
							/rooms/{room_id}/members requires authentication  
						
						... 
						
						
						
						it was just an omission from the spec.
See https://github.com/matrix-org/matrix-doc/pull/1244  
						
						
					 
					
						2018-05-17 19:08:21 +02:00 
						 
				 
			
				
					
						
							
							
								Florian Jacob 
							
						 
					 
					
						
						
						
						
							
						
						
							000b4af1b2 
							
						 
					 
					
						
						
							
							RoomFilter: fix typo  
						
						... 
						
						
						
						nevertheless a breaking change 
						
						
					 
					
						2018-05-17 17:48:09 +02:00 
						 
				 
			
				
					
						
							
							
								Florian Jacob 
							
						 
					 
					
						
						
						
						
							
						
						
							bb96b002d8 
							
						 
					 
					
						
						
							
							[feature(conservative_impl_trait)] is stable since rust 1.26  
						
						
						
						
					 
					
						2018-05-17 17:37:58 +02:00 
						 
				 
			
				
					
						
							
							
								bors[bot] 
							
						 
					 
					
						
						
						
						
							
						
						
							3ae5332931 
							
						 
					 
					
						
						
							
							Merge  #32  
						
						... 
						
						
						
						32: Bump version to 0.5.2 r=nox a=nox
Co-authored-by: Anthony Ramine <n.oxyde@gmail.com> 
						
						
					 
					
						2018-05-16 10:19:15 +00:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							29f2d2fd7f 
							
						 
					 
					
						
						
							
							Bump version to 0.2.0.  
						
						
						
						
					 
					
						2018-05-16 01:48:15 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							ef32a2f9c1 
							
						 
					 
					
						
						
							
							Convert between HeaderValue and the declared type.  
						
						
						
						
					 
					
						2018-05-16 01:43:17 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							e3cf7a38a1 
							
						 
					 
					
						
						
							
							Remove code for building full bodies from streams.  
						
						
						
						
					 
					
						2018-05-16 01:21:59 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							a27adc2f73 
							
						 
					 
					
						
						
							
							Use Vec<u8> for request and response bodies. Use http's API for creating requests and responses.  
						
						
						
						
					 
					
						2018-05-16 01:11:37 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							c9454caff1 
							
						 
					 
					
						
						
							
							Update request/response header logic for new style.  
						
						
						
						
					 
					
						2018-05-16 00:40:51 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							f0f4f9bd17 
							
						 
					 
					
						
						
							
							Detect header attributes as name/value pairs.  
						
						
						
						
					 
					
						2018-05-15 22:57:06 -07:00 
						 
				 
			
				
					
						
							
							
								Anthony Ramine 
							
						 
					 
					
						
						
						
						
							
						
						
							147bc9d93f 
							
						 
					 
					
						
						
							
							Bump version to 0.5.2  
						
						
						
						
					 
					
						2018-05-15 22:19:04 +02:00 
						 
				 
			
				
					
						
							
							
								bors[bot] 
							
						 
					 
					
						
						
						
						
							
						
						
							f1499760e3 
							
						 
					 
					
						
						
							
							Merge  #31  
						
						... 
						
						
						
						31: Bump itoa dep to 0.4.0 r=nox a=alex
Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com> 
						
						
					 
					
						2018-05-15 19:58:04 +00:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							a035c233be 
							
						 
					 
					
						
						
							
							Remove remaining references to hyper and use new header style in docs.  
						
						
						
						
					 
					
						2018-05-15 01:49:42 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							7b1e22eea4 
							
						 
					 
					
						
						
							
							Rewrite Api's ToTokens impl to avoid calls to append_all with string literals.  
						
						
						
						
					 
					
						2018-05-15 01:32:38 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							5bc253b324 
							
						 
					 
					
						
						
							
							Rewrite request and response ToTokens to avoid calls to append_all with string literals.  
						
						
						
						
					 
					
						2018-05-15 01:32:38 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							f6b6c94675 
							
						 
					 
					
						
						
							
							Preserve span information for fields.  
						
						
						
						
					 
					
						2018-05-13 00:23:57 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							c86cdb29b3 
							
						 
					 
					
						
						
							
							Fix another bug and use a more useful variable name for named path segments.  
						
						
						
						
					 
					
						2018-05-13 00:09:39 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							38746660b6 
							
						 
					 
					
						
						
							
							Use a custom parser for the raw input.  
						
						
						
						
					 
					
						2018-05-12 23:56:23 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							8f6bc5af77 
							
						 
					 
					
						
						
							
							Fix remaining compiler errors.  
						
						
						
						
					 
					
						2018-05-11 08:50:39 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							09e377d68e 
							
						 
					 
					
						
						
							
							Extract relevant types out of the metadata's fields.  
						
						
						
						
					 
					
						2018-05-04 20:13:34 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							dfaf1c7da1 
							
						 
					 
					
						
						
							
							Rearrange some code.  
						
						
						
						
					 
					
						2018-05-04 19:39:48 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							5e9a3be5d4 
							
						 
					 
					
						
						
							
							Simplify code with ToTokens::into_tokens.  
						
						
						
						
					 
					
						2018-05-04 19:31:42 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							2a84e038c4 
							
						 
					 
					
						
						
							
							Remove parse module.  
						
						
						
						
					 
					
						2018-05-04 18:53:03 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							4c46df9a59 
							
						 
					 
					
						
						
							
							Update strip_serde_attrs, uncomment code.  
						
						
						
						
					 
					
						2018-05-04 18:50:22 -07:00 
						 
				 
			
				
					
						
							
							
								Jimmy Cuadra 
							
						 
					 
					
						
						
						
						
							
						
						
							ab106f75ac 
							
						 
					 
					
						
						
							
							ExprStruct --> Response  
						
						
						
						
					 
					
						2018-05-04 18:46:48 -07:00