Skip to content

Commit 2beefc1

Browse files
committed
fix clippy issue
1 parent 142842d commit 2beefc1

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

chain-extensions/src/tests.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -684,12 +684,16 @@ fn add_proxy_success_creates_proxy_relationship() {
684684

685685
let proxies = pallet_subtensor_proxy::Proxies::<mock::Test>::get(delegator).0;
686686
assert_eq!(proxies.len(), 1);
687-
assert_eq!(proxies[0].delegate, delegate);
688-
assert_eq!(
689-
proxies[0].proxy_type,
690-
subtensor_runtime_common::ProxyType::Staking
691-
);
692-
assert_eq!(proxies[0].delay, 0u64);
687+
if let Some(proxy) = proxies.first() {
688+
assert_eq!(proxy.delegate, delegate);
689+
assert_eq!(
690+
proxy.proxy_type,
691+
subtensor_runtime_common::ProxyType::Staking
692+
);
693+
assert_eq!(proxy.delay, 0u64);
694+
} else {
695+
panic!("proxies should contain one element");
696+
}
693697
});
694698
}
695699

0 commit comments

Comments
 (0)