Update mod.rs

This commit is contained in:
Gav Wood 2016-04-14 22:23:20 -07:00
parent 264c9bfd3c
commit 16ad086e7f

View File

@ -92,9 +92,7 @@ impl<T: WebApp + 'static> server::Handler<HttpStream> for PageHandler<T> {
None => (None, Next::end()),
Some(f) if self.write_pos == f.content.len() => (None, Next::end()),
Some(f) => match encoder.write(&f.content[self.write_pos..]) {
Ok(bytes) => {
(Some(bytes), Next::write())
},
Ok(bytes) => (Some(bytes), Next::write()),
Err(e) => match e.kind() {
::std::io::ErrorKind::WouldBlock => (None, Next::write()),
_ => (None, Next::end())