From b77c105fa92cd84ae291a53a33b3952b2b975fe9 Mon Sep 17 00:00:00 2001 From: Sander Date: Fri, 22 Nov 2024 21:51:28 +0400 Subject: [PATCH] devenv: fix compilation error Bug introduced in #1602. --- devenv/src/devenv.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/devenv/src/devenv.rs b/devenv/src/devenv.rs index 14e39956e..55481e034 100644 --- a/devenv/src/devenv.rs +++ b/devenv/src/devenv.rs @@ -181,8 +181,10 @@ impl Devenv { std::fs::OpenOptions::new() .append(true) .open(&target_path) - .and_then(|mut file| file.write("\n")) - .and_then(|mut file| file.write_all(path.contents())) + .and_then(|mut file| { + file.write_all(b"\n")?; + file.write_all(path.contents()) + }) .expect("Failed to append to existing file"); } else { std::fs::write(&target_path, path.contents()).expect("Failed to write file");