This commit is contained in:
Rob Ede 2021-01-09 12:01:55 +00:00
parent a1982bdbad
commit a868ce9be5
No known key found for this signature in database
GPG Key ID: C2A3B36E841A91E6
4 changed files with 6 additions and 12 deletions

View File

@ -20,7 +20,7 @@ default = ["http"]
[dependencies]
regex = "1.3.1"
serde = "1.0.104"
bytestring = "0.1.2"
bytestring = ">=0.1.5, <2"
log = "0.4.8"
http = { version = "0.2.2", optional = true }

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

@ -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

@ -327,7 +327,9 @@ macro_rules! forward_ready {
&mut self,
cx: &mut ::core::task::Context<'_>,
) -> ::core::task::Poll<Result<(), Self::Error>> {
self.$field.poll_ready(cx)
self.$field
.poll_ready(cx)
.map_err(::core::convert::Into::into)
}
};
}