Skip to content

Commit 3dc1ba4

Browse files
committed
fix clippy
1 parent 5e797f9 commit 3dc1ba4

File tree

1 file changed

+13
-13
lines changed
  • rust/rbac-registration/src/registration/cardano

1 file changed

+13
-13
lines changed

rust/rbac-registration/src/registration/cardano/mod.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -669,11 +669,12 @@ impl RegistrationChainInner {
669669
/// Returns the latest know applied registration's `PointTxnIdx`.
670670
#[must_use]
671671
fn latest_applied(&self) -> PointTxnIdx {
672-
if let Some(latest_taken_uris_point) = &self.latest_taken_uris_point {
673-
if latest_taken_uris_point.point() > self.current_tx_id_hash.point() {
674-
return latest_taken_uris_point.clone();
675-
}
672+
if let Some(latest_taken_uris_point) = &self.latest_taken_uris_point
673+
&& latest_taken_uris_point.point() > self.current_tx_id_hash.point()
674+
{
675+
return latest_taken_uris_point.clone();
676676
}
677+
677678
PointTxnIdx::new(
678679
self.current_tx_id_hash.point().clone(),
679680
self.current_tx_id_hash.txn_index(),
@@ -733,15 +734,14 @@ where
733734
State: RbacChainsState,
734735
{
735736
for role in cip509.all_roles() {
736-
if let Some(key) = cip509.signing_pk_for_role(role) {
737-
if let Some(previous) = state.chain_catalyst_id_from_signing_pk(&key).await? {
738-
if &previous != cat_id {
739-
cip509.report().functional_validation(
740-
&format!("An update to {cat_id} registration chain uses the same public key ({key:?}) as {previous} chain"),
741-
"It isn't allowed to use role 0 signing (certificate subject public) key in different chains",
742-
);
743-
}
744-
}
737+
if let Some(key) = cip509.signing_pk_for_role(role)
738+
&& let Some(previous) = state.chain_catalyst_id_from_signing_pk(&key).await?
739+
&& &previous != cat_id
740+
{
741+
cip509.report().functional_validation(
742+
&format!("An update to {cat_id} registration chain uses the same public key ({key:?}) as {previous} chain"),
743+
"It isn't allowed to use role 0 signing (certificate subject public) key in different chains",
744+
);
745745
}
746746
}
747747

0 commit comments

Comments
 (0)