Fix API,
This commit is contained in:
parent
e4ed6467a9
commit
d7fe922425
@ -22,8 +22,8 @@ impl<'db> SecTrieDBMut<'db> {
|
|||||||
|
|
||||||
/// Create a new trie with the backing database `db` and `root`
|
/// Create a new trie with the backing database `db` and `root`
|
||||||
/// Panics, if `root` does not exist
|
/// 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 {
|
||||||
SecTrieDBMut { raw: TrieDBMut::new_existing(db, root) }
|
SecTrieDBMut { raw: TrieDBMut::from_existing(db, root) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ impl<'db> TrieDBMut<'db> {
|
|||||||
|
|
||||||
/// Create a new trie with the backing database `db` and `root`
|
/// Create a new trie with the backing database `db` and `root`
|
||||||
/// Panics, if `root` does not exist
|
/// 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));
|
assert!(db.exists(root));
|
||||||
TrieDBMut {
|
TrieDBMut {
|
||||||
db: db,
|
db: db,
|
||||||
@ -1093,7 +1093,7 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
let _ = TrieDBMut::new_existing(&mut db, &mut root);
|
let _ = TrieDBMut::from_existing(&mut db, &mut root);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user