Fix feature builds

This commit is contained in:
asonix 2020-09-29 19:48:00 -05:00
parent d6f7602e31
commit 3c73552ff2
5 changed files with 6 additions and 3 deletions

View file

@ -1,7 +1,7 @@
[package] [package]
name = "http-signature-normalization-reqwest" name = "http-signature-normalization-reqwest"
description = "An HTTP Signatures library that leaves the signing to you" description = "An HTTP Signatures library that leaves the signing to you"
version = "0.1.0" version = "0.1.1"
authors = ["asonix <asonix@asonix.dog>"] authors = ["asonix <asonix@asonix.dog>"]
license-file = "LICENSE" license-file = "LICENSE"
readme = "README.md" readme = "README.md"

View file

@ -14,7 +14,7 @@ This crate provides extensions the RequestBuilder type from reqwest
#### First, add this crate to your dependencies #### First, add this crate to your dependencies
```toml ```toml
thiserror = "0.1" thiserror = "0.1"
http-signature-normalization-reqwest = { version = "0.1.0", default-features = false, features = ["sha-2"] } http-signature-normalization-reqwest = { version = "0.1.1", default-features = false, features = ["sha-2"] }
sha2 = "0.9" sha2 = "0.9"
``` ```

View file

@ -2,7 +2,9 @@ use crate::{Config, Sign, SignError};
use reqwest::{Body, RequestBuilder}; use reqwest::{Body, RequestBuilder};
use std::{fmt::Display, future::Future, pin::Pin}; use std::{fmt::Display, future::Future, pin::Pin};
#[cfg(feature = "sha-2")]
mod sha2; mod sha2;
#[cfg(feature = "sha-3")]
mod sha3; mod sha3;
/// A trait for creating digests of an array of bytes /// A trait for creating digests of an array of bytes

View file

@ -5,7 +5,7 @@ use sha3::{
use super::DigestCreate; use super::DigestCreate;
fn create(digest: &mut impl sha2::Digest, input: &[u8]) -> String { fn create(digest: &mut impl sha3::Digest, input: &[u8]) -> String {
digest.update(input); digest.update(input);
base64::encode(&digest.finalize_reset()) base64::encode(&digest.finalize_reset())
} }

View file

@ -8,6 +8,7 @@ use std::fmt::Display;
pub use http_signature_normalization::RequiredError; pub use http_signature_normalization::RequiredError;
#[cfg(feature = "digest")]
pub mod digest; pub mod digest;
pub mod prelude { pub mod prelude {