From b419fa9e2f83635b3ec956b7558741ef2e7fcd66 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 6 May 2025 16:04:52 +0000 Subject: [PATCH] Fix InMemoryLayerError enum placement Co-Authored-By: christian@neon.tech --- .../src/tenant/storage_layer/inmemory_layer.rs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/pageserver/src/tenant/storage_layer/inmemory_layer.rs b/pageserver/src/tenant/storage_layer/inmemory_layer.rs index bad447b5d9..586b82d6a5 100644 --- a/pageserver/src/tenant/storage_layer/inmemory_layer.rs +++ b/pageserver/src/tenant/storage_layer/inmemory_layer.rs @@ -581,15 +581,17 @@ impl InMemoryLayer { estimated_in_mem_size: AtomicU64::new(0), }) } +} - #[derive(Debug, thiserror::Error)] - pub enum InMemoryLayerError { - #[error("flush task cancelled")] - Cancelled, - #[error(transparent)] - Other(anyhow::Error), - } +#[derive(Debug, thiserror::Error)] +pub enum InMemoryLayerError { + #[error("flush task cancelled")] + Cancelled, + #[error(transparent)] + Other(anyhow::Error), +} +impl InMemoryLayer { /// Write path. /// /// Errors are not retryable, the [`InMemoryLayer`] must be discarded, and not be read from.