From e03417a7c9de041e4978e06da3f59ebbb4e5bc7e Mon Sep 17 00:00:00 2001 From: Eric Seppanen Date: Sat, 17 Apr 2021 14:14:27 -0700 Subject: [PATCH] suppress dead_code warnings on nightly We don't need the nightly compiler, but there's no reason it shouldn't compile without warnings, either. I don't know why stable doesn't warn about these, but it's cheap to suppress them. --- pageserver/src/tui.rs | 1 + pageserver/src/waldecoder.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/pageserver/src/tui.rs b/pageserver/src/tui.rs index 653600b82e..1cfd821cd9 100644 --- a/pageserver/src/tui.rs +++ b/pageserver/src/tui.rs @@ -188,6 +188,7 @@ pub fn ui_main<'b>() -> Result<(), Box> { Ok(()) } +#[allow(dead_code)] struct LogWidget<'a> { logger: &'a TuiLogger, title: &'a str, diff --git a/pageserver/src/waldecoder.rs b/pageserver/src/waldecoder.rs index 1f1a5dfc99..090256f318 100644 --- a/pageserver/src/waldecoder.rs +++ b/pageserver/src/waldecoder.rs @@ -44,6 +44,7 @@ struct XLogLongPageHeaderData { #[allow(non_upper_case_globals)] const SizeOfXLogLongPHD: usize = (2 + 2 + 4 + 8 + 4) + 4 + 8 + 4 + 4; +#[allow(dead_code)] pub struct WalStreamDecoder { lsn: u64, @@ -253,6 +254,7 @@ const BKPIMAGE_HAS_HOLE: u8 = 0x01; /* page image has "hole" */ const BKPIMAGE_IS_COMPRESSED: u8 = 0x02; /* page image is compressed */ const BKPIMAGE_APPLY: u8 = 0x04; /* page image should be restored during replay */ +#[allow(dead_code)] pub struct DecodedBkpBlock { /* Is this block ref in use? */ //in_use: bool,