mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
chore(trie): remove infallible variant (#13057)
This commit is contained in:
@ -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)
|
||||
|
||||
@ -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),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user