add Backend bound on state

This commit is contained in:
Robert Habermeier 2017-02-25 14:28:26 +01:00
parent 636b2deb2e
commit 7863d1e978
1 changed files with 2 additions and 2 deletions

View File

@ -194,7 +194,7 @@ impl AccountEntry {
/// checkpoint can be discateded with `discard_checkpoint`. All of the orignal
/// backed-up values are moved into a parent checkpoint (if any).
///
pub struct State<B> {
pub struct State<B: Backend> {
db: B,
root: H256,
cache: RefCell<HashMap<Address, AccountEntry>>,
@ -826,7 +826,7 @@ impl<B: Backend> State<B> {
}
}
impl<B> fmt::Debug for State<B> {
impl<B: Backend> fmt::Debug for State<B> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{:?}", self.cache.borrow())
}