Skip to content

Commit d68b2b6

Browse files
committed
fix: clippy errors
1 parent 4e4fe5b commit d68b2b6

4 files changed

Lines changed: 5 additions & 8 deletions

File tree

rust/main/agents/relayer/src/relay_api/handlers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ impl RateLimiter {
295295
while self
296296
.requests
297297
.front()
298-
.map_or(false, |&t| now.saturating_sub(t) >= self.window_secs)
298+
.is_some_and(|&t| now.saturating_sub(t) >= self.window_secs)
299299
{
300300
self.requests.pop_front();
301301
}

rust/main/chains/hyperlane-ethereum/src/contracts/interchain_gas.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@ where
140140
.await
141141
.ok_or_else(|| {
142142
ChainCommunicationError::CustomError(format!(
143-
"No receipt found for tx hash {:?}",
144-
tx_hash
143+
"No receipt found for tx hash {tx_hash:?}"
145144
))
146145
})?;
147146

rust/main/chains/hyperlane-ethereum/src/contracts/mailbox.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,7 @@ where
183183
.await
184184
.ok_or_else(|| {
185185
ChainCommunicationError::CustomError(format!(
186-
"No receipt found for tx hash {:?}",
187-
tx_hash
186+
"No receipt found for tx hash {tx_hash:?}"
188187
))
189188
})?;
190189
let logs = raw_logs_and_meta
@@ -216,7 +215,7 @@ where
216215
.await
217216
.map_err(ChainCommunicationError::from_other)?;
218217

219-
Ok(receipt.map_or(false, |r| {
218+
Ok(receipt.is_some_and(|r| {
220219
r.logs
221220
.iter()
222221
.any(|log| log.topics.first() == Some(&cctp_v2_topic))

rust/main/chains/hyperlane-ethereum/src/contracts/merkle_tree_hook.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,7 @@ where
165165
.await
166166
.ok_or_else(|| {
167167
ChainCommunicationError::CustomError(format!(
168-
"No receipt found for tx hash {:?}",
169-
tx_hash
168+
"No receipt found for tx hash {tx_hash:?}"
170169
))
171170
})?;
172171
let logs = raw_logs_and_meta

0 commit comments

Comments
 (0)