Disallow nightly failures (#115)
Always install rustfmt since nightly may change underneath it, causing linking to break. Apply rustfmt
This commit is contained in:
		
				
					committed by
					
						 Sean McArthur
						Sean McArthur
					
				
			
			
				
	
			
			
			
						parent
						
							a72a6bc8f0
						
					
				
				
					commit
					dad113e17b
				
			| @@ -187,7 +187,10 @@ impl Builder { | ||||
|     #[cfg(feature = "unstable")] | ||||
|     pub fn initial_stream_id(&mut self, stream_id: u32) -> &mut Self { | ||||
|         self.stream_id = stream_id.into(); | ||||
|         assert!(self.stream_id.is_client_initiated(), "stream id must be odd"); | ||||
|         assert!( | ||||
|             self.stream_id.is_client_initiated(), | ||||
|             "stream id must be odd" | ||||
|         ); | ||||
|         self | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -148,8 +148,8 @@ impl<T> FramedRead<T> { | ||||
|                 let _ = bytes.split_to(frame::HEADER_LEN); | ||||
|  | ||||
|                 // Parse the frame w/o parsing the payload | ||||
|                 let (mut push, payload) = frame::PushPromise::load(head, bytes) | ||||
|                     .map_err(|_| Connection(ProtocolError))?; | ||||
|                 let (mut push, payload) = | ||||
|                     frame::PushPromise::load(head, bytes).map_err(|_| Connection(ProtocolError))?; | ||||
|  | ||||
|                 if push.is_end_headers() { | ||||
|                     // Load the HPACK encoded headers & return the frame | ||||
| @@ -174,7 +174,6 @@ impl<T> FramedRead<T> { | ||||
|  | ||||
|                     return Ok(None); | ||||
|                 } | ||||
|  | ||||
|             }, | ||||
|             Kind::Priority => { | ||||
|                 if head.stream_id() == 0 { | ||||
| @@ -313,7 +312,11 @@ impl Continuable { | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     fn load_hpack(&mut self, src: BytesMut, decoder: &mut hpack::Decoder) -> Result<(), frame::Error> { | ||||
|     fn load_hpack( | ||||
|         &mut self, | ||||
|         src: BytesMut, | ||||
|         decoder: &mut hpack::Decoder, | ||||
|     ) -> Result<(), frame::Error> { | ||||
|         match *self { | ||||
|             Continuable::Headers(ref mut h) => h.load_hpack(src, decoder), | ||||
|             Continuable::PushPromise(ref mut p) => p.load_hpack(src, decoder), | ||||
|   | ||||
| @@ -61,7 +61,7 @@ where | ||||
|     pub fn new( | ||||
|         codec: Codec<T, Prioritized<B::Buf>>, | ||||
|         settings: &frame::Settings, | ||||
|         next_stream_id: frame::StreamId | ||||
|         next_stream_id: frame::StreamId, | ||||
|     ) -> Connection<T, P, B> { | ||||
|         let streams = Streams::new(streams::Config { | ||||
|             local_init_window_sz: settings | ||||
|   | ||||
| @@ -154,8 +154,8 @@ where | ||||
|         } | ||||
|  | ||||
|         if !stream.content_length.is_head() { | ||||
|             use http::header; | ||||
|             use super::stream::ContentLength; | ||||
|             use http::header; | ||||
|  | ||||
|             if let Some(content_length) = frame.fields().get(header::CONTENT_LENGTH) { | ||||
|                 let content_length = match parse_u64(content_length.as_bytes()) { | ||||
|   | ||||
| @@ -199,8 +199,8 @@ where | ||||
|             // There are no more outstanding references to the stream | ||||
|             self.ref_count == 0 && | ||||
|             // The stream is not in any queue | ||||
|             !self.is_pending_send && !self.is_pending_send_capacity && | ||||
|             !self.is_pending_accept && !self.is_pending_window_update | ||||
|             !self.is_pending_send && !self.is_pending_send_capacity | ||||
|             && !self.is_pending_accept && !self.is_pending_window_update | ||||
|     } | ||||
|  | ||||
|     pub fn assign_capacity(&mut self, capacity: WindowSize) { | ||||
|   | ||||
| @@ -324,8 +324,8 @@ where | ||||
|         request: Request<()>, | ||||
|         end_of_stream: bool, | ||||
|     ) -> Result<StreamRef<B, P>, SendError> { | ||||
|         use http::Method; | ||||
|         use super::stream::ContentLength; | ||||
|         use http::Method; | ||||
|  | ||||
|         // TODO: There is a hazard with assigning a stream ID before the | ||||
|         // prioritize layer. If prioritization reorders new streams, this | ||||
|   | ||||
		Reference in New Issue
	
	Block a user