mirror of
https://github.com/actix/actix-web.git
synced 2025-01-02 21:38:46 +00:00
restore execute method
This commit is contained in:
parent
6b60c9e230
commit
e1fc6dea84
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue