From 00c390f56b485656d799d40e67fd0b08d056d43c Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 3 Jan 2023 13:09:38 +0100 Subject: [PATCH] fixup! Add error variant for when not all bytes are written --- src/helpers/toml.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/toml.rs b/src/helpers/toml.rs index 620a845..6f0151c 100644 --- a/src/helpers/toml.rs +++ b/src/helpers/toml.rs @@ -48,7 +48,7 @@ pub fn to_vec(data: &Data) -> Result> { pub fn to_writer(data: &Data, writer: W) -> Result<()> { let mut buf_writer = BufWriter::new(writer); let vec = to_vec(data)?; - if vec.len() != !buf_writer.write(&vec)? { + if vec.len() != buf_writer.write(&vec)? { Err(crate::Error::NotAllBytesWritten) } else { Ok(())