Skip to content

Commit 46cc6ff

Browse files
committed
more concise cfg attributes for re-exported types / StableAbi mod
1 parent 026aefc commit 46cc6ff

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

frozen-abi/src/lib.rs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,16 @@ pub mod abi_digester;
1111
pub mod abi_example;
1212
#[cfg(feature = "frozen-abi")]
1313
pub mod hash;
14-
#[cfg(feature = "frozen-abi")]
15-
#[cfg(not(target_os = "solana"))]
14+
15+
#[cfg(all(feature = "frozen-abi", not(target_os = "solana")))]
1616
pub mod stable_abi;
1717

1818
#[cfg(feature = "frozen-abi")]
1919
#[macro_use]
2020
extern crate solana_frozen_abi_macro;
2121

22-
#[cfg(feature = "frozen-abi")]
23-
#[cfg(not(target_os = "solana"))]
24-
pub use bincode;
25-
#[cfg(feature = "frozen-abi")]
26-
#[cfg(not(target_os = "solana"))]
27-
pub use rand;
28-
#[cfg(feature = "frozen-abi")]
29-
#[cfg(not(target_os = "solana"))]
30-
pub use rand_chacha;
22+
#[cfg(all(feature = "frozen-abi", not(target_os = "solana")))]
23+
pub use {bincode, rand, rand_chacha};
3124

3225
// Not public API. Previously referenced by macro-generated code. Remove the
3326
// `log` dependency from Cargo.toml when this is cleaned up in the next major

0 commit comments

Comments
 (0)