From 2664e42dcbc50f1cb5af8dc5f8aff74241b92fe7 Mon Sep 17 00:00:00 2001 From: Emmanuel Leblond Date: Fri, 29 Nov 2024 12:23:41 +0100 Subject: [PATCH] Remove dead code `libparsec/crates/platform_storage/src/error.rs` --- .../crates/platform_storage/src/error.rs | 38 ------------------- 1 file changed, 38 deletions(-) delete mode 100644 libparsec/crates/platform_storage/src/error.rs diff --git a/libparsec/crates/platform_storage/src/error.rs b/libparsec/crates/platform_storage/src/error.rs deleted file mode 100644 index 768f3cdd9e0..00000000000 --- a/libparsec/crates/platform_storage/src/error.rs +++ /dev/null @@ -1,38 +0,0 @@ -// Parsec Cloud (https://parsec.cloud) Copyright (c) BUSL-1.1 2016-present Scille SAS - -use libparsec_types::prelude::*; - -pub type Result = std::result::Result; - -#[derive(Debug, thiserror::Error)] -pub enum StorageError { - #[error("Invalid regex pattern `{0}`: {1}")] - InvalidRegexPattern(String, RegexError), - #[error("{0}")] - Internal(DynError), - #[error("Invalid entry ID used for {used_as}: {error}")] - InvalidEntryID { - used_as: &'static str, - error: &'static str, - }, - #[error("Chunk {0} not found in storage")] - LocalChunkIDMiss(ChunkID), - #[error("Block {0} not found in storage")] - LocalBlockIDMiss(BlockID), - #[error("Entry {0} not found in storage")] - LocalEntryIDMiss(VlobID), - // TODO: needed ? or merge into Internal ? - #[error("{0}")] - Crypto(CryptoError), - // TODO: needed ? or merge into Internal ? - #[error("Fail to vacuum: {0}")] - Vacuum(DynError), -} - -impl From for StorageError { - fn from(value: CryptoError) -> Self { - Self::Crypto(value) - } -} - -pub type DynError = Box;