Skip to content

Commit

Permalink
workaround for rust-lang/rust#64636
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Sep 22, 2019
1 parent 2ee6187 commit d715b8f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/send_file.rs
Expand Up @@ -61,6 +61,7 @@ fn internal_server_error() -> Response<Body> {
.unwrap()
}

#[allow(unreachable_code)] // TODO: remove this when https://github.com/rust-lang/rust/issues/64636 fixed.
async fn simple_file_send(filename: &str) -> Result<Response<Body>> {
// Serve a file by asynchronously reading it entirely into memory.
// Uses tokio_fs to open file asynchronously, then tokio::io::AsyncReadExt
Expand Down
1 change: 1 addition & 0 deletions src/proto/h1/decode.rs
Expand Up @@ -385,6 +385,7 @@ mod tests {
size
}

#[allow(unreachable_code)] // TODO: remove this when https://github.com/rust-lang/rust/issues/64636 fixed.
async fn read_err(s: &str, expected_err: io::ErrorKind) {
let mut state = ChunkedState::Size;
let rdr = &mut s.as_bytes();
Expand Down

0 comments on commit d715b8f

Please sign in to comment.