aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2020-03-28 21:28:17 +0100
committerTom Smeding <tom.smeding@gmail.com>2020-03-28 21:30:41 +0100
commitbf4622348beb02d6b2508db96213943335bbfa62 (patch)
tree9ef370e1cafc18680d8be3da3afb45a8e2df07be
parentca1f72456cfa92f72fc83f13adc5004f718c8404 (diff)
worker: File::create(), not open(), to write files
-rw-r--r--worker/src/main.rs3
1 files changed, 2 insertions, 1 deletions
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)
});