aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/blocking/input.rs8
-rw-r--r--src/input.rs8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/blocking/input.rs b/src/blocking/input.rs
index c668857..771bed4 100644
--- a/src/blocking/input.rs
+++ b/src/blocking/input.rs
@@ -225,13 +225,13 @@ impl Input {
}
}
- fn fill_buf(&mut self) -> Result<bool> {
+ fn fill_buf(&mut self) -> Result<()> {
if self.buf_is_empty() {
self.buf.resize(4096, 0);
self.pos = 0;
let bytes = read_stdin(&mut self.buf)?;
if bytes == 0 {
- return Ok(false);
+ return Ok(());
}
self.buf.truncate(bytes);
}
@@ -244,7 +244,7 @@ impl Input {
while cur < self.pos + expected_bytes {
let bytes = read_stdin(&mut self.buf[cur..])?;
if bytes == 0 {
- return Ok(false);
+ return Ok(());
}
cur += bytes;
}
@@ -252,7 +252,7 @@ impl Input {
}
}
- Ok(true)
+ Ok(())
}
}
diff --git a/src/input.rs b/src/input.rs
index bd10b86..4ecd899 100644
--- a/src/input.rs
+++ b/src/input.rs
@@ -239,13 +239,13 @@ impl Input {
}
}
- async fn fill_buf(&mut self) -> Result<bool> {
+ async fn fill_buf(&mut self) -> Result<()> {
if self.buf_is_empty() {
self.buf.resize(4096, 0);
self.pos = 0;
let bytes = read_stdin(&mut self.stdin, &mut self.buf).await?;
if bytes == 0 {
- return Ok(false);
+ return Ok(());
}
self.buf.truncate(bytes);
}
@@ -260,7 +260,7 @@ impl Input {
read_stdin(&mut self.stdin, &mut self.buf[cur..])
.await?;
if bytes == 0 {
- return Ok(false);
+ return Ok(());
}
cur += bytes;
}
@@ -268,7 +268,7 @@ impl Input {
}
}
- Ok(true)
+ Ok(())
}
}