store intercept to set_proxy on requests

This commit is contained in:
Johann Tuffe
2017-12-18 17:53:17 +08:00
parent 8b1bb0b53e
commit 07f89984c4
4 changed files with 15 additions and 3 deletions

View File

@@ -113,7 +113,7 @@ impl Proxy {
/// # fn main() {}
pub fn custom<F, U: IntoUrl>(fun: F, url: U) -> ::Result<Proxy>
where F: Fn(&Uri) -> bool + 'static + Send + Sync {
Proxy::new(Intercept::Custom(Box::new(fun)), url)
Proxy::new(Intercept::Custom(fun.into()), url)
}
/*