fix(clippy): fix clippy on rust nightly

This commit is contained in:
MedzikUser 2022-07-02 12:42:12 +02:00
parent 8d25b1469c
commit 7e48259a9a
No known key found for this signature in database
GPG Key ID: A5FAC1E185C112DB
1 changed files with 3 additions and 4 deletions

View File

@ -50,10 +50,9 @@ pub async fn handle(
// create a directory where the file will be placed
// e.g. path ==> `/secret/files/images/screenshot.png`
// directories up to `{storage dir}/{username}/secret/files/images/` will be created
match file_path.parent() {
Some(prefix) => fs::create_dir_all(&prefix)
.map_err(|err| ServerError::FsError(FsError::CreateFile(err.to_string())))?,
None => (),
if let Some(prefix) = file_path.parent() {
fs::create_dir_all(&prefix)
.map_err(|err| ServerError::FsError(FsError::CreateFile(err.to_string())))?
}
// get multipart field