diff options
author | metamuffin <metamuffin@disroot.org> | 2023-05-15 09:05:04 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-05-15 09:05:04 +0200 |
commit | 87e4512f24b886a5df045ba11ce731b3ffc3e848 (patch) | |
tree | 60cb5478728633af5f0bc46afbf6d79b72b66ce1 /server/src/database.rs | |
parent | 35dadb32b152b391c78e09285eedfaec416a45fb (diff) | |
download | jellything-87e4512f24b886a5df045ba11ce731b3ffc3e848.tar jellything-87e4512f24b886a5df045ba11ce731b3ffc3e848.tar.bz2 jellything-87e4512f24b886a5df045ba11ce731b3ffc3e848.tar.zst |
old uncommited stuff, dunno what it does
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"); |