Skip to content

Commit 1d3365e

Browse files
committed
Clippy
1 parent 3a46fd0 commit 1d3365e

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

splashsurf_lib/src/io/bgeo_format.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ pub fn particles_to_bgeo<R: Real, P: AsRef<Path>>(
123123
let file = OpenOptions::new()
124124
.write(true)
125125
.create(true)
126+
.truncate(true)
126127
.open(path)
127128
.context("Cannot open file for writing JSON")?;
128129
let writer = BufWriter::new(file);

splashsurf_lib/src/io/json_format.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ pub fn particles_to_json<R: Real, P: AsRef<Path>>(
6464
let file = OpenOptions::new()
6565
.write(true)
6666
.create(true)
67+
.truncate(true)
6768
.open(path)
6869
.context("Cannot open file for writing JSON")?;
6970
let writer = BufWriter::new(file);

0 commit comments

Comments
 (0)