diff options
Diffstat (limited to 'server/src/database.rs')
-rw-r--r-- | server/src/database.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/src/database.rs b/server/src/database.rs index a4e5b85..00ce193 100644 --- a/server/src/database.rs +++ b/server/src/database.rs @@ -1,9 +1,10 @@ +use std::path::Path; + /* This file is part of jellything (https://codeberg.org/metamuffin/jellything) which is licensed under the GNU Affero General Public License (version 3); see /COPYING. Copyright (C) 2023 metamuffin <metamuffin.org> */ -use std::path::PathBuf; use anyhow::Context; use log::info; use serde::{Deserialize, Serialize}; @@ -24,7 +25,7 @@ pub struct User { } impl Database { - pub fn open(path: &PathBuf) -> Result<Self, anyhow::Error> { + pub fn open(path: &Path) -> Result<Self, anyhow::Error> { info!("opening database… (takes O(n) time sadly)"); let db = sled::open(path).context("opening database")?; info!("ready"); |