Skip to content

Commit

Permalink
Skip some oddly formatted multiline literals
Browse files Browse the repository at this point in the history
  • Loading branch information
sagebind committed Dec 17, 2020
1 parent 72d34cd commit ff1ff7a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
9 changes: 3 additions & 6 deletions tests/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use std::{
use tempfile::TempDir;

#[test]
#[rustfmt::skip]
fn send_request_to_unix_socket() {
let temp_dir = TempDir::new().unwrap();
let socket_path = temp_dir.path().join("test.sock");
Expand All @@ -22,16 +23,12 @@ fn send_request_to_unix_socket() {
io::copy(&mut reader, &mut io::sink()).unwrap();
});

stream
.write_all(
b"\
stream.write_all(b"\
HTTP/1.1 200 OK\r\n\
Content-Length: 8\r\n\
\r\n\
success\n\
",
)
.unwrap();
").unwrap();
});

let mut response = Request::get("http://localhost")
Expand Down
7 changes: 3 additions & 4 deletions testserver/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,16 @@ impl<R: Responder> Mock<R> {
self.requests.lock().unwrap().iter().cloned().collect()
}

#[rustfmt::skip]
fn is_ready(&self) -> bool {
TcpStream::connect(self.addr())
.and_then(|mut stream| {
stream.write_all(
b"\
stream.write_all(b"\
GET /health HTTP/1.1\r\n\
host: api.mock.local\r\n\
connection: close\r\n\
\r\n\
",
)?;
")?;

let mut response = Vec::new();
stream.read_to_end(&mut response)?;
Expand Down

0 comments on commit ff1ff7a

Please sign in to comment.