diff options
Diffstat (limited to 'src/persistence.rs')
| -rw-r--r-- | src/persistence.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/persistence.rs b/src/persistence.rs index fc04378..1808652 100644 --- a/src/persistence.rs +++ b/src/persistence.rs @@ -28,6 +28,14 @@ pub struct FileStorage { directory: PathBuf } +impl FileStorage { + pub fn new(path: &str) -> Self { + Self { + directory: PathBuf::from(path) + } + } +} + impl PersistentStorage for FileStorage { fn load_room(&self, name: String) -> Result<SaveState> { |
