mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-22 05:19:21 +00:00
Improve code readability
This commit is contained in:
parent
5c938dccd1
commit
3c202d7afa
@ -159,8 +159,8 @@ impl FromRequest for CustomRequest {
|
||||
let mut field = el?;
|
||||
|
||||
let content_type = field.content_disposition().clone();
|
||||
let name = content_type.get_name().ok_or(
|
||||
ErrorInternalServerError("Missing field name!"))?;
|
||||
let name = content_type.get_name().
|
||||
ok_or_else(|| ErrorInternalServerError("Missing field name!"))?;
|
||||
|
||||
// Handle file upload
|
||||
if content_type.get_filename().is_some() {
|
||||
|
Loading…
Reference in New Issue
Block a user