Skip to content

Commit d3063c7

Browse files
simplify hazmat feature documentation cfg attributes
1 parent a359900 commit d3063c7

File tree

4 files changed

+5
-20
lines changed

4 files changed

+5
-20
lines changed

soroban-sdk/src/address.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -394,10 +394,7 @@ impl Address {
394394
/// custom Ed25519 signature verification as a form of authentication
395395
/// because the master key may not be configured the signer of the account.
396396
#[cfg(any(test, feature = "hazmat-address"))]
397-
#[cfg_attr(
398-
feature = "docs",
399-
doc(cfg(any(feature = "hazmat", feature = "hazmat-address")))
400-
)]
397+
#[cfg_attr(feature = "docs", doc(cfg(feature = "hazmat-address")))]
401398
pub fn to_payload(&self) -> Option<AddressPayload> {
402399
AddressPayload::from_address(self)
403400
}
@@ -414,10 +411,7 @@ impl Address {
414411
/// custom Ed25519 signature verification as a form of authentication
415412
/// because the master key may not be configured the signer of the account.
416413
#[cfg(any(test, feature = "hazmat-address"))]
417-
#[cfg_attr(
418-
feature = "docs",
419-
doc(cfg(any(feature = "hazmat", feature = "hazmat-address")))
420-
)]
414+
#[cfg_attr(feature = "docs", doc(cfg(feature = "hazmat-address")))]
421415
pub fn from_payload(env: &Env, payload: AddressPayload) -> Address {
422416
payload.to_address(env)
423417
}

soroban-sdk/src/address_payload.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#![cfg(any(test, feature = "hazmat-address"))]
2-
#![cfg_attr(
3-
feature = "docs",
4-
doc(cfg(any(feature = "hazmat", feature = "hazmat-address")))
5-
)]
2+
#![cfg_attr(feature = "docs", doc(cfg(feature = "hazmat-address")))]
63

74
//! Address payload extraction and construction.
85
//!

soroban-sdk/src/crypto.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,7 @@ impl Crypto {
191191
/// incorrectly can introduce security vulnerabilities. Please use [Crypto] if
192192
/// possible.
193193
#[cfg_attr(any(test, feature = "hazmat-crypto"), visibility::make(pub))]
194-
#[cfg_attr(
195-
feature = "docs",
196-
doc(cfg(any(feature = "hazmat", feature = "hazmat-crypto")))
197-
)]
194+
#[cfg_attr(feature = "docs", doc(cfg(feature = "hazmat-crypto")))]
198195
pub(crate) struct CryptoHazmat {
199196
env: Env,
200197
}

soroban-sdk/src/env.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,7 @@ impl Env {
334334
/// incorrectly can introduce security vulnerabilities. Use [Crypto] if
335335
/// possible.
336336
#[cfg_attr(any(test, feature = "hazmat-crypto"), visibility::make(pub))]
337-
#[cfg_attr(
338-
feature = "docs",
339-
doc(cfg(any(feature = "hazmat", feature = "hazmat-crypto")))
340-
)]
337+
#[cfg_attr(feature = "docs", doc(cfg(feature = "hazmat-crypto")))]
341338
#[inline(always)]
342339
pub(crate) fn crypto_hazmat(&self) -> crate::crypto::CryptoHazmat {
343340
crate::crypto::CryptoHazmat::new(self)

0 commit comments

Comments
 (0)