downgrade from reqwest -> hyper 0.9, to keep compatibility with tenquestionmarks
This commit is contained in:
parent
d2d637c2d9
commit
5a14e3ba06
@ -8,5 +8,11 @@ log = "0.3.6"
|
||||
env_logger = "0.4.0"
|
||||
sqlite = "0.23.4"
|
||||
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"
|
||||
|
@ -1,4 +1,4 @@
|
||||
extern crate reqwest;
|
||||
extern crate hyper;
|
||||
extern crate select;
|
||||
extern crate serde_json;
|
||||
|
||||
|
@ -2,7 +2,6 @@ pub mod mtg;
|
||||
pub mod yugioh;
|
||||
|
||||
use Link;
|
||||
use std::any::Any;
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
pub trait Searcher<T: Link> {
|
||||
|
@ -1,8 +1,8 @@
|
||||
use Link;
|
||||
use searchers::Searcher;
|
||||
|
||||
use reqwest;
|
||||
use reqwest::Client;
|
||||
use hyper;
|
||||
use hyper::Client;
|
||||
|
||||
use serde_json;
|
||||
use serde_json::Value;
|
||||
@ -46,7 +46,7 @@ pub struct MtgSearcher {
|
||||
impl MtgSearcher {
|
||||
pub fn new () -> MtgSearcher {
|
||||
MtgSearcher {
|
||||
client: Client::new().unwrap()
|
||||
client: Client::new()
|
||||
}
|
||||
}
|
||||
|
||||
@ -87,14 +87,14 @@ impl Searcher<MtgCard> for MtgSearcher {
|
||||
|
||||
#[derive(Debug)]
|
||||
enum Error {
|
||||
Http(reqwest::Error),
|
||||
Http(hyper::error::Error),
|
||||
Io(std::io::Error),
|
||||
Json(serde_json::Error),
|
||||
Other(String)
|
||||
}
|
||||
|
||||
impl From<reqwest::Error> for Error {
|
||||
fn from (error: reqwest::Error) -> Error {
|
||||
impl From<hyper::error::Error> for Error {
|
||||
fn from (error: hyper::error::Error) -> Error {
|
||||
Error::Http(error)
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
use Link;
|
||||
use searchers::Searcher;
|
||||
|
||||
use reqwest;
|
||||
use reqwest::Client;
|
||||
use hyper;
|
||||
use hyper::Client;
|
||||
|
||||
use serde_json;
|
||||
use serde_json::Value;
|
||||
@ -47,7 +47,7 @@ pub struct YugiohSearcher {
|
||||
impl YugiohSearcher {
|
||||
pub fn new () -> YugiohSearcher {
|
||||
YugiohSearcher {
|
||||
client: Client::new().unwrap()
|
||||
client: Client::new()
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,14 +91,14 @@ impl Searcher<YugiohCard> for YugiohSearcher {
|
||||
|
||||
#[derive(Debug)]
|
||||
enum Error {
|
||||
Http(reqwest::Error),
|
||||
Http(hyper::error::Error),
|
||||
Io(std::io::Error),
|
||||
Json(serde_json::Error),
|
||||
Other(String)
|
||||
}
|
||||
|
||||
impl From<reqwest::Error> for Error {
|
||||
fn from (error: reqwest::Error) -> Error {
|
||||
impl From<hyper::error::Error> for Error {
|
||||
fn from (error: hyper::error::Error) -> Error {
|
||||
Error::Http(error)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user