From c72c9d2dba4cec9b49f2f287a321932dfe4dadb5 Mon Sep 17 00:00:00 2001 From: Dom Dwyer Date: Wed, 22 Feb 2023 15:46:05 +0100 Subject: [PATCH] refactor: derive Debug on WAL types Deriving debug is highly encouraged so that Result::unwrap() and friends can print the state of an object if it is causing a panic (it's impossible to call unwrap() otherwise!) --- wal/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wal/src/lib.rs b/wal/src/lib.rs index 1b239d5e6e..c2e6ab691a 100644 --- a/wal/src/lib.rs +++ b/wal/src/lib.rs @@ -389,11 +389,13 @@ impl std::fmt::Debug for Wal { } } +#[derive(Debug)] struct Segments { closed_segments: BTreeMap, open_segment: OpenSegmentFileWriter, } +#[derive(Debug)] struct WalBuffer { ops: Vec, notify_flush: tokio::sync::watch::Sender>,