[fix] UnexpectedEof is ok and should not show an error
This commit is contained in:
parent
91ec9ab7ec
commit
070d07b27c
@ -55,7 +55,13 @@ fn run() -> LogtimesResult {
|
|||||||
|
|
||||||
loop {
|
loop {
|
||||||
// read 1 char
|
// read 1 char
|
||||||
input.read_exact(&mut buf)?;
|
if let Err(e) = input.read_exact(&mut buf) {
|
||||||
|
if e.kind() == ErrorKind::UnexpectedEof {
|
||||||
|
return Ok(());
|
||||||
|
} else {
|
||||||
|
return Err(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// push that char to the "current line" buffer
|
// push that char to the "current line" buffer
|
||||||
linebuf.push(buf[0]);
|
linebuf.push(buf[0]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user