From a87a4e24d8ac3a19ca93f96684c54290016c0fe3 Mon Sep 17 00:00:00 2001 From: Stefan Holderbach Date: Mon, 25 Mar 2024 22:54:43 +0100 Subject: [PATCH] Fix `OpenOptions` clippy (#776) `truncate(false)` is the right choice as we manually truncate later. (we want to read from the same handle first and then write, to use the advisory lock) --- src/history/file_backed.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/history/file_backed.rs b/src/history/file_backed.rs index ffff840b..4940c950 100644 --- a/src/history/file_backed.rs +++ b/src/history/file_backed.rs @@ -231,6 +231,7 @@ impl History for FileBackedHistory { .create(true) .write(true) .read(true) + .truncate(false) .open(fname)?, ); let mut writer_guard = f_lock.write()?;