Skip to content

Commit

Permalink
refactor(client): remove experimental HTTP2 support
Browse files Browse the repository at this point in the history
It didn't really work, and it had dangerous optional dependencies
(openssl), so for now, this is going away. HTTP2 should come back with
full support in the not-too-distant future.

BREAKING CHANGE: There is no more `hyper::http::h2`.
  • Loading branch information
seanmonstar committed Jan 5, 2017
1 parent cb48452 commit d301c6a
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 1,025 deletions.
4 changes: 0 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ url = "1.0"
version = "0.5"
default-features = false

[dependencies.solicit]
version = "0.4"
default-features = false

[dev-dependencies]
env_logger = "0.3"

Expand Down
34 changes: 0 additions & 34 deletions examples/client_http2.rs

This file was deleted.

14 changes: 0 additions & 14 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use std::string::FromUtf8Error;

use httparse;
use url;
use solicit::http::HttpError as Http2Error;

#[cfg(feature = "openssl")]
use openssl::ssl::error::SslError;
Expand All @@ -21,7 +20,6 @@ use self::Error::{
Io,
Ssl,
TooLarge,
Http2,
Utf8
};

Expand Down Expand Up @@ -49,8 +47,6 @@ pub enum Error {
Io(IoError),
/// An error from a SSL library.
Ssl(Box<StdError + Send + Sync>),
/// An HTTP/2-specific error, coming from the `solicit` library.
Http2(Http2Error),
/// Parsing a field as string failed
Utf8(Utf8Error),

Expand Down Expand Up @@ -90,7 +86,6 @@ impl StdError for Error {
Uri(ref e) => e.description(),
Io(ref e) => e.description(),
Ssl(ref e) => e.description(),
Http2(ref e) => e.description(),
Utf8(ref e) => e.description(),
Error::__Nonexhaustive(ref void) => match *void {}
}
Expand All @@ -101,7 +96,6 @@ impl StdError for Error {
Io(ref error) => Some(error),
Ssl(ref error) => Some(&**error),
Uri(ref error) => Some(error),
Http2(ref error) => Some(error),
_ => None,
}
}
Expand Down Expand Up @@ -155,18 +149,11 @@ impl From<httparse::Error> for Error {
}
}

impl From<Http2Error> for Error {
fn from(err: Http2Error) -> Error {
Error::Http2(err)
}
}

#[cfg(test)]
mod tests {
use std::error::Error as StdError;
use std::io;
use httparse;
use solicit::http::HttpError as Http2Error;
use url;
use super::Error;
use super::Error::*;
Expand Down Expand Up @@ -208,7 +195,6 @@ mod tests {

from_and_cause!(io::Error::new(io::ErrorKind::Other, "other") => Io(..));
from_and_cause!(url::ParseError::EmptyHost => Uri(..));
from_and_cause!(Http2Error::UnknownStreamId => Http2(..));

from!(httparse::Error::HeaderName => Header);
from!(httparse::Error::HeaderName => Header);
Expand Down
Loading

0 comments on commit d301c6a

Please sign in to comment.