Clone storage factories...
This commit is contained in:
parent
07a5b69a25
commit
427f490a61
10 changed files with 62 additions and 21 deletions
|
|
@ -6,11 +6,11 @@ use parking_lot::RwLock;
|
|||
|
||||
use crate::torrent_state::ManagedTorrentInfo;
|
||||
|
||||
use crate::storage::{StorageFactory, TorrentStorage};
|
||||
use crate::storage::{StorageFactory, StorageFactoryExt, TorrentStorage};
|
||||
|
||||
use super::{FilesystemStorage, FilesystemStorageFactory};
|
||||
|
||||
#[derive(Default)]
|
||||
#[derive(Default, Clone, Copy)]
|
||||
pub struct MmapFilesystemStorageFactory {}
|
||||
|
||||
type OpenedMmap = RwLock<MmapMut>;
|
||||
|
|
@ -36,6 +36,10 @@ impl StorageFactory for MmapFilesystemStorageFactory {
|
|||
fs: fs_storage,
|
||||
})
|
||||
}
|
||||
|
||||
fn clone_box(&self) -> crate::storage::BoxStorageFactory {
|
||||
self.boxed()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct MmapFilesystemStorage {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue