From bf4622348beb02d6b2508db96213943335bbfa62 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Sat, 28 Mar 2020 21:28:17 +0100 Subject: worker: File::create(), not open(), to write files --- worker/src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/worker/src/main.rs b/worker/src/main.rs index 0300278..a014914 100644 --- a/worker/src/main.rs +++ b/worker/src/main.rs @@ -65,10 +65,11 @@ fn main() -> io::Result<()> { let path = tempdir.path().join("core.so"); let res = - File::open(&path) + File::create(&path) .and_then(|mut f| { f.write_all(&libfile)?; Ok(f) }) .and_then(|f| { drop(f); + println!("Wrote new core to {}, loading", path.display()); ComputeCore::load(&path) }); -- cgit v1.2.3-70-g09d2