Update to 2024 edition (#2001)

* Update to 2024 edition

* Update to 2024 edition; fmt, use<> and remove refs

* async functions
This commit is contained in:
James Wilson
2025-05-09 16:12:18 +01:00
committed by GitHub
parent 98c1d153b6
commit 23c62f3d5d
120 changed files with 399 additions and 322 deletions
@@ -2,8 +2,8 @@
// This file is dual-licensed as Apache-2.0 or GPL-3.0.
// see LICENSE for license details.
use super::follow_stream::FollowStream;
use super::ChainHeadRpcMethods;
use super::follow_stream::FollowStream;
use crate::config::{Config, Hash, HashFor};
use crate::error::Error;
use futures::stream::{FuturesUnordered, Stream, StreamExt};
@@ -468,7 +468,7 @@ impl<H: Hash> Drop for BlockRef<H> {
#[cfg(test)]
pub(super) mod test_utils {
use super::super::follow_stream::{test_utils::test_stream_getter, FollowStream};
use super::super::follow_stream::{FollowStream, test_utils::test_stream_getter};
use super::*;
use crate::config::substrate::H256;
@@ -573,10 +573,7 @@ mod test {
10,
);
let out: Vec<_> = follow_unpin
.filter_map(|e| async move { e.ok() })
.collect()
.await;
let out: Vec<_> = follow_unpin.filter_map(async |e| e.ok()).collect().await;
assert_eq!(
out,