about summary refs log tree commit diff
path: root/kittybox-rs/src/database
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2022-07-10 14:55:18 +0300
committerVika <vika@fireburn.ru>2022-07-10 14:55:18 +0300
commit0ee2072d40dc0b88a7f475a25dfc790d49546a5f (patch)
treeb2c2b9a9d9c8b01719cf6be12d12b8d74d09d4df /kittybox-rs/src/database
parent3caf10aa266db7d71dd52614915ae46a5f133fef (diff)
downloadkittybox-0ee2072d40dc0b88a7f475a25dfc790d49546a5f.tar.zst
database: use .path().to_path_buf() to prevent dropping the tempdir
I'm afraid this might've caused me to do some weird stuff with the
tempdir. Better do it like this.
Diffstat (limited to 'kittybox-rs/src/database')
-rw-r--r--kittybox-rs/src/database/mod.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/kittybox-rs/src/database/mod.rs b/kittybox-rs/src/database/mod.rs
index bd25d8d..10fbc72 100644
--- a/kittybox-rs/src/database/mod.rs
+++ b/kittybox-rs/src/database/mod.rs
@@ -547,7 +547,9 @@ mod tests {
             async fn $func_name() {
                 test_logger::ensure_env_logger_initialized();
                 let tempdir = tempdir::TempDir::new("file").expect("Failed to create tempdir");
-                let backend = super::super::FileStorage::new(tempdir.into_path())
+                let backend = super::super::FileStorage::new(
+                    tempdir.path().to_path_buf()
+                )
                     .await
                     .unwrap();
                 super::$func_name(backend).await