From d7fe92242575d74b71aae05197f709b51e9116ff Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Fri, 8 Jan 2016 22:30:45 +0100 Subject: [PATCH] Fix API, --- src/trie/sectriedbmut.rs | 4 ++-- src/trie/triedbmut.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/trie/sectriedbmut.rs b/src/trie/sectriedbmut.rs index b0140582d..99c2e2bb1 100644 --- a/src/trie/sectriedbmut.rs +++ b/src/trie/sectriedbmut.rs @@ -22,8 +22,8 @@ impl<'db> SecTrieDBMut<'db> { /// Create a new trie with the backing database `db` and `root` /// Panics, if `root` does not exist - pub fn new_existing(db: &'db mut HashDB, root: &'db mut H256) -> Self { - SecTrieDBMut { raw: TrieDBMut::new_existing(db, root) } + pub fn from_existing(db: &'db mut HashDB, root: &'db mut H256) -> Self { + SecTrieDBMut { raw: TrieDBMut::from_existing(db, root) } } } diff --git a/src/trie/triedbmut.rs b/src/trie/triedbmut.rs index a51e56a83..b866bc988 100644 --- a/src/trie/triedbmut.rs +++ b/src/trie/triedbmut.rs @@ -70,7 +70,7 @@ impl<'db> TrieDBMut<'db> { /// Create a new trie with the backing database `db` and `root` /// Panics, if `root` does not exist - pub fn new_existing(db: &'db mut HashDB, root: &'db mut H256) -> Self { + pub fn from_existing(db: &'db mut HashDB, root: &'db mut H256) -> Self { assert!(db.exists(root)); TrieDBMut { db: db, @@ -1093,7 +1093,7 @@ mod tests { } { - let _ = TrieDBMut::new_existing(&mut db, &mut root); + let _ = TrieDBMut::from_existing(&mut db, &mut root); } } }