File tree Expand file tree Collapse file tree 4 files changed +13
-14
lines changed Expand file tree Collapse file tree 4 files changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ description = """
14
14
Yet yet yet another OAuth 1.0 client library.
15
15
"""
16
16
17
+ [package .metadata .docs .rs ]
18
+ rustdoc-args = [" --cfg" , " docsrs" ]
19
+
17
20
[dependencies ]
18
21
base64 = " 0.13"
19
22
bitflags = " 1"
Original file line number Diff line number Diff line change 88
88
//!
89
89
//! See [`Request`][oauth1_request_derive::Request] for more details on the derive macro.
90
90
91
+ #![ cfg_attr( docsrs, feature( doc_cfg, doc_cfg_hide) ) ]
91
92
#![ doc( html_root_url = "https://docs.rs/oauth1-request/0.5.1" ) ]
93
+ // Prevent `oauth-credentials/alloc` feature from showing up on re-exports.
94
+ #![ cfg_attr( docsrs, doc( cfg_hide( feature = "alloc" ) ) ) ]
92
95
#![ deny( broken_intra_doc_links) ]
93
96
#![ warn( missing_docs, rust_2018_idioms) ]
94
97
Original file line number Diff line number Diff line change @@ -53,13 +53,9 @@ options! {
53
53
/// A version of `Signer` that uses the `PLAINTEXT` signature method.
54
54
pub type PlaintextAuthorizer < ' a > = Authorizer < ' a , Plaintext > ;
55
55
56
- cfg_if:: cfg_if! {
57
- if #[ cfg( feature = "hmac-sha1" ) ] {
58
- use crate :: signature_method:: HmacSha1 ;
59
- /// A version of `Signer` that uses the `HMAC-SHA1` signature method.
60
- pub type HmacSha1Authorizer <' a> = Authorizer <' a, HmacSha1 >;
61
- }
62
- }
56
+ /// A version of `Signer` that uses the `HMAC-SHA1` signature method.
57
+ #[ cfg( feature = "hmac-sha1" ) ]
58
+ pub type HmacSha1Authorizer < ' a > = Authorizer < ' a , crate :: signature_method:: HmacSha1 > ;
63
59
64
60
impl < ' a , SM : SignatureMethod > Authorizer < ' a , SM > {
65
61
/// Creates an `Authorizer`.
Original file line number Diff line number Diff line change 6
6
//! So the module provides an abstraction over signature methods so that users can implement those
7
7
//! custom methods by themselves.
8
8
9
- cfg_if:: cfg_if! {
10
- if #[ cfg( feature = "hmac-sha1" ) ] {
11
- pub mod hmac_sha1;
12
- pub use self :: hmac_sha1:: HmacSha1 ;
13
- }
14
- }
15
-
9
+ #[ cfg( feature = "hmac-sha1" ) ]
10
+ pub mod hmac_sha1;
16
11
pub mod identity;
17
12
pub mod plaintext;
18
13
19
14
#[ cfg( feature = "either" ) ]
20
15
mod either;
21
16
17
+ #[ cfg( feature = "hmac-sha1" ) ]
18
+ pub use self :: hmac_sha1:: HmacSha1 ;
22
19
pub use self :: identity:: Identity ;
23
20
pub use self :: plaintext:: Plaintext ;
24
21
You can’t perform that action at this time.
0 commit comments