Issue 128: Convert frame::Reason to struct (#142)
Alter frame::Reason to a struct with a single u32 member. Introduce Constants to the impl for existing Reasons. Change all usage in the library and its tests to adopt this change, using the new constants.
This commit is contained in:
		
				
					committed by
					
						 Carl Lerche
						Carl Lerche
					
				
			
			
				
	
			
			
			
						parent
						
							1c179f7bf2
						
					
				
				
					commit
					2aee78c7d7
				
			| @@ -1,6 +1,5 @@ | ||||
| use codec::{Codec, RecvError}; | ||||
| use frame::{Headers, Pseudo, Reason, Settings, StreamId}; | ||||
| use frame::Reason::*; | ||||
| use proto::{self, WindowSize}; | ||||
|  | ||||
| use bytes::{Bytes, IntoBuf}; | ||||
| @@ -445,7 +444,7 @@ impl proto::Peer for Peer { | ||||
|                 // kinds of errors | ||||
|                 return Err(RecvError::Stream { | ||||
|                     id: stream_id, | ||||
|                     reason: ProtocolError, | ||||
|                     reason: Reason::PROTOCOL_ERROR, | ||||
|                 }); | ||||
|             }, | ||||
|         }; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user