]> Untitled Git - bdk/commitdiff
chore(file_store): explicitly state that we truncate file for `create_new`
author志宇 <hello@evanlinjin.me>
Thu, 21 Mar 2024 23:41:17 +0000 (07:41 +0800)
committer志宇 <hello@evanlinjin.me>
Thu, 21 Mar 2024 23:41:17 +0000 (07:41 +0800)
This makes clippy happy.

crates/file_store/src/store.rs

index d0f54c4f5ad0a763d7e329aa3eaa2195b5e8f28c..3682f0033d563cbabd2bb5734f02d1837e773df3 100644 (file)
@@ -64,6 +64,7 @@ where
             .create(true)
             .read(true)
             .write(true)
+            .truncate(true)
             .open(file_path)?;
         f.write_all(magic)?;
         Ok(Self {