Skip to content

Commit

Permalink
Fix building without reqwest
Browse files Browse the repository at this point in the history
  • Loading branch information
FredrikNoren committed Jan 18, 2024
1 parent e070f16 commit ba5d88e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/cargo-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,12 @@ jobs:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose

build-without-reqwest:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose --no-default-features
2 changes: 2 additions & 0 deletions src/v1/resources/shared.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[cfg(feature = "reqwest")]
use reqwest::header::HeaderMap;
use serde::{Deserialize, Serialize};

Expand Down Expand Up @@ -101,6 +102,7 @@ pub enum StopToken {
Array(Vec<String>),
}

#[cfg(feature = "reqwest")]
impl From<HeaderMap> for Headers {
fn from(value: HeaderMap) -> Self {
if value.get("x-ratelimit-limit-requests").is_none()
Expand Down

0 comments on commit ba5d88e

Please sign in to comment.