diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2020-03-28 21:28:17 +0100 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2020-03-28 21:30:41 +0100 |
commit | bf4622348beb02d6b2508db96213943335bbfa62 (patch) | |
tree | 9ef370e1cafc18680d8be3da3afb45a8e2df07be /worker | |
parent | ca1f72456cfa92f72fc83f13adc5004f718c8404 (diff) |
worker: File::create(), not open(), to write files
Diffstat (limited to 'worker')
-rw-r--r-- | worker/src/main.rs | 3 |
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) }); |