Integrate helper functions inside corresponding structs

This commit is contained in:
Yannick Heinrich
2018-10-05 14:02:31 +02:00
committed by Sean McArthur
parent 647f59756e
commit c4bf420021
9 changed files with 111 additions and 116 deletions

View File

@@ -128,7 +128,7 @@ impl Proxy {
}
}
fn intercept<D: Dst>(&self, uri: &D) -> Option<::hyper::Uri> {
pub(crate) fn intercept<D: Dst>(&self, uri: &D) -> Option<::hyper::Uri> {
match self.intercept {
Intercept::All(ref u) => Some(u.clone()),
Intercept::Http(ref u) => {
@@ -203,10 +203,6 @@ impl Dst for Destination {
}
}
pub(crate) fn intercept(proxy: &Proxy, uri: &Destination) -> Option<::http::Uri> {
proxy.intercept(uri)
}
#[cfg(test)]
mod tests {
use super::*;