downgrade from reqwest -> hyper 0.9, to keep compatibility with tenquestionmarks

This commit is contained in:
Adrian Malacoda 2017-02-26 17:53:39 -06:00
parent d2d637c2d9
commit 5a14e3ba06
5 changed files with 20 additions and 15 deletions

View File

@ -8,5 +8,11 @@ log = "0.3.6"
env_logger = "0.4.0" env_logger = "0.4.0"
sqlite = "0.23.4" sqlite = "0.23.4"
select = "0.3.0" select = "0.3.0"
reqwest = "0.4.0"
# 26 February 2017: Would ideally like to use up-to-date libraries here
# but this depends on openssl 0.9.7 which conflicts with the openssl 0.7.17 dependency
# used in tenquestionmarks (ultimately brought in by discord-rs which uses hyper 0.9). So, as a necessary evil,
# we need to keep to those versions as well to be compatible with tenquestionmarks.
#reqwest = "0.4.0"
hyper = "0.9.18"
serde_json = "0.9" serde_json = "0.9"

View File

@ -1,4 +1,4 @@
extern crate reqwest; extern crate hyper;
extern crate select; extern crate select;
extern crate serde_json; extern crate serde_json;

View File

@ -2,7 +2,6 @@ pub mod mtg;
pub mod yugioh; pub mod yugioh;
use Link; use Link;
use std::any::Any;
use std::collections::BTreeMap; use std::collections::BTreeMap;
pub trait Searcher<T: Link> { pub trait Searcher<T: Link> {

View File

@ -1,8 +1,8 @@
use Link; use Link;
use searchers::Searcher; use searchers::Searcher;
use reqwest; use hyper;
use reqwest::Client; use hyper::Client;
use serde_json; use serde_json;
use serde_json::Value; use serde_json::Value;
@ -46,7 +46,7 @@ pub struct MtgSearcher {
impl MtgSearcher { impl MtgSearcher {
pub fn new () -> MtgSearcher { pub fn new () -> MtgSearcher {
MtgSearcher { MtgSearcher {
client: Client::new().unwrap() client: Client::new()
} }
} }
@ -87,14 +87,14 @@ impl Searcher<MtgCard> for MtgSearcher {
#[derive(Debug)] #[derive(Debug)]
enum Error { enum Error {
Http(reqwest::Error), Http(hyper::error::Error),
Io(std::io::Error), Io(std::io::Error),
Json(serde_json::Error), Json(serde_json::Error),
Other(String) Other(String)
} }
impl From<reqwest::Error> for Error { impl From<hyper::error::Error> for Error {
fn from (error: reqwest::Error) -> Error { fn from (error: hyper::error::Error) -> Error {
Error::Http(error) Error::Http(error)
} }
} }

View File

@ -1,8 +1,8 @@
use Link; use Link;
use searchers::Searcher; use searchers::Searcher;
use reqwest; use hyper;
use reqwest::Client; use hyper::Client;
use serde_json; use serde_json;
use serde_json::Value; use serde_json::Value;
@ -47,7 +47,7 @@ pub struct YugiohSearcher {
impl YugiohSearcher { impl YugiohSearcher {
pub fn new () -> YugiohSearcher { pub fn new () -> YugiohSearcher {
YugiohSearcher { YugiohSearcher {
client: Client::new().unwrap() client: Client::new()
} }
} }
@ -91,14 +91,14 @@ impl Searcher<YugiohCard> for YugiohSearcher {
#[derive(Debug)] #[derive(Debug)]
enum Error { enum Error {
Http(reqwest::Error), Http(hyper::error::Error),
Io(std::io::Error), Io(std::io::Error),
Json(serde_json::Error), Json(serde_json::Error),
Other(String) Other(String)
} }
impl From<reqwest::Error> for Error { impl From<hyper::error::Error> for Error {
fn from (error: reqwest::Error) -> Error { fn from (error: hyper::error::Error) -> Error {
Error::Http(error) Error::Http(error)
} }
} }