<commit_before>use futures::{Future, Poll, Stream};
use http_types;
use tokio_service::Service;

use client::{Connect, Client, FutureResponse};
use error::Error;
use http::Body;

/// A Client to make outgoing HTTP requests.
#[derive(Debug)]
pub struct CompatClient<C, B = Body> {
    inner: Client<C, B>
}

pub fn client<C, B>(client: Client<C, B>) -> CompatClient<C, B> {
    CompatClient { inner: client }
}

impl<C, B> Service for CompatClient<C, B>
where C: Connect,
      B: Stream<Error=Error> + 'static,
      B::Item: AsRef<[u8]>,
{
    type Request = http_types::Request<B>;
    type Response = http_types::Response<Body>;
    type Error = Error;
    type Future = CompatFutureResponse;

    fn call(&self, req: Self::Request) -> Self::Future {
        future(self.inner.call(req.into()))
    }
}
<commit_msg>refactor(lib): fix compat layer after rename to proto<commit_after>use futures::{Future, Poll, Stream};
use http_types;
use tokio_service::Service;

use client::{Connect, Client, FutureResponse};
use error::Error;
use proto::Body;

/// A Client to make outgoing HTTP requests.
#[derive(Debug)]
pub struct CompatClient<C, B = Body> {
    inner: Client<C, B>
}

pub fn client<C, B>(client: Client<C, B>) -> CompatClient<C, B> {
    CompatClient { inner: client }
}

impl<C, B> Service for CompatClient<C, B>
where C: Connect,
      B: Stream<Error=Error> + 'static,
      B::Item: AsRef<[u8]>,
{
    type Request = http_types::Request<B>;
    type Response = http_types::Response<Body>;
    type Error = Error;
    type Future = CompatFutureResponse;

    fn call(&self, req: Self::Request) -> Self::Future {
        future(self.inner.call(req.into()))
    }
}

{'fraction_non_alphanumeric': 0.15444245676803817, 'fraction_numerical': 0.0011926058437686344, 'mean_word_length': 4.115853658536586, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5363913', 'n_tokens_mistral': 567, 'n_tokens_neox': 565, 'n_words': 157}