1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-06-26 19:47:43 +02:00

use convert err on forward_ready! (#246)

This commit is contained in:
Rob Ede
2021-01-09 14:13:16 +00:00
committed by GitHub
parent a1982bdbad
commit f751cf5acb
15 changed files with 34 additions and 35 deletions

View File

@ -1,6 +1,9 @@
# Changes
## Unreleased - 2021-xx-xx
* Hidden `ServerBuilder::start` method has been removed. Use `ServerBuilder::run`. [#246]
[#246]: https://github.com/actix/actix-net/pull/246
## 2.0.0-beta.2 - 2021-01-03

View File

@ -252,11 +252,6 @@ impl ServerBuilder {
Ok(self)
}
#[doc(hidden)]
pub fn start(self) -> Server {
self.run()
}
/// Starts processing incoming connections and return server controller.
pub fn run(mut self) -> Server {
if self.sockets.is_empty() {

View File

@ -12,7 +12,7 @@ use crate::{Server, ServerBuilder, ServiceFactory};
///
/// # Examples
///
/// ```rust
/// ```
/// use actix_service::fn_service;
/// use actix_server::TestServer;
///
@ -49,10 +49,7 @@ impl TestServer {
// run server in separate thread
thread::spawn(move || {
let sys = System::new("actix-test-server");
factory(Server::build())
.workers(1)
.disable_signals()
.start();
factory(Server::build()).workers(1).disable_signals().run();
tx.send(System::current()).unwrap();
sys.run()
@ -83,7 +80,7 @@ impl TestServer {
.unwrap()
.workers(1)
.disable_signals()
.start();
.run();
tx.send((System::current(), local_addr)).unwrap();
});
sys.run()

View File

@ -28,7 +28,7 @@ fn test_bind() {
.disable_signals()
.bind("test", addr, move || fn_service(|_| ok::<_, ()>(())))
.unwrap()
.start()
.run()
}));
let _ = tx.send((srv, actix_rt::System::current()));
let _ = sys.run();
@ -55,7 +55,7 @@ fn test_listen() {
.workers(1)
.listen("test", lst, move || fn_service(|_| ok::<_, ()>(())))
.unwrap()
.start();
.run();
let _ = tx.send(actix_rt::System::current());
});
let _ = sys.run();
@ -94,7 +94,7 @@ fn test_start() {
})
})
.unwrap()
.start()
.run()
}));
let _ = tx.send((srv, actix_rt::System::current()));
@ -173,7 +173,7 @@ fn test_configure() {
})
.unwrap()
.workers(1)
.start()
.run()
}));
let _ = tx.send((srv, actix_rt::System::current()));
let _ = sys.run();