Skip to content

Commit 83428b2

Browse files
committed
Revert "reduce rust version to 1.71 & edition to 2021"
This reverts commit 8a34075.
1 parent 8a34075 commit 83428b2

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ categories = [
99
]
1010
keywords = ["evm", "ethereum", "blockchain", "events", "alloy"]
1111
authors = ["OpenZeppelin"]
12-
edition = "2021"
13-
rust-version = "1.71"
12+
edition = "2024"
1413
readme = "README.md"
1514
license = "MIT"
1615
repository = "https://github.com/OpenZeppelin/Event-Scanner"

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[toolchain]
2-
channel = "1.71"
2+
channel = "1.89"

src/event_scanner/block_range_handler.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,25 @@
88
use std::ops::RangeInclusive;
99

1010
use crate::{
11+
Message, Notification, ScannerError, ScannerMessage,
1112
block_range_scanner::BlockScannerResult,
1213
event_scanner::{filter::EventFilter, listener::EventListener},
1314
types::TryStream,
14-
Message, Notification, ScannerError, ScannerMessage,
1515
};
1616
use alloy::{
1717
network::Network,
1818
rpc::types::{Filter, Log},
1919
};
2020
use futures::StreamExt;
21-
use robust_provider::{provider::Error as RobustProviderError, RobustProvider};
21+
use robust_provider::{RobustProvider, provider::Error as RobustProviderError};
2222
use tokio::{
2323
sync::{
24-
broadcast::{self, error::RecvError, Sender},
24+
broadcast::{self, Sender, error::RecvError},
2525
mpsc,
2626
},
2727
task::JoinSet,
2828
};
29-
use tokio_stream::{wrappers::ReceiverStream, Stream};
29+
use tokio_stream::{Stream, wrappers::ReceiverStream};
3030

3131
/// Handles a stream of scanned block ranges.
3232
pub trait BlockRangeHandler {
@@ -117,10 +117,10 @@ impl<N: Network> StreamHandler<N> {
117117

118118
// process all of the buffered results
119119
while let Some(result) = stream.next().await {
120-
if let Ok(ScannerMessage::Data(logs)) = result.as_ref() {
121-
if logs.is_empty() {
122-
continue;
123-
}
120+
if let Ok(ScannerMessage::Data(logs)) = result.as_ref() &&
121+
logs.is_empty()
122+
{
123+
continue;
124124
}
125125

126126
if listener.sender.try_stream(result).await.is_closed() {
@@ -491,7 +491,7 @@ async fn get_logs<N: Network>(
491491
mod tests {
492492
use alloy::{
493493
network::Ethereum,
494-
providers::{mock::Asserter, RootProvider},
494+
providers::{RootProvider, mock::Asserter},
495495
rpc::client::RpcClient,
496496
};
497497

0 commit comments

Comments
 (0)