From 8e6de3226ec521820fb3ea28779a463ef56bea1b Mon Sep 17 00:00:00 2001 From: kruserr <46799551+kruserr@users.noreply.github.com> Date: Sun, 22 Sep 2024 08:47:52 +0000 Subject: [PATCH] fix: cargo clippy open file with truncate false --- src/http/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http/mod.rs b/src/http/mod.rs index c873ebd..553b987 100644 --- a/src/http/mod.rs +++ b/src/http/mod.rs @@ -18,7 +18,7 @@ pub fn open_or_create_file(path: &str) -> Result> { } let file = - OpenOptions::new().read(true).write(true).create(true).open(path)?; + OpenOptions::new().read(true).write(true).create(true).truncate(false).open(path)?; Ok(file) }