Skip to content

Commit 3e88863

Browse files
timviseeacatangiu
authored andcommitted
Implement clippy suggestions for Rust 1.43.1
Signed-off-by: timvisee <[email protected]> Signed-off-by: YUAN LYU <[email protected]>
1 parent 2e3f629 commit 3e88863

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/server.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,10 @@ impl<T: Read + Write> ClientConnection<T> {
131131

132132
// Send an error response for the request that gave us the error.
133133
let mut error_response = Response::new(Version::Http11, StatusCode::BadRequest);
134-
error_response.set_body(Body::new(
135-
format!(
136-
"{{ \"error\": \"{}\nAll previous unanswered requests will be dropped.\" }}",
137-
inner.to_string()
138-
)
139-
.to_string(),
140-
));
134+
error_response.set_body(Body::new(format!(
135+
"{{ \"error\": \"{}\nAll previous unanswered requests will be dropped.\" }}",
136+
inner.to_string()
137+
)));
141138
self.connection.enqueue_response(error_response);
142139
}
143140
Err(ConnectionError::InvalidWrite) => {

0 commit comments

Comments
 (0)