Use rustfmt to enforce consistent formatting
This change adds a .rustfmt.toml that includes ALL supported settings, 12 of which we have overridden to attempt to cater to our own proclivities. rustfmt is checked in the rust-nightly CI job.
This commit is contained in:
		| @@ -1,6 +1,6 @@ | ||||
| use frame::{self, Head, Error, Kind, StreamId, Reason}; | ||||
| use frame::{self, Error, Head, Kind, Reason, StreamId}; | ||||
|  | ||||
| use bytes::{BufMut, BigEndian}; | ||||
| use bytes::{BigEndian, BufMut}; | ||||
|  | ||||
| #[derive(Debug, Eq, PartialEq)] | ||||
| pub struct Reset { | ||||
| @@ -32,13 +32,15 @@ impl Reset { | ||||
|         let error_code = unpack_octets_4!(payload, 0, u32); | ||||
|  | ||||
|         Ok(Reset { | ||||
|             stream_id: head.stream_id(), | ||||
|             error_code: error_code, | ||||
|         }) | ||||
|                stream_id: head.stream_id(), | ||||
|                error_code: error_code, | ||||
|            }) | ||||
|     } | ||||
|  | ||||
|     pub fn encode<B: BufMut>(&self, dst: &mut B) { | ||||
|         trace!("encoding RESET; id={:?} code={}", self.stream_id, self.error_code); | ||||
|         trace!("encoding RESET; id={:?} code={}", | ||||
|                self.stream_id, | ||||
|                self.error_code); | ||||
|         let head = Head::new(Kind::Reset, 0, self.stream_id); | ||||
|         head.encode(4, dst); | ||||
|         dst.put_u32::<BigEndian>(self.error_code); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user