about summary refs log tree commit diff
path: root/src/database/file/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/database/file/mod.rs')
-rw-r--r--src/database/file/mod.rs4
1 files changed, 2 insertions, 2 deletions
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())?;
             }