Merge branch 'master' of github.com:Ticki/libterm

This commit is contained in:
ticki 2016-11-02 18:47:37 +01:00
commit f49a6e501b
1 changed files with 4 additions and 4 deletions

View File

@ -51,14 +51,14 @@ impl Read for AsyncReader {
let mut total = 0; let mut total = 0;
loop { loop {
if total >= buf.len() {
break;
}
match self.recv.try_recv() { match self.recv.try_recv() {
Ok(Ok(b)) => { Ok(Ok(b)) => {
buf[total] = b; buf[total] = b;
total += 1; total += 1;
if total == buf.len() {
break;
}
}, },
Ok(Err(e)) => return Err(e), Ok(Err(e)) => return Err(e),
Err(_) => break, Err(_) => break,