Skip to content

Commit

Permalink
docs(example): fix send file to only send range of buffer read into
Browse files Browse the repository at this point in the history
  • Loading branch information
passchaos authored and seanmonstar committed Jan 16, 2018
1 parent 586993f commit 73511ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/send_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ impl Service for ResponseExamples {
tx_body.close().expect("panic closing");
break;
} else {
let chunk: Chunk = buf.to_vec().into();
let chunk: Chunk = buf[0..n].to_vec().into();
match tx_body.send(Ok(chunk)).wait() {
Ok(t) => { tx_body = t; },
Err(_) => { break; }
Expand Down

0 comments on commit 73511ac

Please sign in to comment.