Skip to content

Commit 6aeb3d1

Browse files
committed
fix: lint
1 parent b2b50d2 commit 6aeb3d1

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/client/near.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -492,10 +492,7 @@ impl NearClient {
492492

493493
pub async fn get_nonce(&self, signer: &InMemorySigner) -> anyhow::Result<(CryptoHash, u64)> {
494494
let nonces = self.access_key_nonces.read().await;
495-
let cache_key = (
496-
signer.account_id.clone(),
497-
signer.secret_key.public_key().into(),
498-
);
495+
let cache_key = (signer.account_id.clone(), signer.secret_key.public_key());
499496

500497
if let Some(nonce) = nonces.get(&cache_key) {
501498
let nonce = nonce.fetch_add(1, Ordering::SeqCst);
@@ -520,9 +517,9 @@ impl NearClient {
520517
let response = self.client.call(request).await?;
521518

522519
let block_hash = response.block_hash;
523-
let access_key = match response.kind {
524-
QueryResponseKind::AccessKey(k) => k,
525-
_ => anyhow::bail!("Wrong response kind: {:?}", response.kind),
520+
521+
let QueryResponseKind::AccessKey(access_key) = response.kind else {
522+
anyhow::bail!("Wrong response kind: {:?}", response.kind)
526523
};
527524

528525
// case where multiple writers end up at the same lock acquisition point and tries

0 commit comments

Comments
 (0)