diff options
author | Vika <vika@fireburn.ru> | 2022-03-06 17:14:10 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2022-03-06 17:14:10 +0300 |
commit | 998ffd3e3ac85a38aec8fc15c7addd02fa1af9ae (patch) | |
tree | 863e7daabf52edc8448fba45fc0b3e6acdba2b0a /src/database/file/mod.rs | |
parent | 11a39e85f2673029c7e317c02ae56bd8813773ad (diff) | |
download | kittybox-998ffd3e3ac85a38aec8fc15c7addd02fa1af9ae.tar.zst |
Restored most of the functionality (except onboarding and some queries)
Diffstat (limited to 'src/database/file/mod.rs')
-rw-r--r-- | src/database/file/mod.rs | 4 |
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())?; } |