1
0
Fork 0

fixed libconfig warns

This commit is contained in:
Simon Renblad 2024-10-17 16:25:07 +08:00
parent e18f77fdea
commit 123bedf0fe
1 changed files with 4 additions and 4 deletions

View File

@ -189,10 +189,10 @@ impl Config {
if is_str { if is_str {
let mut f = root_dir.create_file("/CONFIG.TXT")?; let mut f = root_dir.create_file("/CONFIG.TXT")?;
f.seek(SeekFrom::End(0))?; f.seek(SeekFrom::End(0))?;
f.write(key.as_bytes()); f.write(key.as_bytes())?;
f.write("=".as_bytes()); f.write("=".as_bytes())?;
f.write(value.as_slice()); f.write(value.as_slice())?;
f.write(NEWLINE); f.write(NEWLINE)?;
} else { } else {
let dir = root_dir.create_dir("/CONFIG")?; let dir = root_dir.create_dir("/CONFIG")?;
let mut f = dir.create_file(&[key, ".BIN"].concat())?; let mut f = dir.create_file(&[key, ".BIN"].concat())?;