downgrade from reqwest -> hyper 0.9, to keep compatibility with tenquestionmarks
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user