Re-export reqwest properly

This commit is contained in:
Mingwei Samuel 2020-06-04 22:11:53 -07:00
parent 1b80fa2595
commit ea1af34854
3 changed files with 7 additions and 7 deletions

2
doc.bash Normal file
View file

@ -0,0 +1,2 @@
#!/bin/bash
cargo doc --features nightly

View file

@ -1,13 +1,7 @@
use std::error::Error as StdError; use std::error::Error as StdError;
use std::fmt; use std::fmt;
/// Re-exported `reqwest` types. use reqwest::{ Error, Response, StatusCode };
pub mod reqwest {
pub use reqwest::{
Error, Response, StatusCode, Url
};
}
use ::reqwest::*;
/// Result containing RiotApiError on failure. /// Result containing RiotApiError on failure.
pub type Result<T> = std::result::Result<T, RiotApiError>; pub type Result<T> = std::result::Result<T, RiotApiError>;

View file

@ -6,6 +6,10 @@
#![cfg_attr(feature = "nightly", doc(include = "../README.md"))] #![cfg_attr(feature = "nightly", doc(include = "../README.md"))]
#![cfg_attr(not(feature = "nightly"), doc = "See [README.md](https://github.com/MingweiSamuel/Riven#readme).")] #![cfg_attr(not(feature = "nightly"), doc = "See [README.md](https://github.com/MingweiSamuel/Riven#readme).")]
// Re-exported reqwest types.
pub use reqwest;
mod config; mod config;
pub use config::RiotApiConfig; pub use config::RiotApiConfig;