Rename spawn -> boxed_clone
This commit is contained in:
@@ -128,7 +128,7 @@ impl HashDB for ArchiveDB {
|
||||
}
|
||||
|
||||
impl JournalDB for ArchiveDB {
|
||||
fn spawn(&self) -> Box<JournalDB> {
|
||||
fn boxed_clone(&self) -> Box<JournalDB> {
|
||||
Box::new(ArchiveDB {
|
||||
overlay: self.overlay.clone(),
|
||||
backing: self.backing.clone(),
|
||||
|
||||
@@ -320,7 +320,7 @@ impl HashDB for EarlyMergeDB {
|
||||
}
|
||||
|
||||
impl JournalDB for EarlyMergeDB {
|
||||
fn spawn(&self) -> Box<JournalDB> {
|
||||
fn boxed_clone(&self) -> Box<JournalDB> {
|
||||
Box::new(EarlyMergeDB {
|
||||
overlay: self.overlay.clone(),
|
||||
backing: self.backing.clone(),
|
||||
|
||||
@@ -197,7 +197,7 @@ impl OverlayRecentDB {
|
||||
}
|
||||
|
||||
impl JournalDB for OverlayRecentDB {
|
||||
fn spawn(&self) -> Box<JournalDB> {
|
||||
fn boxed_clone(&self) -> Box<JournalDB> {
|
||||
Box::new(self.clone())
|
||||
}
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ impl HashDB for RefCountedDB {
|
||||
}
|
||||
|
||||
impl JournalDB for RefCountedDB {
|
||||
fn spawn(&self) -> Box<JournalDB> {
|
||||
fn boxed_clone(&self) -> Box<JournalDB> {
|
||||
Box::new(RefCountedDB {
|
||||
forward: self.forward.clone(),
|
||||
backing: self.backing.clone(),
|
||||
|
||||
@@ -23,7 +23,7 @@ use hashdb::*;
|
||||
/// exclusive actions.
|
||||
pub trait JournalDB : HashDB + Send + Sync {
|
||||
/// Return a copy of ourself, in a box.
|
||||
fn spawn(&self) -> Box<JournalDB>;
|
||||
fn boxed_clone(&self) -> Box<JournalDB>;
|
||||
|
||||
/// Returns heap memory size used
|
||||
fn mem_used(&self) -> usize;
|
||||
|
||||
Reference in New Issue
Block a user