From 998ffd3e3ac85a38aec8fc15c7addd02fa1af9ae Mon Sep 17 00:00:00 2001
From: Vika <vika@fireburn.ru>
Date: Sun, 6 Mar 2022 17:14:10 +0300
Subject: Restored most of the functionality (except onboarding and some
 queries)

---
 src/database/file/mod.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/database/file')

diff --git a/src/database/file/mod.rs b/src/database/file/mod.rs
index a33e7c4..841f9c0 100644
--- a/src/database/file/mod.rs
+++ b/src/database/file/mod.rs
@@ -1,4 +1,4 @@
-#![warn(clippy::unwrap_used)]
+//#![warn(clippy::unwrap_used)]
 use crate::database::{filter_post, ErrorKind, Result, Storage, StorageError};
 use std::fs::{File, OpenOptions};
 use std::io::{ErrorKind as IOErrorKind, Seek, SeekFrom, Read, Write};
@@ -332,7 +332,7 @@ impl Storage for FileStorage {
         #[allow(clippy::unwrap_used)] // JoinHandle captures panics, this closure shouldn't panic
         tokio::time::timeout(Duration::from_secs(IO_TIMEOUT), spawn_blocking(move || {
             #[warn(clippy::unwrap_used)]
-            let parent = post_path.parent().unwrap().to_owned();
+            let parent = post_path.parent().expect("Parent for this directory should always exist").to_owned();
             if !parent.is_dir() {
                 std::fs::create_dir_all(post_path.parent().unwrap())?;
             }
-- 
cgit 1.4.1