1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-08-31 10:46:58 +02:00

rename fn service helpers

This commit is contained in:
Nikolay Kim
2019-12-08 19:05:05 +06:00
parent c38a25f102
commit 1ad0bbfb7f
12 changed files with 109 additions and 41 deletions

View File

@@ -258,7 +258,7 @@ mod tests {
use futures_util::future::{lazy, ok, ready, Ready};
use crate::{factory_fn, pipeline, pipeline_factory, Service, ServiceFactory};
use crate::{fn_factory, pipeline, pipeline_factory, Service, ServiceFactory};
struct Srv1(Rc<Cell<usize>>);
@@ -320,7 +320,7 @@ mod tests {
let cnt = Rc::new(Cell::new(0));
let cnt2 = cnt.clone();
let new_srv =
pipeline_factory(factory_fn(move || ready(Ok::<_, ()>(Srv1(cnt2.clone())))))
pipeline_factory(fn_factory(move || ready(Ok::<_, ()>(Srv1(cnt2.clone())))))
.and_then(move || ready(Ok(Srv2(cnt.clone()))));
let mut srv = new_srv.new_service(()).await.unwrap();