Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes build with default-features = false #20

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ jobs:
with:
command: clippy
args: -- -D warnings
- name: Check default-features = false
uses: actions-rs/cargo@v1
with:
command: clippy
args: --no-default-features -- -D warnings
test:
name: Run cargo test
runs-on: ubuntu-latest
Expand Down Expand Up @@ -79,4 +84,4 @@ jobs:
override: true
- uses: katyo/publish-crates@v1
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
stormshield-gt marked this conversation as resolved.
Show resolved Hide resolved
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
3 changes: 3 additions & 0 deletions src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ pub enum ClientError {
method: RequestMethod,
url: String,
},

#[cfg(feature = "reqwest")]
#[error("Error building request for Reqwest crate")]
ReqwestBuildError { source: reqwest::Error },

#[error("Error retrieving HTTP response")]
ResponseError { source: anyhow::Error },
#[error("Error parsing server response as UTF-8")]
Expand Down
7 changes: 3 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
//! Rustify is a small library written in Rust which eases the burden of
//! scaffolding HTTP APIs. It provides an `Endpoint` trait along with a macro helper
//! which allows templating various remote endpoints. Both asynchronous and
//! synchrounous clients are offered for executing requests against endpoints with

Check warning on line 20 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Check for typos

"synchrounous" should be "synchronous".
//! the option of implementing custom clients using the `Client` trait.
//!
//! Rustify provides support for serializing requests and deserializing responses.
Expand Down Expand Up @@ -234,7 +234,6 @@
#[path = "private/mod.rs"]
pub mod __private;

pub use crate::{
clients::reqwest::Client,
endpoint::{Endpoint, MiddleWare, Wrapper},
};
#[cfg(feature = "reqwest")]
pub use crate::clients::reqwest::Client;
pub use crate::endpoint::{Endpoint, MiddleWare, Wrapper};
Loading