rustfmt: add trailing commas in match arms, set fn call to block stle (#85)

This commit is contained in:
Sean McArthur
2017-09-12 19:29:06 -07:00
committed by Carl Lerche
parent de1edf4873
commit f7d14861e5
37 changed files with 894 additions and 973 deletions

View File

@@ -124,6 +124,8 @@ fn update_max_frame_len_at_rest() {
codec.set_max_recv_frame_size(2);
assert_eq!(codec.max_recv_frame_size(), 2);
assert_eq!(codec.poll().unwrap_err().description(),
"frame size too big");
assert_eq!(
codec.poll().unwrap_err().description(),
"frame size too big"
);
}

View File

@@ -241,8 +241,10 @@ fn recv_data_overflows_connection_window() {
// client should see a flow control error
let conn = h2.then(|res| {
let err = res.unwrap_err();
assert_eq!(err.to_string(),
"protocol error: flow-control protocol violated");
assert_eq!(
err.to_string(),
"protocol error: flow-control protocol violated"
);
Ok::<(), ()>(())
});
conn.unwrap().join(req)
@@ -498,8 +500,8 @@ fn recv_window_update_on_stream_closed_by_data_frame() {
// Wait for the response
h2.drive(GetResponse {
stream: Some(stream),
})
stream: Some(stream),
})
})
.and_then(|(h2, (response, mut stream))| {
assert_eq!(response.status(), StatusCode::OK);
@@ -514,7 +516,9 @@ fn recv_window_update_on_stream_closed_by_data_frame() {
let srv = srv.assert_client_handshake()
.unwrap()
.recv_settings()
.recv_frame(frames::headers(1).request("POST", "https://http2.akamai.com/"))
.recv_frame(
frames::headers(1).request("POST", "https://http2.akamai.com/"),
)
.send_frame(frames::headers(1).response(200))
.recv_frame(frames::data(1, "hello").eos())
.send_frame(frames::window_update(1, 5))
@@ -553,8 +557,8 @@ fn reserved_capacity_assigned_in_multi_window_updates() {
stream.send_data("world".into(), true).unwrap();
h2.drive(GetResponse {
stream: Some(stream),
})
stream: Some(stream),
})
})
.and_then(|(h2, (response, _))| {
assert_eq!(response.status(), StatusCode::NO_CONTENT);

View File

@@ -193,7 +193,10 @@ fn send_data_receive_window_update() {
stream.reserve_capacity(frame::DEFAULT_INITIAL_WINDOW_SIZE as usize);
// Wait for capacity
h2.drive(util::wait_for_capacity(stream, frame::DEFAULT_INITIAL_WINDOW_SIZE as usize))
h2.drive(util::wait_for_capacity(
stream,
frame::DEFAULT_INITIAL_WINDOW_SIZE as usize,
))
})
.and_then(|(h2, mut stream)| {
let payload = vec![0; frame::DEFAULT_INITIAL_WINDOW_SIZE as usize];

View File

@@ -184,9 +184,11 @@ fn closed_streams_are_released() {
let srv = srv.assert_client_handshake()
.unwrap()
.recv_settings()
.recv_frame(frames::headers(1)
.request("GET", "https://example.com/")
.eos())
.recv_frame(
frames::headers(1)
.request("GET", "https://example.com/")
.eos(),
)
.send_frame(frames::headers(1).response(204).eos())
.close();