1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-24 07:53:00 +01:00

restore execute method

This commit is contained in:
Nikolay Kim 2018-11-19 16:39:40 -08:00
parent 6b60c9e230
commit e1fc6dea84

View File

@ -375,6 +375,14 @@ impl<T> TestServerRuntime<T> {
self.rt.block_on(fut)
}
/// Execute future on current core
pub fn execute<F, I, E>(&mut self, fut: F) -> Result<I, E>
where
F: Future<Item = I, Error = E>,
{
self.rt.block_on(fut)
}
/// Construct test server url
pub fn addr(&self) -> net::SocketAddr {
self.addr