mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: clippy, fmt
This commit is contained in:
@ -71,27 +71,12 @@ impl BlockSource for S3BlockSource {
|
|||||||
let client = self.client.clone();
|
let client = self.client.clone();
|
||||||
let bucket = self.bucket.clone();
|
let bucket = self.bucket.clone();
|
||||||
async move {
|
async move {
|
||||||
let (_, first_level) = Self::pick_path_with_highest_number(
|
let (_, first_level) =
|
||||||
&client,
|
Self::pick_path_with_highest_number(&client, &bucket, "", true).await?;
|
||||||
&bucket,
|
let (_, second_level) =
|
||||||
"",
|
Self::pick_path_with_highest_number(&client, &bucket, &first_level, true).await?;
|
||||||
true,
|
let (block_number, third_level) =
|
||||||
)
|
Self::pick_path_with_highest_number(&client, &bucket, &second_level, false).await?;
|
||||||
.await?;
|
|
||||||
let (_, second_level) = Self::pick_path_with_highest_number(
|
|
||||||
&client,
|
|
||||||
&bucket,
|
|
||||||
&first_level,
|
|
||||||
true,
|
|
||||||
)
|
|
||||||
.await?;
|
|
||||||
let (block_number, third_level) = Self::pick_path_with_highest_number(
|
|
||||||
&client,
|
|
||||||
&bucket,
|
|
||||||
&second_level,
|
|
||||||
false,
|
|
||||||
)
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
info!("Latest block number: {} with path {}", block_number, third_level);
|
info!("Latest block number: {} with path {}", block_number, third_level);
|
||||||
Some(block_number)
|
Some(block_number)
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
/// Shared utilities for block sources
|
//! Shared utilities for block sources
|
||||||
|
|
||||||
/// Finds the file/directory with the largest number in its name from a list of files
|
/// Finds the file/directory with the largest number in its name from a list of files
|
||||||
pub fn name_with_largest_number(files: &[String], is_dir: bool) -> Option<(u64, String)> {
|
pub fn name_with_largest_number(files: &[String], is_dir: bool) -> Option<(u64, String)> {
|
||||||
|
|||||||
Reference in New Issue
Block a user