mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 05:51:02 +00:00
Initial (non-functional) code.
- Kill Externalities Error type requirement.
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
use std::{error, fmt};
|
||||
|
||||
use backend::Backend;
|
||||
use {Externalities, OverlayedChanges};
|
||||
use {Externalities, ExternalitiesError, OverlayedChanges};
|
||||
|
||||
/// Errors that can occur when interacting with the externalities.
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
@@ -61,12 +61,10 @@ pub struct Ext<'a, B: 'a> {
|
||||
impl<'a, B: 'a> Externalities for Ext<'a, B>
|
||||
where B: Backend
|
||||
{
|
||||
type Error = B::Error;
|
||||
|
||||
fn storage(&self, key: &[u8]) -> Result<&[u8], Self::Error> {
|
||||
fn storage(&self, key: &[u8]) -> Result<&[u8], ExternalitiesError> {
|
||||
match self.overlay.storage(key) {
|
||||
Some(x) => Ok(x),
|
||||
None => self.backend.storage(key)
|
||||
None => self.backend.storage(key).map_err(|_| ExternalitiesError),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user