Skip to content

Commit 41ad87a

Browse files
committed
fix(cardano-blockchain-types): logic
Signed-off-by: bkioshn <[email protected]>
1 parent 358b640 commit 41ad87a

File tree

1 file changed

+5
-1
lines changed
  • rust/cardano-blockchain-types/src/metadata/cip36

1 file changed

+5
-1
lines changed

rust/cardano-blockchain-types/src/metadata/cip36/mod.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ impl Cip36 {
9999
/// * `is_catalyst_strict` - Is this a Catalyst strict registration?
100100
///
101101
/// # Returns
102+
///
102103
/// None if the metadata is not in the block at given index.
103104
///
104105
/// # Errors
@@ -218,7 +219,10 @@ impl Cip36 {
218219
}
219220
}
220221

221-
cip36_map.is_empty().then_some(cip36_map)
222+
if cip36_map.is_empty() {
223+
return None;
224+
}
225+
Some(cip36_map)
222226
}
223227

224228
/// Get the `is_cip36` flag from the registration.

0 commit comments

Comments
 (0)