refactor: use Write::write_all

This commit is contained in:
aria 2025-07-07 23:26:02 +10:00
parent 4bc9b563e4
commit 9ecf3081c0
Signed by: aria
SSH key fingerprint: SHA256:WqtcVnDMrv1lnUlNah5k31iywFUI/DV+5yHzCTO4Vds

View file

@ -170,13 +170,13 @@ fn save_txt_file(
if selection.is_empty() {
for msg in extracted {
out_file.write(msg.as_bytes())?;
out_file.write(b"\n")?;
out_file.write_all(msg.as_bytes())?;
out_file.write_all(b"\n")?;
}
} else {
for msg in selection {
out_file.write(extracted[msg].as_bytes())?;
out_file.write(b"\n")?;
out_file.write_all(extracted[msg].as_bytes())?;
out_file.write_all(b"\n")?;
}
}