Skip to content

Commit 222f863

Browse files
committed
simplify features
1 parent 60a711d commit 222f863

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

crates/iota-sdk-types/src/gas.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,16 +127,14 @@ impl std::fmt::Display for GasCostSummary {
127127
}
128128
}
129129

130-
#[cfg(test)]
130+
#[cfg(all(feature = "serde", test))]
131131
mod test {
132132
#[cfg(target_arch = "wasm32")]
133133
use wasm_bindgen_test::wasm_bindgen_test as test;
134134

135-
#[cfg(feature = "serde")]
136135
use super::*;
137136

138137
#[test]
139-
#[cfg(feature = "serde")]
140138
fn formats() {
141139
let actual = GasCostSummary {
142140
computation_cost: 42,

crates/iota-sdk-types/src/transaction/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ pub struct ChangeEpochV2 {
691691
/// write out the modules below. Modules are provided with the version they
692692
/// will be upgraded to, their modules in serialized form (which include
693693
/// their package ID), and a list of their transitive dependencies.
694-
#[cfg_attr(feature = "proptest", any(proptest::collection::size_range(0..=2).lift()))]
694+
#[cfg_attr(all(test, feature = "proptest"), any(proptest::collection::size_range(0..=2).lift()))]
695695
pub system_packages: Vec<SystemPackage>,
696696
}
697697

0 commit comments

Comments
 (0)