aboutsummaryrefslogtreecommitdiff
path: root/src/wal.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/wal.rs')
-rw-r--r--src/wal.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wal.rs b/src/wal.rs
index 7975f38..119fdf3 100644
--- a/src/wal.rs
+++ b/src/wal.rs
@@ -255,6 +255,9 @@ impl<F: WALStore> WALFilePool<F> {
&'a mut self,
writes: Vec<(WALPos, WALBytes)>,
) -> Vec<Pin<Box<dyn Future<Output = Result<(), ()>> + 'a>>> {
+ if writes.is_empty() {
+ return Vec::new()
+ }
let file_size = self.file_size;
let file_nbit = self.file_nbit;
let meta: Vec<(u64, u64)> = writes