Skip to content

Commit 4798067

Browse files
committed
chore: explicit result type
1 parent 44f4fbc commit 4798067

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/write/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ pub trait Write {
5858

5959
/// Flush this output stream, ensuring that all intermediately buffered
6060
/// contents reach their destination.
61-
fn flush(&mut self) -> Result;
61+
fn flush(&mut self) -> Result<()>;
6262

6363
/// Attempts to write an entire buffer into this writer.
64-
fn write_all(&mut self, mut buf: &[u8]) -> Result {
64+
fn write_all(&mut self, mut buf: &[u8]) -> Result<()> {
6565
while !buf.is_empty() {
6666
match self.write(buf) {
6767
Ok(0) => return Err(Error::WriteZero),

0 commit comments

Comments
 (0)