1
0
mirror of https://github.com/actix/examples synced 2025-06-26 17:17:42 +02:00

remove unwraps in multipart examples

inspired by #406
This commit is contained in:
Rob Ede
2021-10-07 03:27:50 +01:00
parent 465b6a9c0a
commit 0c4ab86a9a
8 changed files with 61 additions and 43 deletions

View File

@ -6,9 +6,10 @@ edition = "2018"
[dependencies]
actix-web = "3"
bytes = "0.5"
env_logger = "0.8"
futures = "0.3.1"
futures-util = "0.3"
log = "0.4"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

View File

@ -1,14 +1,17 @@
// Allow this lint since it's fine to use type directly in the short example.
#![allow(clippy::type_complexity)]
use std::error;
use std::pin::Pin;
use std::sync::{Arc, RwLock};
use std::time::Duration;
use std::{
error,
future::Future,
pin::Pin,
sync::{Arc, RwLock},
time::Duration,
};
use actix_web::{middleware, web, App, Error, HttpResponse, HttpServer};
use bytes::Bytes;
use futures::{Future, FutureExt};
use futures_util::FutureExt as _;
use serde_json::Value;
#[allow(dead_code)]