From 123bedf0fe048bee5c3bc04cbf70ac674bd2b176 Mon Sep 17 00:00:00 2001 From: Simon Renblad Date: Thu, 17 Oct 2024 16:25:07 +0800 Subject: [PATCH] fixed libconfig warns --- libconfig/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libconfig/src/lib.rs b/libconfig/src/lib.rs index 1d5bbbb..e1ca5f5 100644 --- a/libconfig/src/lib.rs +++ b/libconfig/src/lib.rs @@ -189,10 +189,10 @@ impl Config { if is_str { let mut f = root_dir.create_file("/CONFIG.TXT")?; f.seek(SeekFrom::End(0))?; - f.write(key.as_bytes()); - f.write("=".as_bytes()); - f.write(value.as_slice()); - f.write(NEWLINE); + f.write(key.as_bytes())?; + f.write("=".as_bytes())?; + f.write(value.as_slice())?; + f.write(NEWLINE)?; } else { let dir = root_dir.create_dir("/CONFIG")?; let mut f = dir.create_file(&[key, ".BIN"].concat())?;