From c921686355c86afb5bf47e4b6c696057ede01b1f Mon Sep 17 00:00:00 2001 From: troido Date: Mon, 17 Feb 2020 02:24:14 +0100 Subject: persistently save the room state --- src/persistence.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/persistence.rs') 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 { -- cgit