refactor(client): pass internal executor to h2 dispatcher

This commit is contained in:
Sean McArthur
2018-04-25 17:55:45 -07:00
parent a4f4553487
commit d19d95af77
4 changed files with 45 additions and 44 deletions

View File

@@ -61,8 +61,8 @@ impl Destination {
pub fn scheme(&self) -> &str {
self.uri
.scheme_part()
.expect("destination uri has scheme")
.as_str()
.map(|s| s.as_str())
.unwrap_or("")
}
/// Get the hostname.
@@ -70,7 +70,7 @@ impl Destination {
pub fn host(&self) -> &str {
self.uri
.host()
.expect("destination uri has host")
.unwrap_or("")
}
/// Get the port, if specified.
@@ -470,7 +470,6 @@ mod http {
#[cfg(test)]
mod tests {
#![allow(deprecated)]
use std::io;
use futures::Future;
use super::{Connect, Destination, HttpConnector};