chore(trie): remove infallible variant (#13057)

This commit is contained in:
Roman Krasiuk
2024-12-02 12:25:40 +01:00
committed by GitHub
parent 1b34f3e78d
commit 0884611668
2 changed files with 2 additions and 9 deletions

View File

@ -3,7 +3,6 @@
use crate::SparseTrieError;
use alloy_primitives::Bytes;
use reth_trie_common::Nibbles;
use std::convert::Infallible;
/// Factory for instantiating blinded node providers.
pub trait BlindedProviderFactory {
@ -50,7 +49,7 @@ impl BlindedProviderFactory for DefaultBlindedProviderFactory {
pub struct DefaultBlindedProvider;
impl BlindedProvider for DefaultBlindedProvider {
type Error = Infallible;
type Error = SparseTrieError;
fn blinded_node(&mut self, _path: Nibbles) -> Result<Option<Bytes>, Self::Error> {
Ok(None)

View File

@ -1,13 +1,10 @@
//! Errors for sparse trie.
use std::convert::Infallible;
use crate::SparseNode;
use alloy_primitives::{Bytes, B256};
use reth_trie_common::Nibbles;
use thiserror::Error;
use crate::SparseNode;
/// Result type with [`SparseStateTrieError`] as error.
pub type SparseStateTrieResult<Ok> = Result<Ok, SparseStateTrieError>;
@ -58,7 +55,4 @@ pub enum SparseTrieError {
/// RLP error.
#[error(transparent)]
Rlp(#[from] alloy_rlp::Error),
/// Infallible.
#[error(transparent)]
Infallible(#[from] Infallible),
}