1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-31 17:07:01 +02:00

port multipart support

This commit is contained in:
Nikolay Kim
2019-03-28 05:04:39 -07:00
parent c59937784e
commit 4309d9b88c
6 changed files with 1194 additions and 3 deletions

View File

@@ -49,11 +49,12 @@ where
///
/// Note that this function is intended to be used only for testing purpose.
/// This function panics on nested call.
pub fn run_on<F, I, E>(f: F) -> Result<I, E>
pub fn run_on<F, R>(f: F) -> R
where
F: Fn() -> Result<I, E>,
F: Fn() -> R,
{
RT.with(move |rt| rt.borrow_mut().block_on(lazy(f)))
RT.with(move |rt| rt.borrow_mut().block_on(lazy(|| Ok::<_, ()>(f()))))
.unwrap()
}
pub fn ok_service() -> impl Service<