1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-24 22:37:35 +02:00

enable runtime for test:: methods

This commit is contained in:
Nikolay Kim
2019-04-17 10:28:27 -07:00
parent cc8420377e
commit b64851c5ec
3 changed files with 31 additions and 42 deletions

View File

@ -331,7 +331,7 @@ impl ClientRequest {
/// This method calls provided closure with builder reference if
/// value is `true`.
pub fn if_true<F>(mut self, value: bool, f: F) -> Self
pub fn if_true<F>(self, value: bool, f: F) -> Self
where
F: FnOnce(ClientRequest) -> ClientRequest,
{
@ -344,7 +344,7 @@ impl ClientRequest {
/// This method calls provided closure with builder reference if
/// value is `Some`.
pub fn if_some<T, F>(mut self, value: Option<T>, f: F) -> Self
pub fn if_some<T, F>(self, value: Option<T>, f: F) -> Self
where
F: FnOnce(T, ClientRequest) -> ClientRequest,
{